/AWS1/IF_DSR=>CONNECTDIRECTORY()¶
About ConnectDirectory¶
Creates an AD Connector to connect to a self-managed directory.
Before you call ConnectDirectory, ensure that all of the required permissions
have been explicitly granted through a policy. For details about what permissions are required
to run the ConnectDirectory operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
Method Signature¶
METHODS /AWS1/IF_DSR~CONNECTDIRECTORY
IMPORTING
!IV_NAME TYPE /AWS1/DSRDIRECTORYNAME OPTIONAL
!IV_SHORTNAME TYPE /AWS1/DSRDIRECTORYSHORTNAME OPTIONAL
!IV_PASSWORD TYPE /AWS1/DSRCONNECTPASSWORD OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/DSRDESCRIPTION OPTIONAL
!IV_SIZE TYPE /AWS1/DSRDIRECTORYSIZE OPTIONAL
!IO_CONNECTSETTINGS TYPE REF TO /AWS1/CL_DSRDIRECTORYCNCTSTGS 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_dsrcnctdirectoryrslt
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 of your self-managed directory, such as
corp.example.com.
iv_password TYPE /AWS1/DSRCONNECTPASSWORD /AWS1/DSRCONNECTPASSWORD¶
The password for your self-managed user account.
iv_size TYPE /AWS1/DSRDIRECTORYSIZE /AWS1/DSRDIRECTORYSIZE¶
The size of the directory.
io_connectsettings TYPE REF TO /AWS1/CL_DSRDIRECTORYCNCTSTGS /AWS1/CL_DSRDIRECTORYCNCTSTGS¶
A DirectoryConnectSettings object that contains additional information for the operation.
Optional arguments:¶
iv_shortname TYPE /AWS1/DSRDIRECTORYSHORTNAME /AWS1/DSRDIRECTORYSHORTNAME¶
The NetBIOS name of your self-managed directory, such as
CORP.
iv_description TYPE /AWS1/DSRDESCRIPTION /AWS1/DSRDESCRIPTION¶
A description for the directory.
it_tags TYPE /AWS1/CL_DSRTAG=>TT_TAGS TT_TAGS¶
The tags to be assigned to AD Connector.
iv_networktype TYPE /AWS1/DSRNETWORKTYPE /AWS1/DSRNETWORKTYPE¶
The network type for your directory. The default value is
IPv4orIPv6based on the provided subnet capabilities.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dsrcnctdirectoryrslt /AWS1/CL_DSRCNCTDIRECTORYRSLT¶
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->connectdirectory(
io_connectsettings = new /aws1/cl_dsrdirectorycnctstgs(
it_customerdnsips = VALUE /aws1/cl_dsrdnsipaddrs_w=>tt_dnsipaddrs(
( new /aws1/cl_dsrdnsipaddrs_w( |string| ) )
)
it_customerdnsipsv6 = VALUE /aws1/cl_dsrdnsipv6addrs_w=>tt_dnsipv6addrs(
( new /aws1/cl_dsrdnsipv6addrs_w( |string| ) )
)
it_subnetids = VALUE /aws1/cl_dsrsubnetids_w=>tt_subnetids(
( new /aws1/cl_dsrsubnetids_w( |string| ) )
)
iv_customerusername = |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 connect to an on-premises directory¶
The following example creates an AD Connector to connect to an on-premises directory.
DATA(lo_result) = lo_client->connectdirectory(
io_connectsettings = new /aws1/cl_dsrdirectorycnctstgs(
it_customerdnsips = VALUE /aws1/cl_dsrdnsipaddrs_w=>tt_dnsipaddrs(
( new /aws1/cl_dsrdnsipaddrs_w( |172.30.21.228| ) )
)
it_subnetids = VALUE /aws1/cl_dsrsubnetids_w=>tt_subnetids(
( new /aws1/cl_dsrsubnetids_w( |subnet-ba0146de| ) )
( new /aws1/cl_dsrsubnetids_w( |subnet-bef46bc8| ) )
)
iv_customerusername = |Administrator|
iv_vpcid = |vpc-45025421|
)
iv_description = |Connector to corp|
iv_name = |corp.example.com|
iv_password = |Str0ngP@ssw0rd|
iv_shortname = |corp|
iv_size = |Small|
).