Secret Manager v1 API - Class SecretManagerService.SecretManagerServiceClient (2.3.0)

public class SecretManagerService.SecretManagerServiceClient : ClientBase<SecretManagerService.SecretManagerServiceClient>

Reference documentation and code samples for the Secret Manager v1 API class SecretManagerService.SecretManagerServiceClient.

Client for SecretManagerService

Inheritance

object > ClientBase > ClientBaseSecretManagerServiceSecretManagerServiceClient > SecretManagerService.SecretManagerServiceClient

Namespace

Google.Cloud.SecretManager.V1

Assembly

Google.Cloud.SecretManager.V1.dll

Constructors

SecretManagerServiceClient()

protected SecretManagerServiceClient()

Protected parameterless constructor to allow creation of test doubles.

SecretManagerServiceClient(CallInvoker)

public SecretManagerServiceClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

SecretManagerServiceClient(ChannelBase)

public SecretManagerServiceClient(ChannelBase channel)

Creates a new client for SecretManagerService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

SecretManagerServiceClient(ClientBaseConfiguration)

protected SecretManagerServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

AccessSecretVersion(AccessSecretVersionRequest, CallOptions)

public virtual AccessSecretVersionResponse AccessSecretVersion(AccessSecretVersionRequest request, CallOptions options)

Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestAccessSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AccessSecretVersionResponse

The response received from the server.

AccessSecretVersion(AccessSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AccessSecretVersionResponse AccessSecretVersion(AccessSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestAccessSecretVersionRequest

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
AccessSecretVersionResponse

The response received from the server.

AccessSecretVersionAsync(AccessSecretVersionRequest, CallOptions)

public virtual AsyncUnaryCall<AccessSecretVersionResponse> AccessSecretVersionAsync(AccessSecretVersionRequest request, CallOptions options)

Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestAccessSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAccessSecretVersionResponse

The call object.

AccessSecretVersionAsync(AccessSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AccessSecretVersionResponse> AccessSecretVersionAsync(AccessSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestAccessSecretVersionRequest

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
AsyncUnaryCallAccessSecretVersionResponse

The call object.

AddSecretVersion(AddSecretVersionRequest, CallOptions)

public virtual SecretVersion AddSecretVersion(AddSecretVersionRequest request, CallOptions options)

Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches it to an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestAddSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SecretVersion

The response received from the server.

AddSecretVersion(AddSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual SecretVersion AddSecretVersion(AddSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches it to an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestAddSecretVersionRequest

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
SecretVersion

The response received from the server.

AddSecretVersionAsync(AddSecretVersionRequest, CallOptions)

public virtual AsyncUnaryCall<SecretVersion> AddSecretVersionAsync(AddSecretVersionRequest request, CallOptions options)

Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches it to an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestAddSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecretVersion

The call object.

AddSecretVersionAsync(AddSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SecretVersion> AddSecretVersionAsync(AddSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches it to an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestAddSecretVersionRequest

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
AsyncUnaryCallSecretVersion

The call object.

CreateSecret(CreateSecretRequest, CallOptions)

public virtual Secret CreateSecret(CreateSecretRequest request, CallOptions options)

Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestCreateSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Secret

The response received from the server.

CreateSecret(CreateSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual Secret CreateSecret(CreateSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestCreateSecretRequest

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
Secret

The response received from the server.

CreateSecretAsync(CreateSecretRequest, CallOptions)

public virtual AsyncUnaryCall<Secret> CreateSecretAsync(CreateSecretRequest request, CallOptions options)

Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestCreateSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecret

The call object.

CreateSecretAsync(CreateSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Secret> CreateSecretAsync(CreateSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestCreateSecretRequest

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
AsyncUnaryCallSecret

The call object.

DeleteSecret(DeleteSecretRequest, CallOptions)

public virtual Empty DeleteSecret(DeleteSecretRequest request, CallOptions options)

Deletes a [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestDeleteSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteSecret(DeleteSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteSecret(DeleteSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestDeleteSecretRequest

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
Empty

The response received from the server.

DeleteSecretAsync(DeleteSecretRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteSecretAsync(DeleteSecretRequest request, CallOptions options)

Deletes a [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestDeleteSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteSecretAsync(DeleteSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteSecretAsync(DeleteSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestDeleteSecretRequest

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
AsyncUnaryCallEmpty

The call object.

DestroySecretVersion(DestroySecretVersionRequest, CallOptions)

public virtual SecretVersion DestroySecretVersion(DestroySecretVersionRequest request, CallOptions options)

Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the secret data.

Parameters
NameDescription
requestDestroySecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SecretVersion

The response received from the server.

DestroySecretVersion(DestroySecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual SecretVersion DestroySecretVersion(DestroySecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the secret data.

Parameters
NameDescription
requestDestroySecretVersionRequest

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
SecretVersion

The response received from the server.

DestroySecretVersionAsync(DestroySecretVersionRequest, CallOptions)

public virtual AsyncUnaryCall<SecretVersion> DestroySecretVersionAsync(DestroySecretVersionRequest request, CallOptions options)

Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the secret data.

Parameters
NameDescription
requestDestroySecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecretVersion

The call object.

DestroySecretVersionAsync(DestroySecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SecretVersion> DestroySecretVersionAsync(DestroySecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the secret data.

Parameters
NameDescription
requestDestroySecretVersionRequest

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
AsyncUnaryCallSecretVersion

The call object.

DisableSecretVersion(DisableSecretVersionRequest, CallOptions)

public virtual SecretVersion DisableSecretVersion(DisableSecretVersionRequest request, CallOptions options)

Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED].

Parameters
NameDescription
requestDisableSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SecretVersion

The response received from the server.

DisableSecretVersion(DisableSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual SecretVersion DisableSecretVersion(DisableSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED].

Parameters
NameDescription
requestDisableSecretVersionRequest

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
SecretVersion

The response received from the server.

DisableSecretVersionAsync(DisableSecretVersionRequest, CallOptions)

public virtual AsyncUnaryCall<SecretVersion> DisableSecretVersionAsync(DisableSecretVersionRequest request, CallOptions options)

Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED].

Parameters
NameDescription
requestDisableSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecretVersion

The call object.

DisableSecretVersionAsync(DisableSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SecretVersion> DisableSecretVersionAsync(DisableSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED].

Parameters
NameDescription
requestDisableSecretVersionRequest

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
AsyncUnaryCallSecretVersion

The call object.

EnableSecretVersion(EnableSecretVersionRequest, CallOptions)

public virtual SecretVersion EnableSecretVersion(EnableSecretVersionRequest request, CallOptions options)

Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED].

Parameters
NameDescription
requestEnableSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SecretVersion

The response received from the server.

EnableSecretVersion(EnableSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual SecretVersion EnableSecretVersion(EnableSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED].

Parameters
NameDescription
requestEnableSecretVersionRequest

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
SecretVersion

The response received from the server.

EnableSecretVersionAsync(EnableSecretVersionRequest, CallOptions)

public virtual AsyncUnaryCall<SecretVersion> EnableSecretVersionAsync(EnableSecretVersionRequest request, CallOptions options)

Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED].

Parameters
NameDescription
requestEnableSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecretVersion

The call object.

EnableSecretVersionAsync(EnableSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SecretVersion> EnableSecretVersionAsync(EnableSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED].

Parameters
NameDescription
requestEnableSecretVersionRequest

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
AsyncUnaryCallSecretVersion

The call object.

GetIamPolicy(GetIamPolicyRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallOptions options)

Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

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
Policy

The response received from the server.

GetIamPolicyAsync(GetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallOptions options)

Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

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
AsyncUnaryCallPolicy

The call object.

GetSecret(GetSecretRequest, CallOptions)

public virtual Secret GetSecret(GetSecretRequest request, CallOptions options)

Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestGetSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Secret

The response received from the server.

GetSecret(GetSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual Secret GetSecret(GetSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestGetSecretRequest

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
Secret

The response received from the server.

GetSecretAsync(GetSecretRequest, CallOptions)

public virtual AsyncUnaryCall<Secret> GetSecretAsync(GetSecretRequest request, CallOptions options)

Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestGetSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecret

The call object.

GetSecretAsync(GetSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Secret> GetSecretAsync(GetSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestGetSecretRequest

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
AsyncUnaryCallSecret

The call object.

GetSecretVersion(GetSecretVersionRequest, CallOptions)

public virtual SecretVersion GetSecretVersion(GetSecretVersionRequest request, CallOptions options)

Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestGetSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SecretVersion

The response received from the server.

GetSecretVersion(GetSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual SecretVersion GetSecretVersion(GetSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestGetSecretVersionRequest

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
SecretVersion

The response received from the server.

GetSecretVersionAsync(GetSecretVersionRequest, CallOptions)

public virtual AsyncUnaryCall<SecretVersion> GetSecretVersionAsync(GetSecretVersionRequest request, CallOptions options)

Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestGetSecretVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecretVersion

The call object.

GetSecretVersionAsync(GetSecretVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SecretVersion> GetSecretVersionAsync(GetSecretVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

projects/*/secrets/*/versions/latest is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

Parameters
NameDescription
requestGetSecretVersionRequest

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
AsyncUnaryCallSecretVersion

The call object.

ListSecretVersions(ListSecretVersionsRequest, CallOptions)

public virtual ListSecretVersionsResponse ListSecretVersions(ListSecretVersionsRequest request, CallOptions options)

Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret data.

Parameters
NameDescription
requestListSecretVersionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListSecretVersionsResponse

The response received from the server.

ListSecretVersions(ListSecretVersionsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListSecretVersionsResponse ListSecretVersions(ListSecretVersionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret data.

Parameters
NameDescription
requestListSecretVersionsRequest

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
ListSecretVersionsResponse

The response received from the server.

ListSecretVersionsAsync(ListSecretVersionsRequest, CallOptions)

public virtual AsyncUnaryCall<ListSecretVersionsResponse> ListSecretVersionsAsync(ListSecretVersionsRequest request, CallOptions options)

Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret data.

Parameters
NameDescription
requestListSecretVersionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListSecretVersionsResponse

The call object.

ListSecretVersionsAsync(ListSecretVersionsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListSecretVersionsResponse> ListSecretVersionsAsync(ListSecretVersionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret data.

Parameters
NameDescription
requestListSecretVersionsRequest

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
AsyncUnaryCallListSecretVersionsResponse

The call object.

ListSecrets(ListSecretsRequest, CallOptions)

public virtual ListSecretsResponse ListSecrets(ListSecretsRequest request, CallOptions options)

Lists [Secrets][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestListSecretsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListSecretsResponse

The response received from the server.

ListSecrets(ListSecretsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListSecretsResponse ListSecrets(ListSecretsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [Secrets][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestListSecretsRequest

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
ListSecretsResponse

The response received from the server.

ListSecretsAsync(ListSecretsRequest, CallOptions)

public virtual AsyncUnaryCall<ListSecretsResponse> ListSecretsAsync(ListSecretsRequest request, CallOptions options)

Lists [Secrets][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestListSecretsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListSecretsResponse

The call object.

ListSecretsAsync(ListSecretsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListSecretsResponse> ListSecretsAsync(ListSecretsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [Secrets][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestListSecretsRequest

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
AsyncUnaryCallListSecretsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override SecretManagerService.SecretManagerServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
SecretManagerServiceSecretManagerServiceClient
Overrides

SetIamPolicy(SetIamPolicyRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallOptions options)

Sets the access control policy on the specified secret. Replaces any existing policy.

Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy on the specified secret. Replaces any existing policy.

Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestSetIamPolicyRequest

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
Policy

The response received from the server.

SetIamPolicyAsync(SetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallOptions options)

Sets the access control policy on the specified secret. Replaces any existing policy.

Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy on the specified secret. Replaces any existing policy.

Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestSetIamPolicyRequest

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
AsyncUnaryCallPolicy

The call object.

TestIamPermissions(TestIamPermissionsRequest, CallOptions)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallOptions options)

Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
TestIamPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestTestIamPermissionsRequest

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
TestIamPermissionsResponse

The response received from the server.

TestIamPermissionsAsync(TestIamPermissionsRequest, CallOptions)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallOptions options)

Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallTestIamPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestTestIamPermissionsRequest

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
AsyncUnaryCallTestIamPermissionsResponse

The call object.

UpdateSecret(UpdateSecretRequest, CallOptions)

public virtual Secret UpdateSecret(UpdateSecretRequest request, CallOptions options)

Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestUpdateSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Secret

The response received from the server.

UpdateSecret(UpdateSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual Secret UpdateSecret(UpdateSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestUpdateSecretRequest

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
Secret

The response received from the server.

UpdateSecretAsync(UpdateSecretRequest, CallOptions)

public virtual AsyncUnaryCall<Secret> UpdateSecretAsync(UpdateSecretRequest request, CallOptions options)

Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestUpdateSecretRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSecret

The call object.

UpdateSecretAsync(UpdateSecretRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Secret> UpdateSecretAsync(UpdateSecretRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret].

Parameters
NameDescription
requestUpdateSecretRequest

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
AsyncUnaryCallSecret

The call object.