# Secret Manager v1 API - Class SecretManagerServiceClient (2.7.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.7.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.6.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.5.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.4.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.3.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.2.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.1.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.0.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [1.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.9.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [1.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.8.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.7.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.6.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.5.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.4.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.3.0/Google.Cloud.SecretManager.V1.SecretManagerServiceClient)

    public abstract class SecretManagerServiceClient

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

SecretManagerService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> SecretManagerServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[SecretManagerServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClientImpl)

## Namespace

[Google.Cloud.SecretManager.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1)

## Assembly

Google.Cloud.SecretManager.V1.dll

## Remarks

Secret Manager Service

Manages secrets and operations using those secrets. Implements a REST
model with the following objects:

- \[Secret\]\[google.cloud.secretmanager.v1.Secret\]
- \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the SecretManagerService service, which is a host of "secretmanager.googleapis.com"
and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default SecretManagerService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default SecretManagerService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual SecretManagerService.SecretManagerServiceClient GrpcClient { get; }

The underlying gRPC SecretManagerService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerService.SecretManagerServiceClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### AccessSecretVersion(AccessSecretVersionRequest, CallSettings)

    public virtual AccessSecretVersionResponse AccessSecretVersion(AccessSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    AccessSecretVersionRequest request = new AccessSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
    };
    // Make the request
    AccessSecretVersionResponse response = secretManagerServiceClient.AccessSecretVersion(request);

### AccessSecretVersion(SecretVersionName, CallSettings)

    public virtual AccessSecretVersionResponse AccessSecretVersion(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    AccessSecretVersionResponse response = secretManagerServiceClient.AccessSecretVersion(name);

### AccessSecretVersion(string, CallSettings)

    public virtual AccessSecretVersionResponse AccessSecretVersion(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    AccessSecretVersionResponse response = secretManagerServiceClient.AccessSecretVersion(name);

### AccessSecretVersionAsync(AccessSecretVersionRequest, CallSettings)

    public virtual Task<AccessSecretVersionResponse> AccessSecretVersionAsync(AccessSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    AccessSecretVersionRequest request = new AccessSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
    };
    // Make the request
    AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(request);

### AccessSecretVersionAsync(AccessSecretVersionRequest, CancellationToken)

    public virtual Task<AccessSecretVersionResponse> AccessSecretVersionAsync(AccessSecretVersionRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    AccessSecretVersionRequest request = new AccessSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
    };
    // Make the request
    AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(request);

### AccessSecretVersionAsync(SecretVersionName, CallSettings)

    public virtual Task<AccessSecretVersionResponse> AccessSecretVersionAsync(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(name);

### AccessSecretVersionAsync(SecretVersionName, CancellationToken)

    public virtual Task<AccessSecretVersionResponse> AccessSecretVersionAsync(SecretVersionName name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(name);

### AccessSecretVersionAsync(string, CallSettings)

    public virtual Task<AccessSecretVersionResponse> AccessSecretVersionAsync(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(name);

### AccessSecretVersionAsync(string, CancellationToken)

    public virtual Task<AccessSecretVersionResponse> AccessSecretVersionAsync(string name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AccessSecretVersionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(name);

### AddSecretVersion(AddSecretVersionRequest, CallSettings)

    public virtual SecretVersion AddSecretVersion(AddSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AddSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    AddSecretVersionRequest request = new AddSecretVersionRequest
    {
        ParentAsSecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Payload = new SecretPayload(),
    };
    // Make the request
    SecretVersion response = secretManagerServiceClient.AddSecretVersion(request);

### AddSecretVersion(SecretName, SecretPayload, CallSettings)

    public virtual SecretVersion AddSecretVersion(SecretName parent, SecretPayload payload, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to associate with the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `payload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretPayload` Required. The secret payload of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretName parent = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    SecretPayload payload = new SecretPayload();
    // Make the request
    SecretVersion response = secretManagerServiceClient.AddSecretVersion(parent, payload);

### AddSecretVersion(string, SecretPayload, CallSettings)

    public virtual SecretVersion AddSecretVersion(string parent, SecretPayload payload, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to associate with the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `payload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretPayload` Required. The secret payload of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/secrets/[SECRET]";
    SecretPayload payload = new SecretPayload();
    // Make the request
    SecretVersion response = secretManagerServiceClient.AddSecretVersion(parent, payload);

### AddSecretVersionAsync(AddSecretVersionRequest, CallSettings)

    public virtual Task<SecretVersion> AddSecretVersionAsync(AddSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AddSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    AddSecretVersionRequest request = new AddSecretVersionRequest
    {
        ParentAsSecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Payload = new SecretPayload(),
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(request);

### AddSecretVersionAsync(AddSecretVersionRequest, CancellationToken)

    public virtual Task<SecretVersion> AddSecretVersionAsync(AddSecretVersionRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.AddSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    AddSecretVersionRequest request = new AddSecretVersionRequest
    {
        ParentAsSecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Payload = new SecretPayload(),
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(request);

### AddSecretVersionAsync(SecretName, SecretPayload, CallSettings)

    public virtual Task<SecretVersion> AddSecretVersionAsync(SecretName parent, SecretPayload payload, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to associate with the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `payload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretPayload` Required. The secret payload of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretName parent = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    SecretPayload payload = new SecretPayload();
    // Make the request
    SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(parent, payload);

### AddSecretVersionAsync(SecretName, SecretPayload, CancellationToken)

    public virtual Task<SecretVersion> AddSecretVersionAsync(SecretName parent, SecretPayload payload, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to associate with the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `payload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretPayload` Required. The secret payload of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretName parent = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    SecretPayload payload = new SecretPayload();
    // Make the request
    SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(parent, payload);

### AddSecretVersionAsync(string, SecretPayload, CallSettings)

    public virtual Task<SecretVersion> AddSecretVersionAsync(string parent, SecretPayload payload, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to associate with the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `payload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretPayload` Required. The secret payload of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/secrets/[SECRET]";
    SecretPayload payload = new SecretPayload();
    // Make the request
    SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(parent, payload);

### AddSecretVersionAsync(string, SecretPayload, CancellationToken)

    public virtual Task<SecretVersion> AddSecretVersionAsync(string parent, SecretPayload payload, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to associate with the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `payload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretPayload` Required. The secret payload of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/secrets/[SECRET]";
    SecretPayload payload = new SecretPayload();
    // Make the request
    SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(parent, payload);

### Create()

    public static SecretManagerServiceClient Create()

Synchronously creates a [SecretManagerServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use
[SecretManagerServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient` | The created [SecretManagerServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<SecretManagerServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [SecretManagerServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[SecretManagerServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient` | The task representing the created [SecretManagerServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient). |

### CreateSecret(LocationName, string, Secret, CallSettings)

    public virtual Secret CreateSecret(LocationName parent, string secretId, Secret secret, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = secretManagerServiceClient.CreateSecret(parent, secretId, secret);

### CreateSecret(ProjectName, string, Secret, CallSettings)

    public virtual Secret CreateSecret(ProjectName parent, string secretId, Secret secret, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = secretManagerServiceClient.CreateSecret(parent, secretId, secret);

### CreateSecret(CreateSecretRequest, CallSettings)

    public virtual Secret CreateSecret(CreateSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.CreateSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    CreateSecretRequest request = new CreateSecretRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        SecretId = "",
        Secret = new Secret(),
    };
    // Make the request
    Secret response = secretManagerServiceClient.CreateSecret(request);

### CreateSecret(string, string, Secret, CallSettings)

    public virtual Secret CreateSecret(string parent, string secretId, Secret secret, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = secretManagerServiceClient.CreateSecret(parent, secretId, secret);

### CreateSecretAsync(LocationName, string, Secret, CallSettings)

    public virtual Task<Secret> CreateSecretAsync(LocationName parent, string secretId, Secret secret, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(parent, secretId, secret);

### CreateSecretAsync(LocationName, string, Secret, CancellationToken)

    public virtual Task<Secret> CreateSecretAsync(LocationName parent, string secretId, Secret secret, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(parent, secretId, secret);

### CreateSecretAsync(ProjectName, string, Secret, CallSettings)

    public virtual Task<Secret> CreateSecretAsync(ProjectName parent, string secretId, Secret secret, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(parent, secretId, secret);

### CreateSecretAsync(ProjectName, string, Secret, CancellationToken)

    public virtual Task<Secret> CreateSecretAsync(ProjectName parent, string secretId, Secret secret, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(parent, secretId, secret);

### CreateSecretAsync(CreateSecretRequest, CallSettings)

    public virtual Task<Secret> CreateSecretAsync(CreateSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.CreateSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateSecretRequest request = new CreateSecretRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        SecretId = "",
        Secret = new Secret(),
    };
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(request);

### CreateSecretAsync(CreateSecretRequest, CancellationToken)

    public virtual Task<Secret> CreateSecretAsync(CreateSecretRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.CreateSecretRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateSecretRequest request = new CreateSecretRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        SecretId = "",
        Secret = new Secret(),
    };
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(request);

### CreateSecretAsync(string, string, Secret, CallSettings)

    public virtual Task<Secret> CreateSecretAsync(string parent, string secretId, Secret secret, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(parent, secretId, secret);

### CreateSecretAsync(string, string, Secret, CancellationToken)

    public virtual Task<Secret> CreateSecretAsync(string parent, string secretId, Secret secret, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the project to associate with the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*`. |
| `secretId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. A \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with initial field values. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    string secretId = "";
    Secret secret = new Secret();
    // Make the request
    Secret response = await secretManagerServiceClient.CreateSecretAsync(parent, secretId, secret);

### DeleteSecret(DeleteSecretRequest, CallSettings)

    public virtual void DeleteSecret(DeleteSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DeleteSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    DeleteSecretRequest request = new DeleteSecretRequest
    {
        SecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Etag = "",
    };
    // Make the request
    secretManagerServiceClient.DeleteSecret(request);

### DeleteSecret(SecretName, CallSettings)

    public virtual void DeleteSecret(SecretName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to delete in the format `projects/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretName name = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    secretManagerServiceClient.DeleteSecret(name);

### DeleteSecret(string, CallSettings)

    public virtual void DeleteSecret(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to delete in the format `projects/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    secretManagerServiceClient.DeleteSecret(name);

### DeleteSecretAsync(DeleteSecretRequest, CallSettings)

    public virtual Task DeleteSecretAsync(DeleteSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DeleteSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteSecretRequest request = new DeleteSecretRequest
    {
        SecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Etag = "",
    };
    // Make the request
    await secretManagerServiceClient.DeleteSecretAsync(request);

### DeleteSecretAsync(DeleteSecretRequest, CancellationToken)

    public virtual Task DeleteSecretAsync(DeleteSecretRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DeleteSecretRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteSecretRequest request = new DeleteSecretRequest
    {
        SecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Etag = "",
    };
    // Make the request
    await secretManagerServiceClient.DeleteSecretAsync(request);

### DeleteSecretAsync(SecretName, CallSettings)

    public virtual Task DeleteSecretAsync(SecretName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to delete in the format `projects/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretName name = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    await secretManagerServiceClient.DeleteSecretAsync(name);

### DeleteSecretAsync(SecretName, CancellationToken)

    public virtual Task DeleteSecretAsync(SecretName name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to delete in the format `projects/*/secrets/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretName name = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    await secretManagerServiceClient.DeleteSecretAsync(name);

### DeleteSecretAsync(string, CallSettings)

    public virtual Task DeleteSecretAsync(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to delete in the format `projects/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    await secretManagerServiceClient.DeleteSecretAsync(name);

### DeleteSecretAsync(string, CancellationToken)

    public virtual Task DeleteSecretAsync(string name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] to delete in the format `projects/*/secrets/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    await secretManagerServiceClient.DeleteSecretAsync(name);

### DestroySecretVersion(DestroySecretVersionRequest, CallSettings)

    public virtual SecretVersion DestroySecretVersion(DestroySecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    DestroySecretVersionRequest request = new DestroySecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = secretManagerServiceClient.DestroySecretVersion(request);

### DestroySecretVersion(SecretVersionName, CallSettings)

    public virtual SecretVersion DestroySecretVersion(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = secretManagerServiceClient.DestroySecretVersion(name);

### DestroySecretVersion(string, CallSettings)

    public virtual SecretVersion DestroySecretVersion(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = secretManagerServiceClient.DestroySecretVersion(name);

### DestroySecretVersionAsync(DestroySecretVersionRequest, CallSettings)

    public virtual Task<SecretVersion> DestroySecretVersionAsync(DestroySecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    DestroySecretVersionRequest request = new DestroySecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DestroySecretVersionAsync(request);

### DestroySecretVersionAsync(DestroySecretVersionRequest, CancellationToken)

    public virtual Task<SecretVersion> DestroySecretVersionAsync(DestroySecretVersionRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    DestroySecretVersionRequest request = new DestroySecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DestroySecretVersionAsync(request);

### DestroySecretVersionAsync(SecretVersionName, CallSettings)

    public virtual Task<SecretVersion> DestroySecretVersionAsync(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DestroySecretVersionAsync(name);

### DestroySecretVersionAsync(SecretVersionName, CancellationToken)

    public virtual Task<SecretVersion> DestroySecretVersionAsync(SecretVersionName name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DestroySecretVersionAsync(name);

### DestroySecretVersionAsync(string, CallSettings)

    public virtual Task<SecretVersion> DestroySecretVersionAsync(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DestroySecretVersionAsync(name);

### DestroySecretVersionAsync(string, CancellationToken)

    public virtual Task<SecretVersion> DestroySecretVersionAsync(string name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DestroySecretVersionAsync(name);

### DisableSecretVersion(DisableSecretVersionRequest, CallSettings)

    public virtual SecretVersion DisableSecretVersion(DisableSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DisableSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    DisableSecretVersionRequest request = new DisableSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = secretManagerServiceClient.DisableSecretVersion(request);

### DisableSecretVersion(SecretVersionName, CallSettings)

    public virtual SecretVersion DisableSecretVersion(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = secretManagerServiceClient.DisableSecretVersion(name);

### DisableSecretVersion(string, CallSettings)

    public virtual SecretVersion DisableSecretVersion(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = secretManagerServiceClient.DisableSecretVersion(name);

### DisableSecretVersionAsync(DisableSecretVersionRequest, CallSettings)

    public virtual Task<SecretVersion> DisableSecretVersionAsync(DisableSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DisableSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    DisableSecretVersionRequest request = new DisableSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DisableSecretVersionAsync(request);

### DisableSecretVersionAsync(DisableSecretVersionRequest, CancellationToken)

    public virtual Task<SecretVersion> DisableSecretVersionAsync(DisableSecretVersionRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DisableSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    DisableSecretVersionRequest request = new DisableSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DisableSecretVersionAsync(request);

### DisableSecretVersionAsync(SecretVersionName, CallSettings)

    public virtual Task<SecretVersion> DisableSecretVersionAsync(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DisableSecretVersionAsync(name);

### DisableSecretVersionAsync(SecretVersionName, CancellationToken)

    public virtual Task<SecretVersion> DisableSecretVersionAsync(SecretVersionName name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DisableSecretVersionAsync(name);

### DisableSecretVersionAsync(string, CallSettings)

    public virtual Task<SecretVersion> DisableSecretVersionAsync(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DisableSecretVersionAsync(name);

### DisableSecretVersionAsync(string, CancellationToken)

    public virtual Task<SecretVersion> DisableSecretVersionAsync(string name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.DisableSecretVersionAsync(name);

### EnableSecretVersion(EnableSecretVersionRequest, CallSettings)

    public virtual SecretVersion EnableSecretVersion(EnableSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.EnableSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    EnableSecretVersionRequest request = new EnableSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = secretManagerServiceClient.EnableSecretVersion(request);

### EnableSecretVersion(SecretVersionName, CallSettings)

    public virtual SecretVersion EnableSecretVersion(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = secretManagerServiceClient.EnableSecretVersion(name);

### EnableSecretVersion(string, CallSettings)

    public virtual SecretVersion EnableSecretVersion(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = secretManagerServiceClient.EnableSecretVersion(name);

### EnableSecretVersionAsync(EnableSecretVersionRequest, CallSettings)

    public virtual Task<SecretVersion> EnableSecretVersionAsync(EnableSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.EnableSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    EnableSecretVersionRequest request = new EnableSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.EnableSecretVersionAsync(request);

### EnableSecretVersionAsync(EnableSecretVersionRequest, CancellationToken)

    public virtual Task<SecretVersion> EnableSecretVersionAsync(EnableSecretVersionRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.EnableSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    EnableSecretVersionRequest request = new EnableSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
        Etag = "",
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.EnableSecretVersionAsync(request);

### EnableSecretVersionAsync(SecretVersionName, CallSettings)

    public virtual Task<SecretVersion> EnableSecretVersionAsync(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.EnableSecretVersionAsync(name);

### EnableSecretVersionAsync(SecretVersionName, CancellationToken)

    public virtual Task<SecretVersion> EnableSecretVersionAsync(SecretVersionName name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.EnableSecretVersionAsync(name);

### EnableSecretVersionAsync(string, CallSettings)

    public virtual Task<SecretVersion> EnableSecretVersionAsync(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.EnableSecretVersionAsync(name);

### EnableSecretVersionAsync(string, CancellationToken)

    public virtual Task<SecretVersion> EnableSecretVersionAsync(string name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.EnableSecretVersionAsync(name);

### GetIamPolicy(GetIamPolicyRequest, CallSettings)

    public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = secretManagerServiceClient.GetIamPolicy(request);

### GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

    public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = await secretManagerServiceClient.GetIamPolicyAsync(request);

### GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

    public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = await secretManagerServiceClient.GetIamPolicyAsync(request);

### GetSecret(GetSecretRequest, CallSettings)

    public virtual Secret GetSecret(GetSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.GetSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    GetSecretRequest request = new GetSecretRequest
    {
        SecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
    };
    // Make the request
    Secret response = secretManagerServiceClient.GetSecret(request);

### GetSecret(SecretName, CallSettings)

    public virtual Secret GetSecret(SecretName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretName name = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    Secret response = secretManagerServiceClient.GetSecret(name);

### GetSecret(string, CallSettings)

    public virtual Secret GetSecret(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    Secret response = secretManagerServiceClient.GetSecret(name);

### GetSecretAsync(GetSecretRequest, CallSettings)

    public virtual Task<Secret> GetSecretAsync(GetSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.GetSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetSecretRequest request = new GetSecretRequest
    {
        SecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
    };
    // Make the request
    Secret response = await secretManagerServiceClient.GetSecretAsync(request);

### GetSecretAsync(GetSecretRequest, CancellationToken)

    public virtual Task<Secret> GetSecretAsync(GetSecretRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.GetSecretRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetSecretRequest request = new GetSecretRequest
    {
        SecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
    };
    // Make the request
    Secret response = await secretManagerServiceClient.GetSecretAsync(request);

### GetSecretAsync(SecretName, CallSettings)

    public virtual Task<Secret> GetSecretAsync(SecretName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretName name = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    Secret response = await secretManagerServiceClient.GetSecretAsync(name);

### GetSecretAsync(SecretName, CancellationToken)

    public virtual Task<Secret> GetSecretAsync(SecretName name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretName name = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    Secret response = await secretManagerServiceClient.GetSecretAsync(name);

### GetSecretAsync(string, CallSettings)

    public virtual Task<Secret> GetSecretAsync(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    Secret response = await secretManagerServiceClient.GetSecretAsync(name);

### GetSecretAsync(string, CancellationToken)

    public virtual Task<Secret> GetSecretAsync(string name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    Secret response = await secretManagerServiceClient.GetSecretAsync(name);

### GetSecretVersion(GetSecretVersionRequest, CallSettings)

    public virtual SecretVersion GetSecretVersion(GetSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.GetSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    GetSecretVersionRequest request = new GetSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
    };
    // Make the request
    SecretVersion response = secretManagerServiceClient.GetSecretVersion(request);

### GetSecretVersion(SecretVersionName, CallSettings)

    public virtual SecretVersion GetSecretVersion(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = secretManagerServiceClient.GetSecretVersion(name);

### GetSecretVersion(string, CallSettings)

    public virtual SecretVersion GetSecretVersion(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = secretManagerServiceClient.GetSecretVersion(name);

### GetSecretVersionAsync(GetSecretVersionRequest, CallSettings)

    public virtual Task<SecretVersion> GetSecretVersionAsync(GetSecretVersionRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.GetSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetSecretVersionRequest request = new GetSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.GetSecretVersionAsync(request);

### GetSecretVersionAsync(GetSecretVersionRequest, CancellationToken)

    public virtual Task<SecretVersion> GetSecretVersionAsync(GetSecretVersionRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.GetSecretVersionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetSecretVersionRequest request = new GetSecretVersionRequest
    {
        SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"),
    };
    // Make the request
    SecretVersion response = await secretManagerServiceClient.GetSecretVersionAsync(request);

### GetSecretVersionAsync(SecretVersionName, CallSettings)

    public virtual Task<SecretVersion> GetSecretVersionAsync(SecretVersionName name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.GetSecretVersionAsync(name);

### GetSecretVersionAsync(SecretVersionName, CancellationToken)

    public virtual Task<SecretVersion> GetSecretVersionAsync(SecretVersionName name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]");
    // Make the request
    SecretVersion response = await secretManagerServiceClient.GetSecretVersionAsync(name);

### GetSecretVersionAsync(string, CallSettings)

    public virtual Task<SecretVersion> GetSecretVersionAsync(string name, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.GetSecretVersionAsync(name);

### GetSecretVersionAsync(string, CancellationToken)

    public virtual Task<SecretVersion> GetSecretVersionAsync(string name, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created \[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\]. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]";
    // Make the request
    SecretVersion response = await secretManagerServiceClient.GetSecretVersionAsync(name);

### ListSecretVersions(ListSecretVersionsRequest, CallSettings)

    public virtual PagedEnumerable<ListSecretVersionsResponse, SecretVersion> ListSecretVersions(ListSecretVersionsRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A pageable sequence of [SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    ListSecretVersionsRequest request = new ListSecretVersionsRequest
    {
        ParentAsSecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Filter = "",
    };
    // Make the request
    PagedEnumerable<ListSecretVersionsResponse, SecretVersion> response = secretManagerServiceClient.ListSecretVersions(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SecretVersion item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSecretVersionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SecretVersion item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SecretVersion> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SecretVersion item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretVersions(SecretName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSecretVersionsResponse, SecretVersion> ListSecretVersions(SecretName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] associated with the \[SecretVersions\]\[google.cloud.secretmanager.v1.SecretVersion\] to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A pageable sequence of [SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SecretName parent = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    PagedEnumerable<ListSecretVersionsResponse, SecretVersion> response = secretManagerServiceClient.ListSecretVersions(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SecretVersion item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSecretVersionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SecretVersion item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SecretVersion> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SecretVersion item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretVersions(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSecretVersionsResponse, SecretVersion> ListSecretVersions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] associated with the \[SecretVersions\]\[google.cloud.secretmanager.v1.SecretVersion\] to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A pageable sequence of [SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    PagedEnumerable<ListSecretVersionsResponse, SecretVersion> response = secretManagerServiceClient.ListSecretVersions(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SecretVersion item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSecretVersionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SecretVersion item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SecretVersion> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SecretVersion item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretVersionsAsync(ListSecretVersionsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListSecretVersionsResponse, SecretVersion> ListSecretVersionsAsync(ListSecretVersionsRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A pageable asynchronous sequence of [SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListSecretVersionsRequest request = new ListSecretVersionsRequest
    {
        ParentAsSecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"),
        Filter = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListSecretVersionsResponse, SecretVersion> response = secretManagerServiceClient.ListSecretVersionsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((SecretVersion item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListSecretVersionsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SecretVersion item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SecretVersion> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SecretVersion item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretVersionsAsync(SecretName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSecretVersionsResponse, SecretVersion> ListSecretVersionsAsync(SecretName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretName` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] associated with the \[SecretVersions\]\[google.cloud.secretmanager.v1.SecretVersion\] to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A pageable asynchronous sequence of [SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SecretName parent = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]");
    // Make the request
    PagedAsyncEnumerable<ListSecretVersionsResponse, SecretVersion> response = secretManagerServiceClient.ListSecretVersionsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((SecretVersion item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListSecretVersionsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SecretVersion item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SecretVersion> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SecretVersion item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretVersionsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSecretVersionsResponse, SecretVersion> ListSecretVersionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[Secret\]\[google.cloud.secretmanager.v1.Secret\] associated with the \[SecretVersions\]\[google.cloud.secretmanager.v1.SecretVersion\] to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` | A pageable asynchronous sequence of [SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/secrets/[SECRET]";
    // Make the request
    PagedAsyncEnumerable<ListSecretVersionsResponse, SecretVersion> response = secretManagerServiceClient.ListSecretVersionsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((SecretVersion item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListSecretVersionsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SecretVersion item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SecretVersion> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SecretVersion item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecrets(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSecretsResponse, Secret> ListSecrets(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the project associated with the \[Secrets\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecrets(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Secret item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSecretsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecrets(ProjectName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSecretsResponse, Secret> ListSecrets(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The resource name of the project associated with the \[Secrets\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    // Make the request
    PagedEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecrets(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Secret item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSecretsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecrets(ListSecretsRequest, CallSettings)

    public virtual PagedEnumerable<ListSecretsResponse, Secret> ListSecrets(ListSecretsRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    ListSecretsRequest request = new ListSecretsRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        Filter = "",
    };
    // Make the request
    PagedEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecrets(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Secret item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSecretsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecrets(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSecretsResponse, Secret> ListSecrets(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the project associated with the \[Secrets\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    // Make the request
    PagedEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecrets(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Secret item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSecretsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretsAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSecretsResponse, Secret> ListSecretsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the project associated with the \[Secrets\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable asynchronous sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecretsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Secret item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListSecretsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretsAsync(ProjectName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSecretsResponse, Secret> ListSecretsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The resource name of the project associated with the \[Secrets\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable asynchronous sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    // Make the request
    PagedAsyncEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecretsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Secret item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListSecretsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretsAsync(ListSecretsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListSecretsResponse, Secret> ListSecretsAsync(ListSecretsRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable asynchronous sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListSecretsRequest request = new ListSecretsRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        Filter = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecretsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Secret item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListSecretsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSecretsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSecretsResponse, Secret> ListSecretsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the project associated with the \[Secrets\]\[google.cloud.secretmanager.v1.Secret\], in the format `projects/*` or `projects/*/locations/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.ListSecretsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A pageable asynchronous sequence of [Secret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret) resources. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    // Make the request
    PagedAsyncEnumerable<ListSecretsResponse, Secret> response = secretManagerServiceClient.ListSecretsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Secret item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListSecretsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Secret item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Secret> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Secret item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### SetIamPolicy(SetIamPolicyRequest, CallSettings)

    public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = secretManagerServiceClient.SetIamPolicy(request);

### SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

    public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = await secretManagerServiceClient.SetIamPolicyAsync(request);

### SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

    public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = await secretManagerServiceClient.SetIamPolicyAsync(request);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient#Google_Cloud_SecretManager_V1_SecretManagerServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient#Google_Cloud_SecretManager_V1_SecretManagerServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient#Google_Cloud_SecretManager_V1_SecretManagerServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretManagerServiceClient#Google_Cloud_SecretManager_V1_SecretManagerServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### TestIamPermissions(TestIamPermissionsRequest, CallSettings)

    public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = secretManagerServiceClient.TestIamPermissions(request);

### TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = await secretManagerServiceClient.TestIamPermissionsAsync(request);

### TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = await secretManagerServiceClient.TestIamPermissionsAsync(request);

### UpdateSecret(Secret, FieldMask, CallSettings)

    public virtual Secret UpdateSecret(Secret secret, FieldMask updateMask, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with updated field values. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Specifies the fields to be updated. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    Secret secret = new Secret();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Secret response = secretManagerServiceClient.UpdateSecret(secret, updateMask);

### UpdateSecret(UpdateSecretRequest, CallSettings)

    public virtual Secret UpdateSecret(UpdateSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.UpdateSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | The RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create();
    // Initialize request argument(s)
    UpdateSecretRequest request = new UpdateSecretRequest
    {
        Secret = new Secret(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Secret response = secretManagerServiceClient.UpdateSecret(request);

### UpdateSecretAsync(Secret, FieldMask, CallSettings)

    public virtual Task<Secret> UpdateSecretAsync(Secret secret, FieldMask updateMask, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with updated field values. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Specifies the fields to be updated. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    Secret secret = new Secret();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Secret response = await secretManagerServiceClient.UpdateSecretAsync(secret, updateMask);

### UpdateSecretAsync(Secret, FieldMask, CancellationToken)

    public virtual Task<Secret> UpdateSecretAsync(Secret secret, FieldMask updateMask, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `secret` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` Required. \[Secret\]\[google.cloud.secretmanager.v1.Secret\] with updated field values. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Specifies the fields to be updated. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    Secret secret = new Secret();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Secret response = await secretManagerServiceClient.UpdateSecretAsync(secret, updateMask);

### UpdateSecretAsync(UpdateSecretRequest, CallSettings)

    public virtual Task<Secret> UpdateSecretAsync(UpdateSecretRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.UpdateSecretRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateSecretRequest request = new UpdateSecretRequest
    {
        Secret = new Secret(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Secret response = await secretManagerServiceClient.UpdateSecretAsync(request);

### UpdateSecretAsync(UpdateSecretRequest, CancellationToken)

    public virtual Task<Secret> UpdateSecretAsync(UpdateSecretRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.UpdateSecretRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Secret` | A Task containing the RPC response. |

**Example**

    // Create client
    SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateSecretRequest request = new UpdateSecretRequest
    {
        Secret = new Secret(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Secret response = await secretManagerServiceClient.UpdateSecretAsync(request);