Cloud Resource Manager v3 API - Class TagValuesClient (2.4.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 TagValue to be fetched in the format tagValues/456.

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.GetTagValueAsync(name);

GetTagValueAsync(TagValueName, CancellationToken)

public virtual Task<TagValue> GetTagValueAsync(TagValueName name, 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
nameTagValueName

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

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.GetTagValueAsync(name);

GetTagValueAsync(string, CallSettings)

public virtual Task<TagValue> GetTagValueAsync(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
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.GetTagValueAsync(name);

GetTagValueAsync(string, CancellationToken)

public virtual Task<TagValue> GetTagValueAsync(string name, 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
namestring

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

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.GetTagValueAsync(name);

ListTagValues(IResourceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListTagValuesResponse, TagValue> ListTagValues(IResourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all TagValues for a specific TagKey.

Parameters
NameDescription
parentIResourceName

Required.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTagValuesResponseTagValue

A pageable sequence of TagValue resources.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListTagValuesResponse, TagValue> response = tagValuesClient.ListTagValues(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TagValue 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 (ListTagValuesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TagValue 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<TagValue> 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 (TagValue 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;

ListTagValues(ListTagValuesRequest, CallSettings)

public virtual PagedEnumerable<ListTagValuesResponse, TagValue> ListTagValues(ListTagValuesRequest request, CallSettings callSettings = null)

Lists all TagValues for a specific TagKey.

Parameters
NameDescription
requestListTagValuesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTagValuesResponseTagValue

A pageable sequence of TagValue resources.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
ListTagValuesRequest request = new ListTagValuesRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
};
// Make the request
PagedEnumerable<ListTagValuesResponse, TagValue> response = tagValuesClient.ListTagValues(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (TagValue 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 (ListTagValuesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TagValue 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<TagValue> 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 (TagValue 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;

ListTagValues(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListTagValuesResponse, TagValue> ListTagValues(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all TagValues for a specific TagKey.

Parameters
NameDescription
parentstring

Required.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTagValuesResponseTagValue

A pageable sequence of TagValue resources.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedEnumerable<ListTagValuesResponse, TagValue> response = tagValuesClient.ListTagValues(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TagValue 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 (ListTagValuesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TagValue 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<TagValue> 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 (TagValue 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;

ListTagValuesAsync(IResourceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTagValuesResponse, TagValue> ListTagValuesAsync(IResourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all TagValues for a specific TagKey.

Parameters
NameDescription
parentIResourceName

Required.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTagValuesResponseTagValue

A pageable asynchronous sequence of TagValue resources.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListTagValuesResponse, TagValue> response = tagValuesClient.ListTagValuesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TagValue 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((ListTagValuesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TagValue 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<TagValue> 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 (TagValue 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;

ListTagValuesAsync(ListTagValuesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTagValuesResponse, TagValue> ListTagValuesAsync(ListTagValuesRequest request, CallSettings callSettings = null)

Lists all TagValues for a specific TagKey.

Parameters
NameDescription
requestListTagValuesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTagValuesResponseTagValue

A pageable asynchronous sequence of TagValue resources.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
ListTagValuesRequest request = new ListTagValuesRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
};
// Make the request
PagedAsyncEnumerable<ListTagValuesResponse, TagValue> response = tagValuesClient.ListTagValuesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TagValue 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((ListTagValuesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TagValue 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<TagValue> 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 (TagValue 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;

ListTagValuesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTagValuesResponse, TagValue> ListTagValuesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all TagValues for a specific TagKey.

Parameters
NameDescription
parentstring

Required.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTagValuesResponseTagValue

A pageable asynchronous sequence of TagValue resources.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedAsyncEnumerable<ListTagValuesResponse, TagValue> response = tagValuesClient.ListTagValuesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TagValue 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((ListTagValuesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TagValue 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<TagValue> 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 (TagValue 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;

PollOnceCreateTagValue(string, CallSettings)

public virtual Operation<TagValue, CreateTagValueMetadata> PollOnceCreateTagValue(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateTagValue.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueCreateTagValueMetadata

The result of polling the operation.

PollOnceCreateTagValueAsync(string, CallSettings)

public virtual Task<Operation<TagValue, CreateTagValueMetadata>> PollOnceCreateTagValueAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateTagValue.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueCreateTagValueMetadata

A task representing the result of polling the operation.

PollOnceDeleteTagValue(string, CallSettings)

public virtual Operation<TagValue, DeleteTagValueMetadata> PollOnceDeleteTagValue(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteTagValue.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueDeleteTagValueMetadata

The result of polling the operation.

PollOnceDeleteTagValueAsync(string, CallSettings)

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

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteTagValue.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueDeleteTagValueMetadata

A task representing the result of polling the operation.

PollOnceUpdateTagValue(string, CallSettings)

public virtual Operation<TagValue, UpdateTagValueMetadata> PollOnceUpdateTagValue(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateTagValue.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueUpdateTagValueMetadata

The result of polling the operation.

PollOnceUpdateTagValueAsync(string, CallSettings)

public virtual Task<Operation<TagValue, UpdateTagValueMetadata>> PollOnceUpdateTagValueAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateTagValue.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueUpdateTagValueMetadata

A task representing the result of polling the operation.

SetIamPolicy(IResourceName, Policy, CallSettings)

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

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

Parameters
NameDescription
resourceIResourceName

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

policyPolicy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

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");
Policy policy = new Policy();
// Make the request
Policy response = tagValuesClient.SetIamPolicy(resource, policy);

SetIamPolicy(SetIamPolicyRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetIamPolicyRequest

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)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = tagValuesClient.SetIamPolicy(request);

SetIamPolicy(string, Policy, CallSettings)

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

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

Parameters
NameDescription
resourcestring

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

policyPolicy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

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";
Policy policy = new Policy();
// Make the request
Policy response = tagValuesClient.SetIamPolicy(resource, policy);

SetIamPolicyAsync(IResourceName, Policy, CallSettings)

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

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

Parameters
NameDescription
resourceIResourceName

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

policyPolicy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

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");
Policy policy = new Policy();
// Make the request
Policy response = await tagValuesClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(IResourceName, Policy, CancellationToken)

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

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

Parameters
NameDescription
resourceIResourceName

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

policyPolicy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

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");
Policy policy = new Policy();
// Make the request
Policy response = await tagValuesClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetIamPolicyRequest

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)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await tagValuesClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

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

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

Parameters
NameDescription
requestSetIamPolicyRequest

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)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await tagValuesClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, Policy, CallSettings)

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

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

Parameters
NameDescription
resourcestring

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

policyPolicy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

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";
Policy policy = new Policy();
// Make the request
Policy response = await tagValuesClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(string, Policy, CancellationToken)

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

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

Parameters
NameDescription
resourcestring

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

policyPolicy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

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";
Policy policy = new Policy();
// Make the request
Policy response = await tagValuesClient.SetIamPolicyAsync(resource, policy);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

TestIamPermissions(IResourceName, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
resourceIResourceName

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

permissionsIEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = tagValuesClient.TestIamPermissions(resource, permissions);

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

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

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

The RPC response.

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

TestIamPermissions(string, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
resourcestring

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

permissionsIEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = tagValuesClient.TestIamPermissions(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
resourceIResourceName

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

permissionsIEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestIamPermissionsResponse

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");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagValuesClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
resourceIResourceName

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

permissionsIEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestIamPermissionsResponse

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");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagValuesClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

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

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

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

TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

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

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

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

TestIamPermissionsAsync(string, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
resourcestring

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

permissionsIEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagValuesClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(string, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified TagValue. The resource field should be the TagValue's resource name. For example: tagValues/1234.

There are no permissions required for making this API call.

Parameters
NameDescription
resourcestring

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

permissionsIEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagValuesClient.TestIamPermissionsAsync(resource, permissions);

UpdateTagValue(TagValue, FieldMask, CallSettings)

public virtual Operation<TagValue, UpdateTagValueMetadata> UpdateTagValue(TagValue tagValue, FieldMask updateMask, CallSettings callSettings = null)

Updates the attributes of the TagValue resource.

Parameters
NameDescription
tagValueTagValue

Required. The new definition of the TagValue. Only fields description and etag fields can be updated by this request. If the etag field is nonempty, it must match the etag field of the existing ControlGroup. Otherwise, ABORTED will be returned.

updateMaskFieldMask

Optional. Fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueUpdateTagValueMetadata

The RPC response.

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

// Poll until the returned long-running operation is complete
Operation<TagValue, UpdateTagValueMetadata> 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, UpdateTagValueMetadata> retrievedResponse = tagValuesClient.PollOnceUpdateTagValue(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;
}

UpdateTagValue(UpdateTagValueRequest, CallSettings)

public virtual Operation<TagValue, UpdateTagValueMetadata> UpdateTagValue(UpdateTagValueRequest request, CallSettings callSettings = null)

Updates the attributes of the TagValue resource.

Parameters
NameDescription
requestUpdateTagValueRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTagValueUpdateTagValueMetadata

The RPC response.

Example
// Create client
TagValuesClient tagValuesClient = TagValuesClient.Create();
// Initialize request argument(s)
UpdateTagValueRequest request = new UpdateTagValueRequest
{
    TagValue = new TagValue(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<TagValue, UpdateTagValueMetadata> response = tagValuesClient.UpdateTagValue(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, UpdateTagValueMetadata> 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, UpdateTagValueMetadata> retrievedResponse = tagValuesClient.PollOnceUpdateTagValue(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;
}

UpdateTagValueAsync(TagValue, FieldMask, CallSettings)

public virtual Task<Operation<TagValue, UpdateTagValueMetadata>> UpdateTagValueAsync(TagValue tagValue, FieldMask updateMask, CallSettings callSettings = null)

Updates the attributes of the TagValue resource.

Parameters
NameDescription
tagValueTagValue

Required. The new definition of the TagValue. Only fields description and etag fields can be updated by this request. If the etag field is nonempty, it must match the etag field of the existing ControlGroup. Otherwise, ABORTED will be returned.

updateMaskFieldMask

Optional. Fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueUpdateTagValueMetadata

A Task containing the RPC response.

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

// Poll until the returned long-running operation is complete
Operation<TagValue, UpdateTagValueMetadata> 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, UpdateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceUpdateTagValueAsync(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;
}

UpdateTagValueAsync(TagValue, FieldMask, CancellationToken)

public virtual Task<Operation<TagValue, UpdateTagValueMetadata>> UpdateTagValueAsync(TagValue tagValue, FieldMask updateMask, CancellationToken cancellationToken)

Updates the attributes of the TagValue resource.

Parameters
NameDescription
tagValueTagValue

Required. The new definition of the TagValue. Only fields description and etag fields can be updated by this request. If the etag field is nonempty, it must match the etag field of the existing ControlGroup. Otherwise, ABORTED will be returned.

updateMaskFieldMask

Optional. Fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationTagValueUpdateTagValueMetadata

A Task containing the RPC response.

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

// Poll until the returned long-running operation is complete
Operation<TagValue, UpdateTagValueMetadata> 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, UpdateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceUpdateTagValueAsync(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;
}

UpdateTagValueAsync(UpdateTagValueRequest, CallSettings)

public virtual Task<Operation<TagValue, UpdateTagValueMetadata>> UpdateTagValueAsync(UpdateTagValueRequest request, CallSettings callSettings = null)

Updates the attributes of the TagValue resource.

Parameters
NameDescription
requestUpdateTagValueRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTagValueUpdateTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
UpdateTagValueRequest request = new UpdateTagValueRequest
{
    TagValue = new TagValue(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<TagValue, UpdateTagValueMetadata> response = await tagValuesClient.UpdateTagValueAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, UpdateTagValueMetadata> 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, UpdateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceUpdateTagValueAsync(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;
}

UpdateTagValueAsync(UpdateTagValueRequest, CancellationToken)

public virtual Task<Operation<TagValue, UpdateTagValueMetadata>> UpdateTagValueAsync(UpdateTagValueRequest request, CancellationToken cancellationToken)

Updates the attributes of the TagValue resource.

Parameters
NameDescription
requestUpdateTagValueRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationTagValueUpdateTagValueMetadata

A Task containing the RPC response.

Example
// Create client
TagValuesClient tagValuesClient = await TagValuesClient.CreateAsync();
// Initialize request argument(s)
UpdateTagValueRequest request = new UpdateTagValueRequest
{
    TagValue = new TagValue(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<TagValue, UpdateTagValueMetadata> response = await tagValuesClient.UpdateTagValueAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagValue, UpdateTagValueMetadata> 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, UpdateTagValueMetadata> retrievedResponse = await tagValuesClient.PollOnceUpdateTagValueAsync(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;
}