Skip to content

/AWS1/IF_CGP=>UPDATEUSERPOOLREPLICA()

About UpdateUserPoolReplica

Updates replica-specific settings for a user pool replica. You can modify the status to activate or deactivate the replica. This request can be made in both primary and secondary regions of the user pool.

Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Learn more

Method Signature

METHODS /AWS1/IF_CGP~UPDATEUSERPOOLREPLICA
  IMPORTING
    !IV_USERPOOLID TYPE /AWS1/CGPUSERPOOLIDTYPE OPTIONAL
    !IV_REGIONNAME TYPE /AWS1/CGPREGIONNAMETYPE OPTIONAL
    !IV_STATUS TYPE /AWS1/CGPUPDATERPLSTATUSTYPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cgpupduserpoolrplrsp
  RAISING
    /AWS1/CX_CGPINTERNALERROREX
    /AWS1/CX_CGPINVALIDPARAMETEREX
    /AWS1/CX_CGPNOTAUTHORIZEDEX
    /AWS1/CX_CGPOPNOTENABLEDEX
    /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 replica to update.

iv_regionname TYPE /AWS1/CGPREGIONNAMETYPE /AWS1/CGPREGIONNAMETYPE

The Amazon Web Services Region of the replica to update.

iv_status TYPE /AWS1/CGPUPDATERPLSTATUSTYPE /AWS1/CGPUPDATERPLSTATUSTYPE

The status to set for the replica. Valid values are ACTIVE and INACTIVE.

RETURNING

oo_output TYPE REF TO /aws1/cl_cgpupduserpoolrplrsp /AWS1/CL_CGPUPDUSERPOOLRPLRSP

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->updateuserpoolreplica(
  iv_regionname = |string|
  iv_status = |string|
  iv_userpoolid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_userpoolreplicatype = lo_result->get_userpoolreplica( ).
  IF lo_userpoolreplicatype IS NOT INITIAL.
    lv_regionnametype = lo_userpoolreplicatype->get_regionname( ).
    lv_replicastatustype = lo_userpoolreplicatype->get_status( ).
    lv_replicaroletype = lo_userpoolreplicatype->get_role( ).
    lv_arntype = lo_userpoolreplicatype->get_userpoolarn( ).
  ENDIF.
ENDIF.

Example update a user pool replica

The following example sets the status of a user pool replica in the us-east-1 Region to ACTIVE.

DATA(lo_result) = lo_client->updateuserpoolreplica(
  iv_regionname = |us-east-1|
  iv_status = |ACTIVE|
  iv_userpoolid = |ap-south-1_abcd12345|
).