Compute Engine v1 API - Class SubnetworksClient (3.2.0)

public abstract class SubnetworksClient

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

Subnetworks client wrapper, for convenient use.

Inheritance

object > SubnetworksClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Subnetworks API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Subnetworks 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 Subnetworks 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

ExpandIpCidrRangeOperationsClient

public virtual OperationsClient ExpandIpCidrRangeOperationsClient { get; }

The long-running operations client for ExpandIpCidrRange.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual Subnetworks.SubnetworksClient GrpcClient { get; }

The underlying gRPC Subnetworks client

Property Value
Type Description
SubnetworksSubnetworksClient

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

SetPrivateIpGoogleAccessOperationsClient

public virtual OperationsClient SetPrivateIpGoogleAccessOperationsClient { get; }

The long-running operations client for SetPrivateIpGoogleAccess.

Property Value
Type Description
OperationsClient

Methods

AggregatedList(AggregatedListSubnetworksRequest, CallSettings)

public virtual PagedEnumerable<SubnetworkAggregatedList, KeyValuePair<string, SubnetworksScopedList>> AggregatedList(AggregatedListSubnetworksRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request AggregatedListSubnetworksRequest

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
PagedEnumerableSubnetworkAggregatedListKeyValuePairstringSubnetworksScopedList

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

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
AggregatedListSubnetworksRequest request = new AggregatedListSubnetworksRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<SubnetworkAggregatedList, KeyValuePair<string, SubnetworksScopedList>> response = subnetworksClient.AggregatedList(request);

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

Retrieves an aggregated list of subnetworks. 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
PagedEnumerableSubnetworkAggregatedListKeyValuePairstringSubnetworksScopedList

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

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<SubnetworkAggregatedList, KeyValuePair<string, SubnetworksScopedList>> response = subnetworksClient.AggregatedList(project);

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

public virtual PagedAsyncEnumerable<SubnetworkAggregatedList, KeyValuePair<string, SubnetworksScopedList>> AggregatedListAsync(AggregatedListSubnetworksRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request AggregatedListSubnetworksRequest

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
PagedAsyncEnumerableSubnetworkAggregatedListKeyValuePairstringSubnetworksScopedList

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

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
AggregatedListSubnetworksRequest request = new AggregatedListSubnetworksRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<SubnetworkAggregatedList, KeyValuePair<string, SubnetworksScopedList>> response = subnetworksClient.AggregatedListAsync(request);

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

Retrieves an aggregated list of subnetworks. 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
PagedAsyncEnumerableSubnetworkAggregatedListKeyValuePairstringSubnetworksScopedList

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

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<SubnetworkAggregatedList, KeyValuePair<string, SubnetworksScopedList>> response = subnetworksClient.AggregatedListAsync(project);

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

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

Returns
Type Description
SubnetworksClient

The created SubnetworksClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskSubnetworksClient

The task representing the created SubnetworksClient.

Delete(DeleteSubnetworkRequest, CallSettings)

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

Deletes the specified subnetwork.

Parameters
Name Description
request DeleteSubnetworkRequest

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
DeleteSubnetworkRequest request = new DeleteSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Subnetwork = "",
};
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.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 = subnetworksClient.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 subnetwork, CallSettings callSettings = null)

Deletes the specified subnetwork.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

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

// 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 = subnetworksClient.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(DeleteSubnetworkRequest, CallSettings)

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

Deletes the specified subnetwork.

Parameters
Name Description
request DeleteSubnetworkRequest

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

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

Deletes the specified subnetwork.

Parameters
Name Description
request DeleteSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
DeleteSubnetworkRequest request = new DeleteSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Subnetwork = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.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 subnetworksClient.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 subnetwork, CallSettings callSettings = null)

Deletes the specified subnetwork.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork 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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.DeleteAsync(project, region, subnetwork);

// 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 subnetworksClient.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 subnetwork, CancellationToken cancellationToken)

Deletes the specified subnetwork.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork 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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.DeleteAsync(project, region, subnetwork);

// 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 subnetworksClient.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;
}

ExpandIpCidrRange(ExpandIpCidrRangeSubnetworkRequest, CallSettings)

public virtual Operation<Operation, Operation> ExpandIpCidrRange(ExpandIpCidrRangeSubnetworkRequest request, CallSettings callSettings = null)

Expands the IP CIDR range of the subnetwork to a specified value.

Parameters
Name Description
request ExpandIpCidrRangeSubnetworkRequest

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
ExpandIpCidrRangeSubnetworkRequest request = new ExpandIpCidrRangeSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Subnetwork = "",
    SubnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.ExpandIpCidrRange(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 = subnetworksClient.PollOnceExpandIpCidrRange(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;
}

ExpandIpCidrRange(string, string, string, SubnetworksExpandIpCidrRangeRequest, CallSettings)

public virtual Operation<Operation, Operation> ExpandIpCidrRange(string project, string region, string subnetwork, SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource, CallSettings callSettings = null)

Expands the IP CIDR range of the subnetwork to a specified value.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to update.

subnetworksExpandIpCidrRangeRequestResource SubnetworksExpandIpCidrRangeRequest

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest();
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.ExpandIpCidrRange(project, region, subnetwork, subnetworksExpandIpCidrRangeRequestResource);

// 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 = subnetworksClient.PollOnceExpandIpCidrRange(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;
}

ExpandIpCidrRangeAsync(ExpandIpCidrRangeSubnetworkRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> ExpandIpCidrRangeAsync(ExpandIpCidrRangeSubnetworkRequest request, CallSettings callSettings = null)

Expands the IP CIDR range of the subnetwork to a specified value.

Parameters
Name Description
request ExpandIpCidrRangeSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
ExpandIpCidrRangeSubnetworkRequest request = new ExpandIpCidrRangeSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Subnetwork = "",
    SubnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.ExpandIpCidrRangeAsync(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 subnetworksClient.PollOnceExpandIpCidrRangeAsync(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;
}

ExpandIpCidrRangeAsync(ExpandIpCidrRangeSubnetworkRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> ExpandIpCidrRangeAsync(ExpandIpCidrRangeSubnetworkRequest request, CancellationToken cancellationToken)

Expands the IP CIDR range of the subnetwork to a specified value.

Parameters
Name Description
request ExpandIpCidrRangeSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
ExpandIpCidrRangeSubnetworkRequest request = new ExpandIpCidrRangeSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Subnetwork = "",
    SubnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.ExpandIpCidrRangeAsync(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 subnetworksClient.PollOnceExpandIpCidrRangeAsync(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;
}

ExpandIpCidrRangeAsync(string, string, string, SubnetworksExpandIpCidrRangeRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> ExpandIpCidrRangeAsync(string project, string region, string subnetwork, SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource, CallSettings callSettings = null)

Expands the IP CIDR range of the subnetwork to a specified value.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to update.

subnetworksExpandIpCidrRangeRequestResource SubnetworksExpandIpCidrRangeRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.ExpandIpCidrRangeAsync(project, region, subnetwork, subnetworksExpandIpCidrRangeRequestResource);

// 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 subnetworksClient.PollOnceExpandIpCidrRangeAsync(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;
}

ExpandIpCidrRangeAsync(string, string, string, SubnetworksExpandIpCidrRangeRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> ExpandIpCidrRangeAsync(string project, string region, string subnetwork, SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource, CancellationToken cancellationToken)

Expands the IP CIDR range of the subnetwork to a specified value.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to update.

subnetworksExpandIpCidrRangeRequestResource SubnetworksExpandIpCidrRangeRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.ExpandIpCidrRangeAsync(project, region, subnetwork, subnetworksExpandIpCidrRangeRequestResource);

// 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 subnetworksClient.PollOnceExpandIpCidrRangeAsync(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(GetSubnetworkRequest, CallSettings)

public virtual Subnetwork Get(GetSubnetworkRequest request, CallSettings callSettings = null)

Returns the specified subnetwork.

Parameters
Name Description
request GetSubnetworkRequest

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
Subnetwork

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
GetSubnetworkRequest request = new GetSubnetworkRequest
{
    Region = "",
    Project = "",
    Subnetwork = "",
};
// Make the request
Subnetwork response = subnetworksClient.Get(request);

Get(string, string, string, CallSettings)

public virtual Subnetwork Get(string project, string region, string subnetwork, CallSettings callSettings = null)

Returns the specified subnetwork.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Subnetwork

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
// Make the request
Subnetwork response = subnetworksClient.Get(project, region, subnetwork);

GetAsync(GetSubnetworkRequest, CallSettings)

public virtual Task<Subnetwork> GetAsync(GetSubnetworkRequest request, CallSettings callSettings = null)

Returns the specified subnetwork.

Parameters
Name Description
request GetSubnetworkRequest

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
TaskSubnetwork

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
GetSubnetworkRequest request = new GetSubnetworkRequest
{
    Region = "",
    Project = "",
    Subnetwork = "",
};
// Make the request
Subnetwork response = await subnetworksClient.GetAsync(request);

GetAsync(GetSubnetworkRequest, CancellationToken)

public virtual Task<Subnetwork> GetAsync(GetSubnetworkRequest request, CancellationToken cancellationToken)

Returns the specified subnetwork.

Parameters
Name Description
request GetSubnetworkRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSubnetwork

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
GetSubnetworkRequest request = new GetSubnetworkRequest
{
    Region = "",
    Project = "",
    Subnetwork = "",
};
// Make the request
Subnetwork response = await subnetworksClient.GetAsync(request);

GetAsync(string, string, string, CallSettings)

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

Returns the specified subnetwork.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSubnetwork

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
// Make the request
Subnetwork response = await subnetworksClient.GetAsync(project, region, subnetwork);

GetAsync(string, string, string, CancellationToken)

public virtual Task<Subnetwork> GetAsync(string project, string region, string subnetwork, CancellationToken cancellationToken)

Returns the specified subnetwork.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to return.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSubnetwork

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
// Make the request
Subnetwork response = await subnetworksClient.GetAsync(project, region, subnetwork);

GetIamPolicy(GetIamPolicySubnetworkRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicySubnetworkRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicySubnetworkRequest

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
Policy

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
GetIamPolicySubnetworkRequest request = new GetIamPolicySubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = subnetworksClient.GetIamPolicy(request);

GetIamPolicy(string, string, string, CallSettings)

public virtual Policy GetIamPolicy(string project, string region, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = subnetworksClient.GetIamPolicy(project, region, resource);

GetIamPolicyAsync(GetIamPolicySubnetworkRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicySubnetworkRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicySubnetworkRequest

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
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicySubnetworkRequest request = new GetIamPolicySubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await subnetworksClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicySubnetworkRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicySubnetworkRequest request, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicySubnetworkRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicySubnetworkRequest request = new GetIamPolicySubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await subnetworksClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(string, string, string, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string project, string region, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = await subnetworksClient.GetIamPolicyAsync(project, region, resource);

GetIamPolicyAsync(string, string, string, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string project, string region, string resource, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = await subnetworksClient.GetIamPolicyAsync(project, region, resource);

Insert(InsertSubnetworkRequest, CallSettings)

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

Creates a subnetwork in the specified project using the data included in the request.

Parameters
Name Description
request InsertSubnetworkRequest

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
InsertSubnetworkRequest request = new InsertSubnetworkRequest
{
    RequestId = "",
    SubnetworkResource = new Subnetwork(),
    Region = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.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 = subnetworksClient.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, Subnetwork, CallSettings)

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

Creates a subnetwork in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetworkResource Subnetwork

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
Subnetwork subnetworkResource = new Subnetwork();
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.Insert(project, region, subnetworkResource);

// 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 = subnetworksClient.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(InsertSubnetworkRequest, CallSettings)

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

Creates a subnetwork in the specified project using the data included in the request.

Parameters
Name Description
request InsertSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
InsertSubnetworkRequest request = new InsertSubnetworkRequest
{
    RequestId = "",
    SubnetworkResource = new Subnetwork(),
    Region = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.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 subnetworksClient.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(InsertSubnetworkRequest, CancellationToken)

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

Creates a subnetwork in the specified project using the data included in the request.

Parameters
Name Description
request InsertSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
InsertSubnetworkRequest request = new InsertSubnetworkRequest
{
    RequestId = "",
    SubnetworkResource = new Subnetwork(),
    Region = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.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 subnetworksClient.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, Subnetwork, CallSettings)

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

Creates a subnetwork in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetworkResource Subnetwork

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Subnetwork subnetworkResource = new Subnetwork();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.InsertAsync(project, region, subnetworkResource);

// 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 subnetworksClient.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, Subnetwork, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, Subnetwork subnetworkResource, CancellationToken cancellationToken)

Creates a subnetwork in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetworkResource Subnetwork

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Subnetwork subnetworkResource = new Subnetwork();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.InsertAsync(project, region, subnetworkResource);

// 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 subnetworksClient.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(ListSubnetworksRequest, CallSettings)

public virtual PagedEnumerable<SubnetworkList, Subnetwork> List(ListSubnetworksRequest request, CallSettings callSettings = null)

Retrieves a list of subnetworks available to the specified project.

Parameters
Name Description
request ListSubnetworksRequest

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
PagedEnumerableSubnetworkListSubnetwork

A pageable sequence of Subnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
ListSubnetworksRequest request = new ListSubnetworksRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<SubnetworkList, Subnetwork> response = subnetworksClient.List(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Subnetwork 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 (SubnetworkList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Subnetwork 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<Subnetwork> 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 (Subnetwork 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<SubnetworkList, Subnetwork> List(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of subnetworks available to the specified project.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping 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
PagedEnumerableSubnetworkListSubnetwork

A pageable sequence of Subnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<SubnetworkList, Subnetwork> response = subnetworksClient.List(project, region);

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

public virtual PagedAsyncEnumerable<SubnetworkList, Subnetwork> ListAsync(ListSubnetworksRequest request, CallSettings callSettings = null)

Retrieves a list of subnetworks available to the specified project.

Parameters
Name Description
request ListSubnetworksRequest

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
PagedAsyncEnumerableSubnetworkListSubnetwork

A pageable asynchronous sequence of Subnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
ListSubnetworksRequest request = new ListSubnetworksRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<SubnetworkList, Subnetwork> response = subnetworksClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Subnetwork 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((SubnetworkList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Subnetwork 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<Subnetwork> 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 (Subnetwork 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<SubnetworkList, Subnetwork> ListAsync(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of subnetworks available to the specified project.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping 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
PagedAsyncEnumerableSubnetworkListSubnetwork

A pageable asynchronous sequence of Subnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<SubnetworkList, Subnetwork> response = subnetworksClient.ListAsync(project, region);

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

ListUsable(ListUsableSubnetworksRequest, CallSettings)

public virtual PagedEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> ListUsable(ListUsableSubnetworksRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of all usable subnetworks in the project.

Parameters
Name Description
request ListUsableSubnetworksRequest

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
PagedEnumerableUsableSubnetworksAggregatedListUsableSubnetwork

A pageable sequence of UsableSubnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
ListUsableSubnetworksRequest request = new ListUsableSubnetworksRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> response = subnetworksClient.ListUsable(request);

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

ListUsable(string, string, int?, CallSettings)

public virtual PagedEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> ListUsable(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of all usable subnetworks in the project.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableUsableSubnetworksAggregatedListUsableSubnetwork

A pageable sequence of UsableSubnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> response = subnetworksClient.ListUsable(project);

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

ListUsableAsync(ListUsableSubnetworksRequest, CallSettings)

public virtual PagedAsyncEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> ListUsableAsync(ListUsableSubnetworksRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of all usable subnetworks in the project.

Parameters
Name Description
request ListUsableSubnetworksRequest

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
PagedAsyncEnumerableUsableSubnetworksAggregatedListUsableSubnetwork

A pageable asynchronous sequence of UsableSubnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
ListUsableSubnetworksRequest request = new ListUsableSubnetworksRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> response = subnetworksClient.ListUsableAsync(request);

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

ListUsableAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> ListUsableAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of all usable subnetworks in the project.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableUsableSubnetworksAggregatedListUsableSubnetwork

A pageable asynchronous sequence of UsableSubnetwork resources.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork> response = subnetworksClient.ListUsableAsync(project);

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

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

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.

Parameters
Name Description
request PatchSubnetworkRequest

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
PatchSubnetworkRequest request = new PatchSubnetworkRequest
{
    RequestId = "",
    SubnetworkResource = new Subnetwork(),
    Region = "",
    Project = "",
    Subnetwork = "",
    DrainTimeoutSeconds = 0,
};
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.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 = subnetworksClient.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, Subnetwork, CallSettings)

public virtual Operation<Operation, Operation> Patch(string project, string region, string subnetwork, Subnetwork subnetworkResource, CallSettings callSettings = null)

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to patch.

subnetworkResource Subnetwork

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
Subnetwork subnetworkResource = new Subnetwork();
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.Patch(project, region, subnetwork, subnetworkResource);

// 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 = subnetworksClient.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(PatchSubnetworkRequest, CallSettings)

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

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.

Parameters
Name Description
request PatchSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
PatchSubnetworkRequest request = new PatchSubnetworkRequest
{
    RequestId = "",
    SubnetworkResource = new Subnetwork(),
    Region = "",
    Project = "",
    Subnetwork = "",
    DrainTimeoutSeconds = 0,
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.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 subnetworksClient.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(PatchSubnetworkRequest, CancellationToken)

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

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.

Parameters
Name Description
request PatchSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
PatchSubnetworkRequest request = new PatchSubnetworkRequest
{
    RequestId = "",
    SubnetworkResource = new Subnetwork(),
    Region = "",
    Project = "",
    Subnetwork = "",
    DrainTimeoutSeconds = 0,
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.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 subnetworksClient.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, Subnetwork, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string subnetwork, Subnetwork subnetworkResource, CallSettings callSettings = null)

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to patch.

subnetworkResource Subnetwork

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
Subnetwork subnetworkResource = new Subnetwork();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.PatchAsync(project, region, subnetwork, subnetworkResource);

// 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 subnetworksClient.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, Subnetwork, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string subnetwork, Subnetwork subnetworkResource, CancellationToken cancellationToken)

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource to patch.

subnetworkResource Subnetwork

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
Subnetwork subnetworkResource = new Subnetwork();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.PatchAsync(project, region, subnetwork, subnetworkResource);

// 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 subnetworksClient.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.

PollOnceExpandIpCidrRange(string, CallSettings)

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

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

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.

PollOnceExpandIpCidrRangeAsync(string, CallSettings)

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

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

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.

PollOnceSetPrivateIpGoogleAccess(string, CallSettings)

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

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

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.

PollOnceSetPrivateIpGoogleAccessAsync(string, CallSettings)

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

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

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.

SetIamPolicy(SetIamPolicySubnetworkRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicySubnetworkRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicySubnetworkRequest

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
Policy

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
SetIamPolicySubnetworkRequest request = new SetIamPolicySubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = subnetworksClient.SetIamPolicy(request);

SetIamPolicy(string, string, string, RegionSetPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

regionSetPolicyRequestResource RegionSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = subnetworksClient.SetIamPolicy(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicySubnetworkRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicySubnetworkRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicySubnetworkRequest

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
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicySubnetworkRequest request = new SetIamPolicySubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await subnetworksClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicySubnetworkRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicySubnetworkRequest request, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicySubnetworkRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicySubnetworkRequest request = new SetIamPolicySubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await subnetworksClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

regionSetPolicyRequestResource RegionSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await subnetworksClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

regionSetPolicyRequestResource RegionSetPolicyRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await subnetworksClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

SetPrivateIpGoogleAccess(SetPrivateIpGoogleAccessSubnetworkRequest, CallSettings)

public virtual Operation<Operation, Operation> SetPrivateIpGoogleAccess(SetPrivateIpGoogleAccessSubnetworkRequest request, CallSettings callSettings = null)

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

Parameters
Name Description
request SetPrivateIpGoogleAccessSubnetworkRequest

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
SetPrivateIpGoogleAccessSubnetworkRequest request = new SetPrivateIpGoogleAccessSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    SubnetworksSetPrivateIpGoogleAccessRequestResource = new SubnetworksSetPrivateIpGoogleAccessRequest(),
    Subnetwork = "",
};
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.SetPrivateIpGoogleAccess(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 = subnetworksClient.PollOnceSetPrivateIpGoogleAccess(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;
}

SetPrivateIpGoogleAccess(string, string, string, SubnetworksSetPrivateIpGoogleAccessRequest, CallSettings)

public virtual Operation<Operation, Operation> SetPrivateIpGoogleAccess(string project, string region, string subnetwork, SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource, CallSettings callSettings = null)

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource.

subnetworksSetPrivateIpGoogleAccessRequestResource SubnetworksSetPrivateIpGoogleAccessRequest

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
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource = new SubnetworksSetPrivateIpGoogleAccessRequest();
// Make the request
lro::Operation<Operation, Operation> response = subnetworksClient.SetPrivateIpGoogleAccess(project, region, subnetwork, subnetworksSetPrivateIpGoogleAccessRequestResource);

// 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 = subnetworksClient.PollOnceSetPrivateIpGoogleAccess(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;
}

SetPrivateIpGoogleAccessAsync(SetPrivateIpGoogleAccessSubnetworkRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetPrivateIpGoogleAccessAsync(SetPrivateIpGoogleAccessSubnetworkRequest request, CallSettings callSettings = null)

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

Parameters
Name Description
request SetPrivateIpGoogleAccessSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
SetPrivateIpGoogleAccessSubnetworkRequest request = new SetPrivateIpGoogleAccessSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    SubnetworksSetPrivateIpGoogleAccessRequestResource = new SubnetworksSetPrivateIpGoogleAccessRequest(),
    Subnetwork = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.SetPrivateIpGoogleAccessAsync(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 subnetworksClient.PollOnceSetPrivateIpGoogleAccessAsync(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;
}

SetPrivateIpGoogleAccessAsync(SetPrivateIpGoogleAccessSubnetworkRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetPrivateIpGoogleAccessAsync(SetPrivateIpGoogleAccessSubnetworkRequest request, CancellationToken cancellationToken)

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

Parameters
Name Description
request SetPrivateIpGoogleAccessSubnetworkRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
SetPrivateIpGoogleAccessSubnetworkRequest request = new SetPrivateIpGoogleAccessSubnetworkRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    SubnetworksSetPrivateIpGoogleAccessRequestResource = new SubnetworksSetPrivateIpGoogleAccessRequest(),
    Subnetwork = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.SetPrivateIpGoogleAccessAsync(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 subnetworksClient.PollOnceSetPrivateIpGoogleAccessAsync(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;
}

SetPrivateIpGoogleAccessAsync(string, string, string, SubnetworksSetPrivateIpGoogleAccessRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetPrivateIpGoogleAccessAsync(string project, string region, string subnetwork, SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource, CallSettings callSettings = null)

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource.

subnetworksSetPrivateIpGoogleAccessRequestResource SubnetworksSetPrivateIpGoogleAccessRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource = new SubnetworksSetPrivateIpGoogleAccessRequest();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.SetPrivateIpGoogleAccessAsync(project, region, subnetwork, subnetworksSetPrivateIpGoogleAccessRequestResource);

// 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 subnetworksClient.PollOnceSetPrivateIpGoogleAccessAsync(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;
}

SetPrivateIpGoogleAccessAsync(string, string, string, SubnetworksSetPrivateIpGoogleAccessRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetPrivateIpGoogleAccessAsync(string project, string region, string subnetwork, SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource, CancellationToken cancellationToken)

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region scoping this request.

subnetwork string

Name of the Subnetwork resource.

subnetworksSetPrivateIpGoogleAccessRequestResource SubnetworksSetPrivateIpGoogleAccessRequest

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
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string subnetwork = "";
SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource = new SubnetworksSetPrivateIpGoogleAccessRequest();
// Make the request
lro::Operation<Operation, Operation> response = await subnetworksClient.SetPrivateIpGoogleAccessAsync(project, region, subnetwork, subnetworksSetPrivateIpGoogleAccessRequestResource);

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

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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

TestIamPermissions(TestIamPermissionsSubnetworkRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsSubnetworkRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsSubnetworkRequest

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
TestPermissionsResponse

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
TestIamPermissionsSubnetworkRequest request = new TestIamPermissionsSubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = subnetworksClient.TestIamPermissions(request);

TestIamPermissions(string, string, string, TestPermissionsRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestPermissionsResponse

The RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = SubnetworksClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = subnetworksClient.TestIamPermissions(project, region, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(TestIamPermissionsSubnetworkRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsSubnetworkRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsSubnetworkRequest

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
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsSubnetworkRequest request = new TestIamPermissionsSubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await subnetworksClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsSubnetworkRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsSubnetworkRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsSubnetworkRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsSubnetworkRequest request = new TestIamPermissionsSubnetworkRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await subnetworksClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await subnetworksClient.TestIamPermissionsAsync(project, region, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await subnetworksClient.TestIamPermissionsAsync(project, region, resource, testPermissionsRequestResource);