/AWS1/IF_NWS=>GETADMINACCOUNT()¶
About GetAdminAccount¶
Retrieves the details of the specified AWS Network Security Manager administrator account.
Method Signature¶
METHODS /AWS1/IF_NWS~GETADMINACCOUNT
IMPORTING
!IV_ACCOUNTID TYPE /AWS1/NWSACCOUNTID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_nwsgetadminaccountrsp
RAISING
/AWS1/CX_NWSACCESSDENIEDEX
/AWS1/CX_NWSINTERNALSERVEREX
/AWS1/CX_NWSRESOURCENOTFOUNDEX
/AWS1/CX_NWSTHROTTLINGEX
/AWS1/CX_NWSVLDTNEXCEPTION
/AWS1/CX_NWSCLIENTEXC
/AWS1/CX_NWSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_accountid TYPE /AWS1/NWSACCOUNTID /AWS1/NWSACCOUNTID¶
The AWS account ID of the administrator account to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_nwsgetadminaccountrsp /AWS1/CL_NWSGETADMINACCOUNTRSP¶
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->getadminaccount( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_adminaccountdetails = lo_result->get_adminaccountdetails( ).
IF lo_adminaccountdetails IS NOT INITIAL.
lv_accountid = lo_adminaccountdetails->get_adminaccount( ).
lv_adminpriority = lo_adminaccountdetails->get_priority( ).
lo_adminscope = lo_adminaccountdetails->get_adminscope( ).
IF lo_adminscope IS NOT INITIAL.
lo_adminscopefilter = lo_adminscope->get_scopefilter( ).
IF lo_adminscopefilter IS NOT INITIAL.
lo_unit = lo_adminscopefilter->get_includeall( ).
IF lo_unit IS NOT INITIAL.
ENDIF.
lo_adminscopeselection = lo_adminscopefilter->get_includeonly( ).
IF lo_adminscopeselection IS NOT INITIAL.
LOOP AT lo_adminscopeselection->get_accounts( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_accountid = lo_row_1->get_accountid( ).
lv_sensitiveaccountname = lo_row_1->get_name( ).
lv_sensitiveaccountemail = lo_row_1->get_email( ).
ENDIF.
ENDLOOP.
LOOP AT lo_adminscopeselection->get_organizationalunits( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_organizationalunitid = lo_row_3->get_ouid( ).
lv_string = lo_row_3->get_name( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_adminscopeselection = lo_adminscopefilter->get_excludeonly( ).
IF lo_adminscopeselection IS NOT INITIAL.
LOOP AT lo_adminscopeselection->get_accounts( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_accountid = lo_row_1->get_accountid( ).
lv_sensitiveaccountname = lo_row_1->get_name( ).
lv_sensitiveaccountemail = lo_row_1->get_email( ).
ENDIF.
ENDLOOP.
LOOP AT lo_adminscopeselection->get_organizationalunits( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_organizationalunitid = lo_row_3->get_ouid( ).
lv_string = lo_row_3->get_name( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_adminfirewalltypescope = lo_adminscope->get_firewalltypescope( ).
IF lo_adminfirewalltypescope IS NOT INITIAL.
lv_boolean = lo_adminfirewalltypescope->get_allfirewalltypesenabled( ).
LOOP AT lo_adminfirewalltypescope->get_firewalltypes( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_policyfirewalltype = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lv_adminaccountstatus = lo_adminaccountdetails->get_status( ).
ENDIF.
ENDIF.
Get an administrator account¶
Retrieves the details and administrative scope of a Network Security Manager administrator account.
DATA(lo_result) = lo_client->getadminaccount( |234567890123| ).