/AWS1/IF_TRN=>IMPORTSSHPUBLICKEY()¶
About ImportSshPublicKey¶
Adds a Secure Shell (SSH) public key to a Transfer Family user identified by a UserName value assigned to the specific file transfer protocol-enabled server, identified by ServerId.
The response returns the UserName value, the ServerId value, and the name of the SshPublicKeyId.
Method Signature¶
METHODS /AWS1/IF_TRN~IMPORTSSHPUBLICKEY
IMPORTING
!IV_SERVERID TYPE /AWS1/TRNSERVERID OPTIONAL
!IV_SSHPUBLICKEYBODY TYPE /AWS1/TRNSSHPUBLICKEYBODY OPTIONAL
!IV_USERNAME TYPE /AWS1/TRNUSERNAME OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_trnimpsshpublickeyrsp
RAISING
/AWS1/CX_TRNINTERNALSVCERROR
/AWS1/CX_TRNINVALIDREQUESTEX
/AWS1/CX_TRNRESOURCEEXISTSEX
/AWS1/CX_TRNRESOURCENOTFOUNDEX
/AWS1/CX_TRNSERVICEUNAVAILEX
/AWS1/CX_TRNTHROTTLINGEX
/AWS1/CX_TRNCLIENTEXC
/AWS1/CX_TRNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_serverid TYPE /AWS1/TRNSERVERID /AWS1/TRNSERVERID¶
A system-assigned unique identifier for a server.
iv_sshpublickeybody TYPE /AWS1/TRNSSHPUBLICKEYBODY /AWS1/TRNSSHPUBLICKEYBODY¶
The public key portion of an SSH key pair.
Transfer Family accepts RSA, ECDSA, and ED25519 keys.
iv_username TYPE /AWS1/TRNUSERNAME /AWS1/TRNUSERNAME¶
The name of the Transfer Family user that is assigned to one or more servers.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_trnimpsshpublickeyrsp /AWS1/CL_TRNIMPSSHPUBLICKEYRSP¶
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->importsshpublickey(
iv_serverid = |string|
iv_sshpublickeybody = |string|
iv_username = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_serverid = lo_result->get_serverid( ).
lv_sshpublickeyid = lo_result->get_sshpublickeyid( ).
lv_username = lo_result->get_username( ).
ENDIF.