projects

Patches the modifiable fields of an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is global.

patch/v2/{+name}

Request

  • Base URL
    https://apikeys.googleapis.com
  • URL
    https://apikeys.googleapis.com/v2/{+name}
  • Auth
    • OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/apikeys
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/apikeys
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/cloud-platform
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform

Path parameters

namestring required

Identifier. The resource name of the key. The name has the form: projects//locations/global/keys/. 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 is global.

Query parameters

checkExistingUsage'CHECK_EXISTING_USAGE_UNSPECIFIED' | 'SKIP' | 'CHECK'

Optional. Defines the behavior for checking existing usage when updating a key.

updateMaskstring

The field mask specifies which fields to be updated as part of this request. All other fields are ignored. Mutable fields are: display_name, restrictions, and annotations. 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.

Request body

annotationsobject

Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.

createTimestring google-datetime

Output only. A timestamp identifying the time this key was originally created.

deleteTimestring google-datetime

Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.

displayNamestring

Human-readable display name of this key that you can modify. The maximum length is 63 characters.

etagstring

A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.

keyStringstring

Output only. An encrypted and signed value held by this key. This field can be accessed only through the GetKeyString method.

namestring

Identifier. The resource name of the key. The name has the form: projects//locations/global/keys/. 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 is global.

serviceAccountEmailstring

Optional. The email address of the service account the key is bound to.

uidstring

Output only. Unique id in UUID4 format.

updateTimestring google-datetime

Output only. A timestamp identifying the time this key was last updated.

Response

Successful response

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

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

    • info

      the security scope https://www.googleapis.com/auth/apikeys 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

    • info

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

    • info

      the security scope https://www.googleapis.com/auth/apikeys 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

    • info

      added the new optional query request parameter checkExistingUsage