/AWS1/IF_SAG=>CREATETARGETDOMAIN()¶
About CreateTargetDomain¶
Creates a new target domain for penetration testing. A target domain is a web domain that must be registered and verified before it can be tested.
Method Signature¶
METHODS /AWS1/IF_SAG~CREATETARGETDOMAIN
IMPORTING
!IV_TARGETDOMAINNAME TYPE /AWS1/SAGSTRING OPTIONAL
!IV_VERIFICATIONMETHOD TYPE /AWS1/SAGDOMAINVERIFMETHOD OPTIONAL
!IT_TAGS TYPE /AWS1/CL_SAGTAGMAP_W=>TT_TAGMAP OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sagcreatetgtdomoutput
RAISING
/AWS1/CX_SAGCLIENTEXC
/AWS1/CX_SAGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_targetdomainname TYPE /AWS1/SAGSTRING /AWS1/SAGSTRING¶
The domain name to register as a target domain.
iv_verificationmethod TYPE /AWS1/SAGDOMAINVERIFMETHOD /AWS1/SAGDOMAINVERIFMETHOD¶
The method to use for verifying domain ownership. Valid values are DNS_TXT, HTTP_ROUTE, and PRIVATE_VPC.
Optional arguments:¶
it_tags TYPE /AWS1/CL_SAGTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
The tags to associate with the target domain.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_sagcreatetgtdomoutput /AWS1/CL_SAGCREATETGTDOMOUTPUT¶
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->createtargetdomain(
it_tags = VALUE /aws1/cl_sagtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_sagtagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_sagtagmap_w( |string| )
)
)
)
iv_targetdomainname = |string|
iv_verificationmethod = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_targetdomainid = lo_result->get_targetdomainid( ).
lv_string = lo_result->get_domainname( ).
lv_targetdomainstatus = lo_result->get_verificationstatus( ).
lv_string = lo_result->get_verificationstatusreason( ).
lo_verificationdetails = lo_result->get_verificationdetails( ).
IF lo_verificationdetails IS NOT INITIAL.
lv_domainverificationmetho = lo_verificationdetails->get_method( ).
lo_dnsverification = lo_verificationdetails->get_dnstxt( ).
IF lo_dnsverification IS NOT INITIAL.
lv_string = lo_dnsverification->get_token( ).
lv_string = lo_dnsverification->get_dnsrecordname( ).
lv_dnsrecordtype = lo_dnsverification->get_dnsrecordtype( ).
ENDIF.
lo_httpverification = lo_verificationdetails->get_httproute( ).
IF lo_httpverification IS NOT INITIAL.
lv_string = lo_httpverification->get_token( ).
lv_string = lo_httpverification->get_routepath( ).
ENDIF.
ENDIF.
lv_timestamp = lo_result->get_createdat( ).
lv_timestamp = lo_result->get_verifiedat( ).
ENDIF.