Skip to content

/AWS1/CL_IDS=>CREATEUSER()

About CreateUser

Creates a user within the specified identity store.

Method Signature

IMPORTING

Required arguments:

iv_identitystoreid TYPE /AWS1/IDSIDENTITYSTOREID /AWS1/IDSIDENTITYSTOREID

The globally unique identifier for the identity store.

Optional arguments:

iv_username TYPE /AWS1/IDSUSERNAME /AWS1/IDSUSERNAME

A unique string used to identify the user. The length limit is 128 characters. This value can consist of letters, accented characters, symbols, numbers, and punctuation. This value is specified at the time the user is created and stored as an attribute of the user object in the identity store. Administrator and AWSAdministrators are reserved names and can't be used for users or groups.

io_name TYPE REF TO /AWS1/CL_IDSNAME /AWS1/CL_IDSNAME

An object containing the name of the user.

iv_displayname TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string containing the name of the user. This value is typically formatted for display when the user is referenced. For example, "John Doe."

iv_nickname TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string containing an alternate name for the user.

iv_profileurl TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string containing a URL that might be associated with the user.

it_emails TYPE /AWS1/CL_IDSEMAIL=>TT_EMAILS TT_EMAILS

A list of Email objects containing email addresses associated with the user.

it_addresses TYPE /AWS1/CL_IDSADDRESS=>TT_ADDRESSES TT_ADDRESSES

A list of Address objects containing addresses associated with the user.

it_phonenumbers TYPE /AWS1/CL_IDSPHONENUMBER=>TT_PHONENUMBERS TT_PHONENUMBERS

A list of PhoneNumber objects containing phone numbers associated with the user.

iv_usertype TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string indicating the type of user. Possible values are left unspecified. The value can vary based on your specific use case.

iv_title TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string containing the title of the user. Possible values are left unspecified. The value can vary based on your specific use case.

iv_preferredlanguage TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string containing the preferred language of the user. For example, "American English" or "en-us."

iv_locale TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string containing the geographical region or location of the user.

iv_timezone TYPE /AWS1/IDSSENSITIVESTRINGTYPE /AWS1/IDSSENSITIVESTRINGTYPE

A string containing the time zone of the user.

RETURNING

oo_output TYPE REF TO /aws1/cl_idscreateuserresponse /AWS1/CL_IDSCREATEUSERRESPONSE

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->/aws1/if_ids~createuser(
  io_name = new /aws1/cl_idsname(
    iv_familyname = |string|
    iv_formatted = |string|
    iv_givenname = |string|
    iv_honorificprefix = |string|
    iv_honorificsuffix = |string|
    iv_middlename = |string|
  )
  it_addresses = VALUE /aws1/cl_idsaddress=>tt_addresses(
    (
      new /aws1/cl_idsaddress(
        iv_country = |string|
        iv_formatted = |string|
        iv_locality = |string|
        iv_postalcode = |string|
        iv_primary = ABAP_TRUE
        iv_region = |string|
        iv_streetaddress = |string|
        iv_type = |string|
      )
    )
  )
  it_emails = VALUE /aws1/cl_idsemail=>tt_emails(
    (
      new /aws1/cl_idsemail(
        iv_primary = ABAP_TRUE
        iv_type = |string|
        iv_value = |string|
      )
    )
  )
  it_phonenumbers = VALUE /aws1/cl_idsphonenumber=>tt_phonenumbers(
    (
      new /aws1/cl_idsphonenumber(
        iv_primary = ABAP_TRUE
        iv_type = |string|
        iv_value = |string|
      )
    )
  )
  iv_displayname = |string|
  iv_identitystoreid = |string|
  iv_locale = |string|
  iv_nickname = |string|
  iv_preferredlanguage = |string|
  iv_profileurl = |string|
  iv_timezone = |string|
  iv_title = |string|
  iv_username = |string|
  iv_usertype = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_resourceid = lo_result->get_userid( ).
  lv_identitystoreid = lo_result->get_identitystoreid( ).
ENDIF.