public abstract class NetworksClient
Reference documentation and code samples for the Compute Engine v1 API class NetworksClient.
Networks client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The Networks API.
Properties
AddPeeringOperationsClient
public virtual OperationsClient AddPeeringOperationsClient { get; }
The long-running operations client for AddPeering
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Networks service, which is a host of "compute.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Networks scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default Networks scopes are:
DeleteOperationsClient
public virtual OperationsClient DeleteOperationsClient { get; }
The long-running operations client for Delete
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Networks.NetworksClient GrpcClient { get; }
The underlying gRPC Networks client
Property Value | |
---|---|
Type | Description |
Networks.NetworksClient |
InsertOperationsClient
public virtual OperationsClient InsertOperationsClient { get; }
The long-running operations client for Insert
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
PatchOperationsClient
public virtual OperationsClient PatchOperationsClient { get; }
The long-running operations client for Patch
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
RemovePeeringOperationsClient
public virtual OperationsClient RemovePeeringOperationsClient { get; }
The long-running operations client for RemovePeering
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
SwitchToCustomModeOperationsClient
public virtual OperationsClient SwitchToCustomModeOperationsClient { get; }
The long-running operations client for SwitchToCustomMode
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdatePeeringOperationsClient
public virtual OperationsClient UpdatePeeringOperationsClient { get; }
The long-running operations client for UpdatePeering
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
AddPeering(AddPeeringNetworkRequest, CallSettings)
public virtual Operation<Operation, Operation> AddPeering(AddPeeringNetworkRequest request, CallSettings callSettings = null)
Adds a peering to the specified network.
Parameters | |
---|---|
Name | Description |
request | AddPeeringNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
AddPeeringNetworkRequest request = new AddPeeringNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
NetworksAddPeeringRequestResource = new NetworksAddPeeringRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = networksClient.AddPeering(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 = networksClient.PollOnceAddPeering(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;
}
AddPeering(String, String, NetworksAddPeeringRequest, CallSettings)
public virtual Operation<Operation, Operation> AddPeering(string project, string network, NetworksAddPeeringRequest networksAddPeeringRequestResource, CallSettings callSettings = null)
Adds a peering to the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource to add peering to. |
networksAddPeeringRequestResource | NetworksAddPeeringRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksAddPeeringRequest networksAddPeeringRequestResource = new NetworksAddPeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = networksClient.AddPeering(project, network, networksAddPeeringRequestResource);
// 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 = networksClient.PollOnceAddPeering(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;
}
AddPeeringAsync(AddPeeringNetworkRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> AddPeeringAsync(AddPeeringNetworkRequest request, CallSettings callSettings = null)
Adds a peering to the specified network.
Parameters | |
---|---|
Name | Description |
request | AddPeeringNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
AddPeeringNetworkRequest request = new AddPeeringNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
NetworksAddPeeringRequestResource = new NetworksAddPeeringRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.AddPeeringAsync(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 networksClient.PollOnceAddPeeringAsync(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;
}
AddPeeringAsync(AddPeeringNetworkRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AddPeeringAsync(AddPeeringNetworkRequest request, CancellationToken cancellationToken)
Adds a peering to the specified network.
Parameters | |
---|---|
Name | Description |
request | AddPeeringNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
AddPeeringNetworkRequest request = new AddPeeringNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
NetworksAddPeeringRequestResource = new NetworksAddPeeringRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.AddPeeringAsync(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 networksClient.PollOnceAddPeeringAsync(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;
}
AddPeeringAsync(String, String, NetworksAddPeeringRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> AddPeeringAsync(string project, string network, NetworksAddPeeringRequest networksAddPeeringRequestResource, CallSettings callSettings = null)
Adds a peering to the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource to add peering to. |
networksAddPeeringRequestResource | NetworksAddPeeringRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksAddPeeringRequest networksAddPeeringRequestResource = new NetworksAddPeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.AddPeeringAsync(project, network, networksAddPeeringRequestResource);
// 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 networksClient.PollOnceAddPeeringAsync(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;
}
AddPeeringAsync(String, String, NetworksAddPeeringRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AddPeeringAsync(string project, string network, NetworksAddPeeringRequest networksAddPeeringRequestResource, CancellationToken cancellationToken)
Adds a peering to the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource to add peering to. |
networksAddPeeringRequestResource | NetworksAddPeeringRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksAddPeeringRequest networksAddPeeringRequestResource = new NetworksAddPeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.AddPeeringAsync(project, network, networksAddPeeringRequestResource);
// 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 networksClient.PollOnceAddPeeringAsync(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;
}
Create()
public static NetworksClient Create()
Synchronously creates a NetworksClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NetworksClientBuilder.
Returns | |
---|---|
Type | Description |
NetworksClient | The created NetworksClient. |
CreateAsync(CancellationToken)
public static Task<NetworksClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a NetworksClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NetworksClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<NetworksClient> | The task representing the created NetworksClient. |
Delete(DeleteNetworkRequest, CallSettings)
public virtual Operation<Operation, Operation> Delete(DeleteNetworkRequest request, CallSettings callSettings = null)
Deletes the specified network.
Parameters | |
---|---|
Name | Description |
request | DeleteNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
DeleteNetworkRequest request = new DeleteNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = networksClient.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 = networksClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Delete(String, String, CallSettings)
public virtual Operation<Operation, Operation> Delete(string project, string network, CallSettings callSettings = null)
Deletes the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
lro::Operation<Operation, Operation> response = networksClient.Delete(project, network);
// 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 = networksClient.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(DeleteNetworkRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteNetworkRequest request, CallSettings callSettings = null)
Deletes the specified network.
Parameters | |
---|---|
Name | Description |
request | DeleteNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
DeleteNetworkRequest request = new DeleteNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.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 networksClient.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(DeleteNetworkRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteNetworkRequest request, CancellationToken cancellationToken)
Deletes the specified network.
Parameters | |
---|---|
Name | Description |
request | DeleteNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
DeleteNetworkRequest request = new DeleteNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.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 networksClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(String, String, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string network, CallSettings callSettings = null)
Deletes the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.DeleteAsync(project, network);
// 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 networksClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(String, String, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string network, CancellationToken cancellationToken)
Deletes the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to delete. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.DeleteAsync(project, network);
// 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 networksClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Get(GetNetworkRequest, CallSettings)
public virtual Network Get(GetNetworkRequest request, CallSettings callSettings = null)
Returns the specified network. Gets a list of available networks by making a list() request.
Parameters | |
---|---|
Name | Description |
request | GetNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Network | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
GetNetworkRequest request = new GetNetworkRequest
{
Project = "",
Network = "",
};
// Make the request
Network response = networksClient.Get(request);
Get(String, String, CallSettings)
public virtual Network Get(string project, string network, CallSettings callSettings = null)
Returns the specified network. Gets a list of available networks by making a list() request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to return. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Network | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
Network response = networksClient.Get(project, network);
GetAsync(GetNetworkRequest, CallSettings)
public virtual Task<Network> GetAsync(GetNetworkRequest request, CallSettings callSettings = null)
Returns the specified network. Gets a list of available networks by making a list() request.
Parameters | |
---|---|
Name | Description |
request | GetNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
GetNetworkRequest request = new GetNetworkRequest
{
Project = "",
Network = "",
};
// Make the request
Network response = await networksClient.GetAsync(request);
GetAsync(GetNetworkRequest, CancellationToken)
public virtual Task<Network> GetAsync(GetNetworkRequest request, CancellationToken cancellationToken)
Returns the specified network. Gets a list of available networks by making a list() request.
Parameters | |
---|---|
Name | Description |
request | GetNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
GetNetworkRequest request = new GetNetworkRequest
{
Project = "",
Network = "",
};
// Make the request
Network response = await networksClient.GetAsync(request);
GetAsync(String, String, CallSettings)
public virtual Task<Network> GetAsync(string project, string network, CallSettings callSettings = null)
Returns the specified network. Gets a list of available networks by making a list() request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to return. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
Network response = await networksClient.GetAsync(project, network);
GetAsync(String, String, CancellationToken)
public virtual Task<Network> GetAsync(string project, string network, CancellationToken cancellationToken)
Returns the specified network. Gets a list of available networks by making a list() request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to return. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
Network response = await networksClient.GetAsync(project, network);
GetEffectiveFirewalls(GetEffectiveFirewallsNetworkRequest, CallSettings)
public virtual NetworksGetEffectiveFirewallsResponse GetEffectiveFirewalls(GetEffectiveFirewallsNetworkRequest request, CallSettings callSettings = null)
Returns the effective firewalls on a given network.
Parameters | |
---|---|
Name | Description |
request | GetEffectiveFirewallsNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NetworksGetEffectiveFirewallsResponse | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
GetEffectiveFirewallsNetworkRequest request = new GetEffectiveFirewallsNetworkRequest
{
Project = "",
Network = "",
};
// Make the request
NetworksGetEffectiveFirewallsResponse response = networksClient.GetEffectiveFirewalls(request);
GetEffectiveFirewalls(String, String, CallSettings)
public virtual NetworksGetEffectiveFirewallsResponse GetEffectiveFirewalls(string project, string network, CallSettings callSettings = null)
Returns the effective firewalls on a given network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NetworksGetEffectiveFirewallsResponse | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
NetworksGetEffectiveFirewallsResponse response = networksClient.GetEffectiveFirewalls(project, network);
GetEffectiveFirewallsAsync(GetEffectiveFirewallsNetworkRequest, CallSettings)
public virtual Task<NetworksGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(GetEffectiveFirewallsNetworkRequest request, CallSettings callSettings = null)
Returns the effective firewalls on a given network.
Parameters | |
---|---|
Name | Description |
request | GetEffectiveFirewallsNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<NetworksGetEffectiveFirewallsResponse> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
GetEffectiveFirewallsNetworkRequest request = new GetEffectiveFirewallsNetworkRequest
{
Project = "",
Network = "",
};
// Make the request
NetworksGetEffectiveFirewallsResponse response = await networksClient.GetEffectiveFirewallsAsync(request);
GetEffectiveFirewallsAsync(GetEffectiveFirewallsNetworkRequest, CancellationToken)
public virtual Task<NetworksGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(GetEffectiveFirewallsNetworkRequest request, CancellationToken cancellationToken)
Returns the effective firewalls on a given network.
Parameters | |
---|---|
Name | Description |
request | GetEffectiveFirewallsNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<NetworksGetEffectiveFirewallsResponse> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
GetEffectiveFirewallsNetworkRequest request = new GetEffectiveFirewallsNetworkRequest
{
Project = "",
Network = "",
};
// Make the request
NetworksGetEffectiveFirewallsResponse response = await networksClient.GetEffectiveFirewallsAsync(request);
GetEffectiveFirewallsAsync(String, String, CallSettings)
public virtual Task<NetworksGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(string project, string network, CallSettings callSettings = null)
Returns the effective firewalls on a given network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<NetworksGetEffectiveFirewallsResponse> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
NetworksGetEffectiveFirewallsResponse response = await networksClient.GetEffectiveFirewallsAsync(project, network);
GetEffectiveFirewallsAsync(String, String, CancellationToken)
public virtual Task<NetworksGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(string project, string network, CancellationToken cancellationToken)
Returns the effective firewalls on a given network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network for this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<NetworksGetEffectiveFirewallsResponse> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
NetworksGetEffectiveFirewallsResponse response = await networksClient.GetEffectiveFirewallsAsync(project, network);
Insert(InsertNetworkRequest, CallSettings)
public virtual Operation<Operation, Operation> Insert(InsertNetworkRequest request, CallSettings callSettings = null)
Creates a network in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
InsertNetworkRequest request = new InsertNetworkRequest
{
RequestId = "",
NetworkResource = new Network(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = networksClient.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 = networksClient.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, Network, CallSettings)
public virtual Operation<Operation, Operation> Insert(string project, Network networkResource, CallSettings callSettings = null)
Creates a network in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
networkResource | Network The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
Network networkResource = new Network();
// Make the request
lro::Operation<Operation, Operation> response = networksClient.Insert(project, networkResource);
// 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 = networksClient.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(InsertNetworkRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertNetworkRequest request, CallSettings callSettings = null)
Creates a network in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
InsertNetworkRequest request = new InsertNetworkRequest
{
RequestId = "",
NetworkResource = new Network(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.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 networksClient.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(InsertNetworkRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertNetworkRequest request, CancellationToken cancellationToken)
Creates a network in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
InsertNetworkRequest request = new InsertNetworkRequest
{
RequestId = "",
NetworkResource = new Network(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.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 networksClient.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, Network, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, Network networkResource, CallSettings callSettings = null)
Creates a network in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
networkResource | Network The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Network networkResource = new Network();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.InsertAsync(project, networkResource);
// 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 networksClient.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, Network, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, Network networkResource, CancellationToken cancellationToken)
Creates a network in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
networkResource | Network The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Network networkResource = new Network();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.InsertAsync(project, networkResource);
// 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 networksClient.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(ListNetworksRequest, CallSettings)
public virtual PagedEnumerable<NetworkList, Network> List(ListNetworksRequest request, CallSettings callSettings = null)
Retrieves the list of networks available to the specified project.
Parameters | |
---|---|
Name | Description |
request | ListNetworksRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<NetworkList, Network> | A pageable sequence of Network resources. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
ListNetworksRequest request = new ListNetworksRequest
{
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<NetworkList, Network> response = networksClient.List(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Network 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 (NetworkList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
List(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<NetworkList, Network> List(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves the list of networks available to the specified project.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<NetworkList, Network> | A pageable sequence of Network resources. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<NetworkList, Network> response = networksClient.List(project);
// Iterate over all response items, lazily performing RPCs as required
foreach (Network 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 (NetworkList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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(ListNetworksRequest, CallSettings)
public virtual PagedAsyncEnumerable<NetworkList, Network> ListAsync(ListNetworksRequest request, CallSettings callSettings = null)
Retrieves the list of networks available to the specified project.
Parameters | |
---|---|
Name | Description |
request | ListNetworksRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<NetworkList, Network> | A pageable asynchronous sequence of Network resources. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
ListNetworksRequest request = new ListNetworksRequest
{
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<NetworkList, Network> response = networksClient.ListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Network 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((NetworkList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<NetworkList, Network> ListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves the list of networks available to the specified project.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<NetworkList, Network> | A pageable asynchronous sequence of Network resources. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<NetworkList, Network> response = networksClient.ListAsync(project);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Network 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((NetworkList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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;
ListPeeringRoutes(ListPeeringRoutesNetworksRequest, CallSettings)
public virtual PagedEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> ListPeeringRoutes(ListPeeringRoutesNetworksRequest request, CallSettings callSettings = null)
Lists the peering routes exchanged over peering connection.
Parameters | |
---|---|
Name | Description |
request | ListPeeringRoutesNetworksRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> | A pageable sequence of ExchangedPeeringRoute resources. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
ListPeeringRoutesNetworksRequest request = new ListPeeringRoutesNetworksRequest
{
Direction = "",
Region = "",
OrderBy = "",
Project = "",
Network = "",
PeeringName = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> response = networksClient.ListPeeringRoutes(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ExchangedPeeringRoute 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 (ExchangedPeeringRoutesList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ExchangedPeeringRoute 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<ExchangedPeeringRoute> 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 (ExchangedPeeringRoute 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;
ListPeeringRoutes(String, String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> ListPeeringRoutes(string project, string network, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the peering routes exchanged over peering connection.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network for this request. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> | A pageable sequence of ExchangedPeeringRoute resources. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
PagedEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> response = networksClient.ListPeeringRoutes(project, network);
// Iterate over all response items, lazily performing RPCs as required
foreach (ExchangedPeeringRoute 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 (ExchangedPeeringRoutesList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ExchangedPeeringRoute 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<ExchangedPeeringRoute> 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 (ExchangedPeeringRoute 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;
ListPeeringRoutesAsync(ListPeeringRoutesNetworksRequest, CallSettings)
public virtual PagedAsyncEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> ListPeeringRoutesAsync(ListPeeringRoutesNetworksRequest request, CallSettings callSettings = null)
Lists the peering routes exchanged over peering connection.
Parameters | |
---|---|
Name | Description |
request | ListPeeringRoutesNetworksRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> | A pageable asynchronous sequence of ExchangedPeeringRoute resources. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
ListPeeringRoutesNetworksRequest request = new ListPeeringRoutesNetworksRequest
{
Direction = "",
Region = "",
OrderBy = "",
Project = "",
Network = "",
PeeringName = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> response = networksClient.ListPeeringRoutesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ExchangedPeeringRoute 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((ExchangedPeeringRoutesList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ExchangedPeeringRoute 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<ExchangedPeeringRoute> 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 (ExchangedPeeringRoute 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;
ListPeeringRoutesAsync(String, String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> ListPeeringRoutesAsync(string project, string network, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the peering routes exchanged over peering connection.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network for this request. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> | A pageable asynchronous sequence of ExchangedPeeringRoute resources. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
PagedAsyncEnumerable<ExchangedPeeringRoutesList, ExchangedPeeringRoute> response = networksClient.ListPeeringRoutesAsync(project, network);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ExchangedPeeringRoute 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((ExchangedPeeringRoutesList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ExchangedPeeringRoute 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<ExchangedPeeringRoute> 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 (ExchangedPeeringRoute 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(PatchNetworkRequest, CallSettings)
public virtual Operation<Operation, Operation> Patch(PatchNetworkRequest request, CallSettings callSettings = null)
Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
Parameters | |
---|---|
Name | Description |
request | PatchNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
PatchNetworkRequest request = new PatchNetworkRequest
{
RequestId = "",
NetworkResource = new Network(),
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = networksClient.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 = networksClient.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, Network, CallSettings)
public virtual Operation<Operation, Operation> Patch(string project, string network, Network networkResource, CallSettings callSettings = null)
Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to update. |
networkResource | Network The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
Network networkResource = new Network();
// Make the request
lro::Operation<Operation, Operation> response = networksClient.Patch(project, network, networkResource);
// 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 = networksClient.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(PatchNetworkRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchNetworkRequest request, CallSettings callSettings = null)
Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
Parameters | |
---|---|
Name | Description |
request | PatchNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
PatchNetworkRequest request = new PatchNetworkRequest
{
RequestId = "",
NetworkResource = new Network(),
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.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 networksClient.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(PatchNetworkRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchNetworkRequest request, CancellationToken cancellationToken)
Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
Parameters | |
---|---|
Name | Description |
request | PatchNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
PatchNetworkRequest request = new PatchNetworkRequest
{
RequestId = "",
NetworkResource = new Network(),
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.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 networksClient.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, Network, CallSettings)
public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string network, Network networkResource, CallSettings callSettings = null)
Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to update. |
networkResource | Network The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
Network networkResource = new Network();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.PatchAsync(project, network, networkResource);
// 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 networksClient.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, Network, CancellationToken)
public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string network, Network networkResource, CancellationToken cancellationToken)
Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to update. |
networkResource | Network The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
Network networkResource = new Network();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.PatchAsync(project, network, networkResource);
// 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 networksClient.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;
}
PollOnceAddPeering(String, CallSettings)
public virtual Operation<Operation, Operation> PollOnceAddPeering(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of AddPeering
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The result of polling the operation. |
PollOnceAddPeeringAsync(String, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceAddPeeringAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
AddPeering
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A task representing the result of polling the operation. |
PollOnceDelete(String, CallSettings)
public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Delete
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A task representing the result of polling the operation. |
PollOnceRemovePeering(String, CallSettings)
public virtual Operation<Operation, Operation> PollOnceRemovePeering(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of RemovePeering
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The result of polling the operation. |
PollOnceRemovePeeringAsync(String, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceRemovePeeringAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RemovePeering
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A task representing the result of polling the operation. |
PollOnceSwitchToCustomMode(String, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSwitchToCustomMode(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SwitchToCustomMode
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The result of polling the operation. |
PollOnceSwitchToCustomModeAsync(String, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSwitchToCustomModeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SwitchToCustomMode
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A task representing the result of polling the operation. |
PollOnceUpdatePeering(String, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdatePeering(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdatePeering
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The result of polling the operation. |
PollOnceUpdatePeeringAsync(String, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdatePeeringAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdatePeering
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A task representing the result of polling the operation. |
RemovePeering(RemovePeeringNetworkRequest, CallSettings)
public virtual Operation<Operation, Operation> RemovePeering(RemovePeeringNetworkRequest request, CallSettings callSettings = null)
Removes a peering from the specified network.
Parameters | |
---|---|
Name | Description |
request | RemovePeeringNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
RemovePeeringNetworkRequest request = new RemovePeeringNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
NetworksRemovePeeringRequestResource = new NetworksRemovePeeringRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = networksClient.RemovePeering(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 = networksClient.PollOnceRemovePeering(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;
}
RemovePeering(String, String, NetworksRemovePeeringRequest, CallSettings)
public virtual Operation<Operation, Operation> RemovePeering(string project, string network, NetworksRemovePeeringRequest networksRemovePeeringRequestResource, CallSettings callSettings = null)
Removes a peering from the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource to remove peering from. |
networksRemovePeeringRequestResource | NetworksRemovePeeringRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksRemovePeeringRequest networksRemovePeeringRequestResource = new NetworksRemovePeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = networksClient.RemovePeering(project, network, networksRemovePeeringRequestResource);
// 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 = networksClient.PollOnceRemovePeering(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;
}
RemovePeeringAsync(RemovePeeringNetworkRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> RemovePeeringAsync(RemovePeeringNetworkRequest request, CallSettings callSettings = null)
Removes a peering from the specified network.
Parameters | |
---|---|
Name | Description |
request | RemovePeeringNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
RemovePeeringNetworkRequest request = new RemovePeeringNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
NetworksRemovePeeringRequestResource = new NetworksRemovePeeringRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.RemovePeeringAsync(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 networksClient.PollOnceRemovePeeringAsync(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;
}
RemovePeeringAsync(RemovePeeringNetworkRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> RemovePeeringAsync(RemovePeeringNetworkRequest request, CancellationToken cancellationToken)
Removes a peering from the specified network.
Parameters | |
---|---|
Name | Description |
request | RemovePeeringNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
RemovePeeringNetworkRequest request = new RemovePeeringNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
NetworksRemovePeeringRequestResource = new NetworksRemovePeeringRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.RemovePeeringAsync(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 networksClient.PollOnceRemovePeeringAsync(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;
}
RemovePeeringAsync(String, String, NetworksRemovePeeringRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> RemovePeeringAsync(string project, string network, NetworksRemovePeeringRequest networksRemovePeeringRequestResource, CallSettings callSettings = null)
Removes a peering from the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource to remove peering from. |
networksRemovePeeringRequestResource | NetworksRemovePeeringRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksRemovePeeringRequest networksRemovePeeringRequestResource = new NetworksRemovePeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.RemovePeeringAsync(project, network, networksRemovePeeringRequestResource);
// 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 networksClient.PollOnceRemovePeeringAsync(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;
}
RemovePeeringAsync(String, String, NetworksRemovePeeringRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> RemovePeeringAsync(string project, string network, NetworksRemovePeeringRequest networksRemovePeeringRequestResource, CancellationToken cancellationToken)
Removes a peering from the specified network.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource to remove peering from. |
networksRemovePeeringRequestResource | NetworksRemovePeeringRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksRemovePeeringRequest networksRemovePeeringRequestResource = new NetworksRemovePeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.RemovePeeringAsync(project, network, networksRemovePeeringRequestResource);
// 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 networksClient.PollOnceRemovePeeringAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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.
SwitchToCustomMode(SwitchToCustomModeNetworkRequest, CallSettings)
public virtual Operation<Operation, Operation> SwitchToCustomMode(SwitchToCustomModeNetworkRequest request, CallSettings callSettings = null)
Switches the network mode from auto subnet mode to custom subnet mode.
Parameters | |
---|---|
Name | Description |
request | SwitchToCustomModeNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
SwitchToCustomModeNetworkRequest request = new SwitchToCustomModeNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = networksClient.SwitchToCustomMode(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 = networksClient.PollOnceSwitchToCustomMode(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;
}
SwitchToCustomMode(String, String, CallSettings)
public virtual Operation<Operation, Operation> SwitchToCustomMode(string project, string network, CallSettings callSettings = null)
Switches the network mode from auto subnet mode to custom subnet mode.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
lro::Operation<Operation, Operation> response = networksClient.SwitchToCustomMode(project, network);
// 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 = networksClient.PollOnceSwitchToCustomMode(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;
}
SwitchToCustomModeAsync(SwitchToCustomModeNetworkRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SwitchToCustomModeAsync(SwitchToCustomModeNetworkRequest request, CallSettings callSettings = null)
Switches the network mode from auto subnet mode to custom subnet mode.
Parameters | |
---|---|
Name | Description |
request | SwitchToCustomModeNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
SwitchToCustomModeNetworkRequest request = new SwitchToCustomModeNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.SwitchToCustomModeAsync(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 networksClient.PollOnceSwitchToCustomModeAsync(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;
}
SwitchToCustomModeAsync(SwitchToCustomModeNetworkRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SwitchToCustomModeAsync(SwitchToCustomModeNetworkRequest request, CancellationToken cancellationToken)
Switches the network mode from auto subnet mode to custom subnet mode.
Parameters | |
---|---|
Name | Description |
request | SwitchToCustomModeNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
SwitchToCustomModeNetworkRequest request = new SwitchToCustomModeNetworkRequest
{
RequestId = "",
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.SwitchToCustomModeAsync(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 networksClient.PollOnceSwitchToCustomModeAsync(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;
}
SwitchToCustomModeAsync(String, String, CallSettings)
public virtual Task<Operation<Operation, Operation>> SwitchToCustomModeAsync(string project, string network, CallSettings callSettings = null)
Switches the network mode from auto subnet mode to custom subnet mode.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.SwitchToCustomModeAsync(project, network);
// 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 networksClient.PollOnceSwitchToCustomModeAsync(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;
}
SwitchToCustomModeAsync(String, String, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SwitchToCustomModeAsync(string project, string network, CancellationToken cancellationToken)
Switches the network mode from auto subnet mode to custom subnet mode.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network to be updated. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.SwitchToCustomModeAsync(project, network);
// 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 networksClient.PollOnceSwitchToCustomModeAsync(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;
}
UpdatePeering(UpdatePeeringNetworkRequest, CallSettings)
public virtual Operation<Operation, Operation> UpdatePeering(UpdatePeeringNetworkRequest request, CallSettings callSettings = null)
Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
Parameters | |
---|---|
Name | Description |
request | UpdatePeeringNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
UpdatePeeringNetworkRequest request = new UpdatePeeringNetworkRequest
{
RequestId = "",
NetworksUpdatePeeringRequestResource = new NetworksUpdatePeeringRequest(),
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = networksClient.UpdatePeering(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 = networksClient.PollOnceUpdatePeering(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;
}
UpdatePeering(String, String, NetworksUpdatePeeringRequest, CallSettings)
public virtual Operation<Operation, Operation> UpdatePeering(string project, string network, NetworksUpdatePeeringRequest networksUpdatePeeringRequestResource, CallSettings callSettings = null)
Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource which the updated peering is belonging to. |
networksUpdatePeeringRequestResource | NetworksUpdatePeeringRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
NetworksClient networksClient = NetworksClient.Create();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksUpdatePeeringRequest networksUpdatePeeringRequestResource = new NetworksUpdatePeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = networksClient.UpdatePeering(project, network, networksUpdatePeeringRequestResource);
// 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 = networksClient.PollOnceUpdatePeering(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;
}
UpdatePeeringAsync(UpdatePeeringNetworkRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdatePeeringAsync(UpdatePeeringNetworkRequest request, CallSettings callSettings = null)
Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
Parameters | |
---|---|
Name | Description |
request | UpdatePeeringNetworkRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
UpdatePeeringNetworkRequest request = new UpdatePeeringNetworkRequest
{
RequestId = "",
NetworksUpdatePeeringRequestResource = new NetworksUpdatePeeringRequest(),
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.UpdatePeeringAsync(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 networksClient.PollOnceUpdatePeeringAsync(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;
}
UpdatePeeringAsync(UpdatePeeringNetworkRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdatePeeringAsync(UpdatePeeringNetworkRequest request, CancellationToken cancellationToken)
Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
Parameters | |
---|---|
Name | Description |
request | UpdatePeeringNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
UpdatePeeringNetworkRequest request = new UpdatePeeringNetworkRequest
{
RequestId = "",
NetworksUpdatePeeringRequestResource = new NetworksUpdatePeeringRequest(),
Project = "",
Network = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.UpdatePeeringAsync(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 networksClient.PollOnceUpdatePeeringAsync(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;
}
UpdatePeeringAsync(String, String, NetworksUpdatePeeringRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdatePeeringAsync(string project, string network, NetworksUpdatePeeringRequest networksUpdatePeeringRequestResource, CallSettings callSettings = null)
Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource which the updated peering is belonging to. |
networksUpdatePeeringRequestResource | NetworksUpdatePeeringRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksUpdatePeeringRequest networksUpdatePeeringRequestResource = new NetworksUpdatePeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.UpdatePeeringAsync(project, network, networksUpdatePeeringRequestResource);
// 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 networksClient.PollOnceUpdatePeeringAsync(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;
}
UpdatePeeringAsync(String, String, NetworksUpdatePeeringRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdatePeeringAsync(string project, string network, NetworksUpdatePeeringRequest networksUpdatePeeringRequestResource, CancellationToken cancellationToken)
Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
network | String Name of the network resource which the updated peering is belonging to. |
networksUpdatePeeringRequestResource | NetworksUpdatePeeringRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A Task containing the RPC response. |
// Create client
NetworksClient networksClient = await NetworksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string network = "";
NetworksUpdatePeeringRequest networksUpdatePeeringRequestResource = new NetworksUpdatePeeringRequest();
// Make the request
lro::Operation<Operation, Operation> response = await networksClient.UpdatePeeringAsync(project, network, networksUpdatePeeringRequestResource);
// 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 networksClient.PollOnceUpdatePeeringAsync(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;
}