Serverless VPC Access V1 API - Class Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client (v0.5.0)

Reference documentation and code samples for the Serverless VPC Access V1 API class Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.

REST client for the VpcAccessService service.

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.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the VpcAccessService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all VpcAccessService clients
::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the VpcAccessService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_connector

def create_connector(request, options = nil) -> ::Gapic::Operation
def create_connector(parent: nil, connector_id: nil, connector: nil) -> ::Gapic::Operation

Creates a Serverless VPC Access connector, returns an operation.

Overloads
def create_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_connector via a request object, either of type CreateConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_connector(parent: nil, connector_id: nil, connector: nil) -> ::Gapic::Operation
Pass arguments to create_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The project and location in which the configuration should be created, specified in the format projects/*/locations/*.
  • connector_id (::String) — Required. The ID to use for this connector.
  • connector (::Google::Cloud::VpcAccess::V1::Connector, ::Hash) — Required. Resource to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_connector

def delete_connector(request, options = nil) -> ::Gapic::Operation
def delete_connector(name: nil) -> ::Gapic::Operation

Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.

Overloads
def delete_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_connector via a request object, either of type DeleteConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_connector(name: nil) -> ::Gapic::Operation
Pass arguments to delete_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of a Serverless VPC Access connector to delete.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_connector

def get_connector(request, options = nil) -> ::Google::Cloud::VpcAccess::V1::Connector
def get_connector(name: nil) -> ::Google::Cloud::VpcAccess::V1::Connector

Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.

Overloads
def get_connector(request, options = nil) -> ::Google::Cloud::VpcAccess::V1::Connector
Pass arguments to get_connector via a request object, either of type GetConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VpcAccess::V1::GetConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_connector(name: nil) -> ::Google::Cloud::VpcAccess::V1::Connector
Pass arguments to get_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of a Serverless VPC Access connector to get.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new VpcAccessService REST client object.

Yields
  • (config) — Configure the VpcAccessService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_connectors

def list_connectors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>
def list_connectors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>

Lists Serverless VPC Access connectors.

Overloads
def list_connectors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>
Pass arguments to list_connectors via a request object, either of type ListConnectorsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_connectors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>
Pass arguments to list_connectors via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The project and location from which the routes should be listed.
  • page_size (::Integer) — Maximum number of functions to return per call.
  • page_token (::String) — Continuation token.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#operations_client

def operations_client() -> ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Operations

Get the associated client for long-running operations.