Reference documentation and code samples for the Network Connectivity V1 API class Google::Cloud::NetworkConnectivity::V1::HubService::Client.
Client for the HubService service.
Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the HubService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all HubService clients ::Google::Cloud::NetworkConnectivity::V1::HubService::Client.configure do |config| config.timeout = 10.0 end
#accept_hub_spoke
def accept_hub_spoke(request, options = nil) -> ::Gapic::Operation
def accept_hub_spoke(name: nil, spoke_uri: nil, request_id: nil) -> ::Gapic::Operation
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
def accept_hub_spoke(request, options = nil) -> ::Gapic::Operation
accept_hub_spoke
via a request object, either of type
AcceptHubSpokeRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::AcceptHubSpokeRequest, ::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 accept_hub_spoke(name: nil, spoke_uri: nil, request_id: nil) -> ::Gapic::Operation
accept_hub_spoke
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. The name of the hub into which to accept the spoke.
- spoke_uri (::String) — Required. The URI of the spoke to accept into the hub.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::AcceptHubSpokeRequest.new # Call the accept_hub_spoke method. result = client.accept_hub_spoke 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
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the HubService 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_hub
def create_hub(request, options = nil) -> ::Gapic::Operation
def create_hub(parent: nil, hub_id: nil, hub: nil, request_id: nil) -> ::Gapic::Operation
Creates a new Network Connectivity Center hub in the specified project.
def create_hub(request, options = nil) -> ::Gapic::Operation
create_hub
via a request object, either of type
CreateHubRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::CreateHubRequest, ::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_hub(parent: nil, hub_id: nil, hub: nil, request_id: nil) -> ::Gapic::Operation
create_hub
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 parent resource.
- hub_id (::String) — Required. A unique identifier for the hub.
- hub (::Google::Cloud::NetworkConnectivity::V1::Hub, ::Hash) — Required. The initial values for a new hub.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::CreateHubRequest.new # Call the create_hub method. result = client.create_hub 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
#create_spoke
def create_spoke(request, options = nil) -> ::Gapic::Operation
def create_spoke(parent: nil, spoke_id: nil, spoke: nil, request_id: nil) -> ::Gapic::Operation
Creates a Network Connectivity Center spoke.
def create_spoke(request, options = nil) -> ::Gapic::Operation
create_spoke
via a request object, either of type
CreateSpokeRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::CreateSpokeRequest, ::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_spoke(parent: nil, spoke_id: nil, spoke: nil, request_id: nil) -> ::Gapic::Operation
create_spoke
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 parent resource.
- spoke_id (::String) — Required. Unique id for the spoke to create.
- spoke (::Google::Cloud::NetworkConnectivity::V1::Spoke, ::Hash) — Required. The initial values for a new spoke.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::CreateSpokeRequest.new # Call the create_spoke method. result = client.create_spoke 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_hub
def delete_hub(request, options = nil) -> ::Gapic::Operation
def delete_hub(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a Network Connectivity Center hub.
def delete_hub(request, options = nil) -> ::Gapic::Operation
delete_hub
via a request object, either of type
DeleteHubRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::DeleteHubRequest, ::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_hub(name: nil, request_id: nil) -> ::Gapic::Operation
delete_hub
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. The name of the hub to delete.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::DeleteHubRequest.new # Call the delete_hub method. result = client.delete_hub 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_spoke
def delete_spoke(request, options = nil) -> ::Gapic::Operation
def delete_spoke(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a Network Connectivity Center spoke.
def delete_spoke(request, options = nil) -> ::Gapic::Operation
delete_spoke
via a request object, either of type
DeleteSpokeRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::DeleteSpokeRequest, ::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_spoke(name: nil, request_id: nil) -> ::Gapic::Operation
delete_spoke
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. The name of the spoke to delete.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::DeleteSpokeRequest.new # Call the delete_spoke method. result = client.delete_spoke 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_group
def get_group(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Group
def get_group(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Group
Gets details about a Network Connectivity Center group.
def get_group(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Group
get_group
via a request object, either of type
GetGroupRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::GetGroupRequest, ::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_group(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Group
get_group
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. The name of the route table resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1::Group)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::GetGroupRequest.new # Call the get_group method. result = client.get_group request # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Group. p result
#get_hub
def get_hub(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Hub
def get_hub(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Hub
Gets details about a Network Connectivity Center hub.
def get_hub(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Hub
get_hub
via a request object, either of type
GetHubRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::GetHubRequest, ::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_hub(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Hub
get_hub
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. The name of the hub resource to get.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1::Hub)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::GetHubRequest.new # Call the get_hub method. result = client.get_hub request # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Hub. p result
#get_route
def get_route(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Route
def get_route(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Route
Gets details about the specified route.
def get_route(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Route
get_route
via a request object, either of type
GetRouteRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::GetRouteRequest, ::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_route(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Route
get_route
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. The name of the route resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1::Route)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::GetRouteRequest.new # Call the get_route method. result = client.get_route request # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Route. p result
#get_route_table
def get_route_table(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::RouteTable
def get_route_table(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::RouteTable
Gets details about a Network Connectivity Center route table.
def get_route_table(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::RouteTable
get_route_table
via a request object, either of type
GetRouteTableRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::GetRouteTableRequest, ::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_route_table(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::RouteTable
get_route_table
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. The name of the route table resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1::RouteTable)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::GetRouteTableRequest.new # Call the get_route_table method. result = client.get_route_table request # The returned object is of type Google::Cloud::NetworkConnectivity::V1::RouteTable. p result
#get_spoke
def get_spoke(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Spoke
def get_spoke(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Spoke
Gets details about a Network Connectivity Center spoke.
def get_spoke(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::Spoke
get_spoke
via a request object, either of type
GetSpokeRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::GetSpokeRequest, ::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_spoke(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::Spoke
get_spoke
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. The name of the spoke resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkConnectivity::V1::Spoke)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::GetSpokeRequest.new # Call the get_spoke method. result = client.get_spoke request # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Spoke. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new HubService client object.
- (config) — Configure the HubService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::NetworkConnectivity::V1::HubService::Client.new do |config| config.timeout = 10.0 end
#list_groups
def list_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>
def list_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>
Lists groups in a given hub.
def list_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>
list_groups
via a request object, either of type
ListGroupsRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::ListGroupsRequest, ::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_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>
list_groups
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 parent resource's name.
- page_size (::Integer) — The maximum number of results to return per page.
- page_token (::String) — The page token.
- filter (::String) — An expression that filters the list of results.
- order_by (::String) — Sort the results by a certain order.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::ListGroupsRequest.new # Call the list_groups method. result = client.list_groups 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::V1::Group. p item end
#list_hub_spokes
def list_hub_spokes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
def list_hub_spokes(name: nil, spoke_locations: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.
def list_hub_spokes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
list_hub_spokes
via a request object, either of type
ListHubSpokesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest, ::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_hub_spokes(name: nil, spoke_locations: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
list_hub_spokes
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. The name of the hub.
-
spoke_locations (::Array<::String>) — A list of locations.
Specify one of the following:
[global]
, a single region (for example,[us-central1]
), or a combination of values (for example,[global, us-central1, us-west1]
). If the spoke_locations field is populated, the list of results includes only spokes in the specified location. If the spoke_locations field is not populated, the list of results includes spokes in all locations. - page_size (::Integer) — The maximum number of results to return per page.
- page_token (::String) — The page token.
- filter (::String) — An expression that filters the list of results.
- order_by (::String) — Sort the results by name or create_time.
- view (::Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest::SpokeView) — The view of the spoke to return. The view that you use determines which spoke fields are included in the response.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest.new # Call the list_hub_spokes method. result = client.list_hub_spokes 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::V1::Spoke. p item end
#list_hubs
def list_hubs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Hub>
def list_hubs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Hub>
Lists the Network Connectivity Center hubs associated with a given project.
def list_hubs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Hub>
list_hubs
via a request object, either of type
ListHubsRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::ListHubsRequest, ::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_hubs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Hub>
list_hubs
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 parent resource's name.
- page_size (::Integer) — The maximum number of results per page to return.
- page_token (::String) — The page token.
- filter (::String) — An expression that filters the list of results.
- order_by (::String) — Sort the results by a certain order.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Hub>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Hub>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::ListHubsRequest.new # Call the list_hubs method. result = client.list_hubs 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::V1::Hub. p item end
#list_route_tables
def list_route_tables(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>
def list_route_tables(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>
Lists route tables in a given project.
def list_route_tables(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>
list_route_tables
via a request object, either of type
ListRouteTablesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::ListRouteTablesRequest, ::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_route_tables(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>
list_route_tables
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 parent resource's name.
- page_size (::Integer) — The maximum number of results to return per page.
- page_token (::String) — The page token.
- filter (::String) — An expression that filters the list of results.
- order_by (::String) — Sort the results by a certain order.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::ListRouteTablesRequest.new # Call the list_route_tables method. result = client.list_route_tables 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::V1::RouteTable. p item end
#list_routes
def list_routes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>
def list_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>
Lists routes in a given project.
def list_routes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>
list_routes
via a request object, either of type
ListRoutesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::ListRoutesRequest, ::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_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>
list_routes
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 parent resource's name.
- page_size (::Integer) — The maximum number of results to return per page.
- page_token (::String) — The page token.
- filter (::String) — An expression that filters the list of results.
- order_by (::String) — Sort the results by a certain order.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::ListRoutesRequest.new # Call the list_routes method. result = client.list_routes 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::V1::Route. p item end
#list_spokes
def list_spokes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
def list_spokes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
Lists the Network Connectivity Center spokes in a specified project and location.
def list_spokes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
list_spokes
via a request object, either of type
ListSpokesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::ListSpokesRequest, ::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_spokes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>
list_spokes
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 parent resource.
- page_size (::Integer) — The maximum number of results to return per page.
- page_token (::String) — The page token.
- filter (::String) — An expression that filters the list of results.
- order_by (::String) — Sort the results by a certain order.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_connectivity/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::ListSpokesRequest.new # Call the list_spokes method. result = client.list_spokes 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::V1::Spoke. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#operations_client
def operations_client() -> ::Google::Cloud::NetworkConnectivity::V1::HubService::Operations
Get the associated client for long-running operations.
#reject_hub_spoke
def reject_hub_spoke(request, options = nil) -> ::Gapic::Operation
def reject_hub_spoke(name: nil, spoke_uri: nil, request_id: nil, details: nil) -> ::Gapic::Operation
Rejects a Network Connectivity Center spoke from being attached to a hub.
If the spoke was previously in the ACTIVE
state, it
transitions to the INACTIVE
state and is no longer able to
connect to other spokes that are attached to the hub.
def reject_hub_spoke(request, options = nil) -> ::Gapic::Operation
reject_hub_spoke
via a request object, either of type
RejectHubSpokeRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::RejectHubSpokeRequest, ::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 reject_hub_spoke(name: nil, spoke_uri: nil, request_id: nil, details: nil) -> ::Gapic::Operation
reject_hub_spoke
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. The name of the hub from which to reject the spoke.
- spoke_uri (::String) — Required. The URI of the spoke to reject from the hub.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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).
- details (::String) — Optional. Additional information provided by the hub administrator.
- (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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::RejectHubSpokeRequest.new # Call the reject_hub_spoke method. result = client.reject_hub_spoke 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
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_hub
def update_hub(request, options = nil) -> ::Gapic::Operation
def update_hub(update_mask: nil, hub: nil, request_id: nil) -> ::Gapic::Operation
Updates the description and/or labels of a Network Connectivity Center hub.
def update_hub(request, options = nil) -> ::Gapic::Operation
update_hub
via a request object, either of type
UpdateHubRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::UpdateHubRequest, ::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_hub(update_mask: nil, hub: nil, request_id: nil) -> ::Gapic::Operation
update_hub
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. In the case of an update to an existing hub, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.
- hub (::Google::Cloud::NetworkConnectivity::V1::Hub, ::Hash) — Required. The state that the hub should be in after the update.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::UpdateHubRequest.new # Call the update_hub method. result = client.update_hub 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
#update_spoke
def update_spoke(request, options = nil) -> ::Gapic::Operation
def update_spoke(update_mask: nil, spoke: nil, request_id: nil) -> ::Gapic::Operation
Updates the parameters of a Network Connectivity Center spoke.
def update_spoke(request, options = nil) -> ::Gapic::Operation
update_spoke
via a request object, either of type
UpdateSpokeRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkConnectivity::V1::UpdateSpokeRequest, ::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_spoke(update_mask: nil, spoke: nil, request_id: nil) -> ::Gapic::Operation
update_spoke
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. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.
- spoke (::Google::Cloud::NetworkConnectivity::V1::Spoke, ::Hash) — Required. The state that the spoke should be in after the update.
-
request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so
that if you must retry your request, the server knows to ignore the request
if it has already been completed. The server guarantees that a request
doesn't result in creation of duplicate commitments for at least 60
minutes.
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 to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkConnectivity::V1::UpdateSpokeRequest.new # Call the update_spoke method. result = client.update_spoke 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