Skip to content

/AWS1/IF_CGP=>LISTUSERPOOLCLIENTSECRETS()

About ListUserPoolClientSecrets

Lists all client secrets associated with a user pool app client. Returns metadata about the secrets. The response does not include pagination tokens as there are only 2 secrets at any given time and we return both with every ListUserPoolClientSecrets call. For security reasons, the response never reveals the actual secret value in ClientSecretValue.

Method Signature

METHODS /AWS1/IF_CGP~LISTUSERPOOLCLIENTSECRETS
  IMPORTING
    !IV_USERPOOLID TYPE /AWS1/CGPUSERPOOLIDTYPE OPTIONAL
    !IV_CLIENTID TYPE /AWS1/CGPCLIENTIDTYPE OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/CGPPAGINATIONKEY OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cgplstuserpoolclise01
  RAISING
    /AWS1/CX_CGPINTERNALSERVEREX
    /AWS1/CX_CGPINVALIDPARAMETEREX
    /AWS1/CX_CGPLIMITEXCEEDEDEX
    /AWS1/CX_CGPRESOURCENOTFOUNDEX
    /AWS1/CX_CGPTOOMANYREQUESTSEX
    /AWS1/CX_CGPCLIENTEXC
    /AWS1/CX_CGPSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_userpoolid TYPE /AWS1/CGPUSERPOOLIDTYPE /AWS1/CGPUSERPOOLIDTYPE

The ID of the user pool that contains the app client.

iv_clientid TYPE /AWS1/CGPCLIENTIDTYPE /AWS1/CGPCLIENTIDTYPE

The ID of the app client whose secrets you want to list.

Optional arguments:

iv_nexttoken TYPE /AWS1/CGPPAGINATIONKEY /AWS1/CGPPAGINATIONKEY

This API operation returns a limited number of results. The pagination token is an identifier that you can present in an additional API request with the same parameters. When you include the pagination token, Amazon Cognito returns the next set of items after the current list. Subsequent requests return a new pagination token. By use of this token, you can paginate through the full list of items.

RETURNING

oo_output TYPE REF TO /aws1/cl_cgplstuserpoolclise01 /AWS1/CL_CGPLSTUSERPOOLCLISE01

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->listuserpoolclientsecrets(
  iv_clientid = |string|
  iv_nexttoken = |string|
  iv_userpoolid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_clientsecrets( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_clientsecretidtype = lo_row_1->get_clientsecretid( ).
      lv_clientsecrettype = lo_row_1->get_clientsecretvalue( ).
      lv_datetype = lo_row_1->get_clientsecretcreatedate( ).
    ENDIF.
  ENDLOOP.
  lv_paginationkey = lo_result->get_nexttoken( ).
ENDIF.