Skip to main content

data_table_attributes

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

Overview

Namedata_table_attributes
TypeResource
Idaws.connect.data_table_attributes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attribute_idstringThe unique identifier for the attribute within the data table.
data_table_arnstringThe Amazon Resource Name (ARN) of the data table that contains this attribute.
data_table_idstringThe unique identifier of the data table that contains this attribute.
descriptionstringAn optional description explaining the purpose and usage of this attribute. (pattern: <code>^[\P{C}\r\n\t]+$</code>)
last_modified_regionstringThe Amazon Web Services Region where this attribute was last modified, used for region replication. (pattern: <code>[a-z]{2}(-[a-z]+){1,2}(-[0-9])?</code>)
last_modified_timestring (date-time)The timestamp when this attribute was last modified.
lock_versionobjectThe lock version for this attribute, used for optimistic locking to prevent concurrent modification conflicts.
namestringThe human-readable name of the attribute. Must be unique within the data table and conform to Connect naming standards. (pattern: <code>^[\p{L}\p{Z}\p{N}-_.:=@'|]+$</code>)
primarybooleanBoolean indicating whether this attribute is used as a primary key for record identification. Primary attributes must have unique value combinations and cannot contain expressions.
validationobjectDefines validation rules for data table attribute values. Based on JSON Schema Draft 2020-12 with additional Connect-specific validations. Validation rules ensure data integrity and consistency across the data table.
value_typestringThe type of value allowed for this attribute. Must be one of TEXT, TEXT_LIST, NUMBER, NUMBER_LIST, or BOOLEAN. Determines how values are validated and processed. (TEXT, NUMBER, BOOLEAN, TEXT_LIST, NUMBER_LIST)
versionstringThe version identifier for this attribute, used for versioning and change tracking.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_data_table_attributeselectinstance_id, data_table_id, attribute_name, regionReturns detailed information for a specific data table attribute including its configuration, validation rules, and metadata. "Describe" is a deprecated term but is allowed to maintain consistency with existing operations.
list_data_table_attributesselectinstance_id, data_table_id, regionnextToken, maxResultsReturns all attributes for a specified data table. A maximum of 100 attributes per data table is allowed. Customers can request an increase by using Amazon Web Services Service Quotas. The response can be filtered by specific attribute IDs for CloudFormation integration.
create_data_table_attributeinsertinstance_id, data_table_id, region, ValueTypeAdds an attribute to an existing data table. Creating a new primary attribute uses the empty value for the specified value type for all existing records. This should not affect uniqueness of published data tables since the existing primary values will already be unique. Creating attributes does not create any values. System managed tables may not allow customers to create new attributes.
update_data_table_attributeupdateinstance_id, data_table_id, attribute_name, region, ValueTypeUpdates all properties for an attribute using all properties from CreateDataTableAttribute. There are no other granular update endpoints. It does not act as a patch operation - all properties must be provided. System managed attributes are not mutable by customers. Changing an attribute's validation does not invalidate existing values since validation only runs when values are created or updated.
delete_data_table_attributedeleteinstance_id, data_table_id, attribute_name, regionDeletes an attribute and all its values from a data table.

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
attribute_namestringThe name of the attribute to delete.
data_table_idstringThe unique identifier for the data table.
instance_idstringThe unique identifier for the Amazon Connect instance.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of data table attributes to return in one page of results.
nextTokenstringSpecify the pagination token from a previous request to retrieve the next page of results.

SELECT examples

Returns detailed information for a specific data table attribute including its configuration, validation rules, and metadata. "Describe" is a deprecated term but is allowed to maintain consistency with existing operations.

SELECT
attribute_id,
data_table_arn,
data_table_id,
description,
last_modified_region,
last_modified_time,
lock_version,
name,
primary,
validation,
value_type,
version
FROM aws.connect.data_table_attributes
WHERE instance_id = '{{ instance_id }}' -- required
AND data_table_id = '{{ data_table_id }}' -- required
AND attribute_name = '{{ attribute_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Adds an attribute to an existing data table. Creating a new primary attribute uses the empty value for the specified value type for all existing records. This should not affect uniqueness of published data tables since the existing primary values will already be unique. Creating attributes does not create any values. System managed tables may not allow customers to create new attributes.

INSERT INTO aws.connect.data_table_attributes (
Name,
ValueType,
Description,
Primary,
Validation,
instance_id,
data_table_id,
region
)
SELECT
'{{ Name }}',
'{{ ValueType }}' /* required */,
'{{ Description }}',
{{ Primary }},
'{{ Validation }}',
'{{ instance_id }}',
'{{ data_table_id }}',
'{{ region }}'
RETURNING
attribute_id,
lock_version,
name
;

UPDATE examples

Updates all properties for an attribute using all properties from CreateDataTableAttribute. There are no other granular update endpoints. It does not act as a patch operation - all properties must be provided. System managed attributes are not mutable by customers. Changing an attribute's validation does not invalidate existing values since validation only runs when values are created or updated.

UPDATE aws.connect.data_table_attributes
SET
Name = '{{ Name }}',
ValueType = '{{ ValueType }}',
Description = '{{ Description }}',
Primary = {{ Primary }},
Validation = '{{ Validation }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND data_table_id = '{{ data_table_id }}' --required
AND attribute_name = '{{ attribute_name }}' --required
AND region = '{{ region }}' --required
AND ValueType = '{{ ValueType }}' --required
RETURNING
lock_version,
name;

DELETE examples

Deletes an attribute and all its values from a data table.

DELETE FROM aws.connect.data_table_attributes
WHERE instance_id = '{{ instance_id }}' --required
AND data_table_id = '{{ data_table_id }}' --required
AND attribute_name = '{{ attribute_name }}' --required
AND region = '{{ region }}' --required
;