curations
Creates, updates, deletes, gets or lists a curations
resource.
Overview
Name | curations |
Type | Resource |
Id | google.apihub.curations |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the curation. Format: projects/{project}/locations/{location}/curations/{curation} |
createTime | string (google-datetime) | Output only. The time at which the curation was created. |
description | string | Optional. The description of the curation. |
displayName | string | Required. The display name of the curation. |
endpoint | object | Required. The endpoint to be triggered for curation. (id: GoogleCloudApihubV1Endpoint) |
lastExecutionErrorCode | string | Output only. The error code of the last execution of the curation. The error code is populated only when the last execution state is failed. |
lastExecutionErrorMessage | string | Output only. Error message describing the failure, if any, during the last execution of the curation. |
lastExecutionState | string | Output only. The last execution state of the curation. |
pluginInstanceActions | array | Output only. The plugin instances and associated actions that are using the curation. Note: A particular curation could be used by multiple plugin instances or multiple actions in a plugin instance. |
updateTime | string (google-datetime) | Output only. The time at which the curation was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the curation. Format: projects/{project}/locations/{location}/curations/{curation} |
createTime | string (google-datetime) | Output only. The time at which the curation was created. |
description | string | Optional. The description of the curation. |
displayName | string | Required. The display name of the curation. |
endpoint | object | Required. The endpoint to be triggered for curation. (id: GoogleCloudApihubV1Endpoint) |
lastExecutionErrorCode | string | Output only. The error code of the last execution of the curation. The error code is populated only when the last execution state is failed. |
lastExecutionErrorMessage | string | Output only. Error message describing the failure, if any, during the last execution of the curation. |
lastExecutionState | string | Output only. The last execution state of the curation. |
pluginInstanceActions | array | Output only. The plugin instances and associated actions that are using the curation. Note: A particular curation could be used by multiple plugin instances or multiple actions in a plugin instance. |
updateTime | string (google-datetime) | Output only. The time at which the curation was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , curationsId | Get curation resource details. | |
list | select | projectsId , locationsId | filter , pageSize , pageToken | List curation resources in the API hub. |
create | insert | projectsId , locationsId | curationId | Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it. |
patch | update | projectsId , locationsId , curationsId | updateMask | Update a curation resource in the API hub. The following fields in the curation can be updated: * display_name * description The update_mask should be used to specify the fields being updated. |
delete | delete | projectsId , locationsId , curationsId | Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance. |
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 |
---|---|---|
curationsId | string | |
locationsId | string | |
projectsId | string | |
curationId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get curation resource details.
SELECT
name,
createTime,
description,
displayName,
endpoint,
lastExecutionErrorCode,
lastExecutionErrorMessage,
lastExecutionState,
pluginInstanceActions,
updateTime
FROM google.apihub.curations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND curationsId = '{{ curationsId }}' -- required;
List curation resources in the API hub.
SELECT
name,
createTime,
description,
displayName,
endpoint,
lastExecutionErrorCode,
lastExecutionErrorMessage,
lastExecutionState,
pluginInstanceActions,
updateTime
FROM google.apihub.curations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.
INSERT INTO google.apihub.curations (
data__name,
data__displayName,
data__description,
data__endpoint,
projectsId,
locationsId,
curationId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ endpoint }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ curationId }}'
RETURNING
name,
createTime,
description,
displayName,
endpoint,
lastExecutionErrorCode,
lastExecutionErrorMessage,
lastExecutionState,
pluginInstanceActions,
updateTime
;
# Description fields are for documentation purposes
- name: curations
props:
- name: projectsId
value: string
description: Required parameter for the curations resource.
- name: locationsId
value: string
description: Required parameter for the curations resource.
- name: name
value: string
description: >
Identifier. The name of the curation. Format: `projects/{project}/locations/{location}/curations/{curation}`
- name: displayName
value: string
description: >
Required. The display name of the curation.
- name: description
value: string
description: >
Optional. The description of the curation.
- name: endpoint
value: object
description: >
Required. The endpoint to be triggered for curation.
- name: curationId
value: string
UPDATE
examples
- patch
Update a curation resource in the API hub. The following fields in the curation can be updated: * display_name * description The update_mask should be used to specify the fields being updated.
UPDATE google.apihub.curations
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__endpoint = '{{ endpoint }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND curationsId = '{{ curationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
description,
displayName,
endpoint,
lastExecutionErrorCode,
lastExecutionErrorMessage,
lastExecutionState,
pluginInstanceActions,
updateTime;
DELETE
examples
- delete
Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.
DELETE FROM google.apihub.curations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND curationsId = '{{ curationsId }}' --required;