# Google Play EMM API . serviceaccountkeys

## Instance Methods

Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.

Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.

Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.

### Method Details

`delete(enterpriseId, keyId)`

    Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)
      keyId: string, The ID of the key. (required)

`insert(enterpriseId, body)`

    Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.

    Only the type of the key should be populated in the resource to be inserted.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Credentials that can be used to authenticate as a service account.
      "type": "A String", # The file format of the generated key data.
      "kind": "androidenterprise#serviceAccountKey", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccountKey".
      "data": "A String", # The body of the private key credentials file, in string format. This is only populated when the ServiceAccountKey is created, and is not stored by Google.
      "id": "A String", # An opaque, unique identifier for this ServiceAccountKey. Assigned by the server.
    }

    Returns:
      An object of the form:

        { # Credentials that can be used to authenticate as a service account.
        "type": "A String", # The file format of the generated key data.
        "kind": "androidenterprise#serviceAccountKey", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccountKey".
        "data": "A String", # The body of the private key credentials file, in string format. This is only populated when the ServiceAccountKey is created, and is not stored by Google.
        "id": "A String", # An opaque, unique identifier for this ServiceAccountKey. Assigned by the server.
      }

`list(enterpriseId)`

    Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)

    Returns:
      An object of the form:

        {
        "serviceAccountKey": [ # The service account credentials.
          { # Credentials that can be used to authenticate as a service account.
            "type": "A String", # The file format of the generated key data.
            "kind": "androidenterprise#serviceAccountKey", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccountKey".
            "data": "A String", # The body of the private key credentials file, in string format. This is only populated when the ServiceAccountKey is created, and is not stored by Google.
            "id": "A String", # An opaque, unique identifier for this ServiceAccountKey. Assigned by the server.
          },
        ],
      }