public abstract class InternalRangeServiceClient
Reference documentation and code samples for the Network Connectivity v1 API class InternalRangeServiceClient.
InternalRangeService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.NetworkConnectivity.V1Assembly
Google.Cloud.NetworkConnectivity.V1.dll
Remarks
The CLH-based service for internal range resources used to perform IPAM operations within a VPC network.
Properties
CreateInternalRangeOperationsClient
public virtual OperationsClient CreateInternalRangeOperationsClient { get; }
The long-running operations client for CreateInternalRange
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the InternalRangeService service, which is a host of "networkconnectivity.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default InternalRangeService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default InternalRangeService scopes are:
DeleteInternalRangeOperationsClient
public virtual OperationsClient DeleteInternalRangeOperationsClient { get; }
The long-running operations client for DeleteInternalRange
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual InternalRangeService.InternalRangeServiceClient GrpcClient { get; }
The underlying gRPC InternalRangeService client
Property Value | |
---|---|
Type | Description |
InternalRangeServiceInternalRangeServiceClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateInternalRangeOperationsClient
public virtual OperationsClient UpdateInternalRangeOperationsClient { get; }
The long-running operations client for UpdateInternalRange
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static InternalRangeServiceClient Create()
Synchronously creates a InternalRangeServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use InternalRangeServiceClientBuilder.
Returns | |
---|---|
Type | Description |
InternalRangeServiceClient |
The created InternalRangeServiceClient. |
CreateAsync(CancellationToken)
public static Task<InternalRangeServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a InternalRangeServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use InternalRangeServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskInternalRangeServiceClient |
The task representing the created InternalRangeServiceClient. |
CreateInternalRange(LocationName, InternalRange, string, CallSettings)
public virtual Operation<InternalRange, OperationMetadata> CreateInternalRange(LocationName parent, InternalRange internalRange, string internalRangeId, CallSettings callSettings = null)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource's name of the internal range. |
internalRange |
InternalRange Required. Initial values for a new internal range |
internalRangeId |
string Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInternalRangeOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
InternalRange internalRange = new InternalRange();
string internalRangeId = "";
// Make the request
Operation<InternalRange, OperationMetadata> response = internalRangeServiceClient.CreateInternalRange(parent, internalRange, internalRangeId);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceCreateInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRange(CreateInternalRangeRequest, CallSettings)
public virtual Operation<InternalRange, OperationMetadata> CreateInternalRange(CreateInternalRangeRequest request, CallSettings callSettings = null)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
CreateInternalRangeRequest 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 |
OperationInternalRangeOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
CreateInternalRangeRequest request = new CreateInternalRangeRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
InternalRangeId = "",
InternalRange = new InternalRange(),
RequestId = "",
};
// Make the request
Operation<InternalRange, OperationMetadata> response = internalRangeServiceClient.CreateInternalRange(request);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceCreateInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRange(string, InternalRange, string, CallSettings)
public virtual Operation<InternalRange, OperationMetadata> CreateInternalRange(string parent, InternalRange internalRange, string internalRangeId, CallSettings callSettings = null)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource's name of the internal range. |
internalRange |
InternalRange Required. Initial values for a new internal range |
internalRangeId |
string Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInternalRangeOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
InternalRange internalRange = new InternalRange();
string internalRangeId = "";
// Make the request
Operation<InternalRange, OperationMetadata> response = internalRangeServiceClient.CreateInternalRange(parent, internalRange, internalRangeId);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceCreateInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRangeAsync(LocationName, InternalRange, string, CallSettings)
public virtual Task<Operation<InternalRange, OperationMetadata>> CreateInternalRangeAsync(LocationName parent, InternalRange internalRange, string internalRangeId, CallSettings callSettings = null)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource's name of the internal range. |
internalRange |
InternalRange Required. Initial values for a new internal range |
internalRangeId |
string Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
InternalRange internalRange = new InternalRange();
string internalRangeId = "";
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.CreateInternalRangeAsync(parent, internalRange, internalRangeId);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceCreateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRangeAsync(LocationName, InternalRange, string, CancellationToken)
public virtual Task<Operation<InternalRange, OperationMetadata>> CreateInternalRangeAsync(LocationName parent, InternalRange internalRange, string internalRangeId, CancellationToken cancellationToken)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource's name of the internal range. |
internalRange |
InternalRange Required. Initial values for a new internal range |
internalRangeId |
string Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
InternalRange internalRange = new InternalRange();
string internalRangeId = "";
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.CreateInternalRangeAsync(parent, internalRange, internalRangeId);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceCreateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRangeAsync(CreateInternalRangeRequest, CallSettings)
public virtual Task<Operation<InternalRange, OperationMetadata>> CreateInternalRangeAsync(CreateInternalRangeRequest request, CallSettings callSettings = null)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
CreateInternalRangeRequest 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 |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
CreateInternalRangeRequest request = new CreateInternalRangeRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
InternalRangeId = "",
InternalRange = new InternalRange(),
RequestId = "",
};
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.CreateInternalRangeAsync(request);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceCreateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRangeAsync(CreateInternalRangeRequest, CancellationToken)
public virtual Task<Operation<InternalRange, OperationMetadata>> CreateInternalRangeAsync(CreateInternalRangeRequest request, CancellationToken cancellationToken)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
CreateInternalRangeRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
CreateInternalRangeRequest request = new CreateInternalRangeRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
InternalRangeId = "",
InternalRange = new InternalRange(),
RequestId = "",
};
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.CreateInternalRangeAsync(request);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceCreateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRangeAsync(string, InternalRange, string, CallSettings)
public virtual Task<Operation<InternalRange, OperationMetadata>> CreateInternalRangeAsync(string parent, InternalRange internalRange, string internalRangeId, CallSettings callSettings = null)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource's name of the internal range. |
internalRange |
InternalRange Required. Initial values for a new internal range |
internalRangeId |
string Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
InternalRange internalRange = new InternalRange();
string internalRangeId = "";
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.CreateInternalRangeAsync(parent, internalRange, internalRangeId);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceCreateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
CreateInternalRangeAsync(string, InternalRange, string, CancellationToken)
public virtual Task<Operation<InternalRange, OperationMetadata>> CreateInternalRangeAsync(string parent, InternalRange internalRange, string internalRangeId, CancellationToken cancellationToken)
Creates a new internal range in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource's name of the internal range. |
internalRange |
InternalRange Required. Initial values for a new internal range |
internalRangeId |
string Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
InternalRange internalRange = new InternalRange();
string internalRangeId = "";
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.CreateInternalRangeAsync(parent, internalRange, internalRangeId);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceCreateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
DeleteInternalRange(DeleteInternalRangeRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteInternalRange(DeleteInternalRangeRequest request, CallSettings callSettings = null)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
request |
DeleteInternalRangeRequest 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 |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
DeleteInternalRangeRequest request = new DeleteInternalRangeRequest
{
InternalRangeName = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]"),
RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = internalRangeServiceClient.DeleteInternalRange(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceDeleteInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRange(InternalRangeName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteInternalRange(InternalRangeName name, CallSettings callSettings = null)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
name |
InternalRangeName Required. The name of the internal range to delete. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
InternalRangeName name = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]");
// Make the request
Operation<Empty, OperationMetadata> response = internalRangeServiceClient.DeleteInternalRange(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceDeleteInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRange(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteInternalRange(string name, CallSettings callSettings = null)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the internal range to delete. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/internalRanges/[INTERNAL_RANGE]";
// Make the request
Operation<Empty, OperationMetadata> response = internalRangeServiceClient.DeleteInternalRange(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceDeleteInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRangeAsync(DeleteInternalRangeRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteInternalRangeAsync(DeleteInternalRangeRequest request, CallSettings callSettings = null)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
request |
DeleteInternalRangeRequest 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 |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteInternalRangeRequest request = new DeleteInternalRangeRequest
{
InternalRangeName = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]"),
RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await internalRangeServiceClient.DeleteInternalRangeAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceDeleteInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRangeAsync(DeleteInternalRangeRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteInternalRangeAsync(DeleteInternalRangeRequest request, CancellationToken cancellationToken)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
request |
DeleteInternalRangeRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteInternalRangeRequest request = new DeleteInternalRangeRequest
{
InternalRangeName = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]"),
RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await internalRangeServiceClient.DeleteInternalRangeAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceDeleteInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRangeAsync(InternalRangeName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteInternalRangeAsync(InternalRangeName name, CallSettings callSettings = null)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
name |
InternalRangeName Required. The name of the internal range to delete. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
InternalRangeName name = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]");
// Make the request
Operation<Empty, OperationMetadata> response = await internalRangeServiceClient.DeleteInternalRangeAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceDeleteInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRangeAsync(InternalRangeName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteInternalRangeAsync(InternalRangeName name, CancellationToken cancellationToken)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
name |
InternalRangeName Required. The name of the internal range to delete. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
InternalRangeName name = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]");
// Make the request
Operation<Empty, OperationMetadata> response = await internalRangeServiceClient.DeleteInternalRangeAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceDeleteInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRangeAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteInternalRangeAsync(string name, CallSettings callSettings = null)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the internal range to delete. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/internalRanges/[INTERNAL_RANGE]";
// Make the request
Operation<Empty, OperationMetadata> response = await internalRangeServiceClient.DeleteInternalRangeAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceDeleteInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteInternalRangeAsync(string, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteInternalRangeAsync(string name, CancellationToken cancellationToken)
Deletes a single internal range.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the internal range to delete. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/internalRanges/[INTERNAL_RANGE]";
// Make the request
Operation<Empty, OperationMetadata> response = await internalRangeServiceClient.DeleteInternalRangeAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceDeleteInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetInternalRange(GetInternalRangeRequest, CallSettings)
public virtual InternalRange GetInternalRange(GetInternalRangeRequest request, CallSettings callSettings = null)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
request |
GetInternalRangeRequest 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 |
InternalRange |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
GetInternalRangeRequest request = new GetInternalRangeRequest
{
InternalRangeName = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]"),
};
// Make the request
InternalRange response = internalRangeServiceClient.GetInternalRange(request);
GetInternalRange(InternalRangeName, CallSettings)
public virtual InternalRange GetInternalRange(InternalRangeName name, CallSettings callSettings = null)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
name |
InternalRangeName Required. Name of the InternalRange to get. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
InternalRange |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
InternalRangeName name = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]");
// Make the request
InternalRange response = internalRangeServiceClient.GetInternalRange(name);
GetInternalRange(string, CallSettings)
public virtual InternalRange GetInternalRange(string name, CallSettings callSettings = null)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name of the InternalRange to get. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
InternalRange |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/internalRanges/[INTERNAL_RANGE]";
// Make the request
InternalRange response = internalRangeServiceClient.GetInternalRange(name);
GetInternalRangeAsync(GetInternalRangeRequest, CallSettings)
public virtual Task<InternalRange> GetInternalRangeAsync(GetInternalRangeRequest request, CallSettings callSettings = null)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
request |
GetInternalRangeRequest 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 |
TaskInternalRange |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
GetInternalRangeRequest request = new GetInternalRangeRequest
{
InternalRangeName = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]"),
};
// Make the request
InternalRange response = await internalRangeServiceClient.GetInternalRangeAsync(request);
GetInternalRangeAsync(GetInternalRangeRequest, CancellationToken)
public virtual Task<InternalRange> GetInternalRangeAsync(GetInternalRangeRequest request, CancellationToken cancellationToken)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
request |
GetInternalRangeRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskInternalRange |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
GetInternalRangeRequest request = new GetInternalRangeRequest
{
InternalRangeName = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]"),
};
// Make the request
InternalRange response = await internalRangeServiceClient.GetInternalRangeAsync(request);
GetInternalRangeAsync(InternalRangeName, CallSettings)
public virtual Task<InternalRange> GetInternalRangeAsync(InternalRangeName name, CallSettings callSettings = null)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
name |
InternalRangeName Required. Name of the InternalRange to get. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskInternalRange |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
InternalRangeName name = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]");
// Make the request
InternalRange response = await internalRangeServiceClient.GetInternalRangeAsync(name);
GetInternalRangeAsync(InternalRangeName, CancellationToken)
public virtual Task<InternalRange> GetInternalRangeAsync(InternalRangeName name, CancellationToken cancellationToken)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
name |
InternalRangeName Required. Name of the InternalRange to get. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskInternalRange |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
InternalRangeName name = InternalRangeName.FromProjectLocationInternalRange("[PROJECT]", "[LOCATION]", "[INTERNAL_RANGE]");
// Make the request
InternalRange response = await internalRangeServiceClient.GetInternalRangeAsync(name);
GetInternalRangeAsync(string, CallSettings)
public virtual Task<InternalRange> GetInternalRangeAsync(string name, CallSettings callSettings = null)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name of the InternalRange to get. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskInternalRange |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/internalRanges/[INTERNAL_RANGE]";
// Make the request
InternalRange response = await internalRangeServiceClient.GetInternalRangeAsync(name);
GetInternalRangeAsync(string, CancellationToken)
public virtual Task<InternalRange> GetInternalRangeAsync(string name, CancellationToken cancellationToken)
Gets details of a single internal range.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name of the InternalRange to get. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskInternalRange |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/internalRanges/[INTERNAL_RANGE]";
// Make the request
InternalRange response = await internalRangeServiceClient.GetInternalRangeAsync(name);
ListInternalRanges(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListInternalRangesResponse, InternalRange> ListInternalRanges(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists internal ranges in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource's name. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedEnumerableListInternalRangesResponseInternalRange |
A pageable sequence of InternalRange resources. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListInternalRangesResponse, InternalRange> response = internalRangeServiceClient.ListInternalRanges(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (InternalRange 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 (ListInternalRangesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (InternalRange 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<InternalRange> 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 (InternalRange 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;
ListInternalRanges(ListInternalRangesRequest, CallSettings)
public virtual PagedEnumerable<ListInternalRangesResponse, InternalRange> ListInternalRanges(ListInternalRangesRequest request, CallSettings callSettings = null)
Lists internal ranges in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
ListInternalRangesRequest 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 |
PagedEnumerableListInternalRangesResponseInternalRange |
A pageable sequence of InternalRange resources. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
ListInternalRangesRequest request = new ListInternalRangesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedEnumerable<ListInternalRangesResponse, InternalRange> response = internalRangeServiceClient.ListInternalRanges(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (InternalRange 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 (ListInternalRangesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (InternalRange 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<InternalRange> 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 (InternalRange 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;
ListInternalRanges(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListInternalRangesResponse, InternalRange> ListInternalRanges(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists internal ranges in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource's name. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedEnumerableListInternalRangesResponseInternalRange |
A pageable sequence of InternalRange resources. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListInternalRangesResponse, InternalRange> response = internalRangeServiceClient.ListInternalRanges(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (InternalRange 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 (ListInternalRangesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (InternalRange 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<InternalRange> 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 (InternalRange 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;
ListInternalRangesAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListInternalRangesResponse, InternalRange> ListInternalRangesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists internal ranges in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource's name. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedAsyncEnumerableListInternalRangesResponseInternalRange |
A pageable asynchronous sequence of InternalRange resources. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListInternalRangesResponse, InternalRange> response = internalRangeServiceClient.ListInternalRangesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InternalRange 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((ListInternalRangesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (InternalRange 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<InternalRange> 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 (InternalRange 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;
ListInternalRangesAsync(ListInternalRangesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListInternalRangesResponse, InternalRange> ListInternalRangesAsync(ListInternalRangesRequest request, CallSettings callSettings = null)
Lists internal ranges in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
ListInternalRangesRequest 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 |
PagedAsyncEnumerableListInternalRangesResponseInternalRange |
A pageable asynchronous sequence of InternalRange resources. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
ListInternalRangesRequest request = new ListInternalRangesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListInternalRangesResponse, InternalRange> response = internalRangeServiceClient.ListInternalRangesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InternalRange 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((ListInternalRangesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (InternalRange 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<InternalRange> 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 (InternalRange 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;
ListInternalRangesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListInternalRangesResponse, InternalRange> ListInternalRangesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists internal ranges in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource's name. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedAsyncEnumerableListInternalRangesResponseInternalRange |
A pageable asynchronous sequence of InternalRange resources. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListInternalRangesResponse, InternalRange> response = internalRangeServiceClient.ListInternalRangesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InternalRange 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((ListInternalRangesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (InternalRange 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<InternalRange> 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 (InternalRange 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;
PollOnceCreateInternalRange(string, CallSettings)
public virtual Operation<InternalRange, OperationMetadata> PollOnceCreateInternalRange(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateInternalRange
.
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 |
OperationInternalRangeOperationMetadata |
The result of polling the operation. |
PollOnceCreateInternalRangeAsync(string, CallSettings)
public virtual Task<Operation<InternalRange, OperationMetadata>> PollOnceCreateInternalRangeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateInternalRange
.
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 |
TaskOperationInternalRangeOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteInternalRange(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteInternalRange(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteInternalRange
.
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 |
OperationEmptyOperationMetadata |
The result of polling the operation. |
PollOnceDeleteInternalRangeAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteInternalRangeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteInternalRange
.
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 |
TaskOperationEmptyOperationMetadata |
A task representing the result of polling the operation. |
PollOnceUpdateInternalRange(string, CallSettings)
public virtual Operation<InternalRange, OperationMetadata> PollOnceUpdateInternalRange(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateInternalRange
.
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 |
OperationInternalRangeOperationMetadata |
The result of polling the operation. |
PollOnceUpdateInternalRangeAsync(string, CallSettings)
public virtual Task<Operation<InternalRange, OperationMetadata>> PollOnceUpdateInternalRangeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateInternalRange
.
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 |
TaskOperationInternalRangeOperationMetadata |
A task representing the result of polling the operation. |
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.
UpdateInternalRange(InternalRange, FieldMask, CallSettings)
public virtual Operation<InternalRange, OperationMetadata> UpdateInternalRange(InternalRange internalRange, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single internal range.
Parameters | |
---|---|
Name | Description |
internalRange |
InternalRange Required. New values to be patched into the resource. |
updateMask |
FieldMask Optional. Field mask is used to specify the fields to be overwritten in the InternalRange resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInternalRangeOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
InternalRange internalRange = new InternalRange();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<InternalRange, OperationMetadata> response = internalRangeServiceClient.UpdateInternalRange(internalRange, updateMask);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceUpdateInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
UpdateInternalRange(UpdateInternalRangeRequest, CallSettings)
public virtual Operation<InternalRange, OperationMetadata> UpdateInternalRange(UpdateInternalRangeRequest request, CallSettings callSettings = null)
Updates the parameters of a single internal range.
Parameters | |
---|---|
Name | Description |
request |
UpdateInternalRangeRequest 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 |
OperationInternalRangeOperationMetadata |
The RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = InternalRangeServiceClient.Create();
// Initialize request argument(s)
UpdateInternalRangeRequest request = new UpdateInternalRangeRequest
{
UpdateMask = new FieldMask(),
InternalRange = new InternalRange(),
RequestId = "",
};
// Make the request
Operation<InternalRange, OperationMetadata> response = internalRangeServiceClient.UpdateInternalRange(request);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = internalRangeServiceClient.PollOnceUpdateInternalRange(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
UpdateInternalRangeAsync(InternalRange, FieldMask, CallSettings)
public virtual Task<Operation<InternalRange, OperationMetadata>> UpdateInternalRangeAsync(InternalRange internalRange, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single internal range.
Parameters | |
---|---|
Name | Description |
internalRange |
InternalRange Required. New values to be patched into the resource. |
updateMask |
FieldMask Optional. Field mask is used to specify the fields to be overwritten in the InternalRange resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
InternalRange internalRange = new InternalRange();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.UpdateInternalRangeAsync(internalRange, updateMask);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceUpdateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
UpdateInternalRangeAsync(InternalRange, FieldMask, CancellationToken)
public virtual Task<Operation<InternalRange, OperationMetadata>> UpdateInternalRangeAsync(InternalRange internalRange, FieldMask updateMask, CancellationToken cancellationToken)
Updates the parameters of a single internal range.
Parameters | |
---|---|
Name | Description |
internalRange |
InternalRange Required. New values to be patched into the resource. |
updateMask |
FieldMask Optional. Field mask is used to specify the fields to be overwritten in the InternalRange resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
InternalRange internalRange = new InternalRange();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.UpdateInternalRangeAsync(internalRange, updateMask);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceUpdateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
UpdateInternalRangeAsync(UpdateInternalRangeRequest, CallSettings)
public virtual Task<Operation<InternalRange, OperationMetadata>> UpdateInternalRangeAsync(UpdateInternalRangeRequest request, CallSettings callSettings = null)
Updates the parameters of a single internal range.
Parameters | |
---|---|
Name | Description |
request |
UpdateInternalRangeRequest 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 |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateInternalRangeRequest request = new UpdateInternalRangeRequest
{
UpdateMask = new FieldMask(),
InternalRange = new InternalRange(),
RequestId = "",
};
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.UpdateInternalRangeAsync(request);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceUpdateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}
UpdateInternalRangeAsync(UpdateInternalRangeRequest, CancellationToken)
public virtual Task<Operation<InternalRange, OperationMetadata>> UpdateInternalRangeAsync(UpdateInternalRangeRequest request, CancellationToken cancellationToken)
Updates the parameters of a single internal range.
Parameters | |
---|---|
Name | Description |
request |
UpdateInternalRangeRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationInternalRangeOperationMetadata |
A Task containing the RPC response. |
// Create client
InternalRangeServiceClient internalRangeServiceClient = await InternalRangeServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateInternalRangeRequest request = new UpdateInternalRangeRequest
{
UpdateMask = new FieldMask(),
InternalRange = new InternalRange(),
RequestId = "",
};
// Make the request
Operation<InternalRange, OperationMetadata> response = await internalRangeServiceClient.UpdateInternalRangeAsync(request);
// Poll until the returned long-running operation is complete
Operation<InternalRange, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InternalRange 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
Operation<InternalRange, OperationMetadata> retrievedResponse = await internalRangeServiceClient.PollOnceUpdateInternalRangeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
InternalRange retrievedResult = retrievedResponse.Result;
}