Skip to main content

fields

Creates, updates, deletes, gets or lists a fields resource.

Overview

Namefields
TypeResource
Idaws.connectcases.fields

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
errorsarrayA list of field errors.
fieldsarrayA list of detailed field information.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_fieldselectdomain_id, regionReturns the description for the list of fields in the request parameters.
list_fieldsselectdomain_id, regionmaxResults, nextTokenLists all fields in a Cases domain.
create_fieldinsertdomain_id, region, name, typeCreates 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_fieldupdatedomain_id, field_id, regionUpdates the properties of an existing field.
delete_fielddeletedomain_id, field_id, regionDeletes 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.

NameDatatypeDescription
domain_idstringThe unique identifier of the Cases domain.
field_idstringUnique identifier of the field.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return per page.
nextTokenstringThe 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

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
;

INSERT examples

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
;

UPDATE examples

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

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
;