Skip to main content

layouts

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

Overview

Namelayouts
TypeResource
Idaws.connectcases.layouts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the layout. It must be unique. (pattern: <code>.*[\S]</code>)
contentobjectObject to store union of different versions of layout content.
created_timestring (date-time)Timestamp at which the resource was created.
deletedbooleanDenotes whether or not the resource has been deleted.
last_modified_timestring (date-time)Timestamp at which the resource was created or last modified.
layout_arnstringThe Amazon Resource Name (ARN) of the newly created layout.
layout_idstringThe unique identifier of the layout.
tagsobjectA map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_layoutselectdomain_id, layout_id, regionReturns the details for the requested layout.
list_layoutsselectdomain_id, regionmaxResults, nextTokenLists all layouts in the given cases domain. Each list item is a condensed summary object of the layout.
create_layoutinsertdomain_id, region, name, contentCreates a layout in the Cases domain. Layouts define the following configuration in the top section and More Info tab of the Cases user interface: Fields to display to the users Field ordering Title and Status fields cannot be part of layouts since they are not configurable.
update_layoutupdatedomain_id, layout_id, regionUpdates the attributes of an existing layout. If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. A ValidationException is returned when you add non-existent fieldIds to a layout. Title and Status fields cannot be part of layouts because they are not configurable.
delete_layoutdeletedomain_id, layout_id, regionDeletes a layout from a cases template. You can delete up to 100 layouts per domain. After a layout is deleted: You can still retrieve the layout by calling GetLayout. You cannot update a deleted layout by calling UpdateLayout; it throws a ValidationException. Deleted layouts are not included in the ListLayouts response.

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
domain_idstringThe unique identifier of the Cases domain.
layout_idstringThe unique identifier of the layout.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return per page.
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.

SELECT examples

Returns the details for the requested layout.

SELECT
name,
content,
created_time,
deleted,
last_modified_time,
layout_arn,
layout_id,
tags
FROM aws.connectcases.layouts
WHERE domain_id = '{{ domain_id }}' -- required
AND layout_id = '{{ layout_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a layout in the Cases domain. Layouts define the following configuration in the top section and More Info tab of the Cases user interface: Fields to display to the users Field ordering Title and Status fields cannot be part of layouts since they are not configurable.

INSERT INTO aws.connectcases.layouts (
name,
content,
domain_id,
region
)
SELECT
'{{ name }}' /* required */,
'{{ content }}' /* required */,
'{{ domain_id }}',
'{{ region }}'
RETURNING
layout_arn,
layout_id
;

UPDATE examples

Updates the attributes of an existing layout. If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. A ValidationException is returned when you add non-existent fieldIds to a layout. Title and Status fields cannot be part of layouts because they are not configurable.

UPDATE aws.connectcases.layouts
SET
name = '{{ name }}',
content = '{{ content }}'
WHERE
domain_id = '{{ domain_id }}' --required
AND layout_id = '{{ layout_id }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes a layout from a cases template. You can delete up to 100 layouts per domain. After a layout is deleted: You can still retrieve the layout by calling GetLayout. You cannot update a deleted layout by calling UpdateLayout; it throws a ValidationException. Deleted layouts are not included in the ListLayouts response.

DELETE FROM aws.connectcases.layouts
WHERE domain_id = '{{ domain_id }}' --required
AND layout_id = '{{ layout_id }}' --required
AND region = '{{ region }}' --required
;