test_cases
Creates, updates, deletes, gets or lists a test_cases resource.
Overview
| Name | test_cases |
| Type | Resource |
| Id | aws.connect.test_cases |
Fields
The following fields are returned by SELECT queries:
- describe_test_case
- list_test_cases
- search_test_cases
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the test case. |
content | string | The JSON string that represents the content of the test. |
description | string | The description of the test case. |
entry_point | object | Defines the starting point for a test case. |
id | string | The identifier of the test case. |
initialization_data | string | Defines the test attributes for precise data representation. The value must be a valid JSON string. |
last_modified_region | string | The region in which the test case was last modified. (pattern: <code>[a-z]{2}(-[a-z]+){1,2}(-[0-9])?</code>) |
last_modified_time | string (date-time) | The time at which the test case was last modified. |
name | string | The name of the test case. |
status | string | The status of a test case. (PUBLISHED, SAVED) |
tags | object | The tags used to organize, track, or control access for this resource. |
test_case_sha_256 | string | The SHA256 hash of the test case content. (pattern: <code>^[a-zA-Z0-9]{64}$</code>) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the test case. |
id | string | The identifier of the test case. |
last_modified_region | string | The region in which the test case was last modified. (pattern: <code>[a-z]{2}(-[a-z]+){1,2}(-[0-9])?</code>) |
last_modified_time | string (date-time) | The time at which the test case was last modified. |
name | string | The name of the test case. |
status | string | The status of a test case. (PUBLISHED, SAVED) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the test case. |
content | string | The JSON string that represents the content of the test. |
description | string | The description of the test case. |
entry_point | object | Defines the starting point for a test case. |
id | string | The identifier of the test case. |
initialization_data | string | Defines the test attributes for precise data representation. The value must be a valid JSON string. |
last_modified_region | string | The region in which the test case was last modified. (pattern: <code>[a-z]{2}(-[a-z]+){1,2}(-[0-9])?</code>) |
last_modified_time | string (date-time) | The time at which the test case was last modified. |
name | string | The name of the test case. |
status | string | The status of a test case. (PUBLISHED, SAVED) |
tags | object | The tags used to organize, track, or control access for this resource. |
test_case_sha_256 | string | The SHA256 hash of the test case content. (pattern: <code>^[a-zA-Z0-9]{64}$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_test_case | select | instance_id, test_case_id, region | status | Describes the specified test case and allows you to get the content and metadata of the test case for the specified Amazon Connect instance. |
list_test_cases | select | instance_id, region | nextToken, maxResults | Lists the test cases present in the specific Amazon Connect instance. |
search_test_cases | select | region | Searches for test cases in the specified Amazon Connect instance, with optional filtering. | |
create_test_case | insert | instance_id, region | x-amz-resource-id, x-amz-last-modified-time, x-amz-last-modified-region | Creates a test case with its content and metadata for the specified Amazon Connect instance. |
update_test_case | update | instance_id, test_case_id, region | x-amz-last-modified-time, x-amz-last-modified-region | Updates any of the metadata for a test case, such as the name, description, and status or content of an existing test case. This API doesn't allow customers to update the tags of the test case resource for the specified Amazon Connect instance. |
delete_test_case | delete | instance_id, test_case_id, region | Deletes the test case that has already been created for the specified Amazon Connect instance. | |
start_test_case_execution | exec | instance_id, test_case_id, region | Starts executing a published test case. | |
stop_test_case_execution | exec | instance_id, test_case_execution_id, test_case_id, region | Stops a running test execution. |
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 |
|---|---|---|
instance_id | string | The identifier of the Amazon Connect instance. |
region | string | AWS region (default: us-east-1) |
test_case_execution_id | string | The identifier of the test case execution to stop. |
test_case_id | string | The identifier of the test case. |
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. |
status | string | The status of the test case version to retrieve. If not specified, returns the published version if available, otherwise returns the saved version. |
x-amz-last-modified-region | string | The region in which the resource was last modified |
x-amz-last-modified-time | string (date-time) | The time at which the resource was last modified. |
x-amz-resource-id | string | Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency |
SELECT examples
- describe_test_case
- list_test_cases
- search_test_cases
Describes the specified test case and allows you to get the content and metadata of the test case for the specified Amazon Connect instance.
SELECT
arn,
content,
description,
entry_point,
id,
initialization_data,
last_modified_region,
last_modified_time,
name,
status,
tags,
test_case_sha_256
FROM aws.connect.test_cases
WHERE instance_id = '{{ instance_id }}' -- required
AND test_case_id = '{{ test_case_id }}' -- required
AND region = '{{ region }}' -- required
AND status = '{{ status }}'
;
Lists the test cases present in the specific Amazon Connect instance.
SELECT
arn,
id,
last_modified_region,
last_modified_time,
name,
status
FROM aws.connect.test_cases
WHERE instance_id = '{{ instance_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
Searches for test cases in the specified Amazon Connect instance, with optional filtering.
SELECT
arn,
content,
description,
entry_point,
id,
initialization_data,
last_modified_region,
last_modified_time,
name,
status,
tags,
test_case_sha_256
FROM aws.connect.test_cases
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_test_case
- Manifest
Creates a test case with its content and metadata for the specified Amazon Connect instance.
INSERT INTO aws.connect.test_cases (
Name,
Description,
Content,
EntryPoint,
InitializationData,
Status,
Tags,
instance_id,
region,
`x-amz-resource-id`,
`x-amz-last-modified-time`,
`x-amz-last-modified-region`
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Content }}',
'{{ EntryPoint }}',
'{{ InitializationData }}',
'{{ Status }}',
'{{ Tags }}',
'{{ instance_id }}',
'{{ region }}',
'{{ x-amz-resource-id }}',
'{{ x-amz-last-modified-time }}',
'{{ x-amz-last-modified-region }}'
RETURNING
test_case_arn,
test_case_id
;
# Description fields are for documentation purposes
- name: test_cases
props:
- name: instance_id
value: "{{ instance_id }}"
description: Required parameter for the test_cases resource.
- name: region
value: "{{ region }}"
description: Required parameter for the test_cases resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: Content
value: "{{ Content }}"
- name: EntryPoint
description: |
Defines the starting point for a test case.
value:
Type: "{{ Type }}"
VoiceCallEntryPointParameters:
SourcePhoneNumber: "{{ SourcePhoneNumber }}"
DestinationPhoneNumber: "{{ DestinationPhoneNumber }}"
FlowId: "{{ FlowId }}"
ChatEntryPointParameters:
FlowId: "{{ FlowId }}"
- name: InitializationData
value: "{{ InitializationData }}"
- name: Status
value: "{{ Status }}"
description: |
The status of a test case.
valid_values: ['PUBLISHED', 'SAVED']
- name: Tags
value: "{{ Tags }}"
- name: x-amz-resource-id
value: "{{ x-amz-resource-id }}"
description: Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency
description: Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency
- name: x-amz-last-modified-time
value: "{{ x-amz-last-modified-time }}"
description: The time at which the resource was last modified.
description: The time at which the resource was last modified.
- name: x-amz-last-modified-region
value: "{{ x-amz-last-modified-region }}"
description: The region in which the resource was last modified
description: The region in which the resource was last modified
UPDATE examples
- update_test_case
Updates any of the metadata for a test case, such as the name, description, and status or content of an existing test case. This API doesn't allow customers to update the tags of the test case resource for the specified Amazon Connect instance.
UPDATE aws.connect.test_cases
SET
Content = '{{ Content }}',
EntryPoint = '{{ EntryPoint }}',
InitializationData = '{{ InitializationData }}',
Name = '{{ Name }}',
Description = '{{ Description }}',
Status = '{{ Status }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND test_case_id = '{{ test_case_id }}' --required
AND region = '{{ region }}' --required
AND `x-amz-last-modified-time` = '{{ x-amz-last-modified-time}}'
AND `x-amz-last-modified-region` = '{{ x-amz-last-modified-region}}';
DELETE examples
- delete_test_case
Deletes the test case that has already been created for the specified Amazon Connect instance.
DELETE FROM aws.connect.test_cases
WHERE instance_id = '{{ instance_id }}' --required
AND test_case_id = '{{ test_case_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_test_case_execution
- stop_test_case_execution
Starts executing a published test case.
EXEC aws.connect.test_cases.start_test_case_execution
@instance_id='{{ instance_id }}' --required,
@test_case_id='{{ test_case_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ClientToken": "{{ ClientToken }}"
}'
;
Stops a running test execution.
EXEC aws.connect.test_cases.stop_test_case_execution
@instance_id='{{ instance_id }}' --required,
@test_case_execution_id='{{ test_case_execution_id }}' --required,
@test_case_id='{{ test_case_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ClientToken": "{{ ClientToken }}"
}'
;