public abstract class TagKeysClient
Reference documentation and code samples for the Cloud Resource Manager v3 API class TagKeysClient.
TagKeys client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.ResourceManager.V3Assembly
Google.Cloud.ResourceManager.V3.dll
Remarks
Allow users to create and manage tag keys.
Properties
CreateTagKeyOperationsClient
public virtual OperationsClient CreateTagKeyOperationsClient { get; }
The long-running operations client for CreateTagKey
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the TagKeys service, which is a host of "cloudresourcemanager.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default TagKeys scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default TagKeys scopes are:
DeleteTagKeyOperationsClient
public virtual OperationsClient DeleteTagKeyOperationsClient { get; }
The long-running operations client for DeleteTagKey
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual TagKeys.TagKeysClient GrpcClient { get; }
The underlying gRPC TagKeys client
Property Value | |
---|---|
Type | Description |
TagKeysTagKeysClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateTagKeyOperationsClient
public virtual OperationsClient UpdateTagKeyOperationsClient { get; }
The long-running operations client for UpdateTagKey
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static TagKeysClient Create()
Synchronously creates a TagKeysClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TagKeysClientBuilder.
Returns | |
---|---|
Type | Description |
TagKeysClient | The created TagKeysClient. |
CreateAsync(CancellationToken)
public static Task<TagKeysClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a TagKeysClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TagKeysClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskTagKeysClient | The task representing the created TagKeysClient. |
CreateTagKey(CreateTagKeyRequest, CallSettings)
public virtual Operation<TagKey, CreateTagKeyMetadata> CreateTagKey(CreateTagKeyRequest request, CallSettings callSettings = null)
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
Parameters | |
---|---|
Name | Description |
request | CreateTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyCreateTagKeyMetadata | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
CreateTagKeyRequest request = new CreateTagKeyRequest
{
TagKey = new TagKey(),
ValidateOnly = false,
};
// Make the request
Operation<TagKey, CreateTagKeyMetadata> response = tagKeysClient.CreateTagKey(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, CreateTagKeyMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagKey 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<TagKey, CreateTagKeyMetadata> retrievedResponse = tagKeysClient.PollOnceCreateTagKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
CreateTagKey(TagKey, CallSettings)
public virtual Operation<TagKey, CreateTagKeyMetadata> CreateTagKey(TagKey tagKey, CallSettings callSettings = null)
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
Parameters | |
---|---|
Name | Description |
tagKey | TagKey Required. The TagKey to be created. Only fields |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyCreateTagKeyMetadata | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
TagKey tagKey = new TagKey();
// Make the request
Operation<TagKey, CreateTagKeyMetadata> response = tagKeysClient.CreateTagKey(tagKey);
// Poll until the returned long-running operation is complete
Operation<TagKey, CreateTagKeyMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagKey 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<TagKey, CreateTagKeyMetadata> retrievedResponse = tagKeysClient.PollOnceCreateTagKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
CreateTagKeyAsync(CreateTagKeyRequest, CallSettings)
public virtual Task<Operation<TagKey, CreateTagKeyMetadata>> CreateTagKeyAsync(CreateTagKeyRequest request, CallSettings callSettings = null)
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
Parameters | |
---|---|
Name | Description |
request | CreateTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyCreateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
CreateTagKeyRequest request = new CreateTagKeyRequest
{
TagKey = new TagKey(),
ValidateOnly = false,
};
// Make the request
Operation<TagKey, CreateTagKeyMetadata> response = await tagKeysClient.CreateTagKeyAsync(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, CreateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, CreateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceCreateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
CreateTagKeyAsync(CreateTagKeyRequest, CancellationToken)
public virtual Task<Operation<TagKey, CreateTagKeyMetadata>> CreateTagKeyAsync(CreateTagKeyRequest request, CancellationToken cancellationToken)
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
Parameters | |
---|---|
Name | Description |
request | CreateTagKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyCreateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
CreateTagKeyRequest request = new CreateTagKeyRequest
{
TagKey = new TagKey(),
ValidateOnly = false,
};
// Make the request
Operation<TagKey, CreateTagKeyMetadata> response = await tagKeysClient.CreateTagKeyAsync(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, CreateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, CreateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceCreateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
CreateTagKeyAsync(TagKey, CallSettings)
public virtual Task<Operation<TagKey, CreateTagKeyMetadata>> CreateTagKeyAsync(TagKey tagKey, CallSettings callSettings = null)
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
Parameters | |
---|---|
Name | Description |
tagKey | TagKey Required. The TagKey to be created. Only fields |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyCreateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKey tagKey = new TagKey();
// Make the request
Operation<TagKey, CreateTagKeyMetadata> response = await tagKeysClient.CreateTagKeyAsync(tagKey);
// Poll until the returned long-running operation is complete
Operation<TagKey, CreateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, CreateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceCreateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
CreateTagKeyAsync(TagKey, CancellationToken)
public virtual Task<Operation<TagKey, CreateTagKeyMetadata>> CreateTagKeyAsync(TagKey tagKey, CancellationToken cancellationToken)
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
Parameters | |
---|---|
Name | Description |
tagKey | TagKey Required. The TagKey to be created. Only fields |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyCreateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKey tagKey = new TagKey();
// Make the request
Operation<TagKey, CreateTagKeyMetadata> response = await tagKeysClient.CreateTagKeyAsync(tagKey);
// Poll until the returned long-running operation is complete
Operation<TagKey, CreateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, CreateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceCreateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKey(DeleteTagKeyRequest, CallSettings)
public virtual Operation<TagKey, DeleteTagKeyMetadata> DeleteTagKey(DeleteTagKeyRequest request, CallSettings callSettings = null)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
request | DeleteTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyDeleteTagKeyMetadata | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
DeleteTagKeyRequest request = new DeleteTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = tagKeysClient.DeleteTagKey(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = tagKeysClient.PollOnceDeleteTagKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKey(TagKeyName, CallSettings)
public virtual Operation<TagKey, DeleteTagKeyMetadata> DeleteTagKey(TagKeyName name, CallSettings callSettings = null)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. The resource name of a TagKey to be deleted in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyDeleteTagKeyMetadata | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = tagKeysClient.DeleteTagKey(name);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = tagKeysClient.PollOnceDeleteTagKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKey(string, CallSettings)
public virtual Operation<TagKey, DeleteTagKeyMetadata> DeleteTagKey(string name, CallSettings callSettings = null)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
name | string Required. The resource name of a TagKey to be deleted in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyDeleteTagKeyMetadata | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = tagKeysClient.DeleteTagKey(name);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = tagKeysClient.PollOnceDeleteTagKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKeyAsync(DeleteTagKeyRequest, CallSettings)
public virtual Task<Operation<TagKey, DeleteTagKeyMetadata>> DeleteTagKeyAsync(DeleteTagKeyRequest request, CallSettings callSettings = null)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
request | DeleteTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyDeleteTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
DeleteTagKeyRequest request = new DeleteTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = await tagKeysClient.DeleteTagKeyAsync(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceDeleteTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKeyAsync(DeleteTagKeyRequest, CancellationToken)
public virtual Task<Operation<TagKey, DeleteTagKeyMetadata>> DeleteTagKeyAsync(DeleteTagKeyRequest request, CancellationToken cancellationToken)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
request | DeleteTagKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyDeleteTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
DeleteTagKeyRequest request = new DeleteTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = await tagKeysClient.DeleteTagKeyAsync(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceDeleteTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKeyAsync(TagKeyName, CallSettings)
public virtual Task<Operation<TagKey, DeleteTagKeyMetadata>> DeleteTagKeyAsync(TagKeyName name, CallSettings callSettings = null)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. The resource name of a TagKey to be deleted in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyDeleteTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = await tagKeysClient.DeleteTagKeyAsync(name);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceDeleteTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKeyAsync(TagKeyName, CancellationToken)
public virtual Task<Operation<TagKey, DeleteTagKeyMetadata>> DeleteTagKeyAsync(TagKeyName name, CancellationToken cancellationToken)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. The resource name of a TagKey to be deleted in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyDeleteTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = await tagKeysClient.DeleteTagKeyAsync(name);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceDeleteTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKeyAsync(string, CallSettings)
public virtual Task<Operation<TagKey, DeleteTagKeyMetadata>> DeleteTagKeyAsync(string name, CallSettings callSettings = null)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
name | string Required. The resource name of a TagKey to be deleted in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyDeleteTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = await tagKeysClient.DeleteTagKeyAsync(name);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceDeleteTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
DeleteTagKeyAsync(string, CancellationToken)
public virtual Task<Operation<TagKey, DeleteTagKeyMetadata>> DeleteTagKeyAsync(string name, CancellationToken cancellationToken)
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
Parameters | |
---|---|
Name | Description |
name | string Required. The resource name of a TagKey to be deleted in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyDeleteTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
Operation<TagKey, DeleteTagKeyMetadata> response = await tagKeysClient.DeleteTagKeyAsync(name);
// Poll until the returned long-running operation is complete
Operation<TagKey, DeleteTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, DeleteTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceDeleteTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
GetIamPolicy(IResourceName, CallSettings)
public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = tagKeysClient.GetIamPolicy(resource);
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = tagKeysClient.GetIamPolicy(request);
GetIamPolicy(string, CallSettings)
public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = tagKeysClient.GetIamPolicy(resource);
GetIamPolicyAsync(IResourceName, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await tagKeysClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(IResourceName, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await tagKeysClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await tagKeysClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await tagKeysClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(string, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await tagKeysClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(string, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource
field should
be the TagKey's resource name. For example, "tagKeys/1234".
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy
permission on
the specified TagKey.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await tagKeysClient.GetIamPolicyAsync(resource);
GetNamespacedTagKey(GetNamespacedTagKeyRequest, CallSettings)
public virtual TagKey GetNamespacedTagKey(GetNamespacedTagKeyRequest request, CallSettings callSettings = null)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
request | GetNamespacedTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TagKey | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
GetNamespacedTagKeyRequest request = new GetNamespacedTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
};
// Make the request
TagKey response = tagKeysClient.GetNamespacedTagKey(request);
GetNamespacedTagKey(TagKeyName, CallSettings)
public virtual TagKey GetNamespacedTagKey(TagKeyName name, CallSettings callSettings = null)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. A namespaced tag key name in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TagKey | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
TagKey response = tagKeysClient.GetNamespacedTagKey(name);
GetNamespacedTagKey(string, CallSettings)
public virtual TagKey GetNamespacedTagKey(string name, CallSettings callSettings = null)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | string Required. A namespaced tag key name in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TagKey | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
TagKey response = tagKeysClient.GetNamespacedTagKey(name);
GetNamespacedTagKeyAsync(GetNamespacedTagKeyRequest, CallSettings)
public virtual Task<TagKey> GetNamespacedTagKeyAsync(GetNamespacedTagKeyRequest request, CallSettings callSettings = null)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
request | GetNamespacedTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
GetNamespacedTagKeyRequest request = new GetNamespacedTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
};
// Make the request
TagKey response = await tagKeysClient.GetNamespacedTagKeyAsync(request);
GetNamespacedTagKeyAsync(GetNamespacedTagKeyRequest, CancellationToken)
public virtual Task<TagKey> GetNamespacedTagKeyAsync(GetNamespacedTagKeyRequest request, CancellationToken cancellationToken)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
request | GetNamespacedTagKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
GetNamespacedTagKeyRequest request = new GetNamespacedTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
};
// Make the request
TagKey response = await tagKeysClient.GetNamespacedTagKeyAsync(request);
GetNamespacedTagKeyAsync(TagKeyName, CallSettings)
public virtual Task<TagKey> GetNamespacedTagKeyAsync(TagKeyName name, CallSettings callSettings = null)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. A namespaced tag key name in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
TagKey response = await tagKeysClient.GetNamespacedTagKeyAsync(name);
GetNamespacedTagKeyAsync(TagKeyName, CancellationToken)
public virtual Task<TagKey> GetNamespacedTagKeyAsync(TagKeyName name, CancellationToken cancellationToken)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. A namespaced tag key name in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
TagKey response = await tagKeysClient.GetNamespacedTagKeyAsync(name);
GetNamespacedTagKeyAsync(string, CallSettings)
public virtual Task<TagKey> GetNamespacedTagKeyAsync(string name, CallSettings callSettings = null)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | string Required. A namespaced tag key name in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
TagKey response = await tagKeysClient.GetNamespacedTagKeyAsync(name);
GetNamespacedTagKeyAsync(string, CancellationToken)
public virtual Task<TagKey> GetNamespacedTagKeyAsync(string name, CancellationToken cancellationToken)
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED
if the key does not exist
or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | string Required. A namespaced tag key name in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
TagKey response = await tagKeysClient.GetNamespacedTagKeyAsync(name);
GetTagKey(GetTagKeyRequest, CallSettings)
public virtual TagKey GetTagKey(GetTagKeyRequest request, CallSettings callSettings = null)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
request | GetTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TagKey | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
GetTagKeyRequest request = new GetTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
};
// Make the request
TagKey response = tagKeysClient.GetTagKey(request);
GetTagKey(TagKeyName, CallSettings)
public virtual TagKey GetTagKey(TagKeyName name, CallSettings callSettings = null)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. A resource name in the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TagKey | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
TagKey response = tagKeysClient.GetTagKey(name);
GetTagKey(string, CallSettings)
public virtual TagKey GetTagKey(string name, CallSettings callSettings = null)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | string Required. A resource name in the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TagKey | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
TagKey response = tagKeysClient.GetTagKey(name);
GetTagKeyAsync(GetTagKeyRequest, CallSettings)
public virtual Task<TagKey> GetTagKeyAsync(GetTagKeyRequest request, CallSettings callSettings = null)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
request | GetTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
GetTagKeyRequest request = new GetTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
};
// Make the request
TagKey response = await tagKeysClient.GetTagKeyAsync(request);
GetTagKeyAsync(GetTagKeyRequest, CancellationToken)
public virtual Task<TagKey> GetTagKeyAsync(GetTagKeyRequest request, CancellationToken cancellationToken)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
request | GetTagKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
GetTagKeyRequest request = new GetTagKeyRequest
{
TagKeyName = TagKeyName.FromTagKey("[TAG_KEY]"),
};
// Make the request
TagKey response = await tagKeysClient.GetTagKeyAsync(request);
GetTagKeyAsync(TagKeyName, CallSettings)
public virtual Task<TagKey> GetTagKeyAsync(TagKeyName name, CallSettings callSettings = null)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. A resource name in the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
TagKey response = await tagKeysClient.GetTagKeyAsync(name);
GetTagKeyAsync(TagKeyName, CancellationToken)
public virtual Task<TagKey> GetTagKeyAsync(TagKeyName name, CancellationToken cancellationToken)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | TagKeyName Required. A resource name in the format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKeyName name = TagKeyName.FromTagKey("[TAG_KEY]");
// Make the request
TagKey response = await tagKeysClient.GetTagKeyAsync(name);
GetTagKeyAsync(string, CallSettings)
public virtual Task<TagKey> GetTagKeyAsync(string name, CallSettings callSettings = null)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | string Required. A resource name in the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
TagKey response = await tagKeysClient.GetTagKeyAsync(name);
GetTagKeyAsync(string, CancellationToken)
public virtual Task<TagKey> GetTagKeyAsync(string name, CancellationToken cancellationToken)
Retrieves a TagKey. This method will return PERMISSION_DENIED
if the
key does not exist or the user does not have permission to view it.
Parameters | |
---|---|
Name | Description |
name | string Required. A resource name in the format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTagKey | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string name = "tagKeys/[TAG_KEY]";
// Make the request
TagKey response = await tagKeysClient.GetTagKeyAsync(name);
ListTagKeys(IResourceName, string, int?, CallSettings)
public virtual PagedEnumerable<ListTagKeysResponse, TagKey> ListTagKeys(IResourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all TagKeys for a parent resource.
Parameters | |
---|---|
Name | Description |
parent | IResourceName Required. The resource name of the TagKey's parent.
Must be of the form |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTagKeysResponseTagKey | A pageable sequence of TagKey resources. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListTagKeysResponse, TagKey> response = tagKeysClient.ListTagKeys(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TagKey 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 (ListTagKeysResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TagKey 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<TagKey> 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 (TagKey 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;
ListTagKeys(ListTagKeysRequest, CallSettings)
public virtual PagedEnumerable<ListTagKeysResponse, TagKey> ListTagKeys(ListTagKeysRequest request, CallSettings callSettings = null)
Lists all TagKeys for a parent resource.
Parameters | |
---|---|
Name | Description |
request | ListTagKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTagKeysResponseTagKey | A pageable sequence of TagKey resources. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
ListTagKeysRequest request = new ListTagKeysRequest
{
ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
};
// Make the request
PagedEnumerable<ListTagKeysResponse, TagKey> response = tagKeysClient.ListTagKeys(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (TagKey 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 (ListTagKeysResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TagKey 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<TagKey> 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 (TagKey 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;
ListTagKeys(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListTagKeysResponse, TagKey> ListTagKeys(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all TagKeys for a parent resource.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the TagKey's parent.
Must be of the form |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTagKeysResponseTagKey | A pageable sequence of TagKey resources. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedEnumerable<ListTagKeysResponse, TagKey> response = tagKeysClient.ListTagKeys(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TagKey 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 (ListTagKeysResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TagKey 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<TagKey> 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 (TagKey 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;
ListTagKeysAsync(IResourceName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTagKeysResponse, TagKey> ListTagKeysAsync(IResourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all TagKeys for a parent resource.
Parameters | |
---|---|
Name | Description |
parent | IResourceName Required. The resource name of the TagKey's parent.
Must be of the form |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTagKeysResponseTagKey | A pageable asynchronous sequence of TagKey resources. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListTagKeysResponse, TagKey> response = tagKeysClient.ListTagKeysAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TagKey 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((ListTagKeysResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TagKey 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<TagKey> 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 (TagKey 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;
ListTagKeysAsync(ListTagKeysRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListTagKeysResponse, TagKey> ListTagKeysAsync(ListTagKeysRequest request, CallSettings callSettings = null)
Lists all TagKeys for a parent resource.
Parameters | |
---|---|
Name | Description |
request | ListTagKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTagKeysResponseTagKey | A pageable asynchronous sequence of TagKey resources. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
ListTagKeysRequest request = new ListTagKeysRequest
{
ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
};
// Make the request
PagedAsyncEnumerable<ListTagKeysResponse, TagKey> response = tagKeysClient.ListTagKeysAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TagKey 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((ListTagKeysResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TagKey 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<TagKey> 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 (TagKey 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;
ListTagKeysAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTagKeysResponse, TagKey> ListTagKeysAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all TagKeys for a parent resource.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the TagKey's parent.
Must be of the form |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTagKeysResponseTagKey | A pageable asynchronous sequence of TagKey resources. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedAsyncEnumerable<ListTagKeysResponse, TagKey> response = tagKeysClient.ListTagKeysAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TagKey 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((ListTagKeysResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TagKey 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<TagKey> 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 (TagKey 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;
PollOnceCreateTagKey(string, CallSettings)
public virtual Operation<TagKey, CreateTagKeyMetadata> PollOnceCreateTagKey(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateTagKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyCreateTagKeyMetadata | The result of polling the operation. |
PollOnceCreateTagKeyAsync(string, CallSettings)
public virtual Task<Operation<TagKey, CreateTagKeyMetadata>> PollOnceCreateTagKeyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateTagKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyCreateTagKeyMetadata | A task representing the result of polling the operation. |
PollOnceDeleteTagKey(string, CallSettings)
public virtual Operation<TagKey, DeleteTagKeyMetadata> PollOnceDeleteTagKey(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteTagKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyDeleteTagKeyMetadata | The result of polling the operation. |
PollOnceDeleteTagKeyAsync(string, CallSettings)
public virtual Task<Operation<TagKey, DeleteTagKeyMetadata>> PollOnceDeleteTagKeyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteTagKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyDeleteTagKeyMetadata | A task representing the result of polling the operation. |
PollOnceUpdateTagKey(string, CallSettings)
public virtual Operation<TagKey, UpdateTagKeyMetadata> PollOnceUpdateTagKey(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateTagKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyUpdateTagKeyMetadata | The result of polling the operation. |
PollOnceUpdateTagKeyAsync(string, CallSettings)
public virtual Task<Operation<TagKey, UpdateTagKeyMetadata>> PollOnceUpdateTagKeyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateTagKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyUpdateTagKeyMetadata | 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 TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = tagKeysClient.SetIamPolicy(resource, policy);
SetIamPolicy(SetIamPolicyRequest, CallSettings)
public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy on a TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.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 = tagKeysClient.SetIamPolicy(request);
SetIamPolicy(string, Policy, CallSettings)
public virtual Policy SetIamPolicy(string resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy on a TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = tagKeysClient.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 TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await tagKeysClient.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 TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await tagKeysClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy on a TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.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 tagKeysClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)
Sets the access control policy on a TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.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 tagKeysClient.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 TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await tagKeysClient.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 TagKey, replacing any existing
policy. The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
The caller must have resourcemanager.tagKeys.setIamPolicy
permission
on the identified tagValue.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await tagKeysClient.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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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 TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = tagKeysClient.TestIamPermissions(resource, permissions);
TestIamPermissions(TestIamPermissionsRequest, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = tagKeysClient.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 TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = tagKeysClient.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 TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagKeysClient.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 TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagKeysClient.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 TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await tagKeysClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await tagKeysClient.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 TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagKeysClient.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 TagKey.
The resource
field should be the TagKey's resource name.
For example, "tagKeys/1234".
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await tagKeysClient.TestIamPermissionsAsync(resource, permissions);
UpdateTagKey(TagKey, FieldMask, CallSettings)
public virtual Operation<TagKey, UpdateTagKeyMetadata> UpdateTagKey(TagKey tagKey, FieldMask updateMask, CallSettings callSettings = null)
Updates the attributes of the TagKey resource.
Parameters | |
---|---|
Name | Description |
tagKey | TagKey Required. The new definition of the TagKey. Only the |
updateMask | FieldMask Fields to be updated. The mask may only contain |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyUpdateTagKeyMetadata | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
TagKey tagKey = new TagKey();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<TagKey, UpdateTagKeyMetadata> response = tagKeysClient.UpdateTagKey(tagKey, updateMask);
// Poll until the returned long-running operation is complete
Operation<TagKey, UpdateTagKeyMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagKey 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<TagKey, UpdateTagKeyMetadata> retrievedResponse = tagKeysClient.PollOnceUpdateTagKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
UpdateTagKey(UpdateTagKeyRequest, CallSettings)
public virtual Operation<TagKey, UpdateTagKeyMetadata> UpdateTagKey(UpdateTagKeyRequest request, CallSettings callSettings = null)
Updates the attributes of the TagKey resource.
Parameters | |
---|---|
Name | Description |
request | UpdateTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTagKeyUpdateTagKeyMetadata | The RPC response. |
// Create client
TagKeysClient tagKeysClient = TagKeysClient.Create();
// Initialize request argument(s)
UpdateTagKeyRequest request = new UpdateTagKeyRequest
{
TagKey = new TagKey(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<TagKey, UpdateTagKeyMetadata> response = tagKeysClient.UpdateTagKey(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, UpdateTagKeyMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagKey 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<TagKey, UpdateTagKeyMetadata> retrievedResponse = tagKeysClient.PollOnceUpdateTagKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
UpdateTagKeyAsync(TagKey, FieldMask, CallSettings)
public virtual Task<Operation<TagKey, UpdateTagKeyMetadata>> UpdateTagKeyAsync(TagKey tagKey, FieldMask updateMask, CallSettings callSettings = null)
Updates the attributes of the TagKey resource.
Parameters | |
---|---|
Name | Description |
tagKey | TagKey Required. The new definition of the TagKey. Only the |
updateMask | FieldMask Fields to be updated. The mask may only contain |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyUpdateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKey tagKey = new TagKey();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<TagKey, UpdateTagKeyMetadata> response = await tagKeysClient.UpdateTagKeyAsync(tagKey, updateMask);
// Poll until the returned long-running operation is complete
Operation<TagKey, UpdateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, UpdateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceUpdateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
UpdateTagKeyAsync(TagKey, FieldMask, CancellationToken)
public virtual Task<Operation<TagKey, UpdateTagKeyMetadata>> UpdateTagKeyAsync(TagKey tagKey, FieldMask updateMask, CancellationToken cancellationToken)
Updates the attributes of the TagKey resource.
Parameters | |
---|---|
Name | Description |
tagKey | TagKey Required. The new definition of the TagKey. Only the |
updateMask | FieldMask Fields to be updated. The mask may only contain |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyUpdateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
TagKey tagKey = new TagKey();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<TagKey, UpdateTagKeyMetadata> response = await tagKeysClient.UpdateTagKeyAsync(tagKey, updateMask);
// Poll until the returned long-running operation is complete
Operation<TagKey, UpdateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, UpdateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceUpdateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
UpdateTagKeyAsync(UpdateTagKeyRequest, CallSettings)
public virtual Task<Operation<TagKey, UpdateTagKeyMetadata>> UpdateTagKeyAsync(UpdateTagKeyRequest request, CallSettings callSettings = null)
Updates the attributes of the TagKey resource.
Parameters | |
---|---|
Name | Description |
request | UpdateTagKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyUpdateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
UpdateTagKeyRequest request = new UpdateTagKeyRequest
{
TagKey = new TagKey(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<TagKey, UpdateTagKeyMetadata> response = await tagKeysClient.UpdateTagKeyAsync(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, UpdateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, UpdateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceUpdateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}
UpdateTagKeyAsync(UpdateTagKeyRequest, CancellationToken)
public virtual Task<Operation<TagKey, UpdateTagKeyMetadata>> UpdateTagKeyAsync(UpdateTagKeyRequest request, CancellationToken cancellationToken)
Updates the attributes of the TagKey resource.
Parameters | |
---|---|
Name | Description |
request | UpdateTagKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTagKeyUpdateTagKeyMetadata | A Task containing the RPC response. |
// Create client
TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync();
// Initialize request argument(s)
UpdateTagKeyRequest request = new UpdateTagKeyRequest
{
TagKey = new TagKey(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<TagKey, UpdateTagKeyMetadata> response = await tagKeysClient.UpdateTagKeyAsync(request);
// Poll until the returned long-running operation is complete
Operation<TagKey, UpdateTagKeyMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagKey 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<TagKey, UpdateTagKeyMetadata> retrievedResponse = await tagKeysClient.PollOnceUpdateTagKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TagKey retrievedResult = retrievedResponse.Result;
}