fields
Creates, updates, deletes, gets or lists a fields resource.
Overview
| Name | fields |
| Type | Resource |
| Id | aws.connectcases.fields |
Fields
The following fields are returned by SELECT queries:
- batch_get_field
- list_fields
| Name | Datatype | Description |
|---|---|---|
errors | array | A list of field errors. |
fields | array | A list of detailed field information. |
| Name | Datatype | Description |
|---|---|---|
fields | array | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_field | select | domain_id, region | Returns the description for the list of fields in the request parameters. | |
list_fields | select | domain_id, region | maxResults, nextToken | Lists all fields in a Cases domain. |
create_field | insert | domain_id, region, name, type | Creates a field in the Cases domain. This field is used to define the case object model (that is, defines what data can be captured on cases) in a Cases domain. | |
update_field | update | domain_id, field_id, region | Updates the properties of an existing field. | |
delete_field | delete | domain_id, field_id, region | Deletes a field from a cases template. After a field is deleted: You can still retrieve the field by calling BatchGetField. You cannot update a deleted field by calling UpdateField; it throws a ValidationException. Deleted fields are not included in the ListFields response. Calling CreateCase with a deleted field throws a ValidationException denoting which field identifiers in the request have been deleted. Calling GetCase with a deleted field identifier returns the deleted field's value if one exists. Calling UpdateCase with a deleted field ID throws a ValidationException if the case does not already contain a value for the deleted field. Otherwise it succeeds, allowing you to update or remove (using emptyValue: {}) the field's value from the case. GetTemplate does not return field IDs for deleted fields. GetLayout does not return field IDs for deleted fields. Calling SearchCases with the deleted field ID as a filter returns any cases that have a value for the deleted field that matches the filter criteria. Calling SearchCases with a searchTerm value that matches a deleted field's value on a case returns the case in the response. Calling BatchPutFieldOptions with a deleted field ID throw a ValidationException. Calling GetCaseEventConfiguration does not return field IDs for deleted fields. |
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. |
field_id | string | Unique identifier of the field. |
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
- batch_get_field
- list_fields
Returns the description for the list of fields in the request parameters.
SELECT
errors,
fields
FROM aws.connectcases.fields
WHERE domain_id = '{{ domain_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists all fields in a Cases domain.
SELECT
fields,
next_token
FROM aws.connectcases.fields
WHERE domain_id = '{{ domain_id }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_field
- Manifest
Creates a field in the Cases domain. This field is used to define the case object model (that is, defines what data can be captured on cases) in a Cases domain.
INSERT INTO aws.connectcases.fields (
name,
type,
description,
attributes,
domain_id,
region
)
SELECT
'{{ name }}' /* required */,
'{{ type }}' /* required */,
'{{ description }}',
'{{ attributes }}',
'{{ domain_id }}',
'{{ region }}'
RETURNING
field_arn,
field_id
;
# Description fields are for documentation purposes
- name: fields
props:
- name: domain_id
value: "{{ domain_id }}"
description: Required parameter for the fields resource.
- name: region
value: "{{ region }}"
description: Required parameter for the fields resource.
- name: name
value: "{{ name }}"
- name: type
value: "{{ type }}"
valid_values: ['Text', 'Number', 'Boolean', 'DateTime', 'SingleSelect', 'Url', 'User']
- name: description
value: "{{ description }}"
- name: attributes
description: |
Union of field attributes.
value:
text:
isMultiline: {{ isMultiline }}
UPDATE examples
- update_field
Updates the properties of an existing field.
UPDATE aws.connectcases.fields
SET
name = '{{ name }}',
description = '{{ description }}',
attributes = '{{ attributes }}'
WHERE
domain_id = '{{ domain_id }}' --required
AND field_id = '{{ field_id }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_field
Deletes a field from a cases template. After a field is deleted: You can still retrieve the field by calling BatchGetField. You cannot update a deleted field by calling UpdateField; it throws a ValidationException. Deleted fields are not included in the ListFields response. Calling CreateCase with a deleted field throws a ValidationException denoting which field identifiers in the request have been deleted. Calling GetCase with a deleted field identifier returns the deleted field's value if one exists. Calling UpdateCase with a deleted field ID throws a ValidationException if the case does not already contain a value for the deleted field. Otherwise it succeeds, allowing you to update or remove (using emptyValue: {}) the field's value from the case. GetTemplate does not return field IDs for deleted fields. GetLayout does not return field IDs for deleted fields. Calling SearchCases with the deleted field ID as a filter returns any cases that have a value for the deleted field that matches the filter criteria. Calling SearchCases with a searchTerm value that matches a deleted field's value on a case returns the case in the response. Calling BatchPutFieldOptions with a deleted field ID throw a ValidationException. Calling GetCaseEventConfiguration does not return field IDs for deleted fields.
DELETE FROM aws.connectcases.fields
WHERE domain_id = '{{ domain_id }}' --required
AND field_id = '{{ field_id }}' --required
AND region = '{{ region }}' --required
;