instances
Creates, updates, deletes, gets or lists an instances
resource.
Overview
Name | instances |
Type | Resource |
Id | google.apihub.instances |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The unique name of the plugin instance resource. Format: projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance} |
actions | array | Required. The action status for the plugin instance. |
additionalConfig | object | Optional. The additional information for this plugin instance corresponding to the additional config template of the plugin. This information will be sent to plugin hosting service on each call to plugin hosted service. The key will be the config_variable_template.display_name to uniquely identify the config variable. |
authConfig | object | Optional. The authentication information for this plugin instance. (id: GoogleCloudApihubV1AuthConfig) |
createTime | string (google-datetime) | Output only. Timestamp indicating when the plugin instance was created. |
displayName | string | Required. The display name for this plugin instance. Max length is 255 characters. |
errorMessage | string | Output only. Error message describing the failure, if any, during Create, Delete or ApplyConfig operation corresponding to the plugin instance.This field will only be populated if the plugin instance is in the ERROR or FAILED state. |
sourceProjectId | string | Optional. The source project id of the plugin instance. This will be the id of runtime project in case of gcp based plugins and org id in case of non gcp based plugins. This field will be a required field for Google provided on-ramp plugins. |
state | string | Output only. The current state of the plugin instance (e.g., enabled, disabled, provisioning). |
updateTime | string (google-datetime) | Output only. Timestamp indicating when the plugin instance was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The unique name of the plugin instance resource. Format: projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance} |
actions | array | Required. The action status for the plugin instance. |
additionalConfig | object | Optional. The additional information for this plugin instance corresponding to the additional config template of the plugin. This information will be sent to plugin hosting service on each call to plugin hosted service. The key will be the config_variable_template.display_name to uniquely identify the config variable. |
authConfig | object | Optional. The authentication information for this plugin instance. (id: GoogleCloudApihubV1AuthConfig) |
createTime | string (google-datetime) | Output only. Timestamp indicating when the plugin instance was created. |
displayName | string | Required. The display name for this plugin instance. Max length is 255 characters. |
errorMessage | string | Output only. Error message describing the failure, if any, during Create, Delete or ApplyConfig operation corresponding to the plugin instance.This field will only be populated if the plugin instance is in the ERROR or FAILED state. |
sourceProjectId | string | Optional. The source project id of the plugin instance. This will be the id of runtime project in case of gcp based plugins and org id in case of non gcp based plugins. This field will be a required field for Google provided on-ramp plugins. |
state | string | Output only. The current state of the plugin instance (e.g., enabled, disabled, provisioning). |
updateTime | string (google-datetime) | Output only. Timestamp indicating when the plugin instance 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 , instancesId | Get an API Hub plugin instance. | |
list | select | projectsId , locationsId , pluginsId | filter , pageSize , pageToken | List all the plugins in a given project and location. - can be used as wildcard value for {plugin_id} |
create | insert | projectsId , locationsId , pluginsId | pluginInstanceId | Creates a Plugin instance in the API hub. |
patch | update | projectsId , locationsId , pluginsId , instancesId | updateMask | Updates a plugin instance in the API hub. The following fields in the plugin_instance can be updated currently: * display_name * schedule_cron_expression The update_mask should be used to specify the fields being updated. To update the auth_config and additional_config of the plugin instance, use the ApplyPluginInstanceConfig method. |
delete | delete | projectsId , locationsId , pluginsId , instancesId | Deletes a plugin instance in the API hub. | |
execute_action | exec | projectsId , locationsId , pluginsId , instancesId | Executes a plugin instance in the API hub. | |
enable_action | exec | projectsId , locationsId , pluginsId , instancesId | Enables a plugin instance in the API hub. | |
disable_action | exec | projectsId , locationsId , pluginsId , instancesId | Disables a plugin instance in the API hub. |
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 |
---|---|---|
instancesId | string | |
locationsId | string | |
pluginsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
pluginInstanceId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get an API Hub plugin instance.
SELECT
name,
actions,
additionalConfig,
authConfig,
createTime,
displayName,
errorMessage,
sourceProjectId,
state,
updateTime
FROM google.apihub.instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pluginsId = '{{ pluginsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required;
List all the plugins in a given project and location. -
can be used as wildcard value for {plugin_id}
SELECT
name,
actions,
additionalConfig,
authConfig,
createTime,
displayName,
errorMessage,
sourceProjectId,
state,
updateTime
FROM google.apihub.instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pluginsId = '{{ pluginsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a Plugin instance in the API hub.
INSERT INTO google.apihub.instances (
data__name,
data__displayName,
data__authConfig,
data__additionalConfig,
data__actions,
data__sourceProjectId,
projectsId,
locationsId,
pluginsId,
pluginInstanceId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ authConfig }}',
'{{ additionalConfig }}',
'{{ actions }}',
'{{ sourceProjectId }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ pluginsId }}',
'{{ pluginInstanceId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: instances
props:
- name: projectsId
value: string
description: Required parameter for the instances resource.
- name: locationsId
value: string
description: Required parameter for the instances resource.
- name: pluginsId
value: string
description: Required parameter for the instances resource.
- name: name
value: string
description: >
Identifier. The unique name of the plugin instance resource. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
- name: displayName
value: string
description: >
Required. The display name for this plugin instance. Max length is 255 characters.
- name: authConfig
value: object
description: >
Optional. The authentication information for this plugin instance.
- name: additionalConfig
value: object
description: >
Optional. The additional information for this plugin instance corresponding to the additional config template of the plugin. This information will be sent to plugin hosting service on each call to plugin hosted service. The key will be the config_variable_template.display_name to uniquely identify the config variable.
- name: actions
value: array
description: >
Required. The action status for the plugin instance.
- name: sourceProjectId
value: string
description: >
Optional. The source project id of the plugin instance. This will be the id of runtime project in case of gcp based plugins and org id in case of non gcp based plugins. This field will be a required field for Google provided on-ramp plugins.
- name: pluginInstanceId
value: string
UPDATE
examples
- patch
Updates a plugin instance in the API hub. The following fields in the plugin_instance can be updated currently: * display_name * schedule_cron_expression The update_mask should be used to specify the fields being updated. To update the auth_config and additional_config of the plugin instance, use the ApplyPluginInstanceConfig method.
UPDATE google.apihub.instances
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__authConfig = '{{ authConfig }}',
data__additionalConfig = '{{ additionalConfig }}',
data__actions = '{{ actions }}',
data__sourceProjectId = '{{ sourceProjectId }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND pluginsId = '{{ pluginsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
actions,
additionalConfig,
authConfig,
createTime,
displayName,
errorMessage,
sourceProjectId,
state,
updateTime;
DELETE
examples
- delete
Deletes a plugin instance in the API hub.
DELETE FROM google.apihub.instances
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND pluginsId = '{{ pluginsId }}' --required
AND instancesId = '{{ instancesId }}' --required;
Lifecycle Methods
- execute_action
- enable_action
- disable_action
Executes a plugin instance in the API hub.
EXEC google.apihub.instances.execute_action
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pluginsId='{{ pluginsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"actionExecutionDetail": "{{ actionExecutionDetail }}"
}';
Enables a plugin instance in the API hub.
EXEC google.apihub.instances.enable_action
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pluginsId='{{ pluginsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"actionId": "{{ actionId }}"
}';
Disables a plugin instance in the API hub.
EXEC google.apihub.instances.disable_action
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pluginsId='{{ pluginsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"actionId": "{{ actionId }}"
}';