Reference documentation and code samples for the Billing V1 API class Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.
REST client for the CloudCatalog service.
A catalog of Google Cloud Platform services and SKUs. Provides pricing information and metadata on Google Cloud Platform services and SKUs.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the CloudCatalog Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CloudCatalog clients ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the CloudCatalog 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)
#initialize
def initialize() { |config| ... } -> Client
Create a new CloudCatalog REST client object.
- (config) — Configure the CloudCatalog client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| config.timeout = 10.0 end
#list_services
def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>
def list_services(page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>
Lists all public cloud services.
def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>
list_services
via a request object, either of type
ListServicesRequest or an equivalent Hash.
- request (::Google::Cloud::Billing::V1::ListServicesRequest, ::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_services(page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>
list_services
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).
- page_size (::Integer) — Requested page size. Defaults to 5000.
-
page_token (::String) — A token identifying a page of results to return. This should be a
next_page_token
value returned from a previousListServices
call. If unspecified, the first page of results is returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/billing/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Billing::V1::ListServicesRequest.new # Call the list_services method. result = client.list_services 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::Billing::V1::Service. p item end
#list_skus
def list_skus(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>
def list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>
Lists all publicly available SKUs for a given cloud service.
def list_skus(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>
list_skus
via a request object, either of type
ListSkusRequest or an equivalent Hash.
- request (::Google::Cloud::Billing::V1::ListSkusRequest, ::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_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>
list_skus
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 name of the service. Example: "services/6F81-5844-456A"
- start_time (::Google::Protobuf::Timestamp, ::Hash) — Optional inclusive start time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most).
- end_time (::Google::Protobuf::Timestamp, ::Hash) — Optional exclusive end time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most).
- currency_code (::String) — The ISO 4217 currency code for the pricing info in the response proto. Will use the conversion rate as of start_time. Optional. If not specified USD will be used.
- page_size (::Integer) — Requested page size. Defaults to 5000.
-
page_token (::String) — A token identifying a page of results to return. This should be a
next_page_token
value returned from a previousListSkus
call. If unspecified, the first page of results is returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/billing/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Billing::V1::ListSkusRequest.new # Call the list_skus method. result = client.list_skus 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::Billing::V1::Sku. p item end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)