Connect / Client / batch_update_data_table_value

batch_update_data_table_value

Connect.Client.batch_update_data_table_value(**kwargs)

Updates multiple data table values using all properties from BatchCreateDataTableValue. System managed values are not modifiable by customers. The operation requires proper lock versions to prevent concurrent modification conflicts.

See also: AWS API Documentation

Request Syntax

response = client.batch_update_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.

  • Values (list) –

    [REQUIRED]

    A list of values to update, each including the current lock version to ensure optimistic locking.

    • (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',
            '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 updated values with their new lock versions and identifiers.

      • (dict) –

        A batch update 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.

        • 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 updated with error messages explaining the failure reason.

      • (dict) –

        A batch update 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