class ProjectsServiceAccounts extends Resource (View source)

The "serviceAccounts" collection of methods.

Typical usage is:

 $iamcredentialsService = new Google\Service\IAMCredentials(...);
 $serviceAccounts = $iamcredentialsService->projects_serviceAccounts;

Methods

generateAccessToken(string $name, GenerateAccessTokenRequest $postBody, array $optParams = [])

Generates an OAuth 2.0 access token for a service account.

generateIdToken(string $name, GenerateIdTokenRequest $postBody, array $optParams = [])

Generates an OpenID Connect ID token for a service account.

signBlob(string $name, SignBlobRequest $postBody, array $optParams = [])

Signs a blob using a service account's system-managed private key.

signJwt(string $name, SignJwtRequest $postBody, array $optParams = [])

Signs a JWT using a service account's system-managed private key.

Details

GenerateAccessTokenResponse generateAccessToken(string $name, GenerateAccessTokenRequest $postBody, array $optParams = [])

Generates an OAuth 2.0 access token for a service account.

(serviceAccounts.generateAccessToken)

Parameters

string $name

Required. The resource name of the service account for which the credentials are requested, in the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

GenerateAccessTokenRequest $postBody
array $optParams

Optional parameters.

Return Value

GenerateAccessTokenResponse

Exceptions

Exception

GenerateIdTokenResponse generateIdToken(string $name, GenerateIdTokenRequest $postBody, array $optParams = [])

Generates an OpenID Connect ID token for a service account.

(serviceAccounts.generateIdToken)

Parameters

string $name

Required. The resource name of the service account for which the credentials are requested, in the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

GenerateIdTokenRequest $postBody
array $optParams

Optional parameters.

Return Value

GenerateIdTokenResponse

Exceptions

Exception

SignBlobResponse signBlob(string $name, SignBlobRequest $postBody, array $optParams = [])

Signs a blob using a service account's system-managed private key.

(serviceAccounts.signBlob)

Parameters

string $name

Required. The resource name of the service account for which the credentials are requested, in the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

SignBlobRequest $postBody
array $optParams

Optional parameters.

Return Value

SignBlobResponse

Exceptions

Exception

SignJwtResponse signJwt(string $name, SignJwtRequest $postBody, array $optParams = [])

Signs a JWT using a service account's system-managed private key.

(serviceAccounts.signJwt)

Parameters

string $name

Required. The resource name of the service account for which the credentials are requested, in the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

SignJwtRequest $postBody
array $optParams

Optional parameters.

Return Value

SignJwtResponse

Exceptions

Exception