Cloud Location Finder V1 API - Class Google::Cloud::LocationFinder::V1::CloudLocationFinder::Client (v0.1.1)

Reference documentation and code samples for the Cloud Location Finder V1 API class Google::Cloud::LocationFinder::V1::CloudLocationFinder::Client.

Client for the CloudLocationFinder service.

Service describing handlers for resources

Inherits

  • Object

Methods

.configure

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

Configure the CloudLocationFinder 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 CloudLocationFinder clients
::Google::Cloud::LocationFinder::V1::CloudLocationFinder::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the CloudLocationFinder 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

#get_cloud_location

def get_cloud_location(request, options = nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation
def get_cloud_location(name: nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation

Retrieves a resource containing information about a cloud location.

Overloads
def get_cloud_location(request, options = nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation
Pass arguments to get_cloud_location via a request object, either of type GetCloudLocationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::LocationFinder::V1::GetCloudLocationRequest, ::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_cloud_location(name: nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation
Pass arguments to get_cloud_location 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
  • response (::Google::Cloud::LocationFinder::V1::CloudLocation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Google::Cloud::LocationFinder::V1::CloudLocation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/location_finder/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::LocationFinder::V1::CloudLocationFinder::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::LocationFinder::V1::GetCloudLocationRequest.new

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

# The returned object is of type Google::Cloud::LocationFinder::V1::CloudLocation.
p result

#initialize

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

Create a new CloudLocationFinder client object.

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

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

#list_cloud_locations

def list_cloud_locations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
def list_cloud_locations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Lists cloud locations under a given project and location.

Overloads
def list_cloud_locations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
Pass arguments to list_cloud_locations via a request object, either of type ListCloudLocationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::LocationFinder::V1::ListCloudLocationsRequest, ::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_cloud_locations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
Pass arguments to list_cloud_locations via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent, which owns this collection of cloud locations. Format: projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of cloud locations to return per page. The service might return fewer cloud locations than this value. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return. Provide page token returned by a previous 'ListCloudLocations' call to retrieve the next page of results. When paginating, all other parameters provided to 'ListCloudLocations' must match the call that provided the page token.
  • filter (::String) — Optional. A filter expression that filters resources listed in the response. The expression is in the form of field=value. For example, 'cloud_location_type=CLOUD_LOCATION_TYPE_REGION'. Multiple filter queries are space-separated. For example, 'cloud_location_type=CLOUD_LOCATION_TYPE_REGION territory_code="US"' By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/location_finder/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::LocationFinder::V1::CloudLocationFinder::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::LocationFinder::V1::ListCloudLocationsRequest.new

# Call the list_cloud_locations method.
result = client.list_cloud_locations 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::LocationFinder::V1::CloudLocation.
  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)

#search_cloud_locations

def search_cloud_locations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
def search_cloud_locations(parent: nil, source_cloud_location: nil, page_size: nil, page_token: nil, query: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Searches for cloud locations from a given source location.

Overloads
def search_cloud_locations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
Pass arguments to search_cloud_locations via a request object, either of type SearchCloudLocationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::LocationFinder::V1::SearchCloudLocationsRequest, ::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 search_cloud_locations(parent: nil, source_cloud_location: nil, page_size: nil, page_token: nil, query: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
Pass arguments to search_cloud_locations via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent, which owns this collection of cloud locations. Format: projects/{project}/locations/{location}
  • source_cloud_location (::String) — Required. The source cloud location to search from. Example search can be searching nearby cloud locations from the source cloud location by latency.
  • page_size (::Integer) — Optional. The maximum number of cloud locations to return. The service might return fewer cloud locations than this value. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return. Provide Page token returned by a previous 'ListCloudLocations' call to retrieve the next page of results. When paginating, all other parameters provided to 'ListCloudLocations' must match the call that provided the page token.
  • query (::String) — Optional. The query string in search query syntax. While filter is used to filter the search results by attributes, query is used to specify the search requirements.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/location_finder/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::LocationFinder::V1::CloudLocationFinder::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::LocationFinder::V1::SearchCloudLocationsRequest.new

# Call the search_cloud_locations method.
result = client.search_cloud_locations 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::LocationFinder::V1::CloudLocation.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)