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::ConfigurationConfigure the TransportManager Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_transport
def create_transport(request, options = nil) -> ::Gapic::Operation
def create_transport(parent: nil, transport_id: nil, transport: nil, request_id: nil) -> ::Gapic::OperationCreates a new Transport in a given project and location.
def create_transport(request, options = nil) -> ::Gapic::Operationcreate_transport via a request object, either of type
CreateTransportRequest or an equivalent Hash.
- 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::Operationcreate_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).
- 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::OperationDeletes a single Transport.
def delete_transport(request, options = nil) -> ::Gapic::Operationdelete_transport via a request object, either of type
DeleteTransportRequest or an equivalent Hash.
- 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::Operationdelete_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).
- 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::RemoteTransportProfileGets details of a single RemoteTransportProfile.
def get_remote_transport_profile(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfileget_remote_transport_profile via a request object, either of type
GetRemoteTransportProfileRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1beta::GetRemoteTransportProfileRequest, ::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_remote_transport_profile(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfileget_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).
- name (::String) — Required. Name of the resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::GetStatusResponseGets the operational status of a single Transport.
def get_status(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponseget_status via a request object, either of type
GetStatusRequest or an equivalent Hash.
- 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::GetStatusResponseget_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).
- name (::String) — Required. Name of the resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::TransportGets details of a single Transport.
def get_transport(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1beta::Transportget_transport via a request object, either of type
GetTransportRequest or an equivalent Hash.
- 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::Transportget_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).
- name (::String) — Required. Name of the resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1beta::Transport)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::ClientGet the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> ClientCreate a new TransportManager client object.
- (config) — Configure the TransportManager client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_remote_transport_profiles(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>list_remote_transport_profiles via a request object, either of type
ListRemoteTransportProfilesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1beta::ListRemoteTransportProfilesRequest, ::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_remote_transport_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>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).
- 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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.
def list_transports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>list_transports via a request object, either of type
ListTransportsRequest or an equivalent Hash.
- 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>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).
- 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_transport
def update_transport(request, options = nil) -> ::Gapic::Operation
def update_transport(update_mask: nil, transport: nil, request_id: nil) -> ::Gapic::OperationUpdates the parameters of a single Transport.
def update_transport(request, options = nil) -> ::Gapic::Operationupdate_transport via a request object, either of type
UpdateTransportRequest or an equivalent Hash.
- 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::Operationupdate_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).
- 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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