plugins
Creates, updates, deletes, gets or lists a plugins
resource.
Overview
Name | plugins |
Type | Resource |
Id | google.apihub.plugins |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the plugin. Format: projects/{project}/locations/{location}/plugins/{plugin} |
actionsConfig | array | Required. The configuration of actions supported by the plugin. |
configTemplate | object | Optional. The configuration template for the plugin. (id: GoogleCloudApihubV1ConfigTemplate) |
createTime | string (google-datetime) | Output only. Timestamp indicating when the plugin was created. |
description | string | Optional. The plugin description. Max length is 2000 characters (Unicode code points). |
displayName | string | Required. The display name of the plugin. Max length is 50 characters (Unicode code points). |
documentation | object | Optional. The documentation of the plugin, that explains how to set up and use the plugin. (id: GoogleCloudApihubV1Documentation) |
gatewayType | string | Optional. The type of the gateway. |
hostingService | object | Optional. 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) |
ownershipType | string | Output only. The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or 'USER_OWNED'. |
pluginCategory | string | Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins. |
state | string | Output 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. |
type | object | Optional. 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) |
updateTime | string (google-datetime) | Output only. Timestamp indicating when the plugin was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the plugin. Format: projects/{project}/locations/{location}/plugins/{plugin} |
actionsConfig | array | Required. The configuration of actions supported by the plugin. |
configTemplate | object | Optional. The configuration template for the plugin. (id: GoogleCloudApihubV1ConfigTemplate) |
createTime | string (google-datetime) | Output only. Timestamp indicating when the plugin was created. |
description | string | Optional. The plugin description. Max length is 2000 characters (Unicode code points). |
displayName | string | Required. The display name of the plugin. Max length is 50 characters (Unicode code points). |
documentation | object | Optional. The documentation of the plugin, that explains how to set up and use the plugin. (id: GoogleCloudApihubV1Documentation) |
gatewayType | string | Optional. The type of the gateway. |
hostingService | object | Optional. 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) |
ownershipType | string | Output only. The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or 'USER_OWNED'. |
pluginCategory | string | Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins. |
state | string | Output 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. |
type | object | Optional. 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) |
updateTime | string (google-datetime) | Output only. Timestamp indicating when the plugin was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , pluginsId | Get an API Hub plugin. | |
list | select | projectsId , locationsId | filter , pageSize , pageToken | List all the plugins in a given project and location. |
create | insert | projectsId , locationsId | pluginId | Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances. |
delete | delete | projectsId , locationsId , pluginsId | Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. | |
enable | exec | projectsId , locationsId , pluginsId | Enables a plugin. The state of the plugin after enabling is ENABLED | |
disable | exec | projectsId , locationsId , pluginsId | Disables 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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
pluginsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
pluginId | string |
SELECT
examples
- get
- list
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;
List all the plugins in a given project and location.
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 filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: plugins
props:
- name: projectsId
value: string
description: Required parameter for the plugins resource.
- name: locationsId
value: string
description: Required parameter for the plugins resource.
- name: name
value: string
description: >
Identifier. The name of the plugin. Format: `projects/{project}/locations/{location}/plugins/{plugin}`
- name: displayName
value: string
description: >
Required. The display name of the plugin. Max length is 50 characters (Unicode code points).
- name: type
value: object
description: >
Optional. 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.
- name: description
value: string
description: >
Optional. The plugin description. Max length is 2000 characters (Unicode code points).
- name: hostingService
value: object
description: >
Optional. 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.
- name: actionsConfig
value: array
description: >
Required. The configuration of actions supported by the plugin.
- name: documentation
value: object
description: >
Optional. The documentation of the plugin, that explains how to set up and use the plugin.
- name: pluginCategory
value: string
description: >
Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins.
valid_values: ['PLUGIN_CATEGORY_UNSPECIFIED', 'API_GATEWAY', 'API_PRODUCER']
- name: configTemplate
value: object
description: >
Optional. The configuration template for the plugin.
- name: gatewayType
value: string
description: >
Optional. The type of the gateway.
valid_values: ['GATEWAY_TYPE_UNSPECIFIED', 'APIGEE_X_AND_HYBRID', 'APIGEE_EDGE_PUBLIC_CLOUD', 'APIGEE_EDGE_PRIVATE_CLOUD', 'CLOUD_API_GATEWAY', 'CLOUD_ENDPOINTS', 'API_DISCOVERY', 'OTHERS']
- name: pluginId
value: string
DELETE
examples
- delete
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
- enable
- disable
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;
Disables a plugin. The state
of the plugin after disabling is DISABLED
EXEC google.apihub.plugins.disable
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pluginsId='{{ pluginsId }}' --required;