prompts
Creates, updates, deletes or gets a prompt resource or lists prompts in a region
Overview
| Name | prompts |
| Type | Resource |
| Description | Resource Type definition for AWS::Connect::Prompt |
| Id | awscc.connect.prompts |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
instance_arn | string | The identifier of the Amazon Connect instance. |
name | string | The name of the prompt. |
description | string | The description of the prompt. |
s3_uri | string | S3 URI of the customer's audio file for creating prompts resource.. |
prompt_arn | string | The Amazon Resource Name (ARN) for the prompt. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
prompt_arn | string | The Amazon Resource Name (ARN) for the prompt. |
region | string | AWS region. |
For more information, see AWS::Connect::Prompt.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | prompts | INSERT | InstanceArn, Name, region |
delete_resource | prompts | DELETE | Identifier, region |
update_resource | prompts | UPDATE | Identifier, PatchDocument, region |
list_resources | prompts_list_only | SELECT | region |
get_resource | prompts | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual prompt.
SELECT
region,
instance_arn,
name,
description,
s3_uri,
prompt_arn,
tags
FROM awscc.connect.prompts
WHERE
region = '{{ region }}' AND
Identifier = '{{ prompt_arn }}';
Lists all prompts in a region.
SELECT
region,
prompt_arn
FROM awscc.connect.prompts_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new prompt resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.connect.prompts (
InstanceArn,
Name,
region
)
SELECT
'{{ instance_arn }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.connect.prompts (
InstanceArn,
Name,
Description,
S3Uri,
Tags,
region
)
SELECT
'{{ instance_arn }}',
'{{ name }}',
'{{ description }}',
'{{ s3_uri }}',
'{{ 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: prompt
props:
- name: instance_arn
value: '{{ instance_arn }}'
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: s3_uri
value: '{{ s3_uri }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a prompt resource, using stack-deploy.
/*+ update */
UPDATE awscc.connect.prompts
SET PatchDocument = string('{{ {
"InstanceArn": instance_arn,
"Name": name,
"Description": description,
"S3Uri": s3_uri,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ prompt_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.connect.prompts
WHERE
Identifier = '{{ prompt_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 prompts resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
connect:CreatePrompt,
connect:TagResource,
s3:GetObject,
kms:Decrypt,
s3:GetObjectAcl
connect:DescribePrompt
connect:UpdatePrompt,
connect:TagResource,
connect:UntagResource
connect:DeletePrompt
connect:ListPrompts