Skip to main content

plugins

Creates, updates, deletes, gets or lists a plugins resource.

Overview

Nameplugins
TypeResource
Idgoogle.apihub.plugins

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the plugin. Format: projects/{project}/locations/{location}/plugins/{plugin}
actionsConfigarrayRequired. The configuration of actions supported by the plugin.
configTemplateobjectOptional. The configuration template for the plugin. (id: GoogleCloudApihubV1ConfigTemplate)
createTimestring (google-datetime)Output only. Timestamp indicating when the plugin was created.
descriptionstringOptional. The plugin description. Max length is 2000 characters (Unicode code points).
displayNamestringRequired. The display name of the plugin. Max length is 50 characters (Unicode code points).
documentationobjectOptional. The documentation of the plugin, that explains how to set up and use the plugin. (id: GoogleCloudApihubV1Documentation)
gatewayTypestringOptional. The type of the gateway.
hostingServiceobjectOptional. This field is optional. It is used to notify the plugin hosting service for any lifecycle changes of the plugin instance and trigger execution of plugin instance actions in case of API hub managed actions. This field should be provided if the plugin instance lifecycle of the developed plugin needs to be managed from API hub. Also, in this case the plugin hosting service interface needs to be implemented. This field should not be provided if the plugin wants to manage plugin instance lifecycle events outside of hub interface and use plugin framework for only registering of plugin and plugin instances to capture the source of data into hub. Note, in this case the plugin hosting service interface is not required to be implemented. Also, the plugin instance lifecycle actions will be disabled from API hub's UI. (id: GoogleCloudApihubV1HostingService)
ownershipTypestringOutput only. The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or 'USER_OWNED'.
pluginCategorystringOptional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins.
statestringOutput only. Represents the state of the plugin. Note this field will not be set for plugins developed via plugin framework as the state will be managed at plugin instance level.
typeobjectOptional. The type of the API. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-plugin-type attribute. The number of allowed values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute. Note this field is not required for plugins developed via plugin framework. (id: GoogleCloudApihubV1AttributeValues)
updateTimestring (google-datetime)Output only. Timestamp indicating when the plugin was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, pluginsIdGet an API Hub plugin.
listselectprojectsId, locationsIdfilter, pageSize, pageTokenList all the plugins in a given project and location.
createinsertprojectsId, locationsIdpluginIdCreate an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.
deletedeleteprojectsId, locationsId, pluginsIdDelete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.
enableexecprojectsId, locationsId, pluginsIdEnables a plugin. The state of the plugin after enabling is ENABLED
disableexecprojectsId, locationsId, pluginsIdDisables a plugin. The state of the plugin after disabling is DISABLED

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
pluginsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
pluginIdstring

SELECT examples

Get an API Hub plugin.

SELECT
name,
actionsConfig,
configTemplate,
createTime,
description,
displayName,
documentation,
gatewayType,
hostingService,
ownershipType,
pluginCategory,
state,
type,
updateTime
FROM google.apihub.plugins
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pluginsId = '{{ pluginsId }}' -- required;

INSERT examples

Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.

INSERT INTO google.apihub.plugins (
data__name,
data__displayName,
data__type,
data__description,
data__hostingService,
data__actionsConfig,
data__documentation,
data__pluginCategory,
data__configTemplate,
data__gatewayType,
projectsId,
locationsId,
pluginId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ type }}',
'{{ description }}',
'{{ hostingService }}',
'{{ actionsConfig }}',
'{{ documentation }}',
'{{ pluginCategory }}',
'{{ configTemplate }}',
'{{ gatewayType }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ pluginId }}'
RETURNING
name,
actionsConfig,
configTemplate,
createTime,
description,
displayName,
documentation,
gatewayType,
hostingService,
ownershipType,
pluginCategory,
state,
type,
updateTime
;

DELETE examples

Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.

DELETE FROM google.apihub.plugins
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND pluginsId = '{{ pluginsId }}' --required;

Lifecycle Methods

Enables a plugin. The state of the plugin after enabling is ENABLED

EXEC google.apihub.plugins.enable 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pluginsId='{{ pluginsId }}' --required;