Method: projects.serviceAccounts.patch

Patches a ServiceAccount.

Currently, only the following fields are updatable: displayName and description.

Only fields specified in the request are guaranteed to be returned in the response. Other fields in the response may be empty.

Note: The field mask is required.

This method is currently in the beta launch stage.

HTTP request

PATCH https://iam.googleapis.com/v1/{serviceAccount.name=projects/*/serviceAccounts/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
serviceAccount.name

string

The resource name of the service account in the following format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}.

Requests using - as a wildcard for the PROJECT_ID will infer the project from the account and the ACCOUNT value can be the email address or the uniqueId of the service account.

In responses the resource name will always be in the format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "serviceAccount": {
    "name": string,
    "projectId": string,
    "uniqueId": string,
    "email": string,
    "displayName": string,
    "etag": string,
    "description": string,
    "oauth2ClientId": string,
    "disabled": boolean
  },
  "updateMask": string
}
Fields
serviceAccount.projectId

string

The id of the project that owns the service account.

Note: This field is used in responses only. Any value specified here in a request is ignored.

serviceAccount.uniqueId

string

The unique and stable id of the service account.

Note: This field is used in responses only. Any value specified here in a request is ignored.

serviceAccount.email

string

The email address of the service account.

Note: This field is used in responses only. Any value specified here in a request is ignored.

serviceAccount.displayName

string

Optional. A user-specified name for the service account. Must be less than or equal to 100 UTF-8 bytes.

serviceAccount.etag

string (bytes format)

Optional. Note: etag is an inoperable legacy field that is only returned for backwards compatibility.

A base64-encoded string.

serviceAccount.description

string

Optional. A user-specified opaque description of the service account. Must be less than or equal to 256 UTF-8 bytes.

serviceAccount.oauth2ClientId

string

The OAuth2 client id for the service account. This is used in conjunction with the OAuth2 clientconfig API to make three legged OAuth2 (3LO) flows to access the data of Google users.

Note: This field is used in responses only. Any value specified here in a request is ignored.

serviceAccount.disabled

boolean

A bool indicate if the service account is disabled. The field is currently in alpha phase.

Note: This field is used in responses only. Any value specified here in a request is ignored.

updateMask

string (FieldMask format)

A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Response body

If successful, the response body contains an instance of ServiceAccount.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/iam
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Bu sayfayı yararlı buldunuz mu? Lütfen görüşünüzü bildirin:

Şunun hakkında geri bildirim gönderin...