Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::ApiHubPlugin::Rest::Client.
REST client for the ApiHubPlugin service.
This service is used for managing plugins inside the API Hub.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ApiHubPlugin Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ApiHubPlugin clients ::Google::Cloud::ApiHub::V1::ApiHubPlugin::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ApiHubPlugin 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)
#disable_plugin
def disable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def disable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Disables a plugin.
The state
of the plugin after disabling is DISABLED
def disable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
disable_plugin
via a request object, either of type
DisablePluginRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::DisablePluginRequest, ::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 disable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
disable_plugin
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 plugin to disable.
Format:
projects/{project}/locations/{location}/plugins/{plugin}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::Plugin)
- 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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::DisablePluginRequest.new # Call the disable_plugin method. result = client.disable_plugin request # The returned object is of type Google::Cloud::ApiHub::V1::Plugin. p result
#enable_plugin
def enable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def enable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Enables a plugin.
The state
of the plugin after enabling is ENABLED
def enable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
enable_plugin
via a request object, either of type
EnablePluginRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::EnablePluginRequest, ::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 enable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
enable_plugin
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 plugin to enable.
Format:
projects/{project}/locations/{location}/plugins/{plugin}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::Plugin)
- 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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::EnablePluginRequest.new # Call the enable_plugin method. result = client.enable_plugin request # The returned object is of type Google::Cloud::ApiHub::V1::Plugin. p result
#get_plugin
def get_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def get_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Get details about an API Hub plugin.
def get_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
get_plugin
via a request object, either of type
GetPluginRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetPluginRequest, ::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_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
get_plugin
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 plugin to retrieve.
Format:
projects/{project}/locations/{location}/plugins/{plugin}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::Plugin)
- 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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::GetPluginRequest.new # Call the get_plugin method. result = client.get_plugin request # The returned object is of type Google::Cloud::ApiHub::V1::Plugin. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new ApiHubPlugin REST client object.
- (config) — Configure the ApiHubPlugin client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ApiHub::V1::ApiHubPlugin::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ApiHub::V1::ApiHubPlugin::Rest::Client.new do |config| config.timeout = 10.0 end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)