Skip to content

/AWS1/CL_IAM=>GETSERVERCERTIFICATE()

About GetServerCertificate

Retrieves information about the specified server certificate stored in IAM.

For more information about working with server certificates, see Working with server certificates in the IAM User Guide. This topic includes a list of Amazon Web Services services that can use the server certificates that you manage with IAM.

Method Signature

IMPORTING

Required arguments:

iv_servercertificatename TYPE /AWS1/IAMSERVERCERTNAMETYPE /AWS1/IAMSERVERCERTNAMETYPE

The name of the server certificate you want to retrieve information about.

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_iamgetservercertrsp /AWS1/CL_IAMGETSERVERCERTRSP

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~getservercertificate( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_servercertificate = lo_result->get_servercertificate( ).
  IF lo_servercertificate IS NOT INITIAL.
    lo_servercertificatemetada = lo_servercertificate->get_servercertmetadata( ).
    IF lo_servercertificatemetada IS NOT INITIAL.
      lv_pathtype = lo_servercertificatemetada->get_path( ).
      lv_servercertificatenamety = lo_servercertificatemetada->get_servercertificatename( ).
      lv_idtype = lo_servercertificatemetada->get_servercertificateid( ).
      lv_arntype = lo_servercertificatemetada->get_arn( ).
      lv_datetype = lo_servercertificatemetada->get_uploaddate( ).
      lv_datetype = lo_servercertificatemetada->get_expiration( ).
    ENDIF.
    lv_certificatebodytype = lo_servercertificate->get_certificatebody( ).
    lv_certificatechaintype = lo_servercertificate->get_certificatechain( ).
    LOOP AT lo_servercertificate->get_tags( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_tagkeytype = lo_row_1->get_key( ).
        lv_tagvaluetype = lo_row_1->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.