public abstract class VpcAccessServiceClient
VpcAccessService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.VpcAccess.V1Assembly
Google.Cloud.VpcAccess.V1.dll
Remarks
Serverless VPC Access API allows users to create and manage connectors for App Engine, Cloud Functions and Cloud Run to have internal connections to Virtual Private Cloud networks.
Properties
CreateConnectorOperationsClient
public virtual OperationsClient CreateConnectorOperationsClient { get; }
The long-running operations client for CreateConnector
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the VpcAccessService service, which is a host of "vpcaccess.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default VpcAccessService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default VpcAccessService scopes are:
DeleteConnectorOperationsClient
public virtual OperationsClient DeleteConnectorOperationsClient { get; }
The long-running operations client for DeleteConnector
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual VpcAccessService.VpcAccessServiceClient GrpcClient { get; }
The underlying gRPC VpcAccessService client
Property Value | |
---|---|
Type | Description |
VpcAccessService.VpcAccessServiceClient |
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 |
Methods
Create()
public static VpcAccessServiceClient Create()
Synchronously creates a VpcAccessServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VpcAccessServiceClientBuilder.
Returns | |
---|---|
Type | Description |
VpcAccessServiceClient | The created VpcAccessServiceClient. |
CreateAsync(CancellationToken)
public static Task<VpcAccessServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a VpcAccessServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VpcAccessServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<VpcAccessServiceClient> | The task representing the created VpcAccessServiceClient. |
CreateConnector(LocationName, String, Connector, CallSettings)
public virtual Operation<Connector, OperationMetadata> CreateConnector(LocationName parent, string connectorId, Connector connector, CallSettings callSettings = null)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location in which the configuration should be created,
specified in the format |
connectorId | String Required. The ID to use for this connector. |
connector | Connector Required. Resource to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Connector, OperationMetadata> | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string connectorId = "";
Connector connector = new Connector();
// Make the request
Operation<Connector, OperationMetadata> response = vpcAccessServiceClient.CreateConnector(parent, connectorId, connector);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = vpcAccessServiceClient.PollOnceCreateConnector(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnector(CreateConnectorRequest, CallSettings)
public virtual Operation<Connector, OperationMetadata> CreateConnector(CreateConnectorRequest request, CallSettings callSettings = null)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
request | CreateConnectorRequest 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<Connector, OperationMetadata> | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
CreateConnectorRequest request = new CreateConnectorRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
ConnectorId = "",
Connector = new Connector(),
};
// Make the request
Operation<Connector, OperationMetadata> response = vpcAccessServiceClient.CreateConnector(request);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = vpcAccessServiceClient.PollOnceCreateConnector(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnector(String, String, Connector, CallSettings)
public virtual Operation<Connector, OperationMetadata> CreateConnector(string parent, string connectorId, Connector connector, CallSettings callSettings = null)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location in which the configuration should be created,
specified in the format |
connectorId | String Required. The ID to use for this connector. |
connector | Connector Required. Resource to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Connector, OperationMetadata> | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string connectorId = "";
Connector connector = new Connector();
// Make the request
Operation<Connector, OperationMetadata> response = vpcAccessServiceClient.CreateConnector(parent, connectorId, connector);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = vpcAccessServiceClient.PollOnceCreateConnector(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnectorAsync(LocationName, String, Connector, CallSettings)
public virtual Task<Operation<Connector, OperationMetadata>> CreateConnectorAsync(LocationName parent, string connectorId, Connector connector, CallSettings callSettings = null)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location in which the configuration should be created,
specified in the format |
connectorId | String Required. The ID to use for this connector. |
connector | Connector Required. Resource to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Connector, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string connectorId = "";
Connector connector = new Connector();
// Make the request
Operation<Connector, OperationMetadata> response = await vpcAccessServiceClient.CreateConnectorAsync(parent, connectorId, connector);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = await vpcAccessServiceClient.PollOnceCreateConnectorAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnectorAsync(LocationName, String, Connector, CancellationToken)
public virtual Task<Operation<Connector, OperationMetadata>> CreateConnectorAsync(LocationName parent, string connectorId, Connector connector, CancellationToken cancellationToken)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location in which the configuration should be created,
specified in the format |
connectorId | String Required. The ID to use for this connector. |
connector | Connector Required. Resource to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Connector, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string connectorId = "";
Connector connector = new Connector();
// Make the request
Operation<Connector, OperationMetadata> response = await vpcAccessServiceClient.CreateConnectorAsync(parent, connectorId, connector);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = await vpcAccessServiceClient.PollOnceCreateConnectorAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnectorAsync(CreateConnectorRequest, CallSettings)
public virtual Task<Operation<Connector, OperationMetadata>> CreateConnectorAsync(CreateConnectorRequest request, CallSettings callSettings = null)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
request | CreateConnectorRequest 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<Connector, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConnectorRequest request = new CreateConnectorRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
ConnectorId = "",
Connector = new Connector(),
};
// Make the request
Operation<Connector, OperationMetadata> response = await vpcAccessServiceClient.CreateConnectorAsync(request);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = await vpcAccessServiceClient.PollOnceCreateConnectorAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnectorAsync(CreateConnectorRequest, CancellationToken)
public virtual Task<Operation<Connector, OperationMetadata>> CreateConnectorAsync(CreateConnectorRequest request, CancellationToken cancellationToken)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
request | CreateConnectorRequest 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<Connector, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConnectorRequest request = new CreateConnectorRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
ConnectorId = "",
Connector = new Connector(),
};
// Make the request
Operation<Connector, OperationMetadata> response = await vpcAccessServiceClient.CreateConnectorAsync(request);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = await vpcAccessServiceClient.PollOnceCreateConnectorAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnectorAsync(String, String, Connector, CallSettings)
public virtual Task<Operation<Connector, OperationMetadata>> CreateConnectorAsync(string parent, string connectorId, Connector connector, CallSettings callSettings = null)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location in which the configuration should be created,
specified in the format |
connectorId | String Required. The ID to use for this connector. |
connector | Connector Required. Resource to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Connector, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string connectorId = "";
Connector connector = new Connector();
// Make the request
Operation<Connector, OperationMetadata> response = await vpcAccessServiceClient.CreateConnectorAsync(parent, connectorId, connector);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = await vpcAccessServiceClient.PollOnceCreateConnectorAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
CreateConnectorAsync(String, String, Connector, CancellationToken)
public virtual Task<Operation<Connector, OperationMetadata>> CreateConnectorAsync(string parent, string connectorId, Connector connector, CancellationToken cancellationToken)
Creates a Serverless VPC Access connector, returns an operation.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location in which the configuration should be created,
specified in the format |
connectorId | String Required. The ID to use for this connector. |
connector | Connector Required. Resource to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Connector, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string connectorId = "";
Connector connector = new Connector();
// Make the request
Operation<Connector, OperationMetadata> response = await vpcAccessServiceClient.CreateConnectorAsync(parent, connectorId, connector);
// Poll until the returned long-running operation is complete
Operation<Connector, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Connector 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<Connector, OperationMetadata> retrievedResponse = await vpcAccessServiceClient.PollOnceCreateConnectorAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Connector retrievedResult = retrievedResponse.Result;
}
DeleteConnector(ConnectorName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteConnector(ConnectorName name, CallSettings callSettings = null)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | ConnectorName Required. Name of a Serverless VPC Access connector to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
ConnectorName name = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]");
// Make the request
Operation<Empty, OperationMetadata> response = vpcAccessServiceClient.DeleteConnector(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 = vpcAccessServiceClient.PollOnceDeleteConnector(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;
}
DeleteConnector(DeleteConnectorRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteConnector(DeleteConnectorRequest request, CallSettings callSettings = null)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
request | DeleteConnectorRequest 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<Empty, OperationMetadata> | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
DeleteConnectorRequest request = new DeleteConnectorRequest
{
ConnectorName = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = vpcAccessServiceClient.DeleteConnector(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 = vpcAccessServiceClient.PollOnceDeleteConnector(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;
}
DeleteConnector(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteConnector(string name, CallSettings callSettings = null)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of a Serverless VPC Access connector to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connectors/[CONNECTOR]";
// Make the request
Operation<Empty, OperationMetadata> response = vpcAccessServiceClient.DeleteConnector(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 = vpcAccessServiceClient.PollOnceDeleteConnector(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;
}
DeleteConnectorAsync(ConnectorName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteConnectorAsync(ConnectorName name, CallSettings callSettings = null)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | ConnectorName Required. Name of a Serverless VPC Access connector to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectorName name = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]");
// Make the request
Operation<Empty, OperationMetadata> response = await vpcAccessServiceClient.DeleteConnectorAsync(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 vpcAccessServiceClient.PollOnceDeleteConnectorAsync(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;
}
DeleteConnectorAsync(ConnectorName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteConnectorAsync(ConnectorName name, CancellationToken cancellationToken)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | ConnectorName Required. Name of a Serverless VPC Access connector to delete. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectorName name = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]");
// Make the request
Operation<Empty, OperationMetadata> response = await vpcAccessServiceClient.DeleteConnectorAsync(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 vpcAccessServiceClient.PollOnceDeleteConnectorAsync(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;
}
DeleteConnectorAsync(DeleteConnectorRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteConnectorAsync(DeleteConnectorRequest request, CallSettings callSettings = null)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
request | DeleteConnectorRequest 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<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConnectorRequest request = new DeleteConnectorRequest
{
ConnectorName = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await vpcAccessServiceClient.DeleteConnectorAsync(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 vpcAccessServiceClient.PollOnceDeleteConnectorAsync(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;
}
DeleteConnectorAsync(DeleteConnectorRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteConnectorAsync(DeleteConnectorRequest request, CancellationToken cancellationToken)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
request | DeleteConnectorRequest 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<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConnectorRequest request = new DeleteConnectorRequest
{
ConnectorName = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await vpcAccessServiceClient.DeleteConnectorAsync(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 vpcAccessServiceClient.PollOnceDeleteConnectorAsync(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;
}
DeleteConnectorAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteConnectorAsync(string name, CallSettings callSettings = null)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of a Serverless VPC Access connector to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connectors/[CONNECTOR]";
// Make the request
Operation<Empty, OperationMetadata> response = await vpcAccessServiceClient.DeleteConnectorAsync(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 vpcAccessServiceClient.PollOnceDeleteConnectorAsync(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;
}
DeleteConnectorAsync(String, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteConnectorAsync(string name, CancellationToken cancellationToken)
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of a Serverless VPC Access connector to delete. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connectors/[CONNECTOR]";
// Make the request
Operation<Empty, OperationMetadata> response = await vpcAccessServiceClient.DeleteConnectorAsync(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 vpcAccessServiceClient.PollOnceDeleteConnectorAsync(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;
}
GetConnector(ConnectorName, CallSettings)
public virtual Connector GetConnector(ConnectorName name, CallSettings callSettings = null)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | ConnectorName Required. Name of a Serverless VPC Access connector to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Connector | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
ConnectorName name = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]");
// Make the request
Connector response = vpcAccessServiceClient.GetConnector(name);
GetConnector(GetConnectorRequest, CallSettings)
public virtual Connector GetConnector(GetConnectorRequest request, CallSettings callSettings = null)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
request | GetConnectorRequest 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 |
Connector | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
GetConnectorRequest request = new GetConnectorRequest
{
ConnectorName = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]"),
};
// Make the request
Connector response = vpcAccessServiceClient.GetConnector(request);
GetConnector(String, CallSettings)
public virtual Connector GetConnector(string name, CallSettings callSettings = null)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of a Serverless VPC Access connector to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Connector | The RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connectors/[CONNECTOR]";
// Make the request
Connector response = vpcAccessServiceClient.GetConnector(name);
GetConnectorAsync(ConnectorName, CallSettings)
public virtual Task<Connector> GetConnectorAsync(ConnectorName name, CallSettings callSettings = null)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | ConnectorName Required. Name of a Serverless VPC Access connector to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Connector> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectorName name = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]");
// Make the request
Connector response = await vpcAccessServiceClient.GetConnectorAsync(name);
GetConnectorAsync(ConnectorName, CancellationToken)
public virtual Task<Connector> GetConnectorAsync(ConnectorName name, CancellationToken cancellationToken)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | ConnectorName Required. Name of a Serverless VPC Access connector to get. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Connector> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectorName name = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]");
// Make the request
Connector response = await vpcAccessServiceClient.GetConnectorAsync(name);
GetConnectorAsync(GetConnectorRequest, CallSettings)
public virtual Task<Connector> GetConnectorAsync(GetConnectorRequest request, CallSettings callSettings = null)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
request | GetConnectorRequest 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<Connector> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
GetConnectorRequest request = new GetConnectorRequest
{
ConnectorName = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]"),
};
// Make the request
Connector response = await vpcAccessServiceClient.GetConnectorAsync(request);
GetConnectorAsync(GetConnectorRequest, CancellationToken)
public virtual Task<Connector> GetConnectorAsync(GetConnectorRequest request, CancellationToken cancellationToken)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
request | GetConnectorRequest 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<Connector> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
GetConnectorRequest request = new GetConnectorRequest
{
ConnectorName = ConnectorName.FromProjectLocationConnector("[PROJECT]", "[LOCATION]", "[CONNECTOR]"),
};
// Make the request
Connector response = await vpcAccessServiceClient.GetConnectorAsync(request);
GetConnectorAsync(String, CallSettings)
public virtual Task<Connector> GetConnectorAsync(string name, CallSettings callSettings = null)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of a Serverless VPC Access connector to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Connector> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connectors/[CONNECTOR]";
// Make the request
Connector response = await vpcAccessServiceClient.GetConnectorAsync(name);
GetConnectorAsync(String, CancellationToken)
public virtual Task<Connector> GetConnectorAsync(string name, CancellationToken cancellationToken)
Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of a Serverless VPC Access connector to get. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Connector> | A Task containing the RPC response. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connectors/[CONNECTOR]";
// Make the request
Connector response = await vpcAccessServiceClient.GetConnectorAsync(name);
ListConnectors(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListConnectorsResponse, Connector> ListConnectors(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists Serverless VPC Access connectors.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the routes should be listed. |
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<ListConnectorsResponse, Connector> | A pageable sequence of Connector resources. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListConnectorsResponse, Connector> response = vpcAccessServiceClient.ListConnectors(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Connector 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 (ListConnectorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Connector 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<Connector> 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 (Connector 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;
ListConnectors(ListConnectorsRequest, CallSettings)
public virtual PagedEnumerable<ListConnectorsResponse, Connector> ListConnectors(ListConnectorsRequest request, CallSettings callSettings = null)
Lists Serverless VPC Access connectors.
Parameters | |
---|---|
Name | Description |
request | ListConnectorsRequest 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<ListConnectorsResponse, Connector> | A pageable sequence of Connector resources. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
ListConnectorsRequest request = new ListConnectorsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListConnectorsResponse, Connector> response = vpcAccessServiceClient.ListConnectors(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Connector 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 (ListConnectorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Connector 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<Connector> 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 (Connector 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;
ListConnectors(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListConnectorsResponse, Connector> ListConnectors(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists Serverless VPC Access connectors.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the routes should be listed. |
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<ListConnectorsResponse, Connector> | A pageable sequence of Connector resources. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = VpcAccessServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListConnectorsResponse, Connector> response = vpcAccessServiceClient.ListConnectors(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Connector 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 (ListConnectorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Connector 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<Connector> 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 (Connector 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;
ListConnectorsAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListConnectorsResponse, Connector> ListConnectorsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists Serverless VPC Access connectors.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the routes should be listed. |
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<ListConnectorsResponse, Connector> | A pageable asynchronous sequence of Connector resources. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListConnectorsResponse, Connector> response = vpcAccessServiceClient.ListConnectorsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Connector 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((ListConnectorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Connector 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<Connector> 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 (Connector 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;
ListConnectorsAsync(ListConnectorsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListConnectorsResponse, Connector> ListConnectorsAsync(ListConnectorsRequest request, CallSettings callSettings = null)
Lists Serverless VPC Access connectors.
Parameters | |
---|---|
Name | Description |
request | ListConnectorsRequest 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<ListConnectorsResponse, Connector> | A pageable asynchronous sequence of Connector resources. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
ListConnectorsRequest request = new ListConnectorsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListConnectorsResponse, Connector> response = vpcAccessServiceClient.ListConnectorsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Connector 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((ListConnectorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Connector 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<Connector> 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 (Connector 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;
ListConnectorsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListConnectorsResponse, Connector> ListConnectorsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists Serverless VPC Access connectors.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the routes should be listed. |
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<ListConnectorsResponse, Connector> | A pageable asynchronous sequence of Connector resources. |
// Create client
VpcAccessServiceClient vpcAccessServiceClient = await VpcAccessServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListConnectorsResponse, Connector> response = vpcAccessServiceClient.ListConnectorsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Connector 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((ListConnectorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Connector 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<Connector> 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 (Connector 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;
PollOnceCreateConnector(String, CallSettings)
public virtual Operation<Connector, OperationMetadata> PollOnceCreateConnector(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateConnector
.
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<Connector, OperationMetadata> | The result of polling the operation. |
PollOnceCreateConnectorAsync(String, CallSettings)
public virtual Task<Operation<Connector, OperationMetadata>> PollOnceCreateConnectorAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateConnector
.
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<Connector, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteConnector(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteConnector(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteConnector
.
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<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceDeleteConnectorAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteConnectorAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteConnector
.
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<Empty, OperationMetadata>> | 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.