task_templates
Creates, updates, deletes or gets a task_template resource or lists task_templates in a region
Overview
| Name | task_templates |
| Type | Resource |
| Description | Resource Type definition for AWS::Connect::TaskTemplate. |
| Id | awscc.connect.task_templates |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The identifier (arn) of the task template. |
instance_arn | string | The identifier (arn) of the instance. |
name | string | The name of the task template. |
description | string | The description of the task template. |
contact_flow_arn | string | The identifier of the contact flow. |
self_assign_contact_flow_arn | string | The identifier of the contact flow. |
constraints | object | The constraints for the task template |
defaults | array | |
fields | array | The list of task template's fields |
status | string | The status of the task template |
client_token | string | the client token string in uuid format |
tags | array | One or more tags. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The identifier (arn) of the task template. |
region | string | AWS region. |
For more information, see AWS::Connect::TaskTemplate.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | task_templates | INSERT | InstanceArn, region |
delete_resource | task_templates | DELETE | Identifier, region |
update_resource | task_templates | UPDATE | Identifier, PatchDocument, region |
list_resources | task_templates_list_only | SELECT | region |
get_resource | task_templates | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual task_template.
SELECT
region,
arn,
instance_arn,
name,
description,
contact_flow_arn,
self_assign_contact_flow_arn,
constraints,
defaults,
fields,
status,
client_token,
tags
FROM awscc.connect.task_templates
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all task_templates in a region.
SELECT
region,
arn
FROM awscc.connect.task_templates_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new task_template resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.connect.task_templates (
InstanceArn,
region
)
SELECT
'{{ instance_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.connect.task_templates (
InstanceArn,
Name,
Description,
ContactFlowArn,
SelfAssignContactFlowArn,
Constraints,
Defaults,
Fields,
Status,
ClientToken,
Tags,
region
)
SELECT
'{{ instance_arn }}',
'{{ name }}',
'{{ description }}',
'{{ contact_flow_arn }}',
'{{ self_assign_contact_flow_arn }}',
'{{ constraints }}',
'{{ defaults }}',
'{{ fields }}',
'{{ status }}',
'{{ client_token }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: task_template
props:
- name: instance_arn
value: '{{ instance_arn }}'
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: contact_flow_arn
value: '{{ contact_flow_arn }}'
- name: self_assign_contact_flow_arn
value: '{{ self_assign_contact_flow_arn }}'
- name: constraints
value:
invisible_fields:
- id:
name: '{{ name }}'
required_fields:
- id: null
read_only_fields:
- id: null
- name: defaults
value:
- id: null
default_value: '{{ default_value }}'
- name: fields
value:
- id: null
description: '{{ description }}'
type: '{{ type }}'
single_select_options:
- '{{ single_select_options[0] }}'
- name: status
value: '{{ status }}'
- name: client_token
value: '{{ client_token }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a task_template resource, using stack-deploy.
/*+ update */
UPDATE awscc.connect.task_templates
SET PatchDocument = string('{{ {
"InstanceArn": instance_arn,
"Name": name,
"Description": description,
"ContactFlowArn": contact_flow_arn,
"SelfAssignContactFlowArn": self_assign_contact_flow_arn,
"Constraints": constraints,
"Defaults": defaults,
"Fields": fields,
"Status": status,
"ClientToken": client_token,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.connect.task_templates
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the task_templates resource, the following permissions are required:
- Create
- Read
- List
- Update
- Delete
connect:CreateTaskTemplate,
connect:TagResource
connect:GetTaskTemplate
connect:ListTaskTemplates
connect:UpdateTaskTemplate,
connect:TagResource,
connect:UntagResource
connect:DeleteTaskTemplate,
connect:UntagResource,
connect:GetTaskTemplate