IAM Service Account Credentials v1 API - Class IAMCredentials.IAMCredentialsClient (2.3.0)

public class IAMCredentials.IAMCredentialsClient : ClientBase<IAMCredentials.IAMCredentialsClient>

Reference documentation and code samples for the IAM Service Account Credentials v1 API class IAMCredentials.IAMCredentialsClient.

Client for IAMCredentials

Inheritance

object > ClientBase > ClientBaseIAMCredentialsIAMCredentialsClient > IAMCredentials.IAMCredentialsClient

Namespace

Google.Cloud.Iam.Credentials.V1

Assembly

Google.Cloud.Iam.Credentials.V1.dll

Constructors

IAMCredentialsClient()

protected IAMCredentialsClient()

Protected parameterless constructor to allow creation of test doubles.

IAMCredentialsClient(CallInvoker)

public IAMCredentialsClient(CallInvoker callInvoker)

Creates a new client for IAMCredentials that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

IAMCredentialsClient(ChannelBase)

public IAMCredentialsClient(ChannelBase channel)

Creates a new client for IAMCredentials

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

IAMCredentialsClient(ClientBaseConfiguration)

protected IAMCredentialsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

GenerateAccessToken(GenerateAccessTokenRequest, CallOptions)

public virtual GenerateAccessTokenResponse GenerateAccessToken(GenerateAccessTokenRequest request, CallOptions options)

Generates an OAuth 2.0 access token for a service account.

Parameters
Name Description
request GenerateAccessTokenRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
GenerateAccessTokenResponse

The response received from the server.

GenerateAccessToken(GenerateAccessTokenRequest, Metadata, DateTime?, CancellationToken)

public virtual GenerateAccessTokenResponse GenerateAccessToken(GenerateAccessTokenRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Generates an OAuth 2.0 access token for a service account.

Parameters
Name Description
request GenerateAccessTokenRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
GenerateAccessTokenResponse

The response received from the server.

GenerateAccessTokenAsync(GenerateAccessTokenRequest, CallOptions)

public virtual AsyncUnaryCall<GenerateAccessTokenResponse> GenerateAccessTokenAsync(GenerateAccessTokenRequest request, CallOptions options)

Generates an OAuth 2.0 access token for a service account.

Parameters
Name Description
request GenerateAccessTokenRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallGenerateAccessTokenResponse

The call object.

GenerateAccessTokenAsync(GenerateAccessTokenRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<GenerateAccessTokenResponse> GenerateAccessTokenAsync(GenerateAccessTokenRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Generates an OAuth 2.0 access token for a service account.

Parameters
Name Description
request GenerateAccessTokenRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallGenerateAccessTokenResponse

The call object.

GenerateIdToken(GenerateIdTokenRequest, CallOptions)

public virtual GenerateIdTokenResponse GenerateIdToken(GenerateIdTokenRequest request, CallOptions options)

Generates an OpenID Connect ID token for a service account.

Parameters
Name Description
request GenerateIdTokenRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
GenerateIdTokenResponse

The response received from the server.

GenerateIdToken(GenerateIdTokenRequest, Metadata, DateTime?, CancellationToken)

public virtual GenerateIdTokenResponse GenerateIdToken(GenerateIdTokenRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Generates an OpenID Connect ID token for a service account.

Parameters
Name Description
request GenerateIdTokenRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
GenerateIdTokenResponse

The response received from the server.

GenerateIdTokenAsync(GenerateIdTokenRequest, CallOptions)

public virtual AsyncUnaryCall<GenerateIdTokenResponse> GenerateIdTokenAsync(GenerateIdTokenRequest request, CallOptions options)

Generates an OpenID Connect ID token for a service account.

Parameters
Name Description
request GenerateIdTokenRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallGenerateIdTokenResponse

The call object.

GenerateIdTokenAsync(GenerateIdTokenRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<GenerateIdTokenResponse> GenerateIdTokenAsync(GenerateIdTokenRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Generates an OpenID Connect ID token for a service account.

Parameters
Name Description
request GenerateIdTokenRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallGenerateIdTokenResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override IAMCredentials.IAMCredentialsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
IAMCredentialsIAMCredentialsClient
Overrides

SignBlob(SignBlobRequest, CallOptions)

public virtual SignBlobResponse SignBlob(SignBlobRequest request, CallOptions options)

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

Parameters
Name Description
request SignBlobRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
SignBlobResponse

The response received from the server.

SignBlob(SignBlobRequest, Metadata, DateTime?, CancellationToken)

public virtual SignBlobResponse SignBlob(SignBlobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SignBlobRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
SignBlobResponse

The response received from the server.

SignBlobAsync(SignBlobRequest, CallOptions)

public virtual AsyncUnaryCall<SignBlobResponse> SignBlobAsync(SignBlobRequest request, CallOptions options)

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

Parameters
Name Description
request SignBlobRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSignBlobResponse

The call object.

SignBlobAsync(SignBlobRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SignBlobResponse> SignBlobAsync(SignBlobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SignBlobRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSignBlobResponse

The call object.

SignJwt(SignJwtRequest, CallOptions)

public virtual SignJwtResponse SignJwt(SignJwtRequest request, CallOptions options)

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

Parameters
Name Description
request SignJwtRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
SignJwtResponse

The response received from the server.

SignJwt(SignJwtRequest, Metadata, DateTime?, CancellationToken)

public virtual SignJwtResponse SignJwt(SignJwtRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SignJwtRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
SignJwtResponse

The response received from the server.

SignJwtAsync(SignJwtRequest, CallOptions)

public virtual AsyncUnaryCall<SignJwtResponse> SignJwtAsync(SignJwtRequest request, CallOptions options)

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

Parameters
Name Description
request SignJwtRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSignJwtResponse

The call object.

SignJwtAsync(SignJwtRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SignJwtResponse> SignJwtAsync(SignJwtRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SignJwtRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSignJwtResponse

The call object.