/AWS1/IF_CNT=>CREATEDATATABLEATTRIBUTE()¶
About CreateDataTableAttribute¶
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.
Method Signature¶
METHODS /AWS1/IF_CNT~CREATEDATATABLEATTRIBUTE
IMPORTING
!IV_INSTANCEID TYPE /AWS1/CNTINSTANCEID OPTIONAL
!IV_DATATABLEID TYPE /AWS1/CNTDATATABLEID OPTIONAL
!IV_NAME TYPE /AWS1/CNTDATATABLENAME OPTIONAL
!IV_VALUETYPE TYPE /AWS1/CNTDATATBLATTRVALUETYPE OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/CNTDATATABLEDESCRIPTION OPTIONAL
!IV_PRIMARY TYPE /AWS1/CNTBOOLEAN OPTIONAL
!IO_VALIDATION TYPE REF TO /AWS1/CL_CNTVALIDATION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntcredatatblattrrsp
RAISING
/AWS1/CX_CNTACCESSDENIEDEX
/AWS1/CX_CNTCONFLICTEXCEPTION
/AWS1/CX_CNTDUPLICATERESRCEX
/AWS1/CX_CNTINTERNALSERVICEEX
/AWS1/CX_CNTINVALIDPARAMETEREX
/AWS1/CX_CNTINVALIDREQUESTEX
/AWS1/CX_CNTRESOURCENOTFOUNDEX
/AWS1/CX_CNTSERVICEQUOTAEXCDEX
/AWS1/CX_CNTTHROTTLINGEX
/AWS1/CX_CNTCLIENTEXC
/AWS1/CX_CNTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_instanceid TYPE /AWS1/CNTINSTANCEID /AWS1/CNTINSTANCEID¶
The unique identifier for the Amazon Connect instance.
iv_datatableid TYPE /AWS1/CNTDATATABLEID /AWS1/CNTDATATABLEID¶
The unique identifier for the data table. Must also accept the table ARN with or without a version alias. If the version is provided as part of the identifier or ARN, the version must be one of the two available system managed aliases, $SAVED or $LATEST.
iv_name TYPE /AWS1/CNTDATATABLENAME /AWS1/CNTDATATABLENAME¶
The name for the attribute. Must conform to Connect human readable string specification and have 1-127 characters. Must not start with the reserved case insensitive values 'connect:' and 'aws:'. Whitespace trimmed before persisting. Must be unique for the data table using case-insensitive comparison.
iv_valuetype TYPE /AWS1/CNTDATATBLATTRVALUETYPE /AWS1/CNTDATATBLATTRVALUETYPE¶
The type of value allowed or the resultant type after the value's expression is evaluated. Must be one of TEXT, TEXT_LIST, NUMBER, NUMBER_LIST, and BOOLEAN.
Optional arguments:¶
iv_description TYPE /AWS1/CNTDATATABLEDESCRIPTION /AWS1/CNTDATATABLEDESCRIPTION¶
An optional description for the attribute. Must conform to Connect human readable string specification and have 0-250 characters. Whitespace trimmed before persisting.
iv_primary TYPE /AWS1/CNTBOOLEAN /AWS1/CNTBOOLEAN¶
Optional boolean that defaults to false. Determines if the value is used to identify a record in the table. Values for primary attributes must not be expressions.
io_validation TYPE REF TO /AWS1/CL_CNTVALIDATION /AWS1/CL_CNTVALIDATION¶
Optional validation rules for the attribute. Borrows heavily from JSON Schema - Draft 2020-12. The maximum length of arrays within validations and depth of validations is 5. There are default limits that apply to all types. Customer specified limits in excess of the default limits are not permitted.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cntcredatatblattrrsp /AWS1/CL_CNTCREDATATBLATTRRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createdatatableattribute(
io_validation = new /aws1/cl_cntvalidation(
io_enum = new /aws1/cl_cntvalidationenum(
it_values = VALUE /aws1/cl_cntvldtnenumvalues_w=>tt_validationenumvalues(
( new /aws1/cl_cntvldtnenumvalues_w( |string| ) )
)
iv_strict = ABAP_TRUE
)
iv_exclusivemaximum = '0.1'
iv_exclusiveminimum = '0.1'
iv_ignorecase = ABAP_TRUE
iv_maximum = '0.1'
iv_maxlength = 123
iv_maxvalues = 123
iv_minimum = '0.1'
iv_minlength = 123
iv_minvalues = 123
iv_multipleof = '0.1'
)
iv_datatableid = |string|
iv_description = |string|
iv_instanceid = |string|
iv_name = |string|
iv_primary = ABAP_TRUE
iv_valuetype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_datatablename = lo_result->get_name( ).
lv_datatableid = lo_result->get_attributeid( ).
lo_datatablelockversion = lo_result->get_lockversion( ).
IF lo_datatablelockversion IS NOT INITIAL.
lv_string = lo_datatablelockversion->get_datatable( ).
lv_string = lo_datatablelockversion->get_attribute( ).
lv_string = lo_datatablelockversion->get_primaryvalues( ).
lv_string = lo_datatablelockversion->get_value( ).
ENDIF.
ENDIF.