/AWS1/IF_IAM=>GETLOGINPROFILE()¶
About GetLoginProfile¶
Retrieves the user name for the specified IAM user. A login profile is created when
you create a password for the user to access the Amazon Web Services Management Console. If the user does not exist
or does not have a password, the operation returns a 404 (NoSuchEntity)
error.
If you create an IAM user with access to the console, the CreateDate
reflects the date you created the initial password for the user.
If you create an IAM user with programmatic access, and then later add a password
for the user to access the Amazon Web Services Management Console, the CreateDate reflects the initial
password creation date. A user with programmatic access does not have a login profile
unless you create a password for the user to access the Amazon Web Services Management Console.
Method Signature¶
METHODS /AWS1/IF_IAM~GETLOGINPROFILE
IMPORTING
!IV_USERNAME TYPE /AWS1/IAMUSERNAMETYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iamgetloginprofilersp
RAISING
/AWS1/CX_IAMNOSUCHENTITYEX
/AWS1/CX_IAMSERVICEFAILUREEX
/AWS1/CX_IAMCLIENTEXC
/AWS1/CX_IAMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_username TYPE /AWS1/IAMUSERNAMETYPE /AWS1/IAMUSERNAMETYPE¶
The name of the user whose login profile you want to retrieve.
This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an AssumeRoot session to omit the user name.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iamgetloginprofilersp /AWS1/CL_IAMGETLOGINPROFILERSP¶
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->getloginprofile( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_loginprofile = lo_result->get_loginprofile( ).
IF lo_loginprofile IS NOT INITIAL.
lv_usernametype = lo_loginprofile->get_username( ).
lv_datetype = lo_loginprofile->get_createdate( ).
lv_booleantype = lo_loginprofile->get_passwordresetrequired( ).
ENDIF.
ENDIF.
To get password information for an IAM user¶
The following command gets information about the password for the IAM user named Anika.
DATA(lo_result) = lo_client->getloginprofile( |Anika| ).