Network Connectivity V1BETA API - Class Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client (v0.1.0)

Reference documentation and code samples for the Network Connectivity V1BETA API class Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.

Client for the TransportManager service.

The CLH based service for managing RemoteTransportProfiles and Transports.

Inherits

  • Object

Methods

.configure

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

Configure the TransportManager 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 TransportManager clients
::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the TransportManager 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_transport

def create_transport(request, options = nil) -> ::Gapic::Operation
def create_transport(parent: nil, transport_id: nil, transport: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Transport in a given project and location.

Overloads
def create_transport(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_transport via a request object, either of type CreateTransportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkConnectivity::V1beta::CreateTransportRequest, ::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_transport(parent: nil, transport_id: nil, transport: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_transport 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. Value for parent.
  • transport_id (::String) — Required. Id of the requesting object
  • transport (::Google::Cloud::NetworkConnectivity::V1beta::Transport, ::Hash) — Required. The resource being created
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::CreateTransportRequest.new

# Call the create_transport method.
result = client.create_transport 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_transport

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

Deletes a single Transport.

Overloads
def delete_transport(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_transport via a request object, either of type DeleteTransportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkConnectivity::V1beta::DeleteTransportRequest, ::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_transport(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_transport 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
  • name (::String) — Required. Name of the resource.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::DeleteTransportRequest.new

# Call the delete_transport method.
result = client.delete_transport 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_remote_transport_profile

def get_remote_transport_profile(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile
def get_remote_transport_profile(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile

Gets details of a single RemoteTransportProfile.

Overloads
def get_remote_transport_profile(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile
Pass arguments to get_remote_transport_profile via a request object, either of type GetRemoteTransportProfileRequest or an equivalent Hash.
Parameters
def get_remote_transport_profile(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile
Pass arguments to get_remote_transport_profile 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 the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::GetRemoteTransportProfileRequest.new

# Call the get_remote_transport_profile method.
result = client.get_remote_transport_profile request

# The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile.
p result

#get_status

def get_status(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse
def get_status(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse

Gets the operational status of a single Transport.

Overloads
def get_status(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse
Pass arguments to get_status via a request object, either of type GetStatusRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkConnectivity::V1beta::GetStatusRequest, ::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_status(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse
Pass arguments to get_status 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 the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::GetStatusRequest.new

# Call the get_status method.
result = client.get_status request

# The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse.
p result

#get_transport

def get_transport(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::Transport
def get_transport(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::Transport

Gets details of a single Transport.

Overloads
def get_transport(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::Transport
Pass arguments to get_transport via a request object, either of type GetTransportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkConnectivity::V1beta::GetTransportRequest, ::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_transport(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::Transport
Pass arguments to get_transport 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 the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::GetTransportRequest.new

# Call the get_transport method.
result = client.get_transport request

# The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::Transport.
p result

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

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

Returns
  • (Google::Iam::V1::IAMPolicy::Client)

#initialize

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

Create a new TransportManager client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new do |config|
  config.timeout = 10.0
end

#list_remote_transport_profiles

def list_remote_transport_profiles(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>
def list_remote_transport_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>

Lists RemoteTransportProfiles in a given project and location.

Overloads
def list_remote_transport_profiles(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>
Pass arguments to list_remote_transport_profiles via a request object, either of type ListRemoteTransportProfilesRequest or an equivalent Hash.
Parameters
def list_remote_transport_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>
Pass arguments to list_remote_transport_profiles 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. Parent value for ListRemoteTransportProfilesRequest.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) — Optional. Filtering results.
  • order_by (::String) — Optional. Hint for how to order the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::ListRemoteTransportProfilesRequest.new

# Call the list_remote_transport_profiles method.
result = client.list_remote_transport_profiles 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::NetworkConnectivity::V1beta::RemoteTransportProfile.
  p item
end

#list_transports

def list_transports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>
def list_transports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>

Lists Transports in a given project and location.

Overloads
def list_transports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>
Pass arguments to list_transports via a request object, either of type ListTransportsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkConnectivity::V1beta::ListTransportsRequest, ::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_transports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>
Pass arguments to list_transports 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. Parent value for ListTransportsRequest.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) — Optional. Filtering results.
  • order_by (::String) — Optional. Hint for how to order the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::ListTransportsRequest.new

# Call the list_transports method.
result = client.list_transports 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::NetworkConnectivity::V1beta::Transport.
  p item
end

#location_client

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

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

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

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_transport

def update_transport(request, options = nil) -> ::Gapic::Operation
def update_transport(update_mask: nil, transport: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Transport.

Overloads
def update_transport(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_transport via a request object, either of type UpdateTransportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkConnectivity::V1beta::UpdateTransportRequest, ::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 update_transport(update_mask: nil, transport: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_transport 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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the Transport resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.
  • transport (::Google::Cloud::NetworkConnectivity::V1beta::Transport, ::Hash) — Required. The resource being updated.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/network_connectivity/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkConnectivity::V1beta::UpdateTransportRequest.new

# Call the update_transport method.
result = client.update_transport 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