Class TagBindingsClient

public abstract class TagBindingsClient

TagBindings client wrapper, for convenient use.

Inheritance

Object > TagBindingsClient

Derived Types

Namespace

Google.Cloud.ResourceManager.V3

Assembly

Google.Cloud.ResourceManager.V3.dll

Remarks

Allow users to create and manage TagBindings between TagValues and different cloud resources throughout the GCP resource hierarchy.

Properties

CreateTagBindingOperationsClient

public virtual OperationsClient CreateTagBindingOperationsClient { get; }

The long-running operations client for CreateTagBinding.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default TagBindings scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteTagBindingOperationsClient

public virtual OperationsClient DeleteTagBindingOperationsClient { get; }

The long-running operations client for DeleteTagBinding.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual TagBindings.TagBindingsClient GrpcClient { get; }

The underlying gRPC TagBindings client

Property Value
TypeDescription
TagBindings.TagBindingsClient

Methods

Create()

public static TagBindingsClient Create()

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

Returns
TypeDescription
TagBindingsClient

The created TagBindingsClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<TagBindingsClient>

The task representing the created TagBindingsClient.

CreateTagBinding(CreateTagBindingRequest, CallSettings)

public virtual Operation<TagBinding, CreateTagBindingMetadata> CreateTagBinding(CreateTagBindingRequest request, CallSettings callSettings = null)

Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).

Parameters
NameDescription
requestCreateTagBindingRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<TagBinding, CreateTagBindingMetadata>

The RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
CreateTagBindingRequest request = new CreateTagBindingRequest
{
    TagBinding = new TagBinding(),
    ValidateOnly = false,
};
// Make the request
Operation<TagBinding, CreateTagBindingMetadata> response = tagBindingsClient.CreateTagBinding(request);

// Poll until the returned long-running operation is complete
Operation<TagBinding, CreateTagBindingMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagBinding 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<TagBinding, CreateTagBindingMetadata> retrievedResponse = tagBindingsClient.PollOnceCreateTagBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagBinding retrievedResult = retrievedResponse.Result;
}

CreateTagBinding(TagBinding, CallSettings)

public virtual Operation<TagBinding, CreateTagBindingMetadata> CreateTagBinding(TagBinding tagBinding, CallSettings callSettings = null)

Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).

Parameters
NameDescription
tagBindingTagBinding

Required. The TagBinding to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<TagBinding, CreateTagBindingMetadata>

The RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
TagBinding tagBinding = new TagBinding();
// Make the request
Operation<TagBinding, CreateTagBindingMetadata> response = tagBindingsClient.CreateTagBinding(tagBinding);

// Poll until the returned long-running operation is complete
Operation<TagBinding, CreateTagBindingMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TagBinding 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<TagBinding, CreateTagBindingMetadata> retrievedResponse = tagBindingsClient.PollOnceCreateTagBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagBinding retrievedResult = retrievedResponse.Result;
}

CreateTagBindingAsync(CreateTagBindingRequest, CallSettings)

public virtual Task<Operation<TagBinding, CreateTagBindingMetadata>> CreateTagBindingAsync(CreateTagBindingRequest request, CallSettings callSettings = null)

Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).

Parameters
NameDescription
requestCreateTagBindingRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<TagBinding, CreateTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
CreateTagBindingRequest request = new CreateTagBindingRequest
{
    TagBinding = new TagBinding(),
    ValidateOnly = false,
};
// Make the request
Operation<TagBinding, CreateTagBindingMetadata> response = await tagBindingsClient.CreateTagBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagBinding, CreateTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagBinding 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<TagBinding, CreateTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceCreateTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagBinding retrievedResult = retrievedResponse.Result;
}

CreateTagBindingAsync(CreateTagBindingRequest, CancellationToken)

public virtual Task<Operation<TagBinding, CreateTagBindingMetadata>> CreateTagBindingAsync(CreateTagBindingRequest request, CancellationToken cancellationToken)

Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).

Parameters
NameDescription
requestCreateTagBindingRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<TagBinding, CreateTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
CreateTagBindingRequest request = new CreateTagBindingRequest
{
    TagBinding = new TagBinding(),
    ValidateOnly = false,
};
// Make the request
Operation<TagBinding, CreateTagBindingMetadata> response = await tagBindingsClient.CreateTagBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<TagBinding, CreateTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagBinding 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<TagBinding, CreateTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceCreateTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagBinding retrievedResult = retrievedResponse.Result;
}

CreateTagBindingAsync(TagBinding, CallSettings)

public virtual Task<Operation<TagBinding, CreateTagBindingMetadata>> CreateTagBindingAsync(TagBinding tagBinding, CallSettings callSettings = null)

Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).

Parameters
NameDescription
tagBindingTagBinding

Required. The TagBinding to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<TagBinding, CreateTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
TagBinding tagBinding = new TagBinding();
// Make the request
Operation<TagBinding, CreateTagBindingMetadata> response = await tagBindingsClient.CreateTagBindingAsync(tagBinding);

// Poll until the returned long-running operation is complete
Operation<TagBinding, CreateTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagBinding 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<TagBinding, CreateTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceCreateTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagBinding retrievedResult = retrievedResponse.Result;
}

CreateTagBindingAsync(TagBinding, CancellationToken)

public virtual Task<Operation<TagBinding, CreateTagBindingMetadata>> CreateTagBindingAsync(TagBinding tagBinding, CancellationToken cancellationToken)

Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).

Parameters
NameDescription
tagBindingTagBinding

Required. The TagBinding to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<TagBinding, CreateTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
TagBinding tagBinding = new TagBinding();
// Make the request
Operation<TagBinding, CreateTagBindingMetadata> response = await tagBindingsClient.CreateTagBindingAsync(tagBinding);

// Poll until the returned long-running operation is complete
Operation<TagBinding, CreateTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TagBinding 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<TagBinding, CreateTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceCreateTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TagBinding retrievedResult = retrievedResponse.Result;
}

DeleteTagBinding(DeleteTagBindingRequest, CallSettings)

public virtual Operation<Empty, DeleteTagBindingMetadata> DeleteTagBinding(DeleteTagBindingRequest request, CallSettings callSettings = null)

Deletes a TagBinding.

Parameters
NameDescription
requestDeleteTagBindingRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteTagBindingMetadata>

The RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
DeleteTagBindingRequest request = new DeleteTagBindingRequest
{
    TagBindingName = TagBindingName.FromTagBinding("[TAG_BINDING]"),
};
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = tagBindingsClient.DeleteTagBinding(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = tagBindingsClient.PollOnceDeleteTagBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBinding(TagBindingName, CallSettings)

public virtual Operation<Empty, DeleteTagBindingMetadata> DeleteTagBinding(TagBindingName name, CallSettings callSettings = null)

Deletes a TagBinding.

Parameters
NameDescription
nameTagBindingName

Required. The name of the TagBinding. This is a String of the form: tagBindings/{id} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456).

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteTagBindingMetadata>

The RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
TagBindingName name = TagBindingName.FromTagBinding("[TAG_BINDING]");
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = tagBindingsClient.DeleteTagBinding(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = tagBindingsClient.PollOnceDeleteTagBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBinding(String, CallSettings)

public virtual Operation<Empty, DeleteTagBindingMetadata> DeleteTagBinding(string name, CallSettings callSettings = null)

Deletes a TagBinding.

Parameters
NameDescription
nameString

Required. The name of the TagBinding. This is a String of the form: tagBindings/{id} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456).

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteTagBindingMetadata>

The RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
string name = "tagBindings/[TAG_BINDING]";
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = tagBindingsClient.DeleteTagBinding(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = tagBindingsClient.PollOnceDeleteTagBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBindingAsync(DeleteTagBindingRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteTagBindingMetadata>> DeleteTagBindingAsync(DeleteTagBindingRequest request, CallSettings callSettings = null)

Deletes a TagBinding.

Parameters
NameDescription
requestDeleteTagBindingRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
DeleteTagBindingRequest request = new DeleteTagBindingRequest
{
    TagBindingName = TagBindingName.FromTagBinding("[TAG_BINDING]"),
};
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = await tagBindingsClient.DeleteTagBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceDeleteTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBindingAsync(DeleteTagBindingRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteTagBindingMetadata>> DeleteTagBindingAsync(DeleteTagBindingRequest request, CancellationToken cancellationToken)

Deletes a TagBinding.

Parameters
NameDescription
requestDeleteTagBindingRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
DeleteTagBindingRequest request = new DeleteTagBindingRequest
{
    TagBindingName = TagBindingName.FromTagBinding("[TAG_BINDING]"),
};
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = await tagBindingsClient.DeleteTagBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceDeleteTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBindingAsync(TagBindingName, CallSettings)

public virtual Task<Operation<Empty, DeleteTagBindingMetadata>> DeleteTagBindingAsync(TagBindingName name, CallSettings callSettings = null)

Deletes a TagBinding.

Parameters
NameDescription
nameTagBindingName

Required. The name of the TagBinding. This is a String of the form: tagBindings/{id} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456).

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
TagBindingName name = TagBindingName.FromTagBinding("[TAG_BINDING]");
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = await tagBindingsClient.DeleteTagBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceDeleteTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBindingAsync(TagBindingName, CancellationToken)

public virtual Task<Operation<Empty, DeleteTagBindingMetadata>> DeleteTagBindingAsync(TagBindingName name, CancellationToken cancellationToken)

Deletes a TagBinding.

Parameters
NameDescription
nameTagBindingName

Required. The name of the TagBinding. This is a String of the form: tagBindings/{id} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456).

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
TagBindingName name = TagBindingName.FromTagBinding("[TAG_BINDING]");
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = await tagBindingsClient.DeleteTagBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceDeleteTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBindingAsync(String, CallSettings)

public virtual Task<Operation<Empty, DeleteTagBindingMetadata>> DeleteTagBindingAsync(string name, CallSettings callSettings = null)

Deletes a TagBinding.

Parameters
NameDescription
nameString

Required. The name of the TagBinding. This is a String of the form: tagBindings/{id} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456).

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
string name = "tagBindings/[TAG_BINDING]";
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = await tagBindingsClient.DeleteTagBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceDeleteTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTagBindingAsync(String, CancellationToken)

public virtual Task<Operation<Empty, DeleteTagBindingMetadata>> DeleteTagBindingAsync(string name, CancellationToken cancellationToken)

Deletes a TagBinding.

Parameters
NameDescription
nameString

Required. The name of the TagBinding. This is a String of the form: tagBindings/{id} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456).

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteTagBindingMetadata>>

A Task containing the RPC response.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
string name = "tagBindings/[TAG_BINDING]";
// Make the request
Operation<Empty, DeleteTagBindingMetadata> response = await tagBindingsClient.DeleteTagBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTagBindingMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteTagBindingMetadata> retrievedResponse = await tagBindingsClient.PollOnceDeleteTagBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

ListTagBindings(IResourceName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListTagBindingsResponse, TagBinding> ListTagBindings(IResourceName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists the TagBindings for the given cloud resource, as specified with parent.

NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

Parameters
NameDescription
parentIResourceName

Required. The full resource name of a resource for which you want to list existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTagBindingsResponse, TagBinding>

A pageable sequence of TagBinding resources.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListTagBindingsResponse, TagBinding> response = tagBindingsClient.ListTagBindings(parent);

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

ListTagBindings(ListTagBindingsRequest, CallSettings)

public virtual PagedEnumerable<ListTagBindingsResponse, TagBinding> ListTagBindings(ListTagBindingsRequest request, CallSettings callSettings = null)

Lists the TagBindings for the given cloud resource, as specified with parent.

NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

Parameters
NameDescription
requestListTagBindingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTagBindingsResponse, TagBinding>

A pageable sequence of TagBinding resources.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
ListTagBindingsRequest request = new ListTagBindingsRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
};
// Make the request
PagedEnumerable<ListTagBindingsResponse, TagBinding> response = tagBindingsClient.ListTagBindings(request);

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

ListTagBindings(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListTagBindingsResponse, TagBinding> ListTagBindings(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists the TagBindings for the given cloud resource, as specified with parent.

NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

Parameters
NameDescription
parentString

Required. The full resource name of a resource for which you want to list existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTagBindingsResponse, TagBinding>

A pageable sequence of TagBinding resources.

Example
// Create client
TagBindingsClient tagBindingsClient = TagBindingsClient.Create();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedEnumerable<ListTagBindingsResponse, TagBinding> response = tagBindingsClient.ListTagBindings(parent);

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

ListTagBindingsAsync(IResourceName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding> ListTagBindingsAsync(IResourceName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists the TagBindings for the given cloud resource, as specified with parent.

NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

Parameters
NameDescription
parentIResourceName

Required. The full resource name of a resource for which you want to list existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding>

A pageable asynchronous sequence of TagBinding resources.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding> response = tagBindingsClient.ListTagBindingsAsync(parent);

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

ListTagBindingsAsync(ListTagBindingsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding> ListTagBindingsAsync(ListTagBindingsRequest request, CallSettings callSettings = null)

Lists the TagBindings for the given cloud resource, as specified with parent.

NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

Parameters
NameDescription
requestListTagBindingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding>

A pageable asynchronous sequence of TagBinding resources.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
ListTagBindingsRequest request = new ListTagBindingsRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
};
// Make the request
PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding> response = tagBindingsClient.ListTagBindingsAsync(request);

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

ListTagBindingsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding> ListTagBindingsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists the TagBindings for the given cloud resource, as specified with parent.

NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

Parameters
NameDescription
parentString

Required. The full resource name of a resource for which you want to list existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding>

A pageable asynchronous sequence of TagBinding resources.

Example
// Create client
TagBindingsClient tagBindingsClient = await TagBindingsClient.CreateAsync();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedAsyncEnumerable<ListTagBindingsResponse, TagBinding> response = tagBindingsClient.ListTagBindingsAsync(parent);

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

PollOnceCreateTagBinding(String, CallSettings)

public virtual Operation<TagBinding, CreateTagBindingMetadata> PollOnceCreateTagBinding(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<TagBinding, CreateTagBindingMetadata>

The result of polling the operation.

PollOnceCreateTagBindingAsync(String, CallSettings)

public virtual Task<Operation<TagBinding, CreateTagBindingMetadata>> PollOnceCreateTagBindingAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<TagBinding, CreateTagBindingMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteTagBinding(String, CallSettings)

public virtual Operation<Empty, DeleteTagBindingMetadata> PollOnceDeleteTagBinding(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteTagBindingMetadata>

The result of polling the operation.

PollOnceDeleteTagBindingAsync(String, CallSettings)

public virtual Task<Operation<Empty, DeleteTagBindingMetadata>> PollOnceDeleteTagBindingAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteTagBindingMetadata>>

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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