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
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the plugin. Format: projects/{project}/locations/{location}/plugins/{plugin} |
actionsConfig | array | Optional. The configuration of actions supported by the plugin. REQUIRED: This field must be provided when creating or updating a Plugin. The server will reject requests if this field is missing. |
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. (GATEWAY_TYPE_UNSPECIFIED, APIGEE_X_AND_HYBRID, APIGEE_EDGE_PUBLIC_CLOUD, APIGEE_EDGE_PRIVATE_CLOUD, CLOUD_API_GATEWAY, CLOUD_ENDPOINTS, API_DISCOVERY, OTHERS, AWS_API_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'. (OWNERSHIP_TYPE_UNSPECIFIED, SYSTEM_OWNED, USER_OWNED) |
pluginCategory | string | Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins. (PLUGIN_CATEGORY_UNSPECIFIED, API_GATEWAY, API_PRODUCER) |
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. (STATE_UNSPECIFIED, ENABLED, DISABLED) |
type | object | The attribute values associated with resource. (id: GoogleCloudApihubV1AttributeValues) |
updateTime | string (google-datetime) | Output only. Timestamp indicating when the plugin was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the plugin. Format: projects/{project}/locations/{location}/plugins/{plugin} |
actionsConfig | array | Optional. The configuration of actions supported by the plugin. REQUIRED: This field must be provided when creating or updating a Plugin. The server will reject requests if this field is missing. |
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. (GATEWAY_TYPE_UNSPECIFIED, APIGEE_X_AND_HYBRID, APIGEE_EDGE_PUBLIC_CLOUD, APIGEE_EDGE_PRIVATE_CLOUD, CLOUD_API_GATEWAY, CLOUD_ENDPOINTS, API_DISCOVERY, OTHERS, AWS_API_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'. (OWNERSHIP_TYPE_UNSPECIFIED, SYSTEM_OWNED, USER_OWNED) |
pluginCategory | string | Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins. (PLUGIN_CATEGORY_UNSPECIFIED, API_GATEWAY, API_PRODUCER) |
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. (STATE_UNSPECIFIED, ENABLED, DISABLED) |
type | object | The attribute values associated with resource. (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__displayName,
data__hostingService,
data__actionsConfig,
data__type,
data__gatewayType,
data__pluginCategory,
data__name,
data__description,
data__configTemplate,
data__documentation,
projectsId,
locationsId,
pluginId
)
SELECT
'{{ displayName }}',
'{{ hostingService }}',
'{{ actionsConfig }}',
'{{ type }}',
'{{ gatewayType }}',
'{{ pluginCategory }}',
'{{ name }}',
'{{ description }}',
'{{ configTemplate }}',
'{{ documentation }}',
'{{ 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: "{{ projectsId }}"
description: Required parameter for the plugins resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the plugins resource.
- name: displayName
value: "{{ displayName }}"
description: |
Required. The display name of the plugin. Max length is 50 characters (Unicode code points).
- name: hostingService
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.
value:
serviceUri: "{{ serviceUri }}"
- name: actionsConfig
description: |
Optional. The configuration of actions supported by the plugin. **REQUIRED**: This field must be provided when creating or updating a Plugin. The server will reject requests if this field is missing.
value:
- displayName: "{{ displayName }}"
triggerMode: "{{ triggerMode }}"
description: "{{ description }}"
id: "{{ id }}"
- name: type
description: |
The attribute values associated with resource.
value:
attribute: "{{ attribute }}"
enumValues:
values:
- description: "{{ description }}"
id: "{{ id }}"
displayName: "{{ displayName }}"
immutable: {{ immutable }}
stringValues:
values:
- "{{ values }}"
jsonValues:
values:
- "{{ values }}"
uriValues:
values:
- "{{ values }}"
- name: gatewayType
value: "{{ gatewayType }}"
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', 'AWS_API_GATEWAY']
- name: pluginCategory
value: "{{ pluginCategory }}"
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: name
value: "{{ name }}"
description: |
Identifier. The name of the plugin. Format: `projects/{project}/locations/{location}/plugins/{plugin}`
- name: description
value: "{{ description }}"
description: |
Optional. The plugin description. Max length is 2000 characters (Unicode code points).
- name: configTemplate
description: |
Optional. The configuration template for the plugin.
value:
authConfigTemplate:
serviceAccount:
serviceAccount: "{{ serviceAccount }}"
supportedAuthTypes:
- "{{ supportedAuthTypes }}"
additionalConfigTemplate:
- valueType: "{{ valueType }}"
validationRegex: "{{ validationRegex }}"
description: "{{ description }}"
required: {{ required }}
id: "{{ id }}"
enumOptions: "{{ enumOptions }}"
multiSelectOptions: "{{ multiSelectOptions }}"
- name: documentation
description: |
Optional. The documentation of the plugin, that explains how to set up and use the plugin.
value:
externalUri: "{{ externalUri }}"
- name: pluginId
value: "{{ pluginId }}"
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
;