/AWS1/IF_CGP=>CREATEUSERPOOLREPLICA()¶
About CreateUserPoolReplica¶
Creates a replica of an existing user pool in a specified Amazon Web Services Region. The replica enables multi-region replication for high availability and disaster recovery. To create a replica, you must have permissions to create user pools in the target Region.
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~CREATEUSERPOOLREPLICA
IMPORTING
!IV_USERPOOLID TYPE /AWS1/CGPUSERPOOLIDTYPE OPTIONAL
!IV_REGIONNAME TYPE /AWS1/CGPREGIONNAMETYPE OPTIONAL
!IT_USERPOOLTAGS TYPE /AWS1/CL_CGPUSERPOOLTAGSTYPE_W=>TT_USERPOOLTAGSTYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cgpcreuserpoolrplrsp
RAISING
/AWS1/CX_CGPFTUNAVINTIEREX
/AWS1/CX_CGPINTERNALERROREX
/AWS1/CX_CGPINVALIDPARAMETEREX
/AWS1/CX_CGPLIMITEXCEEDEDEX
/AWS1/CX_CGPNOTAUTHORIZEDEX
/AWS1/CX_CGPOPNOTENABLEDEX
/AWS1/CX_CGPRESOURCENOTFOUNDEX
/AWS1/CX_CGPTOOMANYREQUESTSEX
/AWS1/CX_CGPUSERPOOLTAGGINGEX
/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 to replicate.
iv_regionname TYPE /AWS1/CGPREGIONNAMETYPE /AWS1/CGPREGIONNAMETYPE¶
The Amazon Web Services Region where you want to create the replica user pool.
Optional arguments:¶
it_userpooltags TYPE /AWS1/CL_CGPUSERPOOLTAGSTYPE_W=>TT_USERPOOLTAGSTYPE TT_USERPOOLTAGSTYPE¶
A map of tags to assign to the replica user pool. Each tag consists of a key and an optional value, both of which you define. You can maintain tags independently on replica user pools.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cgpcreuserpoolrplrsp /AWS1/CL_CGPCREUSERPOOLRPLRSP¶
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->createuserpoolreplica(
it_userpooltags = VALUE /aws1/cl_cgpuserpooltagstype_w=>tt_userpooltagstype(
(
VALUE /aws1/cl_cgpuserpooltagstype_w=>ts_userpooltagstype_maprow(
key = |string|
value = new /aws1/cl_cgpuserpooltagstype_w( |string| )
)
)
)
iv_regionname = |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 create a replica of a user pool in a new Region¶
The following example creates a replica of a user pool in the ap-south-1 Region.
DATA(lo_result) = lo_client->createuserpoolreplica(
iv_regionname = |ap-south-1|
iv_userpoolid = |us-east-1_abcd12345|
).