Compute Engine v1 API - Class GlobalForwardingRulesClient (2.5.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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default GlobalForwardingRules scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual GlobalForwardingRules.GlobalForwardingRulesClient GrpcClient { get; }

The underlying gRPC GlobalForwardingRules client

Property Value
TypeDescription
GlobalForwardingRules.GlobalForwardingRulesClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
TypeDescription
OperationsClient

SetTargetOperationsClient

public virtual OperationsClient SetTargetOperationsClient { get; }

The long-running operations client for SetTarget.

Property Value
TypeDescription
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
TypeDescription
GlobalForwardingRulesClient

The created GlobalForwardingRulesClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<GlobalForwardingRulesClient>

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
NameDescription
requestDeleteGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestDeleteGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestDeleteGlobalForwardingRuleRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestGetGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ForwardingRule>

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
NameDescription
requestGetGlobalForwardingRuleRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ForwardingRule>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ForwardingRule>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ForwardingRule>

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
NameDescription
requestInsertGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleResourceForwardingRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestInsertGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestInsertGlobalForwardingRuleRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleResourceForwardingRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleResourceForwardingRule

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestListGlobalForwardingRulesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ForwardingRuleList, ForwardingRule>

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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ForwardingRuleList, ForwardingRule>

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
NameDescription
requestListGlobalForwardingRulesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule>

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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule>

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
NameDescription
requestPatchGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to patch.

forwardingRuleResourceForwardingRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestPatchGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestPatchGlobalForwardingRuleRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to patch.

forwardingRuleResourceForwardingRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

Name of the ForwardingRule resource to patch.

forwardingRuleResourceForwardingRule

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestSetLabelsGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetLabelsRequestResourceGlobalSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestSetLabelsGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestSetLabelsGlobalForwardingRuleRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetLabelsRequestResourceGlobalSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetLabelsRequestResourceGlobalSetLabelsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestSetTargetGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

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

targetReferenceResourceTargetReference

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestSetTargetGlobalForwardingRuleRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestSetTargetGlobalForwardingRuleRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

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

targetReferenceResourceTargetReference

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

forwardingRuleString

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

targetReferenceResourceTargetReference

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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