disableDefaultKeyReplicationRegions method

Future<DisableDefaultKeyReplicationRegionsOutput> disableDefaultKeyReplicationRegions({
  1. required List<String> replicationRegions,
})

Disables Multi-Region key replication settings for the specified Amazon Web Services Regions in your Amazon Web Services account, preventing new keys from being automatically replicated to those regions.

After disabling Multi-Region key replication for specific regions, new keys created in your account will not be automatically replicated to those regions. You can still manually add replication to those regions for individual keys using the AddKeyReplicationRegions operation.

This operation does not affect existing keys or their current replication configuration.

Cross-account use: This operation can't be used across different Amazon Web Services accounts.

Related operations:

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter replicationRegions : The list of Amazon Web Services Regions to remove from the account's default replication regions.

New keys created after this operation will not automatically be replicated to these regions, though existing keys with replication to these regions will be unaffected.

Implementation

Future<DisableDefaultKeyReplicationRegionsOutput>
    disableDefaultKeyReplicationRegions({
  required List<String> replicationRegions,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'PaymentCryptographyControlPlane.DisableDefaultKeyReplicationRegions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ReplicationRegions': replicationRegions,
    },
  );

  return DisableDefaultKeyReplicationRegionsOutput.fromJson(
      jsonResponse.body);
}