Secret Manager v1 API - Class SecretManagerService.SecretManagerServiceBase (2.2.0)

[BindServiceMethod(typeof(SecretManagerService), "BindService")]
public abstract class SecretManagerService.SecretManagerServiceBase

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

Base class for server-side implementations of SecretManagerService

Inheritance

object > SecretManagerService.SecretManagerServiceBase

Namespace

Google.Cloud.SecretManager.V1

Assembly

Google.Cloud.SecretManager.V1.dll

Methods

AccessSecretVersion(AccessSecretVersionRequest, ServerCallContext)

public virtual Task<AccessSecretVersionResponse> AccessSecretVersion(AccessSecretVersionRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAccessSecretVersionResponse

The response to send back to the client (wrapped by a task).

AddSecretVersion(AddSecretVersionRequest, ServerCallContext)

public virtual Task<SecretVersion> AddSecretVersion(AddSecretVersionRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecretVersion

The response to send back to the client (wrapped by a task).

CreateSecret(CreateSecretRequest, ServerCallContext)

public virtual Task<Secret> CreateSecret(CreateSecretRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestCreateSecretRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecret

The response to send back to the client (wrapped by a task).

DeleteSecret(DeleteSecretRequest, ServerCallContext)

public virtual Task<Empty> DeleteSecret(DeleteSecretRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestDeleteSecretRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskEmpty

The response to send back to the client (wrapped by a task).

DestroySecretVersion(DestroySecretVersionRequest, ServerCallContext)

public virtual Task<SecretVersion> DestroySecretVersion(DestroySecretVersionRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecretVersion

The response to send back to the client (wrapped by a task).

DisableSecretVersion(DisableSecretVersionRequest, ServerCallContext)

public virtual Task<SecretVersion> DisableSecretVersion(DisableSecretVersionRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecretVersion

The response to send back to the client (wrapped by a task).

EnableSecretVersion(EnableSecretVersionRequest, ServerCallContext)

public virtual Task<SecretVersion> EnableSecretVersion(EnableSecretVersionRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecretVersion

The response to send back to the client (wrapped by a task).

GetIamPolicy(GetIamPolicyRequest, ServerCallContext)

public virtual Task<Policy> GetIamPolicy(GetIamPolicyRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskPolicy

The response to send back to the client (wrapped by a task).

GetSecret(GetSecretRequest, ServerCallContext)

public virtual Task<Secret> GetSecret(GetSecretRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestGetSecretRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecret

The response to send back to the client (wrapped by a task).

GetSecretVersion(GetSecretVersionRequest, ServerCallContext)

public virtual Task<SecretVersion> GetSecretVersion(GetSecretVersionRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecretVersion

The response to send back to the client (wrapped by a task).

ListSecretVersions(ListSecretVersionsRequest, ServerCallContext)

public virtual Task<ListSecretVersionsResponse> ListSecretVersions(ListSecretVersionsRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestListSecretVersionsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListSecretVersionsResponse

The response to send back to the client (wrapped by a task).

ListSecrets(ListSecretsRequest, ServerCallContext)

public virtual Task<ListSecretsResponse> ListSecrets(ListSecretsRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestListSecretsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListSecretsResponse

The response to send back to the client (wrapped by a task).

SetIamPolicy(SetIamPolicyRequest, ServerCallContext)

public virtual Task<Policy> SetIamPolicy(SetIamPolicyRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskPolicy

The response to send back to the client (wrapped by a task).

TestIamPermissions(TestIamPermissionsRequest, ServerCallContext)

public virtual Task<TestIamPermissionsResponse> TestIamPermissions(TestIamPermissionsRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskTestIamPermissionsResponse

The response to send back to the client (wrapped by a task).

UpdateSecret(UpdateSecretRequest, ServerCallContext)

public virtual Task<Secret> UpdateSecret(UpdateSecretRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestUpdateSecretRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSecret

The response to send back to the client (wrapped by a task).