/AWS1/IF_CNT=>CREATEUSER()¶
About CreateUser¶
Creates a user account for the specified Amazon Connect instance.
Certain UserIdentityInfo parameters
are required in some situations. For example, Email, FirstName and
LastName are required if you are using Amazon Connect or SAML for identity
management.
For information about how to create users using the Amazon Connect admin website, see Add Users in the Amazon Connect Administrator Guide.
Method Signature¶
METHODS /AWS1/IF_CNT~CREATEUSER
IMPORTING
!IV_USERNAME TYPE /AWS1/CNTAGENTUSERNAME OPTIONAL
!IV_PASSWORD TYPE /AWS1/CNTPASSWORD OPTIONAL
!IO_IDENTITYINFO TYPE REF TO /AWS1/CL_CNTUSERIDENTITYINFO OPTIONAL
!IO_PHONECONFIG TYPE REF TO /AWS1/CL_CNTUSERPHONECONFIG OPTIONAL
!IV_DIRECTORYUSERID TYPE /AWS1/CNTDIRECTORYUSERID OPTIONAL
!IT_SECURITYPROFILEIDS TYPE /AWS1/CL_CNTSECPROFILEIDS_W=>TT_SECURITYPROFILEIDS OPTIONAL
!IV_ROUTINGPROFILEID TYPE /AWS1/CNTROUTINGPROFILEID OPTIONAL
!IV_HIERARCHYGROUPID TYPE /AWS1/CNTHIERARCHYGROUPID OPTIONAL
!IV_INSTANCEID TYPE /AWS1/CNTINSTANCEID OPTIONAL
!IT_TAGS TYPE /AWS1/CL_CNTTAGMAP_W=>TT_TAGMAP OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntcreateuserresponse
RAISING
/AWS1/CX_CNTDUPLICATERESRCEX
/AWS1/CX_CNTINTERNALSERVICEEX
/AWS1/CX_CNTINVALIDPARAMETEREX
/AWS1/CX_CNTINVALIDREQUESTEX
/AWS1/CX_CNTLIMITEXCEEDEDEX
/AWS1/CX_CNTRESOURCENOTFOUNDEX
/AWS1/CX_CNTTHROTTLINGEX
/AWS1/CX_CNTCLIENTEXC
/AWS1/CX_CNTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_username TYPE /AWS1/CNTAGENTUSERNAME /AWS1/CNTAGENTUSERNAME¶
The user name for the account. For instances not using SAML for identity management, the user name can include up to 20 characters. If you are using SAML for identity management, the user name can include up to 64 characters from [a-zA-Z0-9_-.\@]+.
Username can include @ only if used in an email format. For example:
Correct: testuser
Correct: testuser@example.com
Incorrect: testuser@example
io_phoneconfig TYPE REF TO /AWS1/CL_CNTUSERPHONECONFIG /AWS1/CL_CNTUSERPHONECONFIG¶
The phone settings for the user.
it_securityprofileids TYPE /AWS1/CL_CNTSECPROFILEIDS_W=>TT_SECURITYPROFILEIDS TT_SECURITYPROFILEIDS¶
The identifier of the security profile for the user.
iv_routingprofileid TYPE /AWS1/CNTROUTINGPROFILEID /AWS1/CNTROUTINGPROFILEID¶
The identifier of the routing profile for the user.
iv_instanceid TYPE /AWS1/CNTINSTANCEID /AWS1/CNTINSTANCEID¶
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Optional arguments:¶
iv_password TYPE /AWS1/CNTPASSWORD /AWS1/CNTPASSWORD¶
The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password.
io_identityinfo TYPE REF TO /AWS1/CL_CNTUSERIDENTITYINFO /AWS1/CL_CNTUSERIDENTITYINFO¶
The information about the identity of the user.
iv_directoryuserid TYPE /AWS1/CNTDIRECTORYUSERID /AWS1/CNTDIRECTORYUSERID¶
The identifier of the user account in the directory used for identity management. If Amazon Connect cannot access the directory, you can specify this identifier to authenticate users. If you include the identifier, we assume that Amazon Connect cannot access the directory. Otherwise, the identity information is used to authenticate users from your directory.
This parameter is required if you are using an existing directory for identity management in Amazon Connect when Amazon Connect cannot access your directory to authenticate users. If you are using SAML for identity management and include this parameter, an error is returned.
iv_hierarchygroupid TYPE /AWS1/CNTHIERARCHYGROUPID /AWS1/CNTHIERARCHYGROUPID¶
The identifier of the hierarchy group for the user.
it_tags TYPE /AWS1/CL_CNTTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cntcreateuserresponse /AWS1/CL_CNTCREATEUSERRESPONSE¶
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->createuser(
io_identityinfo = new /aws1/cl_cntuseridentityinfo(
iv_email = |string|
iv_firstname = |string|
iv_lastname = |string|
iv_mobile = |string|
iv_secondaryemail = |string|
)
io_phoneconfig = new /aws1/cl_cntuserphoneconfig(
iv_aftercontactworktimelimit = 123
iv_autoaccept = ABAP_TRUE
iv_deskphonenumber = |string|
iv_persistentconnection = ABAP_TRUE
iv_phonetype = |string|
)
it_securityprofileids = VALUE /aws1/cl_cntsecprofileids_w=>tt_securityprofileids(
( new /aws1/cl_cntsecprofileids_w( |string| ) )
)
it_tags = VALUE /aws1/cl_cnttagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_cnttagmap_w=>ts_tagmap_maprow(
value = new /aws1/cl_cnttagmap_w( |string| )
key = |string|
)
)
)
iv_directoryuserid = |string|
iv_hierarchygroupid = |string|
iv_instanceid = |string|
iv_password = |string|
iv_routingprofileid = |string|
iv_username = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_userid = lo_result->get_userid( ).
lv_arn = lo_result->get_userarn( ).
ENDIF.