cases
Creates, updates, deletes, gets or lists a cases resource.
Overview
| Name | cases |
| Type | Resource |
| Id | aws.connectcases.cases |
Fields
The following fields are returned by SELECT queries:
- get_case
- search_cases
| Name | Datatype | Description |
|---|---|---|
fields | array | A list of detailed field information. |
next_token | string | The token for the next set of results. This is null if there are no more results to return. |
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. |
template_id | string | A unique identifier of a template. |
| Name | Datatype | Description |
|---|---|---|
case_id | string | A unique identifier of the case. |
fields | array | List of case field values. |
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. |
template_id | string | A unique identifier of a template. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_case | select | case_id, domain_id, region | Returns information about a specific case if it exists. | |
search_cases | select | domain_id, region | Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents. For customer_id you must provide the full customer profile ARN in this format: arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID. | |
create_case | insert | domain_id, region, templateId, fields | If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs with a declared data types. When creating a case from a template that has tag propagation configurations, the specified tags are automatically applied to the case. The following fields are required when creating a case: customer_id - You must provide the full customer profile ARN in this format: arn:aws:profile:your_AWS_Region:your_AWS_account ID:domains/your_profiles_domain_name/profiles/profile_ID title | |
update_case | update | domain_id, case_id, region, fields | If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the CreateCase input . If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. | |
delete_case | delete | domain_id, case_id, region | The DeleteCase API permanently deletes a case and all its associated resources from the cases data store. After a successful deletion, you cannot: Retrieve related items Access audit history Perform any operations that require the CaseID This action is irreversible. After you delete a case, you cannot recover its data. |
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 |
|---|---|---|
case_id | string | A unique identifier of the case. |
domain_id | string | A unique identifier of the Cases domain. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_case
- search_cases
Returns information about a specific case if it exists.
SELECT
fields,
next_token,
tags,
template_id
FROM aws.connectcases.cases
WHERE case_id = '{{ case_id }}' -- required
AND domain_id = '{{ domain_id }}' -- required
AND region = '{{ region }}' -- required
;
Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents. For customer_id you must provide the full customer profile ARN in this format: arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID.
SELECT
case_id,
fields,
tags,
template_id
FROM aws.connectcases.cases
WHERE domain_id = '{{ domain_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_case
- Manifest
If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs with a declared data types. When creating a case from a template that has tag propagation configurations, the specified tags are automatically applied to the case. The following fields are required when creating a case: customer_id - You must provide the full customer profile ARN in this format: arn:aws:profile:your_AWS_Region:your_AWS_account ID:domains/your_profiles_domain_name/profiles/profile_ID title
INSERT INTO aws.connectcases.cases (
templateId,
fields,
clientToken,
performedBy,
tags,
domain_id,
region
)
SELECT
'{{ templateId }}' /* required */,
'{{ fields }}' /* required */,
'{{ clientToken }}',
'{{ performedBy }}',
'{{ tags }}',
'{{ domain_id }}',
'{{ region }}'
RETURNING
case_arn,
case_id
;
# Description fields are for documentation purposes
- name: cases
props:
- name: domain_id
value: "{{ domain_id }}"
description: Required parameter for the cases resource.
- name: region
value: "{{ region }}"
description: Required parameter for the cases resource.
- name: templateId
value: "{{ templateId }}"
- name: fields
value:
- id: "{{ id }}"
value:
stringValue: "{{ stringValue }}"
doubleValue: {{ doubleValue }}
booleanValue: {{ booleanValue }}
emptyValue: "{{ emptyValue }}"
userArnValue: "{{ userArnValue }}"
- name: clientToken
value: "{{ clientToken }}"
- name: performedBy
description: |
Represents the entity that performed the action.
value:
userArn: "{{ userArn }}"
customEntity: "{{ customEntity }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_case
If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the CreateCase input . If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
UPDATE aws.connectcases.cases
SET
fields = '{{ fields }}',
performedBy = '{{ performedBy }}'
WHERE
domain_id = '{{ domain_id }}' --required
AND case_id = '{{ case_id }}' --required
AND region = '{{ region }}' --required
AND fields = '{{ fields }}' --required;
DELETE examples
- delete_case
The DeleteCase API permanently deletes a case and all its associated resources from the cases data store. After a successful deletion, you cannot: Retrieve related items Access audit history Perform any operations that require the CaseID This action is irreversible. After you delete a case, you cannot recover its data.
DELETE FROM aws.connectcases.cases
WHERE domain_id = '{{ domain_id }}' --required
AND case_id = '{{ case_id }}' --required
AND region = '{{ region }}' --required
;