updateUserPoolReplica method
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.
Learn more
- Signing Amazon Web Services API Requests
- Using the Amazon Cognito user pools API and user pool endpoints
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotAuthorizedException.
May throw OperationNotEnabledException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter regionName :
The Amazon Web Services Region of the replica to update.
Parameter status :
The status to set for the replica. Valid values are ACTIVE and INACTIVE.
Parameter userPoolId :
The ID of the user pool that contains the replica to update.
Implementation
Future<UpdateUserPoolReplicaResponse> updateUserPoolReplica({
required String regionName,
required UpdateReplicaStatusType status,
required String userPoolId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityProviderService.UpdateUserPoolReplica'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RegionName': regionName,
'Status': status.value,
'UserPoolId': userPoolId,
},
);
return UpdateUserPoolReplicaResponse.fromJson(jsonResponse.body);
}