createDataTable method
Creates a new data table with the specified properties. Supports the creation of all table properties except for attributes and values. A table with no attributes and values is a valid state for a table. The number of tables per instance is limited to 100 per instance. Customers can request an increase by using Amazon Web Services Service Quotas.
May throw AccessDeniedException.
May throw ConflictException.
May throw DuplicateResourceException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
Parameter instanceId :
The unique identifier for the Amazon Connect instance where the data table
will be created.
Parameter name :
The name for the data table. Must conform to Connect human readable string
specification and have 1-127 characters. Whitespace must be trimmed first.
Must not start with the reserved case insensitive values 'connect:' and
'aws:'. Must be unique for the instance using case-insensitive comparison.
Parameter status :
The status of the data table. One of PUBLISHED or SAVED. Required
parameter that determines the initial state of the table.
Parameter timeZone :
The IANA timezone identifier to use when resolving time based dynamic
values. Required even if no time slices are specified.
Parameter valueLockLevel :
The data level that concurrent value edits are locked on. One of
DATA_TABLE, PRIMARY_VALUE, ATTRIBUTE, VALUE, and NONE. NONE is the default
if unspecified. This determines how concurrent edits are handled when
multiple users attempt to modify values simultaneously.
Parameter description :
An optional description for the data table. Must conform to Connect human
readable string specification and have 0-250 characters. Whitespace must
be trimmed first.
Parameter tags :
Key value pairs for attribute based access control (TBAC or ABAC).
Optional tags to apply to the data table for organization and access
control purposes.
Implementation
Future<CreateDataTableResponse> createDataTable({
required String instanceId,
required String name,
required DataTableStatus status,
required String timeZone,
required DataTableLockLevel valueLockLevel,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'Name': name,
'Status': status.value,
'TimeZone': timeZone,
'ValueLockLevel': valueLockLevel.value,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/data-tables/${Uri.encodeComponent(instanceId)}',
exceptionFnMap: _exceptionFns,
);
return CreateDataTableResponse.fromJson(response);
}