2.6.0 (latest) 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.2.0 1.1.0 1.0.0

    public sealed class TagHoldsClientImpl : TagHoldsClient

Reference documentation and code samples for the Cloud Resource Manager v3 API class TagHoldsClientImpl.

TagHolds client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [TagHoldsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt) \> TagHoldsClientImpl

## Inherited Members

[TagHoldsClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DefaultEndpoint) [TagHoldsClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DefaultScopes) [TagHoldsClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ServiceMetadata) [TagHoldsClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateAsync_System_Threading_CancellationToken_) [TagHoldsClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_Create) [TagHoldsClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ShutdownDefaultChannelsAsync) [TagHoldsClient.CreateTagHoldAsync(CreateTagHoldRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHoldAsync_Google_Cloud_ResourceManager_V3_CreateTagHoldRequest_System_Threading_CancellationToken_) [TagHoldsClient.PollOnceCreateTagHold(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_PollOnceCreateTagHold_System_String_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.PollOnceCreateTagHoldAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_PollOnceCreateTagHoldAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.CreateTagHold(string, TagHold, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHold_System_String_Google_Cloud_ResourceManager_V3_TagHold_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.CreateTagHoldAsync(string, TagHold, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHoldAsync_System_String_Google_Cloud_ResourceManager_V3_TagHold_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.CreateTagHoldAsync(string, TagHold, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHoldAsync_System_String_Google_Cloud_ResourceManager_V3_TagHold_System_Threading_CancellationToken_) [TagHoldsClient.CreateTagHold(TagValueName, TagHold, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHold_Google_Cloud_ResourceManager_V3_TagValueName_Google_Cloud_ResourceManager_V3_TagHold_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.CreateTagHoldAsync(TagValueName, TagHold, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHoldAsync_Google_Cloud_ResourceManager_V3_TagValueName_Google_Cloud_ResourceManager_V3_TagHold_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.CreateTagHoldAsync(TagValueName, TagHold, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHoldAsync_Google_Cloud_ResourceManager_V3_TagValueName_Google_Cloud_ResourceManager_V3_TagHold_System_Threading_CancellationToken_) [TagHoldsClient.DeleteTagHoldAsync(DeleteTagHoldRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHoldAsync_Google_Cloud_ResourceManager_V3_DeleteTagHoldRequest_System_Threading_CancellationToken_) [TagHoldsClient.PollOnceDeleteTagHold(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_PollOnceDeleteTagHold_System_String_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.PollOnceDeleteTagHoldAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_PollOnceDeleteTagHoldAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.DeleteTagHold(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHold_System_String_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.DeleteTagHoldAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHoldAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.DeleteTagHoldAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHoldAsync_System_String_System_Threading_CancellationToken_) [TagHoldsClient.DeleteTagHold(TagHoldName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHold_Google_Cloud_ResourceManager_V3_TagHoldName_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.DeleteTagHoldAsync(TagHoldName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHoldAsync_Google_Cloud_ResourceManager_V3_TagHoldName_Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.DeleteTagHoldAsync(TagHoldName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHoldAsync_Google_Cloud_ResourceManager_V3_TagHoldName_System_Threading_CancellationToken_) [TagHoldsClient.ListTagHolds(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ListTagHolds_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.ListTagHoldsAsync(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ListTagHoldsAsync_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.ListTagHolds(TagValueName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ListTagHolds_Google_Cloud_ResourceManager_V3_TagValueName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [TagHoldsClient.ListTagHoldsAsync(TagValueName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ListTagHoldsAsync_Google_Cloud_ResourceManager_V3_TagValueName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.ResourceManager.V3](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.md.txt)

## Assembly

Google.Cloud.ResourceManager.V3.dll

## Remarks

Allow users to create and manage TagHolds for TagValues. TagHolds represent
the use of a Tag Value that is not captured by TagBindings but
should still block TagValue deletion (such as a reference in a policy
condition). This service provides isolated failure domains by cloud location
so that TagHolds can be managed in the same location as their usage.

## Constructors

### TagHoldsClientImpl(TagHoldsClient, TagHoldsSettings, ILogger)

    public TagHoldsClientImpl(TagHolds.TagHoldsClient grpcClient, TagHoldsSettings settings, ILogger logger)

Constructs a client wrapper for the TagHolds service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `TagHoldsTagHoldsClient` The underlying gRPC client. |
| `settings` | `TagHoldsSettings` The base [TagHoldsSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsSettings.md.txt) used within this client. |
| `logger` | `ILogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### CreateTagHoldOperationsClient

    public override OperationsClient CreateTagHoldOperationsClient { get; }

The long-running operations client for `CreateTagHold`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

**Overrides** [TagHoldsClient.CreateTagHoldOperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHoldOperationsClient)

### DeleteTagHoldOperationsClient

    public override OperationsClient DeleteTagHoldOperationsClient { get; }

The long-running operations client for `DeleteTagHold`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

**Overrides** [TagHoldsClient.DeleteTagHoldOperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHoldOperationsClient)

### GrpcClient

    public override TagHolds.TagHoldsClient GrpcClient { get; }

The underlying gRPC TagHolds client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `TagHoldsTagHoldsClient` |   |

**Overrides** [TagHoldsClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_GrpcClient)

## Methods

### CreateTagHold(CreateTagHoldRequest, CallSettings)

    public override Operation<TagHold, CreateTagHoldMetadata> CreateTagHold(CreateTagHoldRequest request, CallSettings callSettings = null)

Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same
resource and origin exists under the same TagValue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateTagHoldRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationTagHoldCreateTagHoldMetadata` | The RPC response. |

**Overrides** [TagHoldsClient.CreateTagHold(CreateTagHoldRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHold_Google_Cloud_ResourceManager_V3_CreateTagHoldRequest_Google_Api_Gax_Grpc_CallSettings_)

### CreateTagHoldAsync(CreateTagHoldRequest, CallSettings)

    public override Task<Operation<TagHold, CreateTagHoldMetadata>> CreateTagHoldAsync(CreateTagHoldRequest request, CallSettings callSettings = null)

Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same
resource and origin exists under the same TagValue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateTagHoldRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationTagHoldCreateTagHoldMetadata` | A Task containing the RPC response. |

**Overrides** [TagHoldsClient.CreateTagHoldAsync(CreateTagHoldRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_CreateTagHoldAsync_Google_Cloud_ResourceManager_V3_CreateTagHoldRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteTagHold(DeleteTagHoldRequest, CallSettings)

    public override Operation<Empty, DeleteTagHoldMetadata> DeleteTagHold(DeleteTagHoldRequest request, CallSettings callSettings = null)

Deletes a TagHold.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteTagHoldRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationEmptyDeleteTagHoldMetadata` | The RPC response. |

**Overrides** [TagHoldsClient.DeleteTagHold(DeleteTagHoldRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHold_Google_Cloud_ResourceManager_V3_DeleteTagHoldRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteTagHoldAsync(DeleteTagHoldRequest, CallSettings)

    public override Task<Operation<Empty, DeleteTagHoldMetadata>> DeleteTagHoldAsync(DeleteTagHoldRequest request, CallSettings callSettings = null)

Deletes a TagHold.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteTagHoldRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyDeleteTagHoldMetadata` | A Task containing the RPC response. |

**Overrides** [TagHoldsClient.DeleteTagHoldAsync(DeleteTagHoldRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_DeleteTagHoldAsync_Google_Cloud_ResourceManager_V3_DeleteTagHoldRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListTagHolds(ListTagHoldsRequest, CallSettings)

    public override PagedEnumerable<ListTagHoldsResponse, TagHold> ListTagHolds(ListTagHoldsRequest request, CallSettings callSettings = null)

Lists TagHolds under a TagValue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListTagHoldsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListTagHoldsResponseTagHold` | A pageable sequence of [TagHold](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHold.md.txt) resources. |

**Overrides** [TagHoldsClient.ListTagHolds(ListTagHoldsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ListTagHolds_Google_Cloud_ResourceManager_V3_ListTagHoldsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListTagHoldsAsync(ListTagHoldsRequest, CallSettings)

    public override PagedAsyncEnumerable<ListTagHoldsResponse, TagHold> ListTagHoldsAsync(ListTagHoldsRequest request, CallSettings callSettings = null)

Lists TagHolds under a TagValue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListTagHoldsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListTagHoldsResponseTagHold` | A pageable asynchronous sequence of [TagHold](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHold.md.txt) resources. |

**Overrides** [TagHoldsClient.ListTagHoldsAsync(ListTagHoldsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.TagHoldsClient.md.txt#Google_Cloud_ResourceManager_V3_TagHoldsClient_ListTagHoldsAsync_Google_Cloud_ResourceManager_V3_ListTagHoldsRequest_Google_Api_Gax_Grpc_CallSettings_)