views
Creates, updates, deletes, gets or lists a views resource.
Overview
| Name | views |
| Type | Resource |
| Id | aws.connect.views |
Fields
The following fields are returned by SELECT queries:
- describe_view
- list_views
- search_views
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the view. |
content | object | View content containing all content necessary to render a view except for runtime input data. |
created_time | string (date-time) | The timestamp of when the view was created. |
description | string | The description of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@,()']+[\p{L}\p{Z}\p{N}.:/=+-@,()']*)$</code>) |
id | string | The identifier of the view. (pattern: <code>^[a-zA-Z0-9_-:/$]+$</code>) |
last_modified_time | string (date-time) | Latest timestamp of the UpdateViewContent or CreateViewVersion operations. |
name | string | The name of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@()']+[\p{L}\p{Z}\p{N}.:/=+-@()']*)$</code>) |
status | string | Indicates the view status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. (PUBLISHED, SAVED) |
tags | object | The tags associated with the view resource (not specific to view version). |
type | string | The type of the view - CUSTOMER_MANAGED. (CUSTOMER_MANAGED, AWS_MANAGED) |
version | integer | Current version of the view. |
version_description | string | The description of the version. (pattern: <code>^([\p{L}\p{N}.:/=+-@,()']+[\p{L}\p{Z}\p{N}.:/=+-@,()']*)$</code>) |
view_content_sha_256 | string | Indicates the checksum value of the latest published view content. (pattern: <code>^[a-zA-Z0-9]$</code>) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the view. |
description | string | The description of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@,()']+[\p{L}\p{Z}\p{N}.:/=+-@,()']*)$</code>) |
id | string | The identifier of the view. (pattern: <code>^[a-zA-Z0-9_-:/$]+$</code>) |
name | string | The name of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@()']+[\p{L}\p{Z}\p{N}.:/=+-@()']*)$</code>) |
status | string | Indicates the view status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. (PUBLISHED, SAVED) |
type | string | The type of the view. (CUSTOMER_MANAGED, AWS_MANAGED) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the view. |
content | object | View content containing all content necessary to render a view except for runtime input data. |
created_time | string (date-time) | The timestamp of when the view was created. |
description | string | The description of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@,()']+[\p{L}\p{Z}\p{N}.:/=+-@,()']*)$</code>) |
id | string | The identifier of the view. (pattern: <code>^[a-zA-Z0-9_-:/$]+$</code>) |
last_modified_time | string (date-time) | Latest timestamp of the UpdateViewContent or CreateViewVersion operations. |
name | string | The name of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@()']+[\p{L}\p{Z}\p{N}.:/=+-@()']*)$</code>) |
status | string | Indicates the view status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. (PUBLISHED, SAVED) |
tags | object | The tags associated with the view resource (not specific to view version). |
type | string | The type of the view - CUSTOMER_MANAGED. (CUSTOMER_MANAGED, AWS_MANAGED) |
version | integer | Current version of the view. |
version_description | string | The description of the version. (pattern: <code>^([\p{L}\p{N}.:/=+-@,()']+[\p{L}\p{Z}\p{N}.:/=+-@,()']*)$</code>) |
view_content_sha_256 | string | Indicates the checksum value of the latest published view content. (pattern: <code>^[a-zA-Z0-9]$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_view | select | instance_id, view_id, region | Retrieves the view for the specified Connect Customer instance and view identifier. The view identifier can be supplied as a ViewId or ARN. $SAVED needs to be supplied if a view is unpublished. The view identifier can contain an optional qualifier, for example, <view-id>:$SAVED, which is either an actual version number or an Connect Customer managed qualifier $SAVED | $LATEST. If it is not supplied, then $LATEST is assumed for customer managed views and an error is returned if there is no published content available. Version 1 is assumed for Amazon Web Services managed views. | |
list_views | select | instance_id, region | type, nextToken, maxResults | Returns views in the given instance. Results are sorted primarily by type, and secondarily by name. |
search_views | select | region | Searches views based on name, description, or tags. | |
create_view | insert | instance_id, region | Creates a new view with the possible status of SAVED or PUBLISHED. The views will have a unique name for each connect instance. It performs basic content validation if the status is SAVED or full content validation if the status is set to PUBLISHED. An error is returned if validation fails. It associates either the $SAVED qualifier or both of the $SAVED and $LATEST qualifiers with the provided view content based on the status. The view is idempotent if ClientToken is provided. | |
update_view_content | update | instance_id, view_id, region | Updates the view content of the given view identifier in the specified Connect Customer instance. It performs content validation if Status is set to SAVED and performs full content validation if Status is PUBLISHED. Note that the $SAVED alias' content will always be updated, but the $LATEST alias' content will only be updated if Status is PUBLISHED. | |
delete_view | delete | instance_id, view_id, region | Deletes the view entirely. It deletes the view and all associated qualifiers (versions and aliases). | |
update_view_metadata | exec | instance_id, view_id, region | Updates the view metadata. Note that either Name or Description must be provided. |
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 |
|---|---|---|
instance_id | string | The identifier of the Connect Customer instance. You can find the instanceId in the ARN of the instance. |
region | string | AWS region (default: us-east-1) |
view_id | string | The identifier of the view. Both ViewArn and ViewId can be used. |
maxResults | integer | The maximum number of results to return per page. The default MaxResult size is 100. |
nextToken | string | The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. |
type | string | The type of the view. |
SELECT examples
- describe_view
- list_views
- search_views
Retrieves the view for the specified Connect Customer instance and view identifier. The view identifier can be supplied as a ViewId or ARN. $SAVED needs to be supplied if a view is unpublished. The view identifier can contain an optional qualifier, for example, <view-id>:$SAVED, which is either an actual version number or an Connect Customer managed qualifier $SAVED | $LATEST. If it is not supplied, then $LATEST is assumed for customer managed views and an error is returned if there is no published content available. Version 1 is assumed for Amazon Web Services managed views.
SELECT
arn,
content,
created_time,
description,
id,
last_modified_time,
name,
status,
tags,
type,
version,
version_description,
view_content_sha_256
FROM aws.connect.views
WHERE instance_id = '{{ instance_id }}' -- required
AND view_id = '{{ view_id }}' -- required
AND region = '{{ region }}' -- required
;
Returns views in the given instance. Results are sorted primarily by type, and secondarily by name.
SELECT
arn,
description,
id,
name,
status,
type
FROM aws.connect.views
WHERE instance_id = '{{ instance_id }}' -- required
AND region = '{{ region }}' -- required
AND type = '{{ type }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
Searches views based on name, description, or tags.
SELECT
arn,
content,
created_time,
description,
id,
last_modified_time,
name,
status,
tags,
type,
version,
version_description,
view_content_sha_256
FROM aws.connect.views
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_view
- Manifest
Creates a new view with the possible status of SAVED or PUBLISHED. The views will have a unique name for each connect instance. It performs basic content validation if the status is SAVED or full content validation if the status is set to PUBLISHED. An error is returned if validation fails. It associates either the $SAVED qualifier or both of the $SAVED and $LATEST qualifiers with the provided view content based on the status. The view is idempotent if ClientToken is provided.
INSERT INTO aws.connect.views (
ClientToken,
Status,
Content,
Description,
Name,
Tags,
instance_id,
region
)
SELECT
'{{ ClientToken }}',
'{{ Status }}',
'{{ Content }}',
'{{ Description }}',
'{{ Name }}',
'{{ Tags }}',
'{{ instance_id }}',
'{{ region }}'
RETURNING
view
;
# Description fields are for documentation purposes
- name: views
props:
- name: instance_id
value: "{{ instance_id }}"
description: Required parameter for the views resource.
- name: region
value: "{{ region }}"
description: Required parameter for the views resource.
- name: ClientToken
value: "{{ ClientToken }}"
- name: Status
value: "{{ Status }}"
valid_values: ['PUBLISHED', 'SAVED']
- name: Content
description: |
View content containing all content necessary to render a view except for runtime input data and the runtime input schema, which is auto-generated by this operation.
value:
Template: "{{ Template }}"
Actions:
- "{{ Actions }}"
- name: Description
value: "{{ Description }}"
- name: Name
value: "{{ Name }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_view_content
Updates the view content of the given view identifier in the specified Connect Customer instance. It performs content validation if Status is set to SAVED and performs full content validation if Status is PUBLISHED. Note that the $SAVED alias' content will always be updated, but the $LATEST alias' content will only be updated if Status is PUBLISHED.
UPDATE aws.connect.views
SET
Status = '{{ Status }}',
Content = '{{ Content }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND view_id = '{{ view_id }}' --required
AND region = '{{ region }}' --required
RETURNING
view;
DELETE examples
- delete_view
Deletes the view entirely. It deletes the view and all associated qualifiers (versions and aliases).
DELETE FROM aws.connect.views
WHERE instance_id = '{{ instance_id }}' --required
AND view_id = '{{ view_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- update_view_metadata
Updates the view metadata. Note that either Name or Description must be provided.
EXEC aws.connect.views.update_view_metadata
@instance_id='{{ instance_id }}' --required,
@view_id='{{ view_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Name": "{{ Name }}",
"Description": "{{ Description }}"
}'
;