pub struct ApiHubPlugin { /* private fields */ }Expand description
Implements a client for the API hub API.
§Example
let client = ApiHubPlugin::builder().build().await?;
// use `client` to make requests to the API hub API.§Service Description
This service is used for managing plugins inside the API Hub.
§Configuration
To configure ApiHubPlugin use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://apihub.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
ApiHubPlugin holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap ApiHubPlugin in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl ApiHubPlugin
impl ApiHubPlugin
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for ApiHubPlugin.
let client = ApiHubPlugin::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: ApiHubPlugin + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: ApiHubPlugin + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn get_plugin(&self) -> GetPlugin
pub fn get_plugin(&self) -> GetPlugin
Get an API Hub plugin.
Sourcepub fn enable_plugin(&self) -> EnablePlugin
pub fn enable_plugin(&self) -> EnablePlugin
Enables a plugin.
The state of the plugin after enabling is ENABLED
Sourcepub fn disable_plugin(&self) -> DisablePlugin
pub fn disable_plugin(&self) -> DisablePlugin
Disables a plugin.
The state of the plugin after disabling is DISABLED
Sourcepub fn create_plugin(&self) -> CreatePlugin
pub fn create_plugin(&self) -> CreatePlugin
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.
Sourcepub fn list_plugins(&self) -> ListPlugins
pub fn list_plugins(&self) -> ListPlugins
List all the plugins in a given project and location.
Sourcepub fn delete_plugin(&self) -> DeletePlugin
pub fn delete_plugin(&self) -> DeletePlugin
Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn create_plugin_instance(&self) -> CreatePluginInstance
pub fn create_plugin_instance(&self) -> CreatePluginInstance
Creates a Plugin instance in the API hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn execute_plugin_instance_action(&self) -> ExecutePluginInstanceAction
pub fn execute_plugin_instance_action(&self) -> ExecutePluginInstanceAction
Executes a plugin instance in the API hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_plugin_instance(&self) -> GetPluginInstance
pub fn get_plugin_instance(&self) -> GetPluginInstance
Get an API Hub plugin instance.
Sourcepub fn list_plugin_instances(&self) -> ListPluginInstances
pub fn list_plugin_instances(&self) -> ListPluginInstances
List all the plugins in a given project and location.
- can be used as wildcard value for {plugin_id}
Sourcepub fn enable_plugin_instance_action(&self) -> EnablePluginInstanceAction
pub fn enable_plugin_instance_action(&self) -> EnablePluginInstanceAction
Enables a plugin instance in the API hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn disable_plugin_instance_action(&self) -> DisablePluginInstanceAction
pub fn disable_plugin_instance_action(&self) -> DisablePluginInstanceAction
Disables a plugin instance in the API hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_plugin_instance(&self) -> UpdatePluginInstance
pub fn update_plugin_instance(&self) -> UpdatePluginInstance
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.
Sourcepub fn delete_plugin_instance(&self) -> DeletePluginInstance
pub fn delete_plugin_instance(&self) -> DeletePluginInstance
Deletes a plugin instance in the API hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for ApiHubPlugin
impl Clone for ApiHubPlugin
Source§fn clone(&self) -> ApiHubPlugin
fn clone(&self) -> ApiHubPlugin
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more