layouts
Creates, updates, deletes, gets or lists a layouts resource.
Overview
| Name | layouts |
| Type | Resource |
| Id | aws.connectcases.layouts |
Fields
The following fields are returned by SELECT queries:
- get_layout
- list_layouts
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the layout. It must be unique. (pattern: <code>.*[\S]</code>) |
content | object | Object to store union of different versions of layout content. |
created_time | string (date-time) | Timestamp at which the resource was created. |
deleted | boolean | Denotes whether or not the resource has been deleted. |
last_modified_time | string (date-time) | Timestamp at which the resource was created or last modified. |
layout_arn | string | The Amazon Resource Name (ARN) of the newly created layout. |
layout_id | string | The unique identifier of the layout. |
tags | object | A map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource. |
| Name | Datatype | Description |
|---|---|---|
layouts | array | The layouts for the domain. |
next_token | string | The token for the next set of results. This is null if there are no more results to return. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_layout | select | domain_id, layout_id, region | Returns the details for the requested layout. | |
list_layouts | select | domain_id, region | maxResults, nextToken | Lists all layouts in the given cases domain. Each list item is a condensed summary object of the layout. |
create_layout | insert | domain_id, region, name, content | 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. | |
update_layout | update | domain_id, layout_id, region | 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. | |
delete_layout | delete | domain_id, layout_id, region | 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. |
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 |
|---|---|---|
domain_id | string | The unique identifier of the Cases domain. |
layout_id | string | The unique identifier of the layout. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return per page. |
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. |
SELECT examples
- get_layout
- list_layouts
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
;
Lists all layouts in the given cases domain. Each list item is a condensed summary object of the layout.
SELECT
layouts,
next_token
FROM aws.connectcases.layouts
WHERE domain_id = '{{ domain_id }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_layout
- Manifest
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
;
# Description fields are for documentation purposes
- name: layouts
props:
- name: domain_id
value: "{{ domain_id }}"
description: Required parameter for the layouts resource.
- name: region
value: "{{ region }}"
description: Required parameter for the layouts resource.
- name: name
value: "{{ name }}"
- name: content
description: |
Object to store union of different versions of layout content.
value:
basic:
topPanel:
sections:
- fieldGroup:
name: "{{ name }}"
fields: "{{ fields }}"
moreInfo:
sections:
- fieldGroup:
name: "{{ name }}"
fields: "{{ fields }}"
UPDATE examples
- update_layout
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
- delete_layout
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
;