/AWS1/CL_IAM=>CREATESERVICESPECIFICCRED()
¶
About CreateServiceSpecificCredential¶
Generates a set of credentials consisting of a user name and password that can be used to access the service specified in the request. These credentials are generated by IAM, and can be used only for the specified service.
You can have a maximum of two sets of service-specific credentials for each supported service per user.
You can create service-specific credentials for CodeCommit and Amazon Keyspaces (for Apache Cassandra).
You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential.
For more information about service-specific credentials, see Using IAM with CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys in the IAM User Guide.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_username
TYPE /AWS1/IAMUSERNAMETYPE
/AWS1/IAMUSERNAMETYPE
¶
The name of the IAM user that is to be associated with the credentials. The new service-specific credentials have the same permissions as the associated user except that they can be used only to access the specified service.
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: _+=,.@-
iv_servicename
TYPE /AWS1/IAMSERVICENAME
/AWS1/IAMSERVICENAME
¶
The name of the Amazon Web Services service that is to be associated with the credentials. The service you specify here is the only service that can be accessed using these credentials.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_iamcresvcspfcredrsp
/AWS1/CL_IAMCRESVCSPFCREDRSP
¶
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->/aws1/if_iam~createservicespecificcred(
iv_servicename = |string|
iv_username = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_servicespecificcredenti = lo_result->get_servicespecificcred( ).
IF lo_servicespecificcredenti IS NOT INITIAL.
lv_datetype = lo_servicespecificcredenti->get_createdate( ).
lv_servicename = lo_servicespecificcredenti->get_servicename( ).
lv_serviceusername = lo_servicespecificcredenti->get_serviceusername( ).
lv_servicepassword = lo_servicespecificcredenti->get_servicepassword( ).
lv_servicespecificcredenti_1 = lo_servicespecificcredenti->get_servicespecificcredid( ).
lv_usernametype = lo_servicespecificcredenti->get_username( ).
lv_statustype = lo_servicespecificcredenti->get_status( ).
ENDIF.
ENDIF.