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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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.
def create_connector(request, options = nil) -> ::Gapic::Operation
create_connector
via a request object, either of type
CreateConnectorRequest or an equivalent Hash.
- 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
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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vpc_access/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new # Call the create_connector method. result = client.create_connector request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#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.
def delete_connector(request, options = nil) -> ::Gapic::Operation
delete_connector
via a request object, either of type
DeleteConnectorRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of a Serverless VPC Access connector to delete.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vpc_access/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new # Call the delete_connector method. result = client.delete_connector request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#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.
def get_connector(request, options = nil) -> ::Google::Cloud::VpcAccess::V1::Connector
get_connector
via a request object, either of type
GetConnectorRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of a Serverless VPC Access connector to get.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VpcAccess::V1::Connector)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vpc_access/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VpcAccess::V1::GetConnectorRequest.new # Call the get_connector method. result = client.get_connector request # The returned object is of type Google::Cloud::VpcAccess::V1::Connector. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new VpcAccessService REST client object.
- (config) — Configure the VpcAccessService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_connectors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>
list_connectors
via a request object, either of type
ListConnectorsRequest or an equivalent Hash.
- 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>
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vpc_access/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new # Call the list_connectors method. result = client.list_connectors request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::VpcAccess::V1::Connector. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)