Connect / Client / batch_create_data_table_value
batch_create_data_table_value¶
- Connect.Client.batch_create_data_table_value(**kwargs)¶
Creates values for attributes in a data table. The value may be a default or it may be associated with a primary value. The value must pass all customer defined validation as well as the default validation for the value type. The operation must conform to Batch Operation API Standards. Although the standard specifies that successful and failed entities are listed separately in the response, authorization fails if any primary values or attributes are unauthorized. The combination of primary values and the attribute name serve as the identifier for the individual item request.
See also: AWS API Documentation
Request Syntax
response = client.batch_create_data_table_value( InstanceId='string', DataTableId='string', Values=[ { 'PrimaryValues': [ { 'AttributeName': 'string', 'Value': 'string' }, ], 'AttributeName': 'string', 'Value': 'string', 'LockVersion': { 'DataTable': 'string', 'Attribute': 'string', 'PrimaryValues': 'string', 'Value': 'string' }, 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' }, ] )
- Parameters:
InstanceId (string) –
[REQUIRED]
The unique identifier for the Amazon Connect instance.
DataTableId (string) –
[REQUIRED]
The unique identifier for the data table. Must also accept the table ARN with or without a version alias. If no alias is provided, the default behavior is identical to providing the $LATEST alias.
Values (list) –
[REQUIRED]
A list of values to create. Each value must specify the attribute name and optionally primary values if the table has primary attributes.
(dict) –
A data table value.
PrimaryValues (list) –
The value’s primary values.
(dict) –
Represents a primary key value used to identify a specific record in a data table. Primary values are used in combination to create unique record identifiers when a table has multiple primary attributes.
AttributeName (string) – [REQUIRED]
The name of the primary attribute that this value belongs to.
Value (string) – [REQUIRED]
The actual value for the primary attribute. Must be provided as a string regardless of the attribute’s value type. Primary values cannot be expressions and must be explicitly specified.
AttributeName (string) – [REQUIRED]
The value’s attribute name.
Value (string) – [REQUIRED]
The value’s value.
LockVersion (dict) –
The value’s lock version.
DataTable (string) –
The lock version for the data table itself. Used for optimistic locking and table versioning. Changes with each update to the table’s metadata or structure.
Attribute (string) –
The lock version for a specific attribute. When the ValueLockLevel is ATTRIBUTE, this version changes when any value for the attribute changes. For other lock levels, it only changes when the attribute’s properties are directly updated.
PrimaryValues (string) –
The lock version for a specific set of primary values (record). This includes the default record even if the table does not have any primary attributes. Used for record-level locking.
Value (string) –
The lock version for a specific value. Changes each time the individual value is modified. Used for the finest-grained locking control.
LastModifiedTime (datetime) –
The value’s last modified time.
LastModifiedRegion (string) –
The value’s last modified region.
- Return type:
dict
- Returns:
Response Syntax
{ 'Successful': [ { 'PrimaryValues': [ { 'AttributeName': 'string', 'Value': 'string' }, ], 'AttributeName': 'string', 'RecordId': 'string', 'LockVersion': { 'DataTable': 'string', 'Attribute': 'string', 'PrimaryValues': 'string', 'Value': 'string' } }, ], 'Failed': [ { 'PrimaryValues': [ { 'AttributeName': 'string', 'Value': 'string' }, ], 'AttributeName': 'string', 'Message': 'string' }, ] }
Response Structure
(dict) –
Successful (list) –
A list of successfully created values with their identifiers and lock versions.
(dict) –
A batch create data table value success result.
PrimaryValues (list) –
The result’s primary values.
(dict) –
Represents a primary key value used to identify a specific record in a data table. Primary values are used in combination to create unique record identifiers when a table has multiple primary attributes.
AttributeName (string) –
The name of the primary attribute that this value belongs to.
Value (string) –
The actual value for the primary attribute. Must be provided as a string regardless of the attribute’s value type. Primary values cannot be expressions and must be explicitly specified.
AttributeName (string) –
The result’s attribute name.
RecordId (string) –
The result’s record ID.
LockVersion (dict) –
The result’s lock version.
DataTable (string) –
The lock version for the data table itself. Used for optimistic locking and table versioning. Changes with each update to the table’s metadata or structure.
Attribute (string) –
The lock version for a specific attribute. When the ValueLockLevel is ATTRIBUTE, this version changes when any value for the attribute changes. For other lock levels, it only changes when the attribute’s properties are directly updated.
PrimaryValues (string) –
The lock version for a specific set of primary values (record). This includes the default record even if the table does not have any primary attributes. Used for record-level locking.
Value (string) –
The lock version for a specific value. Changes each time the individual value is modified. Used for the finest-grained locking control.
Failed (list) –
A list of values that failed to be created with error messages explaining the failure reason.
(dict) –
A batch create data table value failure result.
PrimaryValues (list) –
The result’s primary values.
(dict) –
Represents a primary key value used to identify a specific record in a data table. Primary values are used in combination to create unique record identifiers when a table has multiple primary attributes.
AttributeName (string) –
The name of the primary attribute that this value belongs to.
Value (string) –
The actual value for the primary attribute. Must be provided as a string regardless of the attribute’s value type. Primary values cannot be expressions and must be explicitly specified.
AttributeName (string) –
The result’s attribute name.
Message (string) –
The result’s message.
Exceptions