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::ConfigurationConfigure the CloudLocationFinder Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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::CloudLocationRetrieves a resource containing information about a cloud location.
def get_cloud_location(request, options = nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocationget_cloud_location via a request object, either of type
GetCloudLocationRequest or an equivalent Hash.
- 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::CloudLocationget_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).
- name (::String) — Required. Name of the resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::LocationFinder::V1::CloudLocation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::LocationFinder::V1::CloudLocation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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| ... } -> ClientCreate a new CloudLocationFinder client object.
- (config) — Configure the CloudLocationFinder client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_cloud_locations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>list_cloud_locations via a request object, either of type
ListCloudLocationsRequest or an equivalent Hash.
- 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>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).
- 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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)
#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.
def search_cloud_locations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>search_cloud_locations via a request object, either of type
SearchCloudLocationsRequest or an equivalent Hash.
- 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>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).
- 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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() -> StringThe effective universe domain
- (String)