Class ForwardingRulesClient (1.1.0)

public abstract class ForwardingRulesClient

ForwardingRules client wrapper, for convenient use.

Inheritance

Object > ForwardingRulesClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The ForwardingRules API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ForwardingRules 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 ForwardingRules 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 ForwardingRules.ForwardingRulesClient GrpcClient { get; }

The underlying gRPC ForwardingRules client

Property Value
TypeDescription
ForwardingRules.ForwardingRulesClient

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

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

AggregatedList(AggregatedListForwardingRulesRequest, CallSettings)

public virtual PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedList(AggregatedListForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

Parameters
NameDescription
requestAggregatedListForwardingRulesRequest

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<ForwardingRuleAggregatedList, KeyValuePair<String, ForwardingRulesScopedList>>

A pageable sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
AggregatedListForwardingRulesRequest request = new AggregatedListForwardingRulesRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedList(request);

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

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

public virtual PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

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<ForwardingRuleAggregatedList, KeyValuePair<String, ForwardingRulesScopedList>>

A pageable sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedList(project);

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

AggregatedListAsync(AggregatedListForwardingRulesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedListAsync(AggregatedListForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

Parameters
NameDescription
requestAggregatedListForwardingRulesRequest

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<ForwardingRuleAggregatedList, KeyValuePair<String, ForwardingRulesScopedList>>

A pageable asynchronous sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
AggregatedListForwardingRulesRequest request = new AggregatedListForwardingRulesRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedListAsync(request);

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

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

public virtual PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

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<ForwardingRuleAggregatedList, KeyValuePair<String, ForwardingRulesScopedList>>

A pageable asynchronous sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedListAsync(project);

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

Create()

public static ForwardingRulesClient Create()

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

Returns
TypeDescription
ForwardingRulesClient

The created ForwardingRulesClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ForwardingRulesClient>

The task representing the created ForwardingRulesClient.

Delete(DeleteForwardingRuleRequest, CallSettings)

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

Deletes the specified ForwardingRule resource.

Parameters
NameDescription
requestDeleteForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
DeleteForwardingRuleRequest request = new DeleteForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, String, CallSettings)

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

Deletes the specified ForwardingRule resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.Delete(project, region, 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 = forwardingRulesClient.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(DeleteForwardingRuleRequest, CallSettings)

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

Deletes the specified ForwardingRule resource.

Parameters
NameDescription
requestDeleteForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
DeleteForwardingRuleRequest request = new DeleteForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(DeleteForwardingRuleRequest, CancellationToken)

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

Deletes the specified ForwardingRule resource.

Parameters
NameDescription
requestDeleteForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
DeleteForwardingRuleRequest request = new DeleteForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, String, CallSettings)

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

Deletes the specified ForwardingRule resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.DeleteAsync(project, region, 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 forwardingRulesClient.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, String, CancellationToken)

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

Deletes the specified ForwardingRule resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.DeleteAsync(project, region, 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 forwardingRulesClient.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(GetForwardingRuleRequest, CallSettings)

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

Returns the specified ForwardingRule resource.

Parameters
NameDescription
requestGetForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
GetForwardingRuleRequest request = new GetForwardingRuleRequest
{
    Region = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
ForwardingRule response = forwardingRulesClient.Get(request);

Get(String, String, String, CallSettings)

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

Returns the specified ForwardingRule resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
// Make the request
ForwardingRule response = forwardingRulesClient.Get(project, region, forwardingRule);

GetAsync(GetForwardingRuleRequest, CallSettings)

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

Returns the specified ForwardingRule resource.

Parameters
NameDescription
requestGetForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
GetForwardingRuleRequest request = new GetForwardingRuleRequest
{
    Region = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
ForwardingRule response = await forwardingRulesClient.GetAsync(request);

GetAsync(GetForwardingRuleRequest, CancellationToken)

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

Returns the specified ForwardingRule resource.

Parameters
NameDescription
requestGetForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
GetForwardingRuleRequest request = new GetForwardingRuleRequest
{
    Region = "",
    Project = "",
    ForwardingRule = "",
};
// Make the request
ForwardingRule response = await forwardingRulesClient.GetAsync(request);

GetAsync(String, String, String, CallSettings)

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

Returns the specified ForwardingRule resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
// Make the request
ForwardingRule response = await forwardingRulesClient.GetAsync(project, region, forwardingRule);

GetAsync(String, String, String, CancellationToken)

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

Returns the specified ForwardingRule resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
// Make the request
ForwardingRule response = await forwardingRulesClient.GetAsync(project, region, forwardingRule);

Insert(InsertForwardingRuleRequest, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region using the data included in the request.

Parameters
NameDescription
requestInsertForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
InsertForwardingRuleRequest request = new InsertForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, String, ForwardingRule, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region using the data included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.Insert(project, region, 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 = forwardingRulesClient.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(InsertForwardingRuleRequest, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region using the data included in the request.

Parameters
NameDescription
requestInsertForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
InsertForwardingRuleRequest request = new InsertForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(InsertForwardingRuleRequest, CancellationToken)

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

Creates a ForwardingRule resource in the specified project and region using the data included in the request.

Parameters
NameDescription
requestInsertForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
InsertForwardingRuleRequest request = new InsertForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, String, ForwardingRule, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region using the data included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.InsertAsync(project, region, 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 forwardingRulesClient.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, String, ForwardingRule, CancellationToken)

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

Creates a ForwardingRule resource in the specified project and region using the data included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.InsertAsync(project, region, 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 forwardingRulesClient.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(ListForwardingRulesRequest, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified project and region.

Parameters
NameDescription
requestListForwardingRulesRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
ListForwardingRulesRequest request = new ListForwardingRulesRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.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, String, Nullable<Int32>, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified project and region.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.List(project, region);

// 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(ListForwardingRulesRequest, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified project and region.

Parameters
NameDescription
requestListForwardingRulesRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
ListForwardingRulesRequest request = new ListForwardingRulesRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.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, String, Nullable<Int32>, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified project and region.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.ListAsync(project, region);

// 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(PatchForwardingRuleRequest, CallSettings)

public virtual Operation<Operation, Operation> Patch(PatchForwardingRuleRequest 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
requestPatchForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
PatchForwardingRuleRequest request = new PatchForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, String, ForwardingRule, CallSettings)

public virtual Operation<Operation, Operation> Patch(string project, string region, 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.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.Patch(project, region, 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 = forwardingRulesClient.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(PatchForwardingRuleRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchForwardingRuleRequest 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
requestPatchForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
PatchForwardingRuleRequest request = new PatchForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(PatchForwardingRuleRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchForwardingRuleRequest 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
requestPatchForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
PatchForwardingRuleRequest request = new PatchForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
    ForwardingRuleResource = new ForwardingRule(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, String, ForwardingRule, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, 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.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.PatchAsync(project, region, 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 forwardingRulesClient.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, String, ForwardingRule, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, 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.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
ForwardingRule forwardingRuleResource = new ForwardingRule();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.PatchAsync(project, region, 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 forwardingRulesClient.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(SetLabelsForwardingRuleRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetLabelsForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, String, RegionSetLabelsRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, 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.

regionString

The region for this request.

resourceString

Name or id of the resource for this request.

regionSetLabelsRequestResourceRegionSetLabelsRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.SetLabels(project, region, resource, regionSetLabelsRequestResource);

// 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 = forwardingRulesClient.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(SetLabelsForwardingRuleRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetLabelsForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(SetLabelsForwardingRuleRequest, CancellationToken)

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

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

Parameters
NameDescription
requestSetLabelsForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, String, RegionSetLabelsRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, 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.

regionString

The region for this request.

resourceString

Name or id of the resource for this request.

regionSetLabelsRequestResourceRegionSetLabelsRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

// 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 forwardingRulesClient.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, String, RegionSetLabelsRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, 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.

regionString

The region for this request.

resourceString

Name or id of the resource for this request.

regionSetLabelsRequestResourceRegionSetLabelsRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

// 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 forwardingRulesClient.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(SetTargetForwardingRuleRequest, CallSettings)

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

Changes target URL for forwarding rule. The new target should be of the same type as the old target.

Parameters
NameDescription
requestSetTargetForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
SetTargetForwardingRuleRequest request = new SetTargetForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
    TargetReferenceResource = new TargetReference(),
};
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, String, TargetReference, CallSettings)

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

Changes target URL for forwarding rule. The new target should be of the same type as the old target.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
TargetReference targetReferenceResource = new TargetReference();
// Make the request
lro::Operation<Operation, Operation> response = forwardingRulesClient.SetTarget(project, region, 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 = forwardingRulesClient.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(SetTargetForwardingRuleRequest, CallSettings)

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

Changes target URL for forwarding rule. The new target should be of the same type as the old target.

Parameters
NameDescription
requestSetTargetForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetTargetForwardingRuleRequest request = new SetTargetForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
    TargetReferenceResource = new TargetReference(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(SetTargetForwardingRuleRequest, CancellationToken)

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

Changes target URL for forwarding rule. The new target should be of the same type as the old target.

Parameters
NameDescription
requestSetTargetForwardingRuleRequest

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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
SetTargetForwardingRuleRequest request = new SetTargetForwardingRuleRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ForwardingRule = "",
    TargetReferenceResource = new TargetReference(),
};
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, String, TargetReference, CallSettings)

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

Changes target URL for forwarding rule. The new target should be of the same type as the old target.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
TargetReference targetReferenceResource = new TargetReference();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetTargetAsync(project, region, 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 forwardingRulesClient.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, String, TargetReference, CancellationToken)

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

Changes target URL for forwarding rule. The new target should be of the same type as the old target.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping 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
ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string forwardingRule = "";
TargetReference targetReferenceResource = new TargetReference();
// Make the request
lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetTargetAsync(project, region, 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 forwardingRulesClient.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.