Google Identity and Access Management API . projects . serviceAccounts . keys

Instance Methods

create(name, body, x__xgafv=None)

Creates a service account key and returns it.

delete(name, x__xgafv=None)

Deletes a service account key.

get(name, x__xgafv=None)

Gets the ServiceAccountKey by key id.

list(name, keyTypes=None, x__xgafv=None)

Lists service account keys

Method Details

create(name, body, x__xgafv=None)
Creates a service account key and returns it.

Args:
  name: string, The resource name of the service account in the format "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # The service account key create request.
    "privateKeyType": "A String", # The type of the key requested. GOOGLE_CREDENTIALS is the default key type.
  }

  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # Represents a service account key. A service account can have 0 or more key pairs. The private keys for these are not stored by Google. ServiceAccountKeys are immutable.
    "privateKeyType": "A String", # The type of the private key.
    "privateKeyData": "A String", # The key data.
    "validBeforeTime": "A String", # The key can be used before this timestamp.
    "name": "A String", # The resource name of the service account key in the format "projects/{project}/serviceAccounts/{email}/keys/{key}".
    "validAfterTime": "A String", # The key can be used after this timestamp.
  }
delete(name, x__xgafv=None)
Deletes a service account key.

Args:
  name: string, The resource name of the service account key in the format "projects/{project}/serviceAccounts/{account}/keys/{key}". Using '-' as a wildcard for the project will infer the project from the account. The account value can be the email address or the unique_id of the service account. (required)
  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
  }
get(name, x__xgafv=None)
Gets the ServiceAccountKey by key id.

Args:
  name: string, The resource name of the service account key in the format "projects/{project}/serviceAccounts/{account}/keys/{key}". Using '-' as a wildcard for the project will infer the project from the account. The account value can be the email address or the unique_id of the service account. (required)
  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # Represents a service account key. A service account can have 0 or more key pairs. The private keys for these are not stored by Google. ServiceAccountKeys are immutable.
    "privateKeyType": "A String", # The type of the private key.
    "privateKeyData": "A String", # The key data.
    "validBeforeTime": "A String", # The key can be used before this timestamp.
    "name": "A String", # The resource name of the service account key in the format "projects/{project}/serviceAccounts/{email}/keys/{key}".
    "validAfterTime": "A String", # The key can be used after this timestamp.
  }
list(name, keyTypes=None, x__xgafv=None)
Lists service account keys

Args:
  name: string, The resource name of the service account in the format "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account. (required)
  keyTypes: string, The type of keys the user wants to list. If empty, all key types are included in the response. Duplicate key types are not allowed. (repeated)
  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # The service account keys list response.
    "keys": [ # The public keys for the service account.
      { # Represents a service account key. A service account can have 0 or more key pairs. The private keys for these are not stored by Google. ServiceAccountKeys are immutable.
        "privateKeyType": "A String", # The type of the private key.
        "privateKeyData": "A String", # The key data.
        "validBeforeTime": "A String", # The key can be used before this timestamp.
        "name": "A String", # The resource name of the service account key in the format "projects/{project}/serviceAccounts/{email}/keys/{key}".
        "validAfterTime": "A String", # The key can be used after this timestamp.
      },
    ],
  }