- Resource: Plugin
- State
- OwnershipType
- HostingService
- PluginActionConfig
- TriggerMode
- PluginCategory
- ConfigTemplate
- AuthConfigTemplate
- ConfigVariableTemplate
- ValueType
- Methods
Resource: Plugin
A plugin resource in the API hub.
JSON representation |
---|
{ "name": string, "displayName": string, "type": { object ( |
Fields | |
---|---|
name |
Identifier. The name of the plugin. Format: |
displayName |
Required. The display name of the plugin. Max length is 50 characters (Unicode code points). |
type |
Optional. The type of the API. This maps to the following system defined attribute: |
description |
Optional. The plugin description. Max length is 2000 characters (Unicode code points). |
state |
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. |
ownershipType |
Output only. The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or 'USER_OWNED'. |
hostingService |
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. |
actionsConfig[] |
Optional. The configuration of actions supported by the plugin. |
documentation |
Optional. The documentation of the plugin, that explains how to set up and use the plugin. |
pluginCategory |
Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins. |
configTemplate |
Optional. The configuration template for the plugin. |
createTime |
Output only. Timestamp indicating when the plugin was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. Timestamp indicating when the plugin was last updated. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
State
Possible states a plugin can have. Note that this enum may receive new values in the future. Consumers are advised to always code against the enum values expecting new states can be added later on.
Enums | |
---|---|
STATE_UNSPECIFIED |
The default value. This value is used if the state is omitted. |
ENABLED |
The plugin is enabled. |
DISABLED |
The plugin is disabled. |
OwnershipType
Ownership type of the plugin.
Enums | |
---|---|
OWNERSHIP_TYPE_UNSPECIFIED |
Default unspecified type. |
SYSTEM_OWNED |
System owned plugins are defined by API hub and are available out of the box in API hub. |
USER_OWNED |
User owned plugins are defined by the user and need to be explicitly added to API hub via plugins.create method. |
HostingService
The information related to the service implemented by the plugin developer, used to invoke the plugin's functionality.
JSON representation |
---|
{ "serviceUri": string } |
Fields | |
---|---|
serviceUri |
Optional. The URI of the service implemented by the plugin developer, used to invoke the plugin's functionality. This information is only required for user defined plugins. |
PluginActionConfig
PluginActionConfig represents the configuration of an action supported by a plugin.
JSON representation |
---|
{
"id": string,
"displayName": string,
"description": string,
"triggerMode": enum ( |
Fields | |
---|---|
id |
Required. The id of the action. |
displayName |
Required. The display name of the action. |
description |
Required. The description of the operation performed by the action. |
triggerMode |
Required. The trigger mode supported by the action. |
TriggerMode
Execution mode of the action.
Enums | |
---|---|
TRIGGER_MODE_UNSPECIFIED |
Default unspecified mode. |
API_HUB_ON_DEMAND_TRIGGER |
This action can be executed by invoking ExecutePluginInstanceAction API with the given action id. To support this, the plugin hosting service should handle this action id as part of execute call. |
API_HUB_SCHEDULE_TRIGGER |
This action will be executed on schedule by invoking ExecutePluginInstanceAction API with the given action id. To set the schedule, the user can provide the cron expression in the [PluginAction][PluginAction.schedule_cron_expression] field for a given plugin instance. To support this, the plugin hosting service should handle this action id as part of execute call. Note, on demand execution will be supported by default in this trigger mode. |
NON_API_HUB_MANAGED |
The execution of this plugin is not handled by API hub. In this case, the plugin hosting service need not handle this action id as part of the execute call. |
PluginCategory
Enum for the plugin category.
Enums | |
---|---|
PLUGIN_CATEGORY_UNSPECIFIED |
Default unspecified plugin type. |
API_GATEWAY |
API_GATEWAY plugins represent plugins built for API Gateways like Apigee. |
API_PRODUCER |
API_PRODUCER plugins represent plugins built for API Producers like Cloud Run, Application Integration etc. |
ConfigTemplate
ConfigTemplate represents the configuration template for a plugin.
JSON representation |
---|
{ "authConfigTemplate": { object ( |
Fields | |
---|---|
authConfigTemplate |
Optional. The authentication template for the plugin. |
additionalConfigTemplate[] |
Optional. The list of additional configuration variables for the plugin's configuration. |
AuthConfigTemplate
AuthConfigTemplate represents the authentication template for a plugin.
JSON representation |
---|
{ "supportedAuthTypes": [ enum ( |
Fields | |
---|---|
supportedAuthTypes[] |
Required. The list of authentication types supported by the plugin. |
serviceAccount |
Optional. The service account of the plugin hosting service. This service account should be granted the required permissions on the Auth Config parameters provided while creating the plugin instances corresponding to this plugin. For example, if the plugin instance auth config requires a secret manager secret, the service account should be granted the secretmanager.versions.access permission on the corresponding secret, if the plugin instance auth config contains a service account, the service account should be granted the iam.serviceAccounts.getAccessToken permission on the corresponding service account. |
ConfigVariableTemplate
ConfigVariableTemplate represents a configuration variable template present in a Plugin Config.
JSON representation |
---|
{ "id": string, "valueType": enum ( |
Fields | |
---|---|
id |
Required. ID of the config variable. Must be unique within the configuration. |
valueType |
Required. Type of the parameter: string, int, bool etc. |
description |
Optional. Description. |
validationRegex |
Optional. Regular expression in RE2 syntax used for validating the |
required |
Optional. Flag represents that this |
enumOptions[] |
Optional. Enum options. To be populated if |
multiSelectOptions[] |
Optional. Multi select options. To be populated if |
ValueType
ValueType indicates the data type of the value.
Enums | |
---|---|
VALUE_TYPE_UNSPECIFIED |
Value type is not specified. |
STRING |
Value type is string. |
INT |
Value type is integer. |
BOOL |
Value type is boolean. |
SECRET |
Value type is secret. |
ENUM |
Value type is enum. |
MULTI_SELECT |
Value type is multi select. |
MULTI_STRING |
Value type is multi string. |
MULTI_INT |
Value type is multi int. |
Methods |
|
---|---|
|
Create an API hub plugin resource in the API hub. |
|
Delete a Plugin in API hub. |
|
Disables a plugin. |
|
Enables a plugin. |
|
Get an API hub plugin. |
|
Get the style guide being used for linting. |
|
List all the plugins in a given project and location. |
|
Update the styleGuide to be used for liniting in by API hub. |