Compute Engine v1 API - Class GlobalForwardingRulesClient (2.15.0)

public abstract class GlobalForwardingRulesClient

Reference documentation and code samples for the Compute Engine v1 API class GlobalForwardingRulesClient.

GlobalForwardingRules client wrapper, for convenient use.

Inheritance

object > GlobalForwardingRulesClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The GlobalForwardingRules API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default GlobalForwardingRules scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual GlobalForwardingRules.GlobalForwardingRulesClient GrpcClient { get; }

The underlying gRPC GlobalForwardingRules client

Property Value
Type Description
GlobalForwardingRulesGlobalForwardingRulesClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
Type Description
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
Type Description
OperationsClient

SetTargetOperationsClient

public virtual OperationsClient SetTargetOperationsClient { get; }

The long-running operations client for SetTarget.

Property Value
Type Description
OperationsClient

Methods

Create()

public static GlobalForwardingRulesClient Create()

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

Returns
Type Description
GlobalForwardingRulesClient

The created GlobalForwardingRulesClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskGlobalForwardingRulesClient

The task representing the created GlobalForwardingRulesClient.

Delete(DeleteGlobalForwardingRuleRequest, CallSettings)

public virtual Operation<Operation, Operation> Delete(DeleteGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Deletes the specified GlobalForwardingRule resource.

Parameters
Name Description
request DeleteGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
DeleteGlobalForwardingRuleRequest request = new DeleteGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Delete(request);

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

Delete(string, string, CallSettings)

public virtual Operation<Operation, Operation> Delete(string project, string forwardingRule, CallSettings callSettings = null)

Deletes the specified GlobalForwardingRule resource.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Delete(project, forwardingRule);

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

DeleteAsync(DeleteGlobalForwardingRuleRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Deletes the specified GlobalForwardingRule resource.

Parameters
Name Description
request DeleteGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
DeleteGlobalForwardingRuleRequest request = new DeleteGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(request);

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

DeleteAsync(DeleteGlobalForwardingRuleRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Deletes the specified GlobalForwardingRule resource.

Parameters
Name Description
request DeleteGlobalForwardingRuleRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
DeleteGlobalForwardingRuleRequest request = new DeleteGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(request);

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

DeleteAsync(string, string, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string forwardingRule, CallSettings callSettings = null)

Deletes the specified GlobalForwardingRule resource.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(project, forwardingRule);

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

DeleteAsync(string, string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string forwardingRule, CancellationToken cancellationToken)

Deletes the specified GlobalForwardingRule resource.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(project, forwardingRule);

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

Get(GetGlobalForwardingRuleRequest, CallSettings)

public virtual ForwardingRule Get(GetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.

Parameters
Name Description
request GetGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ForwardingRule

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
GetGlobalForwardingRuleRequest request = new GetGlobalForwardingRuleRequest
{
    Project = "",
    ForwardingRule = "",
};
// Make the request
ForwardingRule response = globalForwardingRulesClient.Get(request);

Get(string, string, CallSettings)

public virtual ForwardingRule Get(string project, string forwardingRule, CallSettings callSettings = null)

Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ForwardingRule

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
// Make the request
ForwardingRule response = globalForwardingRulesClient.Get(project, forwardingRule);

GetAsync(GetGlobalForwardingRuleRequest, CallSettings)

public virtual Task<ForwardingRule> GetAsync(GetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.

Parameters
Name Description
request GetGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskForwardingRule

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
GetGlobalForwardingRuleRequest request = new GetGlobalForwardingRuleRequest
{
    Project = "",
    ForwardingRule = "",
};
// Make the request
ForwardingRule response = await globalForwardingRulesClient.GetAsync(request);

GetAsync(GetGlobalForwardingRuleRequest, CancellationToken)

public virtual Task<ForwardingRule> GetAsync(GetGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.

Parameters
Name Description
request GetGlobalForwardingRuleRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskForwardingRule

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
GetGlobalForwardingRuleRequest request = new GetGlobalForwardingRuleRequest
{
    Project = "",
    ForwardingRule = "",
};
// Make the request
ForwardingRule response = await globalForwardingRulesClient.GetAsync(request);

GetAsync(string, string, CallSettings)

public virtual Task<ForwardingRule> GetAsync(string project, string forwardingRule, CallSettings callSettings = null)

Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskForwardingRule

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
// Make the request
ForwardingRule response = await globalForwardingRulesClient.GetAsync(project, forwardingRule);

GetAsync(string, string, CancellationToken)

public virtual Task<ForwardingRule> GetAsync(string project, string forwardingRule, CancellationToken cancellationToken)

Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to return.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskForwardingRule

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
// Make the request
ForwardingRule response = await globalForwardingRulesClient.GetAsync(project, forwardingRule);

Insert(InsertGlobalForwardingRuleRequest, CallSettings)

public virtual Operation<Operation, Operation> Insert(InsertGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in the specified project using the data included in the request.

Parameters
Name Description
request InsertGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
InsertGlobalForwardingRuleRequest request = new InsertGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Insert(request);

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

Insert(string, ForwardingRule, CallSettings)

public virtual Operation<Operation, Operation> Insert(string project, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

forwardingRuleResource ForwardingRule

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Insert(project, forwardingRuleResource);

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

InsertAsync(InsertGlobalForwardingRuleRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in the specified project using the data included in the request.

Parameters
Name Description
request InsertGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
InsertGlobalForwardingRuleRequest request = new InsertGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(request);

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

InsertAsync(InsertGlobalForwardingRuleRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Creates a GlobalForwardingRule resource in the specified project using the data included in the request.

Parameters
Name Description
request InsertGlobalForwardingRuleRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
InsertGlobalForwardingRuleRequest request = new InsertGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(request);

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

InsertAsync(string, ForwardingRule, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

forwardingRuleResource ForwardingRule

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(project, forwardingRuleResource);

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

InsertAsync(string, ForwardingRule, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, ForwardingRule forwardingRuleResource, CancellationToken cancellationToken)

Creates a GlobalForwardingRule resource in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

forwardingRuleResource ForwardingRule

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(project, forwardingRuleResource);

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

List(ListGlobalForwardingRulesRequest, CallSettings)

public virtual PagedEnumerable<ForwardingRuleList, ForwardingRule> List(ListGlobalForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the specified project.

Parameters
Name Description
request ListGlobalForwardingRulesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableForwardingRuleListForwardingRule

A pageable sequence of ForwardingRule resources.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
ListGlobalForwardingRulesRequest request = new ListGlobalForwardingRulesRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.List(request);

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

List(string, string, int?, CallSettings)

public virtual PagedEnumerable<ForwardingRuleList, ForwardingRule> List(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the specified project.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableForwardingRuleListForwardingRule

A pageable sequence of ForwardingRule resources.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.List(project);

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

ListAsync(ListGlobalForwardingRulesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> ListAsync(ListGlobalForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the specified project.

Parameters
Name Description
request ListGlobalForwardingRulesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableForwardingRuleListForwardingRule

A pageable asynchronous sequence of ForwardingRule resources.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
ListGlobalForwardingRulesRequest request = new ListGlobalForwardingRulesRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ForwardingRule item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ForwardingRuleList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ForwardingRule 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<ForwardingRule> 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 (ForwardingRule 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;

ListAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> ListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the specified project.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableForwardingRuleListForwardingRule

A pageable asynchronous sequence of ForwardingRule resources.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.ListAsync(project);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ForwardingRule item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ForwardingRuleList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ForwardingRule 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<ForwardingRule> 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 (ForwardingRule 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;

Patch(PatchGlobalForwardingRuleRequest, CallSettings)

public virtual Operation<Operation, Operation> Patch(PatchGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Parameters
Name Description
request PatchGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
PatchGlobalForwardingRuleRequest request = new PatchGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Patch(request);

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

Patch(string, string, ForwardingRule, CallSettings)

public virtual Operation<Operation, Operation> Patch(string project, string forwardingRule, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to patch.

forwardingRuleResource ForwardingRule

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Patch(project, forwardingRule, forwardingRuleResource);

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

PatchAsync(PatchGlobalForwardingRuleRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Parameters
Name Description
request PatchGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
PatchGlobalForwardingRuleRequest request = new PatchGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(request);

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

PatchAsync(PatchGlobalForwardingRuleRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Parameters
Name Description
request PatchGlobalForwardingRuleRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
PatchGlobalForwardingRuleRequest request = new PatchGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(request);

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

PatchAsync(string, string, ForwardingRule, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string forwardingRule, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to patch.

forwardingRuleResource ForwardingRule

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(project, forwardingRule, forwardingRuleResource);

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

PatchAsync(string, string, ForwardingRule, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string forwardingRule, ForwardingRule forwardingRuleResource, CancellationToken cancellationToken)

Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource to patch.

forwardingRuleResource ForwardingRule

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(project, forwardingRule, forwardingRuleResource);

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

PollOnceDelete(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOncePatch(string, CallSettings)

public virtual Operation<Operation, Operation> PollOncePatch(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOncePatchAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOncePatchAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetLabels(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetLabels(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceSetLabelsAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetLabelsAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetTarget(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetTarget(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceSetTargetAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetTargetAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

SetLabels(SetLabelsGlobalForwardingRuleRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(SetLabelsGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.

Parameters
Name Description
request SetLabelsGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
SetLabelsGlobalForwardingRuleRequest request = new SetLabelsGlobalForwardingRuleRequest
{
    Resource = "",
    Project = "",
    GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetLabels(request);

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

SetLabels(string, string, GlobalSetLabelsRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetLabelsRequestResource GlobalSetLabelsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetLabels(project, resource, globalSetLabelsRequestResource);

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

SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.

Parameters
Name Description
request SetLabelsGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsGlobalForwardingRuleRequest request = new SetLabelsGlobalForwardingRuleRequest
{
    Resource = "",
    Project = "",
    GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(request);

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

SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.

Parameters
Name Description
request SetLabelsGlobalForwardingRuleRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsGlobalForwardingRuleRequest request = new SetLabelsGlobalForwardingRuleRequest
{
    Resource = "",
    Project = "",
    GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(request);

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

SetLabelsAsync(string, string, GlobalSetLabelsRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetLabelsRequestResource GlobalSetLabelsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(project, resource, globalSetLabelsRequestResource);

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

SetLabelsAsync(string, string, GlobalSetLabelsRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CancellationToken cancellationToken)

Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetLabelsRequestResource GlobalSetLabelsRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(project, resource, globalSetLabelsRequestResource);

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

SetTarget(SetTargetGlobalForwardingRuleRequest, CallSettings)

public virtual Operation<Operation, Operation> SetTarget(SetTargetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.

Parameters
Name Description
request SetTargetGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
SetTargetGlobalForwardingRuleRequest request = new SetTargetGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
    TargetReferenceResource = new TargetReference(),
};
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetTarget(request);

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

SetTarget(string, string, TargetReference, CallSettings)

public virtual Operation<Operation, Operation> SetTarget(string project, string forwardingRule, TargetReference targetReferenceResource, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource in which target is to be set.

targetReferenceResource TargetReference

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
TargetReference targetReferenceResource = new TargetReference();
// Make the request
lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetTarget(project, forwardingRule, targetReferenceResource);

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

SetTargetAsync(SetTargetGlobalForwardingRuleRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetTargetAsync(SetTargetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.

Parameters
Name Description
request SetTargetGlobalForwardingRuleRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetTargetGlobalForwardingRuleRequest request = new SetTargetGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
    TargetReferenceResource = new TargetReference(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(request);

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

SetTargetAsync(SetTargetGlobalForwardingRuleRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetTargetAsync(SetTargetGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.

Parameters
Name Description
request SetTargetGlobalForwardingRuleRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetTargetGlobalForwardingRuleRequest request = new SetTargetGlobalForwardingRuleRequest
{
    RequestId = "",
    Project = "",
    ForwardingRule = "",
    TargetReferenceResource = new TargetReference(),
};
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(request);

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

SetTargetAsync(string, string, TargetReference, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetTargetAsync(string project, string forwardingRule, TargetReference targetReferenceResource, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource in which target is to be set.

targetReferenceResource TargetReference

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
TargetReference targetReferenceResource = new TargetReference();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(project, forwardingRule, targetReferenceResource);

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

SetTargetAsync(string, string, TargetReference, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetTargetAsync(string project, string forwardingRule, TargetReference targetReferenceResource, CancellationToken cancellationToken)

Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.

Parameters
Name Description
project string

Project ID for this request.

forwardingRule string

Name of the ForwardingRule resource in which target is to be set.

targetReferenceResource TargetReference

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string forwardingRule = "";
TargetReference targetReferenceResource = new TargetReference();
// Make the request
lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(project, forwardingRule, targetReferenceResource);

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

Remarks

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