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

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Subnetworks scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

ExpandIpCidrRangeOperationsClient

public virtual OperationsClient ExpandIpCidrRangeOperationsClient { get; }

The long-running operations client for ExpandIpCidrRange.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Subnetworks.SubnetworksClient GrpcClient { get; }

The underlying gRPC Subnetworks client

Property Value
TypeDescription
Subnetworks.SubnetworksClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

SetPrivateIpGoogleAccessOperationsClient

public virtual OperationsClient SetPrivateIpGoogleAccessOperationsClient { get; }

The long-running operations client for SetPrivateIpGoogleAccess.

Property Value
TypeDescription
OperationsClient

Methods

AggregatedList(AggregatedListSubnetworksRequest, CallSettings)

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

Retrieves an aggregated list of subnetworks.

Parameters
NameDescription
requestAggregatedListSubnetworksRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SubnetworkAggregatedList, KeyValuePair<String, SubnetworksScopedList>>

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 = "",
    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, Nullable<Int32>, 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.

Parameters
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SubnetworkAggregatedList, KeyValuePair<String, SubnetworksScopedList>>

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.

Parameters
NameDescription
requestAggregatedListSubnetworksRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SubnetworkAggregatedList, KeyValuePair<String, SubnetworksScopedList>>

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 = "",
    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, Nullable<Int32>, 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.

Parameters
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SubnetworkAggregatedList, KeyValuePair<String, SubnetworksScopedList>>

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

The created SubnetworksClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<SubnetworksClient>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
requestDeleteSubnetworkRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
requestExpandIpCidrRangeSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to update.

subnetworksExpandIpCidrRangeRequestResourceSubnetworksExpandIpCidrRangeRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
requestExpandIpCidrRangeSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
requestExpandIpCidrRangeSubnetworkRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to update.

subnetworksExpandIpCidrRangeRequestResourceSubnetworksExpandIpCidrRangeRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to update.

subnetworksExpandIpCidrRangeRequestResourceSubnetworksExpandIpCidrRangeRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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. Gets a list of available subnetworks list() request.

Parameters
NameDescription
requestGetSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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. Gets a list of available subnetworks list() request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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. Gets a list of available subnetworks list() request.

Parameters
NameDescription
requestGetSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Subnetwork>

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. Gets a list of available subnetworks list() request.

Parameters
NameDescription
requestGetSubnetworkRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Subnetwork>

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. Gets a list of available subnetworks list() request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Subnetwork>

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. Gets a list of available subnetworks list() request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Subnetwork>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkResourceSubnetwork

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
requestInsertSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
requestInsertSubnetworkRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkResourceSubnetwork

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkResourceSubnetwork

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
requestListSubnetworksRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SubnetworkList, Subnetwork>

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

Project ID for this request.

regionString

Name of the region scoping this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SubnetworkList, Subnetwork>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SubnetworkList, Subnetwork>

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

Project ID for this request.

regionString

Name of the region scoping this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SubnetworkList, Subnetwork>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork>

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

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork>

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

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<UsableSubnetworksAggregatedList, UsableSubnetwork>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to patch.

subnetworkResourceSubnetwork

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
requestPatchSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
requestPatchSubnetworkRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to patch.

subnetworkResourceSubnetwork

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource to patch.

subnetworkResourceSubnetwork

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOnceDeleteAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

PollOnceInsert(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOnceInsertAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

PollOncePatch(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOncePatchAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource.

subnetworksSetPrivateIpGoogleAccessRequestResourceSubnetworksSetPrivateIpGoogleAccessRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
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
NameDescription
requestSetPrivateIpGoogleAccessSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
requestSetPrivateIpGoogleAccessSubnetworkRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource.

subnetworksSetPrivateIpGoogleAccessRequestResourceSubnetworksSetPrivateIpGoogleAccessRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

subnetworkString

Name of the Subnetwork resource.

subnetworksSetPrivateIpGoogleAccessRequestResourceSubnetworksSetPrivateIpGoogleAccessRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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

TestIamPermissions(TestIamPermissionsSubnetworkRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsSubnetworkRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

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

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

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);