REST Resource: projects.locations.plugins

Resource: Plugin

A plugin resource in the API hub.

JSON representation
{
  "name": string,
  "displayName": string,
  "type": {
    object (AttributeValues)
  },
  "description": string,
  "state": enum (State),
  "ownershipType": enum (OwnershipType),
  "hostingService": {
    object (HostingService)
  },
  "actionsConfig": [
    {
      object (PluginActionConfig)
    }
  ],
  "documentation": {
    object (Documentation)
  },
  "pluginCategory": enum (PluginCategory),
  "configTemplate": {
    object (ConfigTemplate)
  },
  "createTime": string,
  "updateTime": string
}
Fields
name

string

Identifier. The name of the plugin. Format: projects/{project}/locations/{location}/plugins/{plugin}

displayName

string

Required. The display name of the plugin. Max length is 50 characters (Unicode code points).

type

object (AttributeValues)

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.

description

string

Optional. The plugin description. Max length is 2000 characters (Unicode code points).

state

enum (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

enum (OwnershipType)

Output only. The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or 'USER_OWNED'.

hostingService

object (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[]

object (PluginActionConfig)

Optional. The configuration of actions supported by the plugin.

documentation

object (Documentation)

Optional. The documentation of the plugin, that explains how to set up and use the plugin.

pluginCategory

enum (PluginCategory)

Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins.

configTemplate

object (ConfigTemplate)

Optional. The configuration template for the plugin.

createTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

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

string

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 (TriggerMode)
}
Fields
id

string

Required. The id of the action.

displayName

string

Required. The display name of the action.

description

string

Required. The description of the operation performed by the action.

triggerMode

enum (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 (AuthConfigTemplate)
  },
  "additionalConfigTemplate": [
    {
      object (ConfigVariableTemplate)
    }
  ]
}
Fields
authConfigTemplate

object (AuthConfigTemplate)

Optional. The authentication template for the plugin.

additionalConfigTemplate[]

object (ConfigVariableTemplate)

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 (AuthType)
  ],
  "serviceAccount": {
    object (GoogleServiceAccountConfig)
  }
}
Fields
supportedAuthTypes[]

enum (AuthType)

Required. The list of authentication types supported by the plugin.

serviceAccount

object (GoogleServiceAccountConfig)

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 (ValueType),
  "description": string,
  "validationRegex": string,
  "required": boolean,
  "enumOptions": [
    {
      object (ConfigValueOption)
    }
  ],
  "multiSelectOptions": [
    {
      object (ConfigValueOption)
    }
  ]
}
Fields
id

string

Required. ID of the config variable. Must be unique within the configuration.

valueType

enum (ValueType)

Required. Type of the parameter: string, int, bool etc.

description

string

Optional. Description.

validationRegex

string

Optional. Regular expression in RE2 syntax used for validating the value of a ConfigVariable.

required

boolean

Optional. Flag represents that this ConfigVariable must be provided for a PluginInstance.

enumOptions[]

object (ConfigValueOption)

Optional. Enum options. To be populated if ValueType is ENUM.

multiSelectOptions[]

object (ConfigValueOption)

Optional. Multi select options. To be populated if ValueType is MULTI_SELECT.

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

Create an API hub plugin resource in the API hub.

delete

Delete a Plugin in API hub.

disable

Disables a plugin.

enable

Enables a plugin.

get

Get an API hub plugin.

getStyleGuide

Get the style guide being used for linting.

list

List all the plugins in a given project and location.

updateStyleGuide

Update the styleGuide to be used for liniting in by API hub.