projects

PATCH /v1/projects/{projectsId}/locations/{locationsId}/attributes/{attributesId}

Changed on

Update the attribute. The following fields in the Attribute resource can be updated: * display_name The display name can be updated for user defined attributes only. * description The description can be updated for user defined attributes only. * allowed_values To update the list of allowed values, clients need to use the fetched list of allowed values and add or remove values to or from the same list. The mutable allowed values can be updated for both user defined and System defined attributes. The immutable allowed values cannot be updated or deleted. The updated list of allowed values cannot be empty. If an allowed value that is already used by some resource's attribute is deleted, then the association between the resource and the attribute value will also be deleted. * cardinality The cardinality can be updated for user defined attributes only. Cardinality can only be increased during an update. The update_mask should be used to specify the fields being updated.

Request

  • Base URL
    https://apihub.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/apihub.readwrite
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/apihub.readwrite
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/cloud-platform
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/cloud-platform
  • TypeScript

Path parameters

projectsIdstring required
locationsIdstring required
attributesIdstring required

Query parameters

updateMaskstring google-fieldmask

Required. The list of fields to update.

Request body

cardinalityinteger

Optional. The maximum number of values that the attribute can have when associated with an API Hub resource. Cardinality 1 would represent a single-valued attribute. It must not be less than 1 or greater than 20. If not specified, the cardinality would be set to 1 by default and represent a single-valued attribute.

createTimestring google-datetime

Output only. The time at which the attribute was created.

dataType'DATA_TYPE_UNSPECIFIED' | 'ENUM' | 'JSON' | 'STRING' | 'URI'

Required. The type of the data of the attribute.

definitionType'DEFINITION_TYPE_UNSPECIFIED' | 'SYSTEM_DEFINED' | 'USER_DEFINED'

Output only. The definition type of the attribute.

descriptionstring

Optional. The description of the attribute.

displayNamestring

Required. The display name of the attribute.

mandatoryboolean

Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.

namestring

Identifier. The name of the attribute in the API Hub. Format: projects/{project}/locations/{location}/attributes/{attribute}

scope'SCOPE_UNSPECIFIED' | 'API' | 'VERSION' | 'SPEC' | 'API_OPERATION' | 'DEPLOYMENT' | 'DEPENDENCY' | 'DEFINITION' | 'EXTERNAL_API' | 'PLUGIN'

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

updateTimestring google-datetime

Output only. The time at which the attribute was last updated.

Response

Successful response

cardinalityinteger

Optional. The maximum number of values that the attribute can have when associated with an API Hub resource. Cardinality 1 would represent a single-valued attribute. It must not be less than 1 or greater than 20. If not specified, the cardinality would be set to 1 by default and represent a single-valued attribute.

createTimestring google-datetime

Output only. The time at which the attribute was created.

dataType'DATA_TYPE_UNSPECIFIED' | 'ENUM' | 'JSON' | 'STRING' | 'URI'

Required. The type of the data of the attribute.

definitionType'DEFINITION_TYPE_UNSPECIFIED' | 'SYSTEM_DEFINED' | 'USER_DEFINED'

Output only. The definition type of the attribute.

descriptionstring

Optional. The description of the attribute.

displayNamestring

Required. The display name of the attribute.

mandatoryboolean

Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.

namestring

Identifier. The name of the attribute in the API Hub. Format: projects/{project}/locations/{location}/attributes/{attribute}

scope'SCOPE_UNSPECIFIED' | 'API' | 'VERSION' | 'SPEC' | 'API_OPERATION' | 'DEPLOYMENT' | 'DEPENDENCY' | 'DEFINITION' | 'EXTERNAL_API' | 'PLUGIN'

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

updateTimestring google-datetime

Output only. The time at which the attribute was last updated.

Changes

    • info

      the security scope https://www.googleapis.com/auth/apihub.readwrite was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/apihub.readwrite was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was removed from the endpoint's security scheme Oauth2c