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)
#create_plugin
def create_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def create_plugin(parent: nil, plugin_id: nil, plugin: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.
def create_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
create_plugin
via a request object, either of type
CreatePluginRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::CreatePluginRequest, ::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 create_plugin(parent: nil, plugin_id: nil, plugin: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
create_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).
-
parent (::String) — Required. The parent resource where this plugin will be created.
Format:
projects/{project}/locations/{location}
. -
plugin_id (::String) — Optional. The ID to use for the Plugin resource, which will become the
final component of the Plugin's resource name. This field is optional.
- If provided, the same will be used. The service will throw an error if the specified id is already used by another Plugin resource in the API hub instance.
- If not provided, a system generated id will be used.
This value should be 4-63 characters, overall resource name which will be of format
projects/{project}/locations/{location}/plugins/{plugin}
, its length is limited to 1000 characters and valid characters are /[a-z][A-Z][0-9]-_/. - plugin (::Google::Cloud::ApiHub::V1::Plugin, ::Hash) — Required. The plugin to create.
- (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::CreatePluginRequest.new # Call the create_plugin method. result = client.create_plugin request # The returned object is of type Google::Cloud::ApiHub::V1::Plugin. p result
#create_plugin_instance
def create_plugin_instance(request, options = nil) -> ::Gapic::Operation
def create_plugin_instance(parent: nil, plugin_instance_id: nil, plugin_instance: nil) -> ::Gapic::Operation
Creates a Plugin instance in the API hub.
def create_plugin_instance(request, options = nil) -> ::Gapic::Operation
create_plugin_instance
via a request object, either of type
CreatePluginInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::CreatePluginInstanceRequest, ::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 create_plugin_instance(parent: nil, plugin_instance_id: nil, plugin_instance: nil) -> ::Gapic::Operation
create_plugin_instance
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 of the plugin instance resource.
Format:
projects/{project}/locations/{location}/plugins/{plugin}
-
plugin_instance_id (::String) — Optional. The ID to use for the plugin instance, which will become the
final component of the plugin instance's resource name. This field is
optional.
- If provided, the same will be used. The service will throw an error if the specified id is already used by another plugin instance in the plugin resource.
- If not provided, a system generated id will be used.
This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
- plugin_instance (::Google::Cloud::ApiHub::V1::PluginInstance, ::Hash) — Required. The plugin instance to create.
- (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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::CreatePluginInstanceRequest.new # Call the create_plugin_instance method. result = client.create_plugin_instance 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
#delete_plugin
def delete_plugin(request, options = nil) -> ::Gapic::Operation
def delete_plugin(name: nil) -> ::Gapic::Operation
Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.
def delete_plugin(request, options = nil) -> ::Gapic::Operation
delete_plugin
via a request object, either of type
DeletePluginRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::DeletePluginRequest, ::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 delete_plugin(name: nil) -> ::Gapic::Operation
delete_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 resource to delete.
Format:
projects/{project}/locations/{location}/plugins/{plugin}
- (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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::DeletePluginRequest.new # Call the delete_plugin method. result = client.delete_plugin 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
#delete_plugin_instance
def delete_plugin_instance(request, options = nil) -> ::Gapic::Operation
def delete_plugin_instance(name: nil) -> ::Gapic::Operation
Deletes a plugin instance in the API hub.
def delete_plugin_instance(request, options = nil) -> ::Gapic::Operation
delete_plugin_instance
via a request object, either of type
DeletePluginInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::DeletePluginInstanceRequest, ::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 delete_plugin_instance(name: nil) -> ::Gapic::Operation
delete_plugin_instance
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 instance to delete.
Format:
projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
.
- (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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::DeletePluginInstanceRequest.new # Call the delete_plugin_instance method. result = client.delete_plugin_instance 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
#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
#disable_plugin_instance_action
def disable_plugin_instance_action(request, options = nil) -> ::Gapic::Operation
def disable_plugin_instance_action(name: nil, action_id: nil) -> ::Gapic::Operation
Disables a plugin instance in the API hub.
def disable_plugin_instance_action(request, options = nil) -> ::Gapic::Operation
disable_plugin_instance_action
via a request object, either of type
DisablePluginInstanceActionRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::DisablePluginInstanceActionRequest, ::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_instance_action(name: nil, action_id: nil) -> ::Gapic::Operation
disable_plugin_instance_action
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 instance to disable.
Format:
projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
- action_id (::String) — Required. The action id to disable.
- (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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::DisablePluginInstanceActionRequest.new # Call the disable_plugin_instance_action method. result = client.disable_plugin_instance_action 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
#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
#enable_plugin_instance_action
def enable_plugin_instance_action(request, options = nil) -> ::Gapic::Operation
def enable_plugin_instance_action(name: nil, action_id: nil) -> ::Gapic::Operation
Enables a plugin instance in the API hub.
def enable_plugin_instance_action(request, options = nil) -> ::Gapic::Operation
enable_plugin_instance_action
via a request object, either of type
EnablePluginInstanceActionRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::EnablePluginInstanceActionRequest, ::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_instance_action(name: nil, action_id: nil) -> ::Gapic::Operation
enable_plugin_instance_action
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 instance to enable.
Format:
projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
- action_id (::String) — Required. The action id to enable.
- (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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::EnablePluginInstanceActionRequest.new # Call the enable_plugin_instance_action method. result = client.enable_plugin_instance_action 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
#execute_plugin_instance_action
def execute_plugin_instance_action(request, options = nil) -> ::Gapic::Operation
def execute_plugin_instance_action(name: nil, action_execution_detail: nil) -> ::Gapic::Operation
Executes a plugin instance in the API hub.
def execute_plugin_instance_action(request, options = nil) -> ::Gapic::Operation
execute_plugin_instance_action
via a request object, either of type
ExecutePluginInstanceActionRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ExecutePluginInstanceActionRequest, ::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 execute_plugin_instance_action(name: nil, action_execution_detail: nil) -> ::Gapic::Operation
execute_plugin_instance_action
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 instance to execute.
Format:
projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
- action_execution_detail (::Google::Cloud::ApiHub::V1::ActionExecutionDetail, ::Hash) — Required. The execution details for the action to execute.
- (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::ApiHubPlugin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::ExecutePluginInstanceActionRequest.new # Call the execute_plugin_instance_action method. result = client.execute_plugin_instance_action 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
#get_plugin
def get_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def get_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Get 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
#get_plugin_instance
def get_plugin_instance(request, options = nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
def get_plugin_instance(name: nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
Get an API Hub plugin instance.
def get_plugin_instance(request, options = nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
get_plugin_instance
via a request object, either of type
GetPluginInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetPluginInstanceRequest, ::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_instance(name: nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
get_plugin_instance
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 instance to retrieve.
Format:
projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::PluginInstance)
- 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::GetPluginInstanceRequest.new # Call the get_plugin_instance method. result = client.get_plugin_instance request # The returned object is of type Google::Cloud::ApiHub::V1::PluginInstance. 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
#list_plugin_instances
def list_plugin_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::PluginInstance>
def list_plugin_instances(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::PluginInstance>
List all the plugins in a given project and location.
-
can be used as wildcard value for {plugin_id}
def list_plugin_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::PluginInstance>
list_plugin_instances
via a request object, either of type
ListPluginInstancesRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ListPluginInstancesRequest, ::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_plugin_instances(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::PluginInstance>
list_plugin_instances
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 plugin will be created.
Format:
projects/{project}/locations/{location}/plugins/{plugin}
. To list plugin instances for multiple plugins, use the - character instead of the plugin ID. -
filter (::String) —
Optional. An expression that filters the list of plugin instances.
A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. The comparison operator must be one of:
<
,>
or=
. Filters are not case sensitive.The following fields in the
PluginInstances
are eligible for filtering:state
- The state of the Plugin Instance. Allowed comparison operators:=
.
A filter function is also supported in the filter string. The filter function is
id(name)
. Theid(name)
function returns the id of the resource name. For example,id(name) = \"plugin-instance-1\"
is equivalent toname = \"projects/test-project-id/locations/test-location-id/plugins/plugin-1/instances/plugin-instance-1\"
provided the parent isprojects/test-project-id/locations/test-location-id/plugins/plugin-1
.Expressions are combined with either
AND
logic operator orOR
logical operator but not both of them together i.e. only one of theAND
orOR
operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that thenINVALID_ARGUMENT
error is returned by the API. Here are a few examples:state = ENABLED
- The plugin instance is in enabled state.
- page_size (::Integer) — Optional. The maximum number of hub plugins to return. The service may return fewer than this value. If unspecified, at most 50 hub plugins 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
ListPluginInstances
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListPluginInstances
must 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::PluginInstance>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::PluginInstance>)
- (::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::ListPluginInstancesRequest.new # Call the list_plugin_instances method. result = client.list_plugin_instances 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::PluginInstance. p item end
#list_plugins
def list_plugins(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Plugin>
def list_plugins(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Plugin>
List all the plugins in a given project and location.
def list_plugins(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Plugin>
list_plugins
via a request object, either of type
ListPluginsRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ListPluginsRequest, ::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_plugins(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Plugin>
list_plugins
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 plugin will be created.
Format:
projects/{project}/locations/{location}
. -
filter (::String) —
Optional. An expression that filters the list of plugins.
A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. The comparison operator must be one of:
<
,>
or=
. Filters are not case sensitive.The following fields in the
Plugins
are eligible for filtering:plugin_category
- The category of the Plugin. Allowed comparison operators:=
.
Expressions are combined with either
AND
logic operator orOR
logical operator but not both of them together i.e. only one of theAND
orOR
operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that thenINVALID_ARGUMENT
error is returned by the API. Here are a few examples:plugin_category = ON_RAMP
- The plugin is of category on ramp.
- page_size (::Integer) — Optional. The maximum number of hub plugins to return. The service may return fewer than this value. If unspecified, at most 50 hub plugins 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
ListPlugins
call. Provide this to retrieve the subsequent page.When paginating, all other parameters (except page_size) provided to
ListPlugins
must 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::Plugin>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Plugin>)
- (::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::ListPluginsRequest.new # Call the list_plugins method. result = client.list_plugins 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::Plugin. p item 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)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::ApiHub::V1::ApiHubPlugin::Rest::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_plugin_instance
def update_plugin_instance(request, options = nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
def update_plugin_instance(plugin_instance: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
Updates a plugin instance in the API hub. The following fields in the plugin_instance can be updated currently:
- display_name
- [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression]
The update_mask should be used to specify the fields being updated.
To update the auth_config and additional_config of the plugin instance, use the [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] method.
def update_plugin_instance(request, options = nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
update_plugin_instance
via a request object, either of type
UpdatePluginInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::UpdatePluginInstanceRequest, ::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 update_plugin_instance(plugin_instance: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::PluginInstance
update_plugin_instance
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).
- plugin_instance (::Google::Cloud::ApiHub::V1::PluginInstance, ::Hash) — Required. The plugin instance to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The list of fields to update.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::PluginInstance)
- 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::UpdatePluginInstanceRequest.new # Call the update_plugin_instance method. result = client.update_plugin_instance request # The returned object is of type Google::Cloud::ApiHub::V1::PluginInstance. p result