Skip to main content

views

Creates, updates, deletes, gets or lists a views resource.

Overview

Nameviews
TypeResource
Idaws.connect.views

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the view.
contentobjectView content containing all content necessary to render a view except for runtime input data.
created_timestring (date-time)The timestamp of when the view was created.
descriptionstringThe description of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@,()']+[\p{L}\p{Z}\p{N}.:/=+-@,()']*)$</code>)
idstringThe identifier of the view. (pattern: <code>^[a-zA-Z0-9_-:/$]+$</code>)
last_modified_timestring (date-time)Latest timestamp of the UpdateViewContent or CreateViewVersion operations.
namestringThe name of the view. (pattern: <code>^([\p{L}\p{N}.:/=+-@()']+[\p{L}\p{Z}\p{N}.:/=+-@()']*)$</code>)
statusstringIndicates the view status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. (PUBLISHED, SAVED)
tagsobjectThe tags associated with the view resource (not specific to view version).
typestringThe type of the view - CUSTOMER_MANAGED. (CUSTOMER_MANAGED, AWS_MANAGED)
versionintegerCurrent version of the view.
version_descriptionstringThe description of the version. (pattern: <code>^([\p{L}\p{N}.:/=+-@,()']+[\p{L}\p{Z}\p{N}.:/=+-@,()']*)$</code>)
view_content_sha_256stringIndicates 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:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_viewselectinstance_id, view_id, regionRetrieves 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_viewsselectinstance_id, regiontype, nextToken, maxResultsReturns views in the given instance. Results are sorted primarily by type, and secondarily by name.
search_viewsselectregionSearches views based on name, description, or tags.
create_viewinsertinstance_id, regionCreates 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_contentupdateinstance_id, view_id, regionUpdates 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_viewdeleteinstance_id, view_id, regionDeletes the view entirely. It deletes the view and all associated qualifiers (versions and aliases).
update_view_metadataexecinstance_id, view_id, regionUpdates 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.

NameDatatypeDescription
instance_idstringThe identifier of the Connect Customer instance. You can find the instanceId in the ARN of the instance.
regionstringAWS region (default: us-east-1)
view_idstringThe identifier of the view. Both ViewArn and ViewId can be used.
maxResultsintegerThe maximum number of results to return per page. The default MaxResult size is 100.
nextTokenstringThe 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.
typestringThe type of the view.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}'
;