IAM Service Account Credentials v1 API - Class IAMCredentials.IAMCredentialsClient (2.2.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

IAMCredentialsClient(ChannelBase)

public IAMCredentialsClient(ChannelBase channel)

Creates a new client for IAMCredentials

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

IAMCredentialsClient(ClientBaseConfiguration)

protected IAMCredentialsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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
NameDescription
requestGenerateAccessTokenRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGenerateAccessTokenRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGenerateAccessTokenRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGenerateAccessTokenRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGenerateIdTokenRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGenerateIdTokenRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGenerateIdTokenRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGenerateIdTokenRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallGenerateIdTokenResponse

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
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
NameDescription
requestSignBlobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSignBlobRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSignBlobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSignBlobRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSignJwtRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSignJwtRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSignJwtRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSignJwtRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallSignJwtResponse

The call object.