Cloud Resource Manager v3 API - Class TagValuesClient (2.2.0)

public abstract class TagValuesClient

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

TagValues client wrapper, for convenient use.

Inheritance

object > TagValuesClient

Derived Types

Namespace

Google.Cloud.ResourceManager.V3

Assembly

Google.Cloud.ResourceManager.V3.dll

Remarks

Allow users to create and manage tag values.

Properties

CreateTagValueOperationsClient

public virtual OperationsClient CreateTagValueOperationsClient { get; }

The long-running operations client for CreateTagValue.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default TagValues scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

DeleteTagValueOperationsClient

public virtual OperationsClient DeleteTagValueOperationsClient { get; }

The long-running operations client for DeleteTagValue.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual TagValues.TagValuesClient GrpcClient { get; }

The underlying gRPC TagValues client

Property Value
TypeDescription
TagValuesTagValuesClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateTagValueOperationsClient

public virtual OperationsClient UpdateTagValueOperationsClient { get; }

The long-running operations client for UpdateTagValue.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static TagValuesClient Create()

Synchronously creates a TagValuesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TagValuesClientBuilder.

Returns
TypeDescription
TagValuesClient

The created TagValuesClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a TagValuesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TagValuesClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskTagValuesClient

The task representing the created TagValuesClient.

CreateTagValue(CreateTagValueRequest, CallSettings)

public virtual Operation<TagValue, CreateTagValueMetadata> CreateTagValue(CreateTagValueRequest request, CallSettings callSettings = null)

Creates a TagValue as a child of the specified TagKey. If a 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 TagValues can exist under a TagKey at any given time.

Parameters
NameDescription
requestCreateTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueCreateTagValueMetadata

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
CreateTagValueRequest request = new CreateTagValueRequest
{
    TagValue = new TagValue(),
    ValidateOnly = false,
};
// Make the request
Operation<TagValue, CreateTagValueMetadata> response = tagValuesClient.CreateTagValue(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, CreateTagValueMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, CreateTagValueMetadata> retrievedResponse = tagValuesClient.PollOnceCreateTagValue(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

CreateTagValue(TagValue, CallSettings)

public virtual Operation<TagValue, CreateTagValueMetadata> CreateTagValue(TagValue tagValue, CallSettings callSettings = null)

Creates a TagValue as a child of the specified TagKey. If a 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 TagValues can exist under a TagKey at any given time.

Parameters
NameDescription
tagValueTagValue

Required. The TagValue to be created. Only fields short_name, description, and parent are considered during the creation request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueCreateTagValueMetadata

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
TagValue tagValue = new TagValue();
// Make the request
Operation<TagValue, CreateTagValueMetadata> response = tagValuesClient.CreateTagValue(tagValue);

// Poll until the returned long-running operation is complete
Operation<TagValue, CreateTagValueMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, CreateTagValueMetadata> retrievedResponse = tagValuesClient.PollOnceCreateTagValue(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

CreateTagValueAsync(CreateTagValueRequest, CallSettings)

public virtual Task<Operation<TagValue, CreateTagValueMetadata>> CreateTagValueAsync(CreateTagValueRequest request, CallSettings callSettings = null)

Creates a TagValue as a child of the specified TagKey. If a 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 TagValues can exist under a TagKey at any given time.

Parameters
NameDescription
requestCreateTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueCreateTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
CreateTagValueRequest request = new CreateTagValueRequest
{
    TagValue = new TagValue(),
    ValidateOnly = false,
};
// Make the request
Operation<TagValue, CreateTagValueMetadata> response = await tagValuesClient.CreateTagValueAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, CreateTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, CreateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceCreateTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

CreateTagValueAsync(CreateTagValueRequest, CancellationToken)

public virtual Task<Operation<TagValue, CreateTagValueMetadata>> CreateTagValueAsync(CreateTagValueRequest request, CancellationToken cancellationToken)

Creates a TagValue as a child of the specified TagKey. If a 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 TagValues can exist under a TagKey at any given time.

Parameters
NameDescription
requestCreateTagValueRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationTagValueCreateTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
CreateTagValueRequest request = new CreateTagValueRequest
{
    TagValue = new TagValue(),
    ValidateOnly = false,
};
// Make the request
Operation<TagValue, CreateTagValueMetadata> response = await tagValuesClient.CreateTagValueAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, CreateTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, CreateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceCreateTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

CreateTagValueAsync(TagValue, CallSettings)

public virtual Task<Operation<TagValue, CreateTagValueMetadata>> CreateTagValueAsync(TagValue tagValue, CallSettings callSettings = null)

Creates a TagValue as a child of the specified TagKey. If a 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 TagValues can exist under a TagKey at any given time.

Parameters
NameDescription
tagValueTagValue

Required. The TagValue to be created. Only fields short_name, description, and parent are considered during the creation request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueCreateTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
TagValue tagValue = new TagValue();
// Make the request
Operation<TagValue, CreateTagValueMetadata> response = await tagValuesClient.CreateTagValueAsync(tagValue);

// Poll until the returned long-running operation is complete
Operation<TagValue, CreateTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, CreateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceCreateTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

CreateTagValueAsync(TagValue, CancellationToken)

public virtual Task<Operation<TagValue, CreateTagValueMetadata>> CreateTagValueAsync(TagValue tagValue, CancellationToken cancellationToken)

Creates a TagValue as a child of the specified TagKey. If a 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 TagValues can exist under a TagKey at any given time.

Parameters
NameDescription
tagValueTagValue

Required. The TagValue to be created. Only fields short_name, description, and parent are considered during the creation request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationTagValueCreateTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
TagValue tagValue = new TagValue();
// Make the request
Operation<TagValue, CreateTagValueMetadata> response = await tagValuesClient.CreateTagValueAsync(tagValue);

// Poll until the returned long-running operation is complete
Operation<TagValue, CreateTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, CreateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceCreateTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValue(DeleteTagValueRequest, CallSettings)

public virtual Operation<TagValue, DeleteTagValueMetadata> DeleteTagValue(DeleteTagValueRequest request, CallSettings callSettings = null)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
requestDeleteTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueDeleteTagValueMetadata

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
DeleteTagValueRequest request = new DeleteTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = tagValuesClient.DeleteTagValue(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = tagValuesClient.PollOnceDeleteTagValue(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValue(TagValueName, CallSettings)

public virtual Operation<TagValue, DeleteTagValueMetadata> DeleteTagValue(TagValueName name, CallSettings callSettings = null)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
nameTagValueName

Required. Resource name for TagValue to be deleted in the format tagValues/456.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueDeleteTagValueMetadata

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
TagValueName name = TagValueName.FromTagValue("[TAG_VALUE]");
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = tagValuesClient.DeleteTagValue(name);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = tagValuesClient.PollOnceDeleteTagValue(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValue(string, CallSettings)

public virtual Operation<TagValue, DeleteTagValueMetadata> DeleteTagValue(string name, CallSettings callSettings = null)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
namestring

Required. Resource name for TagValue to be deleted in the format tagValues/456.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueDeleteTagValueMetadata

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
string name = "tagValues/[TAG_VALUE]";
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = tagValuesClient.DeleteTagValue(name);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = tagValuesClient.PollOnceDeleteTagValue(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValueAsync(DeleteTagValueRequest, CallSettings)

public virtual Task<Operation<TagValue, DeleteTagValueMetadata>> DeleteTagValueAsync(DeleteTagValueRequest request, CallSettings callSettings = null)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
requestDeleteTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueDeleteTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
DeleteTagValueRequest request = new DeleteTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = await tagValuesClient.DeleteTagValueAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceDeleteTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValueAsync(DeleteTagValueRequest, CancellationToken)

public virtual Task<Operation<TagValue, DeleteTagValueMetadata>> DeleteTagValueAsync(DeleteTagValueRequest request, CancellationToken cancellationToken)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
requestDeleteTagValueRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationTagValueDeleteTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
DeleteTagValueRequest request = new DeleteTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = await tagValuesClient.DeleteTagValueAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceDeleteTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValueAsync(TagValueName, CallSettings)

public virtual Task<Operation<TagValue, DeleteTagValueMetadata>> DeleteTagValueAsync(TagValueName name, CallSettings callSettings = null)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
nameTagValueName

Required. Resource name for TagValue to be deleted in the format tagValues/456.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueDeleteTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
TagValueName name = TagValueName.FromTagValue("[TAG_VALUE]");
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = await tagValuesClient.DeleteTagValueAsync(name);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceDeleteTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValueAsync(TagValueName, CancellationToken)

public virtual Task<Operation<TagValue, DeleteTagValueMetadata>> DeleteTagValueAsync(TagValueName name, CancellationToken cancellationToken)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
nameTagValueName

Required. Resource name for TagValue to be deleted in the format tagValues/456.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationTagValueDeleteTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
TagValueName name = TagValueName.FromTagValue("[TAG_VALUE]");
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = await tagValuesClient.DeleteTagValueAsync(name);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceDeleteTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValueAsync(string, CallSettings)

public virtual Task<Operation<TagValue, DeleteTagValueMetadata>> DeleteTagValueAsync(string name, CallSettings callSettings = null)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
namestring

Required. Resource name for TagValue to be deleted in the format tagValues/456.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueDeleteTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string name = "tagValues/[TAG_VALUE]";
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = await tagValuesClient.DeleteTagValueAsync(name);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceDeleteTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

DeleteTagValueAsync(string, CancellationToken)

public virtual Task<Operation<TagValue, DeleteTagValueMetadata>> DeleteTagValueAsync(string name, CancellationToken cancellationToken)

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

Parameters
NameDescription
namestring

Required. Resource name for TagValue to be deleted in the format tagValues/456.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationTagValueDeleteTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string name = "tagValues/[TAG_VALUE]";
// Make the request
Operation<TagValue, DeleteTagValueMetadata> response = await tagValuesClient.DeleteTagValueAsync(name);

// Poll until the returned long-running operation is complete
Operation<TagValue, DeleteTagValueMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagValue result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TagValue, DeleteTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceDeleteTagValueAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagValue retrievedResult = retrievedResponse.Result;
}

GetIamPolicy(IResourceName, CallSettings)

public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = tagValuesClient.GetIamPolicy(resource);

GetIamPolicy(GetIamPolicyRequest, CallSettings)

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

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

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

GetIamPolicy(string, CallSettings)

public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
resourcestring

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = tagValuesClient.GetIamPolicy(resource);

GetIamPolicyAsync(IResourceName, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await tagValuesClient.GetIamPolicyAsync(resource);

GetIamPolicyAsync(IResourceName, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await tagValuesClient.GetIamPolicyAsync(resource);

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

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

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

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

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(string, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
resourcestring

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await tagValuesClient.GetIamPolicyAsync(resource);

GetIamPolicyAsync(string, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The resource field should be the TagValue's resource name. For example: tagValues/1234. The caller must have the cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on the identified TagValue to get the access control policy.

Parameters
NameDescription
resourcestring

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await tagValuesClient.GetIamPolicyAsync(resource);

GetNamespacedTagValue(GetNamespacedTagValueRequest, CallSettings)

public virtual TagValue GetNamespacedTagValue(GetNamespacedTagValueRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetNamespacedTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TagValue

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
GetNamespacedTagValueRequest request = new GetNamespacedTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
};
// Make the request
TagValue response = tagValuesClient.GetNamespacedTagValue(request);

GetNamespacedTagValue(TagValueName, CallSettings)

public virtual TagValue GetNamespacedTagValue(TagValueName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameTagValueName

Required. A namespaced tag value name in the following format:

{parentId}/{tagKeyShort}/{tagValueShort}

Examples:

  • 42/foo/abc for a value with short name "abc" under the key with short name "foo" under the organization with ID 42
  • r2-d2/bar/xyz for a value with short name "xyz" under the key with short name "bar" under the project with ID "r2-d2"
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TagValue

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
TagValueName name = TagValueName.FromTagValue("[TAG_VALUE]");
// Make the request
TagValue response = tagValuesClient.GetNamespacedTagValue(name);

GetNamespacedTagValue(string, CallSettings)

public virtual TagValue GetNamespacedTagValue(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. A namespaced tag value name in the following format:

{parentId}/{tagKeyShort}/{tagValueShort}

Examples:

  • 42/foo/abc for a value with short name "abc" under the key with short name "foo" under the organization with ID 42
  • r2-d2/bar/xyz for a value with short name "xyz" under the key with short name "bar" under the project with ID "r2-d2"
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TagValue

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
string name = "tagValues/[TAG_VALUE]";
// Make the request
TagValue response = tagValuesClient.GetNamespacedTagValue(name);

GetNamespacedTagValueAsync(GetNamespacedTagValueRequest, CallSettings)

public virtual Task<TagValue> GetNamespacedTagValueAsync(GetNamespacedTagValueRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetNamespacedTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
GetNamespacedTagValueRequest request = new GetNamespacedTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
};
// Make the request
TagValue response = await tagValuesClient.GetNamespacedTagValueAsync(request);

GetNamespacedTagValueAsync(GetNamespacedTagValueRequest, CancellationToken)

public virtual Task<TagValue> GetNamespacedTagValueAsync(GetNamespacedTagValueRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetNamespacedTagValueRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
GetNamespacedTagValueRequest request = new GetNamespacedTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
};
// Make the request
TagValue response = await tagValuesClient.GetNamespacedTagValueAsync(request);

GetNamespacedTagValueAsync(TagValueName, CallSettings)

public virtual Task<TagValue> GetNamespacedTagValueAsync(TagValueName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameTagValueName

Required. A namespaced tag value name in the following format:

{parentId}/{tagKeyShort}/{tagValueShort}

Examples:

  • 42/foo/abc for a value with short name "abc" under the key with short name "foo" under the organization with ID 42
  • r2-d2/bar/xyz for a value with short name "xyz" under the key with short name "bar" under the project with ID "r2-d2"
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
TagValueName name = TagValueName.FromTagValue("[TAG_VALUE]");
// Make the request
TagValue response = await tagValuesClient.GetNamespacedTagValueAsync(name);

GetNamespacedTagValueAsync(TagValueName, CancellationToken)

public virtual Task<TagValue> GetNamespacedTagValueAsync(TagValueName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameTagValueName

Required. A namespaced tag value name in the following format:

{parentId}/{tagKeyShort}/{tagValueShort}

Examples:

  • 42/foo/abc for a value with short name "abc" under the key with short name "foo" under the organization with ID 42
  • r2-d2/bar/xyz for a value with short name "xyz" under the key with short name "bar" under the project with ID "r2-d2"
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
TagValueName name = TagValueName.FromTagValue("[TAG_VALUE]");
// Make the request
TagValue response = await tagValuesClient.GetNamespacedTagValueAsync(name);

GetNamespacedTagValueAsync(string, CallSettings)

public virtual Task<TagValue> GetNamespacedTagValueAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. A namespaced tag value name in the following format:

{parentId}/{tagKeyShort}/{tagValueShort}

Examples:

  • 42/foo/abc for a value with short name "abc" under the key with short name "foo" under the organization with ID 42
  • r2-d2/bar/xyz for a value with short name "xyz" under the key with short name "bar" under the project with ID "r2-d2"
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string name = "tagValues/[TAG_VALUE]";
// Make the request
TagValue response = await tagValuesClient.GetNamespacedTagValueAsync(name);

GetNamespacedTagValueAsync(string, CancellationToken)

public virtual Task<TagValue> GetNamespacedTagValueAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. A namespaced tag value name in the following format:

{parentId}/{tagKeyShort}/{tagValueShort}

Examples:

  • 42/foo/abc for a value with short name "abc" under the key with short name "foo" under the organization with ID 42
  • r2-d2/bar/xyz for a value with short name "xyz" under the key with short name "bar" under the project with ID "r2-d2"
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string name = "tagValues/[TAG_VALUE]";
// Make the request
TagValue response = await tagValuesClient.GetNamespacedTagValueAsync(name);

GetTagValue(GetTagValueRequest, CallSettings)

public virtual TagValue GetTagValue(GetTagValueRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TagValue

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
GetTagValueRequest request = new GetTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
};
// Make the request
TagValue response = tagValuesClient.GetTagValue(request);

GetTagValue(TagValueName, CallSettings)

public virtual TagValue GetTagValue(TagValueName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameTagValueName

Required. Resource name for TagValue to be fetched in the format tagValues/456.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TagValue

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
TagValueName name = TagValueName.FromTagValue("[TAG_VALUE]");
// Make the request
TagValue response = tagValuesClient.GetTagValue(name);

GetTagValue(string, CallSettings)

public virtual TagValue GetTagValue(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. Resource name for TagValue to be fetched in the format tagValues/456.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TagValue

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
string name = "tagValues/[TAG_VALUE]";
// Make the request
TagValue response = tagValuesClient.GetTagValue(name);

GetTagValueAsync(GetTagValueRequest, CallSettings)

public virtual Task<TagValue> GetTagValueAsync(GetTagValueRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetTagValueRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
GetTagValueRequest request = new GetTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
};
// Make the request
TagValue response = await tagValuesClient.GetTagValueAsync(request);

GetTagValueAsync(GetTagValueRequest, CancellationToken)

public virtual Task<TagValue> GetTagValueAsync(GetTagValueRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetTagValueRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTagValue

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
GetTagValueRequest request = new GetTagValueRequest
{
    TagValueName = TagValueName.FromTagValue("[TAG_VALUE]"),
};
// Make the request
TagValue response = await tagValuesClient.GetTagValueAsync(request);

GetTagValueAsync(TagValueName, CallSettings)

public virtual Task<TagValue> GetTagValueAsync(TagValueName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameTagValueName

Required. Resource name for T