/AWS1/IF_DSR=>CREATEDIRECTORY()¶
About CreateDirectory¶
Creates a Simple AD directory. For more information, see Simple Active Directory in the Directory Service Admin Guide.
Before you call CreateDirectory, ensure that all of the required permissions
have been explicitly granted through a policy. For details about what permissions are required
to run the CreateDirectory operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
Method Signature¶
METHODS /AWS1/IF_DSR~CREATEDIRECTORY
IMPORTING
!IV_NAME TYPE /AWS1/DSRDIRECTORYNAME OPTIONAL
!IV_SHORTNAME TYPE /AWS1/DSRDIRECTORYSHORTNAME OPTIONAL
!IV_PASSWORD TYPE /AWS1/DSRPASSWORD OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/DSRDESCRIPTION OPTIONAL
!IV_SIZE TYPE /AWS1/DSRDIRECTORYSIZE OPTIONAL
!IO_VPCSETTINGS TYPE REF TO /AWS1/CL_DSRDIRECTORYVPCSTGS OPTIONAL
!IT_TAGS TYPE /AWS1/CL_DSRTAG=>TT_TAGS OPTIONAL
!IV_NETWORKTYPE TYPE /AWS1/DSRNETWORKTYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dsrcredirectoryrslt
RAISING
/AWS1/CX_DSRCLIENTEXCEPTION
/AWS1/CX_DSRDIRECTORYLMTEXCDEX
/AWS1/CX_DSRINVALIDPARAMETEREX
/AWS1/CX_DSRSERVICEEXCEPTION
/AWS1/CX_DSRCLIENTEXC
/AWS1/CX_DSRSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/DSRDIRECTORYNAME /AWS1/DSRDIRECTORYNAME¶
The fully qualified name for the directory, such as
corp.example.com.
iv_password TYPE /AWS1/DSRPASSWORD /AWS1/DSRPASSWORD¶
The password for the directory administrator. The directory creation process creates a directory administrator account with the user name
Administratorand this password.If you need to change the password for the administrator account, you can use the ResetUserPassword API call.
The regex pattern for this string is made up of the following conditions:
Length (?=^.{8,64}$) – Must be between 8 and 64 characters
AND any 3 of the following password complexity rules required by Active Directory:
Numbers and upper case and lowercase (?=.\d)(?=.[A-Z])(?=.[a-z])
Numbers and special characters and lower case (?=.\d)(?=.[^A-Za-z0-9\s])(?=.[a-z])
Special characters and upper case and lower case (?=.[^A-Za-z0-9\s])(?=.[A-Z])(?=.[a-z])
Numbers and upper case and special characters (?=.\d)(?=.[A-Z])(?=.[^A-Za-z0-9\s])
For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
iv_size TYPE /AWS1/DSRDIRECTORYSIZE /AWS1/DSRDIRECTORYSIZE¶
The size of the directory.
Optional arguments:¶
iv_shortname TYPE /AWS1/DSRDIRECTORYSHORTNAME /AWS1/DSRDIRECTORYSHORTNAME¶
The NetBIOS name of the directory, such as
CORP.
iv_description TYPE /AWS1/DSRDESCRIPTION /AWS1/DSRDESCRIPTION¶
A description for the directory.
io_vpcsettings TYPE REF TO /AWS1/CL_DSRDIRECTORYVPCSTGS /AWS1/CL_DSRDIRECTORYVPCSTGS¶
A DirectoryVpcSettings object that contains additional information for the operation.
it_tags TYPE /AWS1/CL_DSRTAG=>TT_TAGS TT_TAGS¶
The tags to be assigned to the Simple AD directory.
iv_networktype TYPE /AWS1/DSRNETWORKTYPE /AWS1/DSRNETWORKTYPE¶
The network type for your directory. Simple AD supports IPv4 and Dual-stack only.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dsrcredirectoryrslt /AWS1/CL_DSRCREDIRECTORYRSLT¶
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->createdirectory(
io_vpcsettings = new /aws1/cl_dsrdirectoryvpcstgs(
it_subnetids = VALUE /aws1/cl_dsrsubnetids_w=>tt_subnetids(
( new /aws1/cl_dsrsubnetids_w( |string| ) )
)
iv_vpcid = |string|
)
it_tags = VALUE /aws1/cl_dsrtag=>tt_tags(
(
new /aws1/cl_dsrtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_description = |string|
iv_name = |string|
iv_networktype = |string|
iv_password = |string|
iv_shortname = |string|
iv_size = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_directoryid = lo_result->get_directoryid( ).
ENDIF.
To create a Simple AD directory¶
The following example creates a Simple AD directory.
DATA(lo_result) = lo_client->createdirectory(
io_vpcsettings = new /aws1/cl_dsrdirectoryvpcstgs(
it_subnetids = VALUE /aws1/cl_dsrsubnetids_w=>tt_subnetids(
( new /aws1/cl_dsrsubnetids_w( |subnet-ba0146de| ) )
( new /aws1/cl_dsrsubnetids_w( |subnet-bef46bc8| ) )
)
iv_vpcid = |vpc-45025421|
)
iv_description = |Regional directory for example.com|
iv_name = |seattle.example.com|
iv_password = |Str0ngP@ssw0rd|
iv_shortname = |seattle|
iv_size = |Small|
).