public abstract class AddressGroupServiceClientReference documentation and code samples for the Network Security v1 API class AddressGroupServiceClient.
AddressGroupService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.NetworkSecurity.V1Assembly
Google.Cloud.NetworkSecurity.V1.dll
Remarks
AddressGroup is a resource that manages a collection of IP or Domain Names, it can be used in Firewall Policy to represent allow or deny traffic from all the IP or Domain Names from the Address Group.
Properties
AddAddressGroupItemsOperationsClient
public virtual OperationsClient AddAddressGroupItemsOperationsClient { get; }The long-running operations client for AddAddressGroupItems.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
CloneAddressGroupItemsOperationsClient
public virtual OperationsClient CloneAddressGroupItemsOperationsClient { get; }The long-running operations client for CloneAddressGroupItems.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
CreateAddressGroupOperationsClient
public virtual OperationsClient CreateAddressGroupOperationsClient { get; }The long-running operations client for CreateAddressGroup.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the AddressGroupService service, which is a host of "networksecurity.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default AddressGroupService scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default AddressGroupService scopes are:
DeleteAddressGroupOperationsClient
public virtual OperationsClient DeleteAddressGroupOperationsClient { get; }The long-running operations client for DeleteAddressGroup.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public virtual AddressGroupService.AddressGroupServiceClient GrpcClient { get; }The underlying gRPC AddressGroupService client
| Property Value | |
|---|---|
| Type | Description |
AddressGroupServiceAddressGroupServiceClient |
|
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }The IAMPolicyClient associated with this client.
| Property Value | |
|---|---|
| Type | Description |
IAMPolicyClient |
|
LocationsClient
public virtual LocationsClient LocationsClient { get; }The LocationsClient associated with this client.
| Property Value | |
|---|---|
| Type | Description |
LocationsClient |
|
RemoveAddressGroupItemsOperationsClient
public virtual OperationsClient RemoveAddressGroupItemsOperationsClient { get; }The long-running operations client for RemoveAddressGroupItems.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
ServiceMetadata |
|
UpdateAddressGroupOperationsClient
public virtual OperationsClient UpdateAddressGroupOperationsClient { get; }The long-running operations client for UpdateAddressGroup.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
Methods
AddAddressGroupItems(AddAddressGroupItemsRequest, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> AddAddressGroupItems(AddAddressGroupItemsRequest request, CallSettings callSettings = null)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
AddAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddAddressGroupItemsRequest request = new AddAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
Items = { "", },
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.AddAddressGroupItems(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceAddAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItems(AddressGroupName, IEnumerable<string>, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> AddAddressGroupItems(AddressGroupName addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to add items to. Must be in the format
|
items |
IEnumerablestringRequired. List of items to add. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.AddAddressGroupItems(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceAddAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItems(string, IEnumerable<string>, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> AddAddressGroupItems(string addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to add items to. Must be in the format
|
items |
IEnumerablestringRequired. List of items to add. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.AddAddressGroupItems(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceAddAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItemsAsync(AddAddressGroupItemsRequest, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> AddAddressGroupItemsAsync(AddAddressGroupItemsRequest request, CallSettings callSettings = null)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
AddAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddAddressGroupItemsRequest request = new AddAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
Items = { "", },
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.AddAddressGroupItemsAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceAddAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItemsAsync(AddAddressGroupItemsRequest, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> AddAddressGroupItemsAsync(AddAddressGroupItemsRequest request, CancellationToken cancellationToken)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
AddAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddAddressGroupItemsRequest request = new AddAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
Items = { "", },
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.AddAddressGroupItemsAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceAddAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItemsAsync(AddressGroupName, IEnumerable<string>, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> AddAddressGroupItemsAsync(AddressGroupName addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to add items to. Must be in the format
|
items |
IEnumerablestringRequired. List of items to add. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.AddAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceAddAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItemsAsync(AddressGroupName, IEnumerable<string>, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> AddAddressGroupItemsAsync(AddressGroupName addressGroup, IEnumerable<string> items, CancellationToken cancellationToken)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to add items to. Must be in the format
|
items |
IEnumerablestringRequired. List of items to add. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.AddAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceAddAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItemsAsync(string, IEnumerable<string>, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> AddAddressGroupItemsAsync(string addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to add items to. Must be in the format
|
items |
IEnumerablestringRequired. List of items to add. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.AddAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceAddAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
AddAddressGroupItemsAsync(string, IEnumerable<string>, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> AddAddressGroupItemsAsync(string addressGroup, IEnumerable<string> items, CancellationToken cancellationToken)Adds items to an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to add items to. Must be in the format
|
items |
IEnumerablestringRequired. List of items to add. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.AddAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceAddAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItems(AddressGroupName, AddressGroupName, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> CloneAddressGroupItems(AddressGroupName addressGroup, AddressGroupName sourceAddressGroup, CallSettings callSettings = null)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to clone items to. Must be in the
format |
sourceAddressGroup |
AddressGroupNameRequired. Source address group to clone items from. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
AddressGroupName sourceAddressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.CloneAddressGroupItems(addressGroup, sourceAddressGroup);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceCloneAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItems(CloneAddressGroupItemsRequest, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> CloneAddressGroupItems(CloneAddressGroupItemsRequest request, CallSettings callSettings = null)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
request |
CloneAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
CloneAddressGroupItemsRequest request = new CloneAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
SourceAddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.CloneAddressGroupItems(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceCloneAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItems(string, string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> CloneAddressGroupItems(string addressGroup, string sourceAddressGroup, CallSettings callSettings = null)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to clone items to. Must be in the
format |
sourceAddressGroup |
stringRequired. Source address group to clone items from. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
string sourceAddressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.CloneAddressGroupItems(addressGroup, sourceAddressGroup);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceCloneAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItemsAsync(AddressGroupName, AddressGroupName, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CloneAddressGroupItemsAsync(AddressGroupName addressGroup, AddressGroupName sourceAddressGroup, CallSettings callSettings = null)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to clone items to. Must be in the
format |
sourceAddressGroup |
AddressGroupNameRequired. Source address group to clone items from. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
AddressGroupName sourceAddressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CloneAddressGroupItemsAsync(addressGroup, sourceAddressGroup);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCloneAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItemsAsync(AddressGroupName, AddressGroupName, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CloneAddressGroupItemsAsync(AddressGroupName addressGroup, AddressGroupName sourceAddressGroup, CancellationToken cancellationToken)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to clone items to. Must be in the
format |
sourceAddressGroup |
AddressGroupNameRequired. Source address group to clone items from. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
AddressGroupName sourceAddressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CloneAddressGroupItemsAsync(addressGroup, sourceAddressGroup);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCloneAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest request, CallSettings callSettings = null)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
request |
CloneAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
CloneAddressGroupItemsRequest request = new CloneAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
SourceAddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CloneAddressGroupItemsAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCloneAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest request, CancellationToken cancellationToken)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
request |
CloneAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
CloneAddressGroupItemsRequest request = new CloneAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
SourceAddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CloneAddressGroupItemsAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCloneAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItemsAsync(string, string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CloneAddressGroupItemsAsync(string addressGroup, string sourceAddressGroup, CallSettings callSettings = null)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to clone items to. Must be in the
format |
sourceAddressGroup |
stringRequired. Source address group to clone items from. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
string sourceAddressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CloneAddressGroupItemsAsync(addressGroup, sourceAddressGroup);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCloneAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CloneAddressGroupItemsAsync(string, string, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CloneAddressGroupItemsAsync(string addressGroup, string sourceAddressGroup, CancellationToken cancellationToken)Clones items from one address group to another.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to clone items to. Must be in the
format |
sourceAddressGroup |
stringRequired. Source address group to clone items from. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
string sourceAddressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CloneAddressGroupItemsAsync(addressGroup, sourceAddressGroup);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCloneAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
Create()
public static AddressGroupServiceClient Create()Synchronously creates a AddressGroupServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AddressGroupServiceClientBuilder.
| Returns | |
|---|---|
| Type | Description |
AddressGroupServiceClient |
The created AddressGroupServiceClient. |
CreateAddressGroup(LocationName, AddressGroup, string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> CreateAddressGroup(LocationName parent, AddressGroup addressGroup, string addressGroupId, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.CreateAddressGroup(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceCreateAddressGroup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroup(CreateAddressGroupRequest, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> CreateAddressGroup(CreateAddressGroupRequest request, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
CreateAddressGroupRequest request = new CreateAddressGroupRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
AddressGroupId = "",
AddressGroup = new AddressGroup(),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.CreateAddressGroup(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceCreateAddressGroup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroup(OrganizationLocationName, AddressGroup, string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> CreateAddressGroup(OrganizationLocationName parent, AddressGroup addressGroup, string addressGroupId, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.CreateAddressGroup(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceCreateAddressGroup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroup(string, AddressGroup, string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> CreateAddressGroup(string parent, AddressGroup addressGroup, string addressGroupId, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.CreateAddressGroup(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceCreateAddressGroup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(LocationName, AddressGroup, string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(LocationName parent, AddressGroup addressGroup, string addressGroupId, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(LocationName, AddressGroup, string, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(LocationName parent, AddressGroup addressGroup, string addressGroupId, CancellationToken cancellationToken)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(CreateAddressGroupRequest, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(CreateAddressGroupRequest request, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAddressGroupRequest request = new CreateAddressGroupRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
AddressGroupId = "",
AddressGroup = new AddressGroup(),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(CreateAddressGroupRequest, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(CreateAddressGroupRequest request, CancellationToken cancellationToken)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateAddressGroupRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAddressGroupRequest request = new CreateAddressGroupRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
AddressGroupId = "",
AddressGroup = new AddressGroup(),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(OrganizationLocationName, AddressGroup, string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(OrganizationLocationName parent, AddressGroup addressGroup, string addressGroupId, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(OrganizationLocationName, AddressGroup, string, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(OrganizationLocationName parent, AddressGroup addressGroup, string addressGroupId, CancellationToken cancellationToken)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(string, AddressGroup, string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(string parent, AddressGroup addressGroup, string addressGroupId, CallSettings callSettings = null)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAddressGroupAsync(string, AddressGroup, string, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> CreateAddressGroupAsync(string parent, AddressGroup addressGroup, string addressGroupId, CancellationToken cancellationToken)Creates a new address group in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource of the AddressGroup. Must be in the
format |
addressGroup |
AddressGroupRequired. AddressGroup resource to be created. |
addressGroupId |
stringRequired. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AddressGroup addressGroup = new AddressGroup();
string addressGroupId = "";
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.CreateAddressGroupAsync(parent, addressGroup, addressGroupId);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceCreateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
CreateAsync(CancellationToken)
public static Task<AddressGroupServiceClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a AddressGroupServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AddressGroupServiceClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskAddressGroupServiceClient |
The task representing the created AddressGroupServiceClient. |
DeleteAddressGroup(AddressGroupName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteAddressGroup(AddressGroupName name, CallSettings callSettings = null)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
AddressGroupNameRequired. A name of the AddressGroup to delete. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddressGroupName name = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
Operation<Empty, OperationMetadata> response = addressGroupServiceClient.DeleteAddressGroup(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceDeleteAddressGroup(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;
}
DeleteAddressGroup(DeleteAddressGroupRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteAddressGroup(DeleteAddressGroupRequest request, CallSettings callSettings = null)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
DeleteAddressGroupRequest request = new DeleteAddressGroupRequest
{
AddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = addressGroupServiceClient.DeleteAddressGroup(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceDeleteAddressGroup(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;
}
DeleteAddressGroup(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteAddressGroup(string name, CallSettings callSettings = null)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. A name of the AddressGroup to delete. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
Operation<Empty, OperationMetadata> response = addressGroupServiceClient.DeleteAddressGroup(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceDeleteAddressGroup(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;
}
DeleteAddressGroupAsync(AddressGroupName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAddressGroupAsync(AddressGroupName name, CallSettings callSettings = null)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
AddressGroupNameRequired. A name of the AddressGroup to delete. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName name = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
Operation<Empty, OperationMetadata> response = await addressGroupServiceClient.DeleteAddressGroupAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceDeleteAddressGroupAsync(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;
}
DeleteAddressGroupAsync(AddressGroupName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAddressGroupAsync(AddressGroupName name, CancellationToken cancellationToken)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
AddressGroupNameRequired. A name of the AddressGroup to delete. Must be in the format
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName name = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
Operation<Empty, OperationMetadata> response = await addressGroupServiceClient.DeleteAddressGroupAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceDeleteAddressGroupAsync(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;
}
DeleteAddressGroupAsync(DeleteAddressGroupRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAddressGroupAsync(DeleteAddressGroupRequest request, CallSettings callSettings = null)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAddressGroupRequest request = new DeleteAddressGroupRequest
{
AddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await addressGroupServiceClient.DeleteAddressGroupAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceDeleteAddressGroupAsync(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;
}
DeleteAddressGroupAsync(DeleteAddressGroupRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAddressGroupAsync(DeleteAddressGroupRequest request, CancellationToken cancellationToken)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteAddressGroupRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAddressGroupRequest request = new DeleteAddressGroupRequest
{
AddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await addressGroupServiceClient.DeleteAddressGroupAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceDeleteAddressGroupAsync(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;
}
DeleteAddressGroupAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAddressGroupAsync(string name, CallSettings callSettings = null)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. A name of the AddressGroup to delete. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
Operation<Empty, OperationMetadata> response = await addressGroupServiceClient.DeleteAddressGroupAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceDeleteAddressGroupAsync(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;
}
DeleteAddressGroupAsync(string, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAddressGroupAsync(string name, CancellationToken cancellationToken)Deletes a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. A name of the AddressGroup to delete. Must be in the format
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
Operation<Empty, OperationMetadata> response = await addressGroupServiceClient.DeleteAddressGroupAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceDeleteAddressGroupAsync(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;
}
GetAddressGroup(AddressGroupName, CallSettings)
public virtual AddressGroup GetAddressGroup(AddressGroupName name, CallSettings callSettings = null)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
AddressGroupNameRequired. A name of the AddressGroup to get. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
AddressGroup |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddressGroupName name = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
AddressGroup response = addressGroupServiceClient.GetAddressGroup(name);
GetAddressGroup(GetAddressGroupRequest, CallSettings)
public virtual AddressGroup GetAddressGroup(GetAddressGroupRequest request, CallSettings callSettings = null)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
GetAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
AddressGroup |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
GetAddressGroupRequest request = new GetAddressGroupRequest
{
AddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
};
// Make the request
AddressGroup response = addressGroupServiceClient.GetAddressGroup(request);
GetAddressGroup(string, CallSettings)
public virtual AddressGroup GetAddressGroup(string name, CallSettings callSettings = null)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. A name of the AddressGroup to get. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
AddressGroup |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
AddressGroup response = addressGroupServiceClient.GetAddressGroup(name);
GetAddressGroupAsync(AddressGroupName, CallSettings)
public virtual Task<AddressGroup> GetAddressGroupAsync(AddressGroupName name, CallSettings callSettings = null)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
AddressGroupNameRequired. A name of the AddressGroup to get. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAddressGroup |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName name = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
AddressGroup response = await addressGroupServiceClient.GetAddressGroupAsync(name);
GetAddressGroupAsync(AddressGroupName, CancellationToken)
public virtual Task<AddressGroup> GetAddressGroupAsync(AddressGroupName name, CancellationToken cancellationToken)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
AddressGroupNameRequired. A name of the AddressGroup to get. Must be in the format
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAddressGroup |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName name = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
AddressGroup response = await addressGroupServiceClient.GetAddressGroupAsync(name);
GetAddressGroupAsync(GetAddressGroupRequest, CallSettings)
public virtual Task<AddressGroup> GetAddressGroupAsync(GetAddressGroupRequest request, CallSettings callSettings = null)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
GetAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAddressGroup |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
GetAddressGroupRequest request = new GetAddressGroupRequest
{
AddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
};
// Make the request
AddressGroup response = await addressGroupServiceClient.GetAddressGroupAsync(request);
GetAddressGroupAsync(GetAddressGroupRequest, CancellationToken)
public virtual Task<AddressGroup> GetAddressGroupAsync(GetAddressGroupRequest request, CancellationToken cancellationToken)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
GetAddressGroupRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAddressGroup |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
GetAddressGroupRequest request = new GetAddressGroupRequest
{
AddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
};
// Make the request
AddressGroup response = await addressGroupServiceClient.GetAddressGroupAsync(request);
GetAddressGroupAsync(string, CallSettings)
public virtual Task<AddressGroup> GetAddressGroupAsync(string name, CallSettings callSettings = null)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. A name of the AddressGroup to get. Must be in the format
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAddressGroup |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
AddressGroup response = await addressGroupServiceClient.GetAddressGroupAsync(name);
GetAddressGroupAsync(string, CancellationToken)
public virtual Task<AddressGroup> GetAddressGroupAsync(string name, CancellationToken cancellationToken)Gets details of a single address group.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. A name of the AddressGroup to get. Must be in the format
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAddressGroup |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
AddressGroup response = await addressGroupServiceClient.GetAddressGroupAsync(name);
ListAddressGroupReferences(AddressGroupName, string, int?, CallSettings)
public virtual PagedEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> ListAddressGroupReferences(AddressGroupName addressGroup, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists references of an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to clone items to. Must be in the
format |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddressGroupReferencesResponseListAddressGroupReferencesResponseTypesAddressGroupReference |
A pageable sequence of ListAddressGroupReferencesResponse.Types.AddressGroupReference resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
PagedEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> response = addressGroupServiceClient.ListAddressGroupReferences(addressGroup);
// Iterate over all response items, lazily performing RPCs as required
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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 (ListAddressGroupReferencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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<ListAddressGroupReferencesResponse.Types.AddressGroupReference> 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 (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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;
ListAddressGroupReferences(ListAddressGroupReferencesRequest, CallSettings)
public virtual PagedEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> ListAddressGroupReferences(ListAddressGroupReferencesRequest request, CallSettings callSettings = null)Lists references of an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAddressGroupReferencesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddressGroupReferencesResponseListAddressGroupReferencesResponseTypesAddressGroupReference |
A pageable sequence of ListAddressGroupReferencesResponse.Types.AddressGroupReference resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
ListAddressGroupReferencesRequest request = new ListAddressGroupReferencesRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
};
// Make the request
PagedEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> response = addressGroupServiceClient.ListAddressGroupReferences(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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 (ListAddressGroupReferencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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<ListAddressGroupReferencesResponse.Types.AddressGroupReference> 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 (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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;
ListAddressGroupReferences(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> ListAddressGroupReferences(string addressGroup, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists references of an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to clone items to. Must be in the
format |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddressGroupReferencesResponseListAddressGroupReferencesResponseTypesAddressGroupReference |
A pageable sequence of ListAddressGroupReferencesResponse.Types.AddressGroupReference resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
PagedEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> response = addressGroupServiceClient.ListAddressGroupReferences(addressGroup);
// Iterate over all response items, lazily performing RPCs as required
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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 (ListAddressGroupReferencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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<ListAddressGroupReferencesResponse.Types.AddressGroupReference> 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 (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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;
ListAddressGroupReferencesAsync(AddressGroupName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> ListAddressGroupReferencesAsync(AddressGroupName addressGroup, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists references of an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to clone items to. Must be in the
format |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddressGroupReferencesResponseListAddressGroupReferencesResponseTypesAddressGroupReference |
A pageable asynchronous sequence of ListAddressGroupReferencesResponse.Types.AddressGroupReference resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
// Make the request
PagedAsyncEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> response = addressGroupServiceClient.ListAddressGroupReferencesAsync(addressGroup);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddressGroupReferencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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<ListAddressGroupReferencesResponse.Types.AddressGroupReference> 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 (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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;
ListAddressGroupReferencesAsync(ListAddressGroupReferencesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> ListAddressGroupReferencesAsync(ListAddressGroupReferencesRequest request, CallSettings callSettings = null)Lists references of an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAddressGroupReferencesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddressGroupReferencesResponseListAddressGroupReferencesResponseTypesAddressGroupReference |
A pageable asynchronous sequence of ListAddressGroupReferencesResponse.Types.AddressGroupReference resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
ListAddressGroupReferencesRequest request = new ListAddressGroupReferencesRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
};
// Make the request
PagedAsyncEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> response = addressGroupServiceClient.ListAddressGroupReferencesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddressGroupReferencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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<ListAddressGroupReferencesResponse.Types.AddressGroupReference> 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 (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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;
ListAddressGroupReferencesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> ListAddressGroupReferencesAsync(string addressGroup, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists references of an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to clone items to. Must be in the
format |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddressGroupReferencesResponseListAddressGroupReferencesResponseTypesAddressGroupReference |
A pageable asynchronous sequence of ListAddressGroupReferencesResponse.Types.AddressGroupReference resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
// Make the request
PagedAsyncEnumerable<ListAddressGroupReferencesResponse, ListAddressGroupReferencesResponse.Types.AddressGroupReference> response = addressGroupServiceClient.ListAddressGroupReferencesAsync(addressGroup);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddressGroupReferencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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<ListAddressGroupReferencesResponse.Types.AddressGroupReference> 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 (ListAddressGroupReferencesResponse.Types.AddressGroupReference 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;
ListAddressGroups(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListAddressGroupsResponse, AddressGroup> ListAddressGroups(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists address groups in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the AddressGroups
should be listed, specified in the format
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddressGroupsResponseAddressGroup |
A pageable sequence of AddressGroup resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAddressGroupsResponse, AddressGroup> response = addressGroupServiceClient.ListAddressGroups(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AddressGroup 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 (ListAddressGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AddressGroup 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<AddressGroup> 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 (AddressGroup 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;
ListAddressGroups(ListAddressGroupsRequest, CallSettings)
public virtual PagedEnumerable<ListAddressGroupsResponse, AddressGroup> ListAddressGroups(ListAddressGroupsRequest request, CallSettings callSettings = null)Lists address groups in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAddressGroupsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddressGroupsResponseAddressGroup |
A pageable sequence of AddressGroup resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
ListAddressGroupsRequest request = new ListAddressGroupsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ListAddressGroupsResponse, AddressGroup> response = addressGroupServiceClient.ListAddressGroups(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AddressGroup 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 (ListAddressGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AddressGroup 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<AddressGroup> 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 (AddressGroup 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;
ListAddressGroups(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListAddressGroupsResponse, AddressGroup> ListAddressGroups(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists address groups in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The project and location from which the AddressGroups
should be listed, specified in the format
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddressGroupsResponseAddressGroup |
A pageable sequence of AddressGroup resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListAddressGroupsResponse, AddressGroup> response = addressGroupServiceClient.ListAddressGroups(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AddressGroup 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 (ListAddressGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AddressGroup 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<AddressGroup> 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 (AddressGroup 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;
ListAddressGroupsAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListAddressGroupsResponse, AddressGroup> ListAddressGroupsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists address groups in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the AddressGroups
should be listed, specified in the format
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddressGroupsResponseAddressGroup |
A pageable asynchronous sequence of AddressGroup resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAddressGroupsResponse, AddressGroup> response = addressGroupServiceClient.ListAddressGroupsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (AddressGroup item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddressGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AddressGroup 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<AddressGroup> 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 (AddressGroup 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;
ListAddressGroupsAsync(ListAddressGroupsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListAddressGroupsResponse, AddressGroup> ListAddressGroupsAsync(ListAddressGroupsRequest request, CallSettings callSettings = null)Lists address groups in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAddressGroupsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddressGroupsResponseAddressGroup |
A pageable asynchronous sequence of AddressGroup resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
ListAddressGroupsRequest request = new ListAddressGroupsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ListAddressGroupsResponse, AddressGroup> response = addressGroupServiceClient.ListAddressGroupsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (AddressGroup item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddressGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AddressGroup 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<AddressGroup> 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 (AddressGroup 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;
ListAddressGroupsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListAddressGroupsResponse, AddressGroup> ListAddressGroupsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists address groups in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The project and location from which the AddressGroups
should be listed, specified in the format
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddressGroupsResponseAddressGroup |
A pageable asynchronous sequence of AddressGroup resources. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListAddressGroupsResponse, AddressGroup> response = addressGroupServiceClient.ListAddressGroupsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (AddressGroup item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddressGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AddressGroup 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<AddressGroup> 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 (AddressGroup 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;
PollOnceAddAddressGroupItems(string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> PollOnceAddAddressGroupItems(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of AddAddressGroupItems
.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The result of polling the operation. |
PollOnceAddAddressGroupItemsAsync(string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> PollOnceAddAddressGroupItemsAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
AddAddressGroupItems.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A task representing the result of polling the operation. |
PollOnceCloneAddressGroupItems(string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> PollOnceCloneAddressGroupItems(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of
CloneAddressGroupItems.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The result of polling the operation. |
PollOnceCloneAddressGroupItemsAsync(string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> PollOnceCloneAddressGroupItemsAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
CloneAddressGroupItems.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A task representing the result of polling the operation. |
PollOnceCreateAddressGroup(string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> PollOnceCreateAddressGroup(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of CreateAddressGroup
.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The result of polling the operation. |
PollOnceCreateAddressGroupAsync(string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> PollOnceCreateAddressGroupAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
CreateAddressGroup.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteAddressGroup(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteAddressGroup(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of DeleteAddressGroup
.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The result of polling the operation. |
PollOnceDeleteAddressGroupAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteAddressGroupAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
DeleteAddressGroup.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A task representing the result of polling the operation. |
PollOnceRemoveAddressGroupItems(string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> PollOnceRemoveAddressGroupItems(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of
RemoveAddressGroupItems.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The result of polling the operation. |
PollOnceRemoveAddressGroupItemsAsync(string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> PollOnceRemoveAddressGroupItemsAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
RemoveAddressGroupItems.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A task representing the result of polling the operation. |
PollOnceUpdateAddressGroup(string, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> PollOnceUpdateAddressGroup(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of UpdateAddressGroup
.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The result of polling the operation. |
PollOnceUpdateAddressGroupAsync(string, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> PollOnceUpdateAddressGroupAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
UpdateAddressGroup.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A task representing the result of polling the operation. |
RemoveAddressGroupItems(AddressGroupName, IEnumerable<string>, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> RemoveAddressGroupItems(AddressGroupName addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to remove items from. Must be in the
format |
items |
IEnumerablestringRequired. List of items to remove. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.RemoveAddressGroupItems(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceRemoveAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItems(RemoveAddressGroupItemsRequest, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> RemoveAddressGroupItems(RemoveAddressGroupItemsRequest request, CallSettings callSettings = null)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
RemoveAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
RemoveAddressGroupItemsRequest request = new RemoveAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
Items = { "", },
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.RemoveAddressGroupItems(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceRemoveAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItems(string, IEnumerable<string>, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> RemoveAddressGroupItems(string addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to remove items from. Must be in the
format |
items |
IEnumerablestringRequired. List of items to remove. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.RemoveAddressGroupItems(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceRemoveAddressGroupItems(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItemsAsync(AddressGroupName, IEnumerable<string>, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> RemoveAddressGroupItemsAsync(AddressGroupName addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to remove items from. Must be in the
format |
items |
IEnumerablestringRequired. List of items to remove. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.RemoveAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceRemoveAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItemsAsync(AddressGroupName, IEnumerable<string>, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> RemoveAddressGroupItemsAsync(AddressGroupName addressGroup, IEnumerable<string> items, CancellationToken cancellationToken)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupNameRequired. A name of the AddressGroup to remove items from. Must be in the
format |
items |
IEnumerablestringRequired. List of items to remove. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroupName addressGroup = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]");
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.RemoveAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceRemoveAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItemsAsync(RemoveAddressGroupItemsRequest, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> RemoveAddressGroupItemsAsync(RemoveAddressGroupItemsRequest request, CallSettings callSettings = null)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
RemoveAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveAddressGroupItemsRequest request = new RemoveAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
Items = { "", },
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.RemoveAddressGroupItemsAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceRemoveAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItemsAsync(RemoveAddressGroupItemsRequest, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> RemoveAddressGroupItemsAsync(RemoveAddressGroupItemsRequest request, CancellationToken cancellationToken)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
request |
RemoveAddressGroupItemsRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveAddressGroupItemsRequest request = new RemoveAddressGroupItemsRequest
{
AddressGroupAsAddressGroupName = AddressGroupName.FromProjectLocationAddressGroup("[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]"),
Items = { "", },
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.RemoveAddressGroupItemsAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceRemoveAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItemsAsync(string, IEnumerable<string>, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> RemoveAddressGroupItemsAsync(string addressGroup, IEnumerable<string> items, CallSettings callSettings = null)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to remove items from. Must be in the
format |
items |
IEnumerablestringRequired. List of items to remove. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.RemoveAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceRemoveAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
RemoveAddressGroupItemsAsync(string, IEnumerable<string>, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> RemoveAddressGroupItemsAsync(string addressGroup, IEnumerable<string> items, CancellationToken cancellationToken)Removes items from an address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
stringRequired. A name of the AddressGroup to remove items from. Must be in the
format |
items |
IEnumerablestringRequired. List of items to remove. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
string addressGroup = "projects/[PROJECT]/locations/[LOCATION]/addressGroups/[ADDRESS_GROUP]";
IEnumerable<string> items = new string[] { "", };
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.RemoveAddressGroupItemsAsync(addressGroup, items);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceRemoveAddressGroupItemsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
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.
UpdateAddressGroup(AddressGroup, FieldMask, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> UpdateAddressGroup(AddressGroup addressGroup, FieldMask updateMask, CallSettings callSettings = null)Updates the parameters of a single address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupRequired. Updated AddressGroup resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
AddressGroup addressGroup = new AddressGroup();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.UpdateAddressGroup(addressGroup, updateMask);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceUpdateAddressGroup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
UpdateAddressGroup(UpdateAddressGroupRequest, CallSettings)
public virtual Operation<AddressGroup, OperationMetadata> UpdateAddressGroup(UpdateAddressGroupRequest request, CallSettings callSettings = null)Updates the parameters of a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddressGroupOperationMetadata |
The RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = AddressGroupServiceClient.Create();
// Initialize request argument(s)
UpdateAddressGroupRequest request = new UpdateAddressGroupRequest
{
UpdateMask = new FieldMask(),
AddressGroup = new AddressGroup(),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = addressGroupServiceClient.UpdateAddressGroup(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = addressGroupServiceClient.PollOnceUpdateAddressGroup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
UpdateAddressGroupAsync(AddressGroup, FieldMask, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> UpdateAddressGroupAsync(AddressGroup addressGroup, FieldMask updateMask, CallSettings callSettings = null)Updates the parameters of a single address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupRequired. Updated AddressGroup resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroup addressGroup = new AddressGroup();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.UpdateAddressGroupAsync(addressGroup, updateMask);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceUpdateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
UpdateAddressGroupAsync(AddressGroup, FieldMask, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> UpdateAddressGroupAsync(AddressGroup addressGroup, FieldMask updateMask, CancellationToken cancellationToken)Updates the parameters of a single address group.
| Parameters | |
|---|---|
| Name | Description |
addressGroup |
AddressGroupRequired. Updated AddressGroup resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
AddressGroup addressGroup = new AddressGroup();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.UpdateAddressGroupAsync(addressGroup, updateMask);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceUpdateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
UpdateAddressGroupAsync(UpdateAddressGroupRequest, CallSettings)
public virtual Task<Operation<AddressGroup, OperationMetadata>> UpdateAddressGroupAsync(UpdateAddressGroupRequest request, CallSettings callSettings = null)Updates the parameters of a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateAddressGroupRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAddressGroupRequest request = new UpdateAddressGroupRequest
{
UpdateMask = new FieldMask(),
AddressGroup = new AddressGroup(),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.UpdateAddressGroupAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceUpdateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}
UpdateAddressGroupAsync(UpdateAddressGroupRequest, CancellationToken)
public virtual Task<Operation<AddressGroup, OperationMetadata>> UpdateAddressGroupAsync(UpdateAddressGroupRequest request, CancellationToken cancellationToken)Updates the parameters of a single address group.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateAddressGroupRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddressGroupOperationMetadata |
A Task containing the RPC response. |
// Create client
AddressGroupServiceClient addressGroupServiceClient = await AddressGroupServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAddressGroupRequest request = new UpdateAddressGroupRequest
{
UpdateMask = new FieldMask(),
AddressGroup = new AddressGroup(),
RequestId = "",
};
// Make the request
Operation<AddressGroup, OperationMetadata> response = await addressGroupServiceClient.UpdateAddressGroupAsync(request);
// Poll until the returned long-running operation is complete
Operation<AddressGroup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AddressGroup 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<AddressGroup, OperationMetadata> retrievedResponse = await addressGroupServiceClient.PollOnceUpdateAddressGroupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AddressGroup retrievedResult = retrievedResponse.Result;
}