user_pool_replicas
Creates, updates, deletes, gets or lists a user_pool_replicas resource.
Overview
| Name | user_pool_replicas |
| Type | Resource |
| Id | aws.cognito_idp.user_pool_replicas |
Fields
The following fields are returned by SELECT queries:
- list_user_pool_replicas
| Name | Datatype | Description |
|---|---|---|
next_token | string | A pagination token for retrieving the next page of results. If this value is null, there are no more results to retrieve. (pattern: <code>[\S]+</code>) |
user_pool_replicas | array | A list of user pool replicas, including information about their status, role, and Region. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_user_pool_replicas | select | region | Lists all replicas for a user pool, including both primary and secondary replicas. We recommend using pagination to ensure that the operation returns quickly and successfully. 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints | |
create_user_pool_replica | insert | region, UserPoolId, RegionName | 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints | |
update_user_pool_replica | update | region, UserPoolId, RegionName, Status | 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints | |
delete_user_pool_replica | delete | region | Deletes a secondary replica user pool. You can only delete replicas that are in the INACTIVE status. This operation must be called from the primary 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_user_pool_replicas
Lists all replicas for a user pool, including both primary and secondary replicas. We recommend using pagination to ensure that the operation returns quickly and successfully. 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
SELECT
next_token,
user_pool_replicas
FROM aws.cognito_idp.user_pool_replicas
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_user_pool_replica
- Manifest
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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
INSERT INTO aws.cognito_idp.user_pool_replicas (
UserPoolId,
RegionName,
UserPoolTags,
region
)
SELECT
'{{ UserPoolId }}' /* required */,
'{{ RegionName }}' /* required */,
'{{ UserPoolTags }}',
'{{ region }}'
RETURNING
user_pool_replica
;
# Description fields are for documentation purposes
- name: user_pool_replicas
props:
- name: region
value: "{{ region }}"
description: Required parameter for the user_pool_replicas resource.
- name: UserPoolId
value: "{{ UserPoolId }}"
description: |
The ID of the user pool to replicate.
- name: RegionName
value: "{{ RegionName }}"
description: |
The Amazon Web Services Region where you want to create the replica user pool.
- name: UserPoolTags
value: "{{ UserPoolTags }}"
description: |
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.
UPDATE examples
- update_user_pool_replica
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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
UPDATE aws.cognito_idp.user_pool_replicas
SET
UserPoolId = '{{ UserPoolId }}',
RegionName = '{{ RegionName }}',
Status = '{{ Status }}'
WHERE
region = '{{ region }}' --required
AND UserPoolId = '{{ UserPoolId }}' --required
AND RegionName = '{{ RegionName }}' --required
AND Status = '{{ Status }}' --required
RETURNING
user_pool_replica;
DELETE examples
- delete_user_pool_replica
Deletes a secondary replica user pool. You can only delete replicas that are in the INACTIVE status. This operation must be called from the primary 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
DELETE FROM aws.cognito_idp.user_pool_replicas
WHERE region = '{{ region }}' --required
;