Cloud Resource Manager v3 API - Class TagKeysClientImpl (2.5.0)

public sealed class TagKeysClientImpl : TagKeysClient

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

TagKeys client wrapper implementation, for convenient use.

Inheritance

object > TagKeysClient > TagKeysClientImpl

Namespace

Google.Cloud.ResourceManager.V3

Assembly

Google.Cloud.ResourceManager.V3.dll

Remarks

Allow users to create and manage tag keys.

Constructors

TagKeysClientImpl(TagKeysClient, TagKeysSettings, ILogger)

public TagKeysClientImpl(TagKeys.TagKeysClient grpcClient, TagKeysSettings settings, ILogger logger)

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

Parameters
Name Description
grpcClient TagKeysTagKeysClient

The underlying gRPC client.

settings TagKeysSettings

The base TagKeysSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

CreateTagKeyOperationsClient

public override OperationsClient CreateTagKeyOperationsClient { get; }

The long-running operations client for CreateTagKey.

Property Value
Type Description
OperationsClient
Overrides

DeleteTagKeyOperationsClient

public override OperationsClient DeleteTagKeyOperationsClient { get; }

The long-running operations client for DeleteTagKey.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override TagKeys.TagKeysClient GrpcClient { get; }

The underlying gRPC TagKeys client

Property Value
Type Description
TagKeysTagKeysClient
Overrides

UpdateTagKeyOperationsClient

public override OperationsClient UpdateTagKeyOperationsClient { get; }

The long-running operations client for UpdateTagKey.

Property Value
Type Description
OperationsClient
Overrides

Methods

CreateTagKey(CreateTagKeyRequest, CallSettings)

public override Operation<TagKey, CreateTagKeyMetadata> CreateTagKey(CreateTagKeyRequest request, CallSettings callSettings = null)

Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.

Parameters
Name Description
request CreateTagKeyRequest

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
OperationTagKeyCreateTagKeyMetadata

The RPC response.

Overrides

CreateTagKeyAsync(CreateTagKeyRequest, CallSettings)

public override Task<Operation<TagKey, CreateTagKeyMetadata>> CreateTagKeyAsync(CreateTagKeyRequest request, CallSettings callSettings = null)

Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.

Parameters
Name Description
request CreateTagKeyRequest

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
TaskOperationTagKeyCreateTagKeyMetadata

A Task containing the RPC response.

Overrides

DeleteTagKey(DeleteTagKeyRequest, CallSettings)

public override Operation<TagKey, DeleteTagKeyMetadata> DeleteTagKey(DeleteTagKeyRequest request, CallSettings callSettings = null)

Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.

Parameters
Name Description
request DeleteTagKeyRequest

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
OperationTagKeyDeleteTagKeyMetadata

The RPC response.

Overrides

DeleteTagKeyAsync(DeleteTagKeyRequest, CallSettings)

public override Task<Operation<TagKey, DeleteTagKeyMetadata>> DeleteTagKeyAsync(DeleteTagKeyRequest request, CallSettings callSettings = null)

Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.

Parameters
Name Description
request DeleteTagKeyRequest

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
TaskOperationTagKeyDeleteTagKeyMetadata

A Task containing the RPC response.

Overrides

GetIamPolicy(GetIamPolicyRequest, CallSettings)

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

Gets the access control policy for a TagKey. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagKey's resource name. For example, "tagKeys/1234". The caller must have cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy permission on the specified TagKey.

Parameters
Name Description
request GetIamPolicyRequest

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
Policy

The RPC response.

Overrides

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

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

Gets the access control policy for a TagKey. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagKey's resource name. For example, "tagKeys/1234". The caller must have cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy permission on the specified TagKey.

Parameters
Name Description
request GetIamPolicyRequest

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
TaskPolicy

A Task containing the RPC response.

Overrides

GetNamespacedTagKey(GetNamespacedTagKeyRequest, CallSettings)

public override TagKey GetNamespacedTagKey(GetNamespacedTagKeyRequest request, CallSettings callSettings = null)

Retrieves a TagKey by its namespaced name. This method will return PERMISSION_DENIED if the key does not exist or the user does not have permission to view it.

Parameters
Name Description
request GetNamespacedTagKeyRequest

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
TagKey

The RPC response.

Overrides

GetNamespacedTagKeyAsync(GetNamespacedTagKeyRequest, CallSettings)

public override Task<TagKey> GetNamespacedTagKeyAsync(GetNamespacedTagKeyRequest request, CallSettings callSettings = null)

Retrieves a TagKey by its namespaced name. This method will return PERMISSION_DENIED if the key does not exist or the user does not have permission to view it.

Parameters
Name Description
request GetNamespacedTagKeyRequest

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
TaskTagKey

A Task containing the RPC response.

Overrides

GetTagKey(GetTagKeyRequest, CallSettings)

public override TagKey GetTagKey(GetTagKeyRequest request, CallSettings callSettings = null)

Retrieves a TagKey. This method will return PERMISSION_DENIED if the key does not exist or the user does not have permission to view it.

Parameters
Name Description
request GetTagKeyRequest

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
TagKey

The RPC response.

Overrides

GetTagKeyAsync(GetTagKeyRequest, CallSettings)

public override Task<TagKey> GetTagKeyAsync(GetTagKeyRequest request, CallSettings callSettings = null)

Retrieves a TagKey. This method will return PERMISSION_DENIED if the key does not exist or the user does not have permission to view it.

Parameters
Name Description
request GetTagKeyRequest

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
TaskTagKey

A Task containing the RPC response.

Overrides

ListTagKeys(ListTagKeysRequest, CallSettings)

public override PagedEnumerable<ListTagKeysResponse, TagKey> ListTagKeys(ListTagKeysRequest request, CallSettings callSettings = null)

Lists all TagKeys for a parent resource.

Parameters
Name Description
request ListTagKeysRequest

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
PagedEnumerableListTagKeysResponseTagKey

A pageable sequence of TagKey resources.

Overrides

ListTagKeysAsync(ListTagKeysRequest, CallSettings)

public override PagedAsyncEnumerable<ListTagKeysResponse, TagKey> ListTagKeysAsync(ListTagKeysRequest request, CallSettings callSettings = null)

Lists all TagKeys for a parent resource.

Parameters
Name Description
request ListTagKeysRequest

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
PagedAsyncEnumerableListTagKeysResponseTagKey

A pageable asynchronous sequence of TagKey resources.

Overrides

SetIamPolicy(SetIamPolicyRequest, CallSettings)

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

Sets the access control policy on a TagKey, replacing any existing policy. The resource field should be the TagKey's resource name. For example, "tagKeys/1234". The caller must have resourcemanager.tagKeys.setIamPolicy permission on the identified tagValue.

Parameters
Name Description
request SetIamPolicyRequest

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
Policy

The RPC response.

Overrides

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

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

Sets the access control policy on a TagKey, replacing any existing policy. The resource field should be the TagKey's resource name. For example, "tagKeys/1234". The caller must have resourcemanager.tagKeys.setIamPolicy permission on the identified tagValue.

Parameters
Name Description
request SetIamPolicyRequest

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
TaskPolicy

A Task containing the RPC response.

Overrides

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

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

Returns permissions that a caller has on the specified TagKey. The resource field should be the TagKey's resource name. For example, "tagKeys/1234".

There are no permissions required for making this API call.

Parameters
Name Description
request TestIamPermissionsRequest

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
TestIamPermissionsResponse

The RPC response.

Overrides

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

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

Returns permissions that a caller has on the specified TagKey. The resource field should be the TagKey's resource name. For example, "tagKeys/1234".

There are no permissions required for making this API call.

Parameters
Name Description
request TestIamPermissionsRequest

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
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Overrides

UpdateTagKey(UpdateTagKeyRequest, CallSettings)

public override Operation<TagKey, UpdateTagKeyMetadata> UpdateTagKey(UpdateTagKeyRequest request, CallSettings callSettings = null)

Updates the attributes of the TagKey resource.

Parameters
Name Description
request UpdateTagKeyRequest

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
OperationTagKeyUpdateTagKeyMetadata

The RPC response.

Overrides

UpdateTagKeyAsync(UpdateTagKeyRequest, CallSettings)

public override Task<Operation<TagKey, UpdateTagKeyMetadata>> UpdateTagKeyAsync(UpdateTagKeyRequest request, CallSettings callSettings = null)

Updates the attributes of the TagKey resource.

Parameters
Name Description
request UpdateTagKeyRequest

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
TaskOperationTagKeyUpdateTagKeyMetadata

A Task containing the RPC response.

Overrides