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 updateMask should be used to specify the fields being updated.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eThis content describes how to update an Attribute resource in API Hub, specifically focusing on modifiable fields and update procedures.\u003c/p\u003e\n"],["\u003cp\u003eUpdatable fields for user-defined attributes include \u003ccode\u003edisplay_name\u003c/code\u003e, \u003ccode\u003edescription\u003c/code\u003e, and \u003ccode\u003ecardinality\u003c/code\u003e, while both user-defined and system-defined attributes can have their \u003ccode\u003eallowed_values\u003c/code\u003e modified.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eupdateMask\u003c/code\u003e query parameter is mandatory and is used to specify which fields within the Attribute resource are being modified during the update.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request for updating an Attribute uses the \u003ccode\u003ePATCH\u003c/code\u003e method with a URL that includes the attribute's name, and it requires specific OAuth scopes and IAM permissions.\u003c/p\u003e\n"],["\u003cp\u003eThe request body contains the new attribute, while the response body, if successful, returns the updated attribute.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.attributes.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nUpdate the attribute. The following fields in the [Attribute resource](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute) can be updated:\n\n- [display_name](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute.FIELDS.display_name) The display name can be updated for user defined attributes only.\n- [description](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute.FIELDS.description) The description can be updated for user defined attributes only.\n- [allowed_values](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute.FIELDS.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.\n- [cardinality](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute.FIELDS.cardinality) The cardinality can be updated for user defined attributes only. Cardinality can only be increased during an update.\n\nThe [updateMask](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes/patch#body.QUERY_PARAMETERS.update_mask) should be used to specify the fields being updated.\n\n### HTTP request\n\n`PATCH https://apihub.googleapis.com/v1/{attribute.name=projects/*/locations/*/attributes/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Attribute](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute).\n\n### Response body\n\nIf successful, the response body contains an instance of [Attribute](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `apihub.attributes.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]