Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::Client.
REST client for the ApiHubAddon service.
This service is used for managing addons inside the API Hub.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the ApiHubAddon Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ApiHubAddon clients ::Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the ApiHubAddon 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_addon
def get_addon(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Addon
def get_addon(name: nil) -> ::Google::Cloud::ApiHub::V1::AddonGet an addon.
def get_addon(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Addonget_addon via a request object, either of type
GetAddonRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetAddonRequest, ::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_addon(name: nil) -> ::Google::Cloud::ApiHub::V1::Addonget_addon 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 addon to get.
Format:
projects/{project}/locations/{location}/addons/{addon}.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::Addon)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::GetAddonRequest.new # Call the get_addon method. result = client.get_addon request # The returned object is of type Google::Cloud::ApiHub::V1::Addon. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new ApiHubAddon REST client object.
- (config) — Configure the ApiHubAddon client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::Client.new do |config| config.timeout = 10.0 end
#list_addons
def list_addons(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Addon>
def list_addons(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Addon>List addons.
def list_addons(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Addon>list_addons via a request object, either of type
ListAddonsRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ListAddonsRequest, ::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_addons(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Addon>list_addons 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 where this addon will be created.
Format:
projects/{project}/locations/{location}. -
filter (::String) — Optional. An expression that filters the list of addons.
The only supported filter is
plugin_instance_name. It can be used to filter addons that are enabled for a given plugin instance. The format of the filter isplugin_instance_name = "projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}". - page_size (::Integer) — Optional. The maximum number of hub addons to return. The service may return fewer than this value. If unspecified, at most 50 hub addons will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
ListAddonscall. Provide this to retrieve the subsequent page.When paginating, all other parameters (except page_size) provided to
ListAddonsmust match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Addon>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Addon>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::ListAddonsRequest.new # Call the list_addons method. result = client.list_addons 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::ApiHub::V1::Addon. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#manage_addon_config
def manage_addon_config(request, options = nil) -> ::Gapic::Operation
def manage_addon_config(name: nil, config: nil) -> ::Gapic::OperationManage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
def manage_addon_config(request, options = nil) -> ::Gapic::Operationmanage_addon_config via a request object, either of type
ManageAddonConfigRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ManageAddonConfigRequest, ::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 manage_addon_config(name: nil, config: nil) -> ::Gapic::Operationmanage_addon_config 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 addon for which the config is to be managed.
Format:
projects/{project}/locations/{location}/addons/{addon}. - config (::Google::Cloud::ApiHub::V1::AddonConfig, ::Hash) — Required. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::ManageAddonConfigRequest.new # Call the manage_addon_config method. result = client.manage_addon_config 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
#operations_client
def operations_client() -> ::Google::Cloud::ApiHub::V1::ApiHubAddon::Rest::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)