Output only. The resource name of the key. Thenamehas the form:projects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>. For example:projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2
NOTE: Key is a global resource; hence the only supported value for location isglobal.
The field mask specifies which fields to be updated as part of this request. All other fields are ignored. Mutable fields are:displayName,restrictions, andannotations. If an update mask is not provided, the service treats it as an implied mask equivalent to all allowed fields that are set on the wire. If the field mask has a special value "*", the service treats it equivalent to replace all allowed mutable fields.
This is a comma-separated list of fully qualified names of fields. Example:"user.displayName,photo".
[[["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-06-26 UTC."],[[["\u003cp\u003eThis API call patches modifiable fields of an API key, excluding the key string itself from the response.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request method is \u003ccode\u003ePATCH\u003c/code\u003e and uses gRPC Transcoding syntax with a URL structure that requires specifying the key's resource name.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekey.name\u003c/code\u003e path parameter is mandatory, and it follows the format \u003ccode\u003eprojects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>\u003c/code\u003e, noting that only \u003ccode\u003eglobal\u003c/code\u003e is a supported location.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eupdateMask\u003c/code\u003e query parameter determines which fields are updated in the request, with mutable fields being \u003ccode\u003edisplayName\u003c/code\u003e, \u003ccode\u003erestrictions\u003c/code\u003e, and \u003ccode\u003eannotations\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful calls return an \u003ccode\u003eOperation\u003c/code\u003e instance, and it needs \u003ccode\u003eapikeys.keys.update\u003c/code\u003e IAM permission along with OAuth scope: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.keys.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- [Try it!](#try-it)\n\nPatches the modifiable fields of an API key. The key string of the API key isn't included in the response.\n\nNOTE: Key is a global resource; hence the only supported value for location is `global`.\n\n### HTTP request\n\n`PATCH https://apikeys.googleapis.com/v2/{key.name=projects/*/locations/*/keys/*}`\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 [Key](/api-keys/docs/reference/rest/v2/projects.locations.keys#Key).\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/api-keys/docs/reference/rest/v2/operations#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `apikeys.keys.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]