Compute Engine v1 API - Class RoutersClient (2.17.0)

public abstract class RoutersClient

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

Routers client wrapper, for convenient use.

Inheritance

object > RoutersClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Routers API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Routers scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual Routers.RoutersClient GrpcClient { get; }

The underlying gRPC Routers client

Property Value
Type Description
RoutersRoutersClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
Type Description
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateOperationsClient

public virtual OperationsClient UpdateOperationsClient { get; }

The long-running operations client for Update.

Property Value
Type Description
OperationsClient

Methods

AggregatedList(AggregatedListRoutersRequest, CallSettings)

public virtual PagedEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> AggregatedList(AggregatedListRoutersRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of routers. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListRoutersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableRouterAggregatedListKeyValuePairstringRoutersScopedList

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

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
AggregatedListRoutersRequest request = new AggregatedListRoutersRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedList(request);

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

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

Retrieves an aggregated list of routers. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableRouterAggregatedListKeyValuePairstringRoutersScopedList

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

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedList(project);

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

public virtual PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> AggregatedListAsync(AggregatedListRoutersRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of routers. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListRoutersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableRouterAggregatedListKeyValuePairstringRoutersScopedList

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

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
AggregatedListRoutersRequest request = new AggregatedListRoutersRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedListAsync(request);

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

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

Retrieves an aggregated list of routers. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableRouterAggregatedListKeyValuePairstringRoutersScopedList

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

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedListAsync(project);

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

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

Returns
Type Description
RoutersClient

The created RoutersClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskRoutersClient

The task representing the created RoutersClient.

Delete(DeleteRouterRequest, CallSettings)

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

Deletes the specified Router resource.

Parameters
Name Description
request DeleteRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
DeleteRouterRequest request = new DeleteRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.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 = routersClient.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 router, CallSettings callSettings = null)

Deletes the specified Router resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Delete(project, region, router);

// 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 = routersClient.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(DeleteRouterRequest, CallSettings)

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

Deletes the specified Router resource.

Parameters
Name Description
request DeleteRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
DeleteRouterRequest request = new DeleteRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.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 routersClient.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(DeleteRouterRequest, CancellationToken)

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

Deletes the specified Router resource.

Parameters
Name Description
request DeleteRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
DeleteRouterRequest request = new DeleteRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.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 routersClient.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 router, CallSettings callSettings = null)

Deletes the specified Router resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 routersClient.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 router, CancellationToken cancellationToken)

Deletes the specified Router resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 routersClient.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(GetRouterRequest, CallSettings)

public virtual Router Get(GetRouterRequest request, CallSettings callSettings = null)

Returns the specified Router resource.

Parameters
Name Description
request GetRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Router

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
GetRouterRequest request = new GetRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
Router response = routersClient.Get(request);

Get(string, string, string, CallSettings)

public virtual Router Get(string project, string region, string router, CallSettings callSettings = null)

Returns the specified Router resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Router

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
Router response = routersClient.Get(project, region, router);

GetAsync(GetRouterRequest, CallSettings)

public virtual Task<Router> GetAsync(GetRouterRequest request, CallSettings callSettings = null)

Returns the specified Router resource.

Parameters
Name Description
request GetRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRouter

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterRequest request = new GetRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
Router response = await routersClient.GetAsync(request);

GetAsync(GetRouterRequest, CancellationToken)

public virtual Task<Router> GetAsync(GetRouterRequest request, CancellationToken cancellationToken)

Returns the specified Router resource.

Parameters
Name Description
request GetRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRouter

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterRequest request = new GetRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
Router response = await routersClient.GetAsync(request);

GetAsync(string, string, string, CallSettings)

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

Returns the specified Router resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRouter

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
Router response = await routersClient.GetAsync(project, region, router);

GetAsync(string, string, string, CancellationToken)

public virtual Task<Router> GetAsync(string project, string region, string router, CancellationToken cancellationToken)

Returns the specified Router resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to return.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRouter

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
Router response = await routersClient.GetAsync(project, region, router);

GetNatIpInfo(GetNatIpInfoRouterRequest, CallSettings)

public virtual NatIpInfoResponse GetNatIpInfo(GetNatIpInfoRouterRequest request, CallSettings callSettings = null)

Retrieves runtime NAT IP information.

Parameters
Name Description
request GetNatIpInfoRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NatIpInfoResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
GetNatIpInfoRouterRequest request = new GetNatIpInfoRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
    NatName = "",
};
// Make the request
NatIpInfoResponse response = routersClient.GetNatIpInfo(request);

GetNatIpInfo(string, string, string, CallSettings)

public virtual NatIpInfoResponse GetNatIpInfo(string project, string region, string router, CallSettings callSettings = null)

Retrieves runtime NAT IP information.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NatIpInfoResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
NatIpInfoResponse response = routersClient.GetNatIpInfo(project, region, router);

GetNatIpInfoAsync(GetNatIpInfoRouterRequest, CallSettings)

public virtual Task<NatIpInfoResponse> GetNatIpInfoAsync(GetNatIpInfoRouterRequest request, CallSettings callSettings = null)

Retrieves runtime NAT IP information.

Parameters
Name Description
request GetNatIpInfoRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNatIpInfoResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetNatIpInfoRouterRequest request = new GetNatIpInfoRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
    NatName = "",
};
// Make the request
NatIpInfoResponse response = await routersClient.GetNatIpInfoAsync(request);

GetNatIpInfoAsync(GetNatIpInfoRouterRequest, CancellationToken)

public virtual Task<NatIpInfoResponse> GetNatIpInfoAsync(GetNatIpInfoRouterRequest request, CancellationToken cancellationToken)

Retrieves runtime NAT IP information.

Parameters
Name Description
request GetNatIpInfoRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNatIpInfoResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetNatIpInfoRouterRequest request = new GetNatIpInfoRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
    NatName = "",
};
// Make the request
NatIpInfoResponse response = await routersClient.GetNatIpInfoAsync(request);

GetNatIpInfoAsync(string, string, string, CallSettings)

public virtual Task<NatIpInfoResponse> GetNatIpInfoAsync(string project, string region, string router, CallSettings callSettings = null)

Retrieves runtime NAT IP information.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNatIpInfoResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
NatIpInfoResponse response = await routersClient.GetNatIpInfoAsync(project, region, router);

GetNatIpInfoAsync(string, string, string, CancellationToken)

public virtual Task<NatIpInfoResponse> GetNatIpInfoAsync(string project, string region, string router, CancellationToken cancellationToken)

Retrieves runtime NAT IP information.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNatIpInfoResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
NatIpInfoResponse response = await routersClient.GetNatIpInfoAsync(project, region, router);

GetNatMappingInfo(GetNatMappingInfoRoutersRequest, CallSettings)

public virtual PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfo(GetNatMappingInfoRoutersRequest request, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
Name Description
request GetNatMappingInfoRoutersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableVmEndpointNatMappingsListVmEndpointNatMappings

A pageable sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
GetNatMappingInfoRoutersRequest request = new GetNatMappingInfoRoutersRequest
{
    Region = "",
    Router = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    NatName = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfo(request);

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

GetNatMappingInfo(string, string, string, string, int?, CallSettings)

public virtual PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfo(string project, string region, string router, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query for Nat Mapping information of VM endpoints.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableVmEndpointNatMappingsListVmEndpointNatMappings

A pageable sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfo(project, region, router);

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

GetNatMappingInfoAsync(GetNatMappingInfoRoutersRequest, CallSettings)

public virtual PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfoAsync(GetNatMappingInfoRoutersRequest request, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
Name Description
request GetNatMappingInfoRoutersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableVmEndpointNatMappingsListVmEndpointNatMappings

A pageable asynchronous sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetNatMappingInfoRoutersRequest request = new GetNatMappingInfoRoutersRequest
{
    Region = "",
    Router = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    NatName = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfoAsync(request);

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

GetNatMappingInfoAsync(string, string, string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfoAsync(string project, string region, string router, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query for Nat Mapping information of VM endpoints.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableVmEndpointNatMappingsListVmEndpointNatMappings

A pageable asynchronous sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfoAsync(project, region, router);

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

GetRouterStatus(GetRouterStatusRouterRequest, CallSettings)

public virtual RouterStatusResponse GetRouterStatus(GetRouterStatusRouterRequest request, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
Name Description
request GetRouterStatusRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RouterStatusResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
GetRouterStatusRouterRequest request = new GetRouterStatusRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
RouterStatusResponse response = routersClient.GetRouterStatus(request);

GetRouterStatus(string, string, string, CallSettings)

public virtual RouterStatusResponse GetRouterStatus(string project, string region, string router, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RouterStatusResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
RouterStatusResponse response = routersClient.GetRouterStatus(project, region, router);

GetRouterStatusAsync(GetRouterStatusRouterRequest, CallSettings)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(GetRouterStatusRouterRequest request, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
Name Description
request GetRouterStatusRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRouterStatusResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterStatusRouterRequest request = new GetRouterStatusRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(request);

GetRouterStatusAsync(GetRouterStatusRouterRequest, CancellationToken)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(GetRouterStatusRouterRequest request, CancellationToken cancellationToken)

Retrieves runtime information of the specified router.

Parameters
Name Description
request GetRouterStatusRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRouterStatusResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterStatusRouterRequest request = new GetRouterStatusRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(request);

GetRouterStatusAsync(string, string, string, CallSettings)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(string project, string region, string router, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRouterStatusResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(project, region, router);

GetRouterStatusAsync(string, string, string, CancellationToken)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(string project, string region, string router, CancellationToken cancellationToken)

Retrieves runtime information of the specified router.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRouterStatusResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(project, region, router);

Insert(InsertRouterRequest, CallSettings)

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

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

Parameters
Name Description
request InsertRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
InsertRouterRequest request = new InsertRouterRequest
{
    RequestId = "",
    Region = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.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 = routersClient.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, Router, CallSettings)

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

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

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Insert(project, region, routerResource);

// 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 = routersClient.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(InsertRouterRequest, CallSettings)

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

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

Parameters
Name Description
request InsertRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
InsertRouterRequest request = new InsertRouterRequest
{
    RequestId = "",
    Region = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.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 routersClient.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(InsertRouterRequest, CancellationToken)

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

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

Parameters
Name Description
request InsertRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
InsertRouterRequest request = new InsertRouterRequest
{
    RequestId = "",
    Region = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.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 routersClient.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, Router, CallSettings)

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

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

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.InsertAsync(project, region, routerResource);

// 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 routersClient.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, Router, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, Router routerResource, CancellationToken cancellationToken)

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

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

routerResource Router

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.InsertAsync(project, region, routerResource);

// 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 routersClient.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(ListRoutersRequest, CallSettings)

public virtual PagedEnumerable<RouterList, Router> List(ListRoutersRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request ListRoutersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableRouterListRouter

A pageable sequence of Router resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
ListRoutersRequest request = new ListRoutersRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<RouterList, Router> response = routersClient.List(request);

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

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

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

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableRouterListRouter

A pageable sequence of Router resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<RouterList, Router> response = routersClient.List(project, region);

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

public virtual PagedAsyncEnumerable<RouterList, Router> ListAsync(ListRoutersRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request ListRoutersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableRouterListRouter

A pageable asynchronous sequence of Router resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
ListRoutersRequest request = new ListRoutersRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<RouterList, Router> response = routersClient.ListAsync(request);

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

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

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

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableRouterListRouter

A pageable asynchronous sequence of Router resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<RouterList, Router> response = routersClient.ListAsync(project, region);

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

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

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
Name Description
request PatchRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
PatchRouterRequest request = new PatchRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.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 = routersClient.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, Router, CallSettings)

public virtual Operation<Operation, Operation> Patch(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to patch.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Patch(project, region, router, routerResource);

// 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 = routersClient.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(PatchRouterRequest, CallSettings)

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

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
Name Description
request PatchRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PatchRouterRequest request = new PatchRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.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 routersClient.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(PatchRouterRequest, CancellationToken)

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

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
Name Description
request PatchRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PatchRouterRequest request = new PatchRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.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 routersClient.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, Router, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to patch.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.PatchAsync(project, region, router, routerResource);

// 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 routersClient.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, Router, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string router, Router routerResource, CancellationToken cancellationToken)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to patch.

routerResource Router

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.PatchAsync(project, region, router, routerResource);

// 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 routersClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PollOnceDelete(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOncePatch(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOncePatchAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceUpdate(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceUpdateAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

Preview(PreviewRouterRequest, CallSettings)

public virtual RoutersPreviewResponse Preview(PreviewRouterRequest request, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
Name Description
request PreviewRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RoutersPreviewResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
PreviewRouterRequest request = new PreviewRouterRequest
{
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
RoutersPreviewResponse response = routersClient.Preview(request);

Preview(string, string, string, Router, CallSettings)

public virtual RoutersPreviewResponse Preview(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RoutersPreviewResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
RoutersPreviewResponse response = routersClient.Preview(project, region, router, routerResource);

PreviewAsync(PreviewRouterRequest, CallSettings)

public virtual Task<RoutersPreviewResponse> PreviewAsync(PreviewRouterRequest request, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
Name Description
request PreviewRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRoutersPreviewResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PreviewRouterRequest request = new PreviewRouterRequest
{
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(request);

PreviewAsync(PreviewRouterRequest, CancellationToken)

public virtual Task<RoutersPreviewResponse> PreviewAsync(PreviewRouterRequest request, CancellationToken cancellationToken)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
Name Description
request PreviewRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRoutersPreviewResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PreviewRouterRequest request = new PreviewRouterRequest
{
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(request);

PreviewAsync(string, string, string, Router, CallSettings)

public virtual Task<RoutersPreviewResponse> PreviewAsync(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRoutersPreviewResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(project, region, router, routerResource);

PreviewAsync(string, string, string, Router, CancellationToken)

public virtual Task<RoutersPreviewResponse> PreviewAsync(string project, string region, string router, Router routerResource, CancellationToken cancellationToken)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to query.

routerResource Router

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRoutersPreviewResponse

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(project, region, router, routerResource);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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

Update(UpdateRouterRequest, CallSettings)

public virtual Operation<Operation, Operation> Update(UpdateRouterRequest request, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
Name Description
request UpdateRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
UpdateRouterRequest request = new UpdateRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Update(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 = routersClient.PollOnceUpdate(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;
}

Update(string, string, string, Router, CallSettings)

public virtual Operation<Operation, Operation> Update(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to update.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Update(project, region, router, routerResource);

// 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 = routersClient.PollOnceUpdate(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;
}

UpdateAsync(UpdateRouterRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateRouterRequest request, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
Name Description
request UpdateRouterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
UpdateRouterRequest request = new UpdateRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(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 routersClient.PollOnceUpdateAsync(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;
}

UpdateAsync(UpdateRouterRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateRouterRequest request, CancellationToken cancellationToken)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
Name Description
request UpdateRouterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
UpdateRouterRequest request = new UpdateRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(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 routersClient.PollOnceUpdateAsync(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;
}

UpdateAsync(string, string, string, Router, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to update.

routerResource Router

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(project, region, router, routerResource);

// 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 routersClient.PollOnceUpdateAsync(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;
}

UpdateAsync(string, string, string, Router, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string region, string router, Router routerResource, CancellationToken cancellationToken)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

router string

Name of the Router resource to update.

routerResource Router

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(project, region, router, routerResource);

// 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 routersClient.PollOnceUpdateAsync(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;
}