Class VpcAccessServiceClient (1.1.0)

public abstract class VpcAccessServiceClient

VpcAccessService client wrapper, for convenient use.

Inheritance

Object > VpcAccessServiceClient

Namespace

Google.Cloud.VpcAccess.V1

Assembly

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

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default VpcAccessService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default VpcAccessService scopes are:

DeleteConnectorOperationsClient

public virtual OperationsClient DeleteConnectorOperationsClient { get; }

The long-running operations client for DeleteConnector.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual VpcAccessService.VpcAccessServiceClient GrpcClient { get; }

The underlying gRPC VpcAccessService client

Property Value
TypeDescription
VpcAccessService.VpcAccessServiceClient

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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

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

Required. The project and location in which the configuration should be created, specified in the format projects/*/locations/*.

connectorIdString

Required. The ID to use for this connector.

connectorConnector

Required. Resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Connector, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
requestCreateConnectorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Connector, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
parentString

Required. The project and location in which the configuration should be created, specified in the format projects/*/locations/*.

connectorIdString

Required. The ID to use for this connector.

connectorConnector

Required. Resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Connector, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The project and location in which the configuration should be created, specified in the format projects/*/locations/*.

connectorIdString

Required. The ID to use for this connector.

connectorConnector

Required. Resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Connector, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The project and location in which the configuration should be created, specified in the format projects/*/locations/*.

connectorIdString

Required. The ID to use for this connector.

connectorConnector

Required. Resource to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Connector, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateConnectorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Connector, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateConnectorRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Connector, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The project and location in which the configuration should be created, specified in the format projects/*/locations/*.

connectorIdString

Required. The ID to use for this connector.

connectorConnector

Required. Resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Connector, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The project and location in which the configuration should be created, specified in the format projects/*/locations/*.

connectorIdString

Required. The ID to use for this connector.

connectorConnector

Required. Resource to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Connector, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameConnectorName

Required. Name of a Serverless VPC Access connector to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
requestDeleteConnectorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameString

Required. Name of a Serverless VPC Access connector to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameConnectorName

Required. Name of a Serverless VPC Access connector to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameConnectorName

Required. Name of a Serverless VPC Access connector to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteConnectorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteConnectorRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. Name of a Serverless VPC Access connector to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. Name of a Serverless VPC Access connector to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameConnectorName

Required. Name of a Serverless VPC Access connector to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Connector

The RPC response.

Example
// 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
NameDescription
requestGetConnectorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Connector

The RPC response.

Example
// 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
NameDescription
nameString

Required. Name of a Serverless VPC Access connector to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Connector

The RPC response.

Example
// 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
NameDescription
nameConnectorName

Required. Name of a Serverless VPC Access connector to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Connector>

A Task containing the RPC response.

Example
// 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
NameDescription
nameConnectorName

Required. Name of a Serverless VPC Access connector to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Connector>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetConnectorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Connector>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetConnectorRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Connector>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. Name of a Serverless VPC Access connector to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Connector>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. Name of a Serverless VPC Access connector to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Connector>

A Task containing the RPC response.

Example
// 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 = default(int? ), CallSettings callSettings = null)

Lists Serverless VPC Access connectors.

Parameters
NameDescription
parentLocationName

Required. The project and location from which the routes should be listed.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConnectorsResponse, Connector>

A pageable sequence of Connector resources.

Example
// 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
NameDescription
requestListConnectorsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConnectorsResponse, Connector>

A pageable sequence of Connector resources.

Example
// 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 = default(int? ), CallSettings callSettings = null)

Lists Serverless VPC Access connectors.

Parameters
NameDescription
parentString

Required. The project and location from which the routes should be listed.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConnectorsResponse, Connector>

A pageable sequence of Connector resources.

Example
// 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 = default(int? ), CallSettings callSettings = null)

Lists Serverless VPC Access connectors.

Parameters
NameDescription
parentLocationName

Required. The project and location from which the routes should be listed.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConnectorsResponse, Connector>

A pageable asynchronous sequence of Connector resources.

Example
// 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
NameDescription
requestListConnectorsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConnectorsResponse, Connector>

A pageable asynchronous sequence of Connector resources.

Example
// 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 = default(int? ), CallSettings callSettings = null)

Lists Serverless VPC Access connectors.

Parameters
NameDescription
parentString

Required. The project and location from which the routes should be listed.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConnectorsResponse, Connector>

A pageable asynchronous sequence of Connector resources.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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