modifyReplicationConfig method

Future<ModifyReplicationConfigResponse> modifyReplicationConfig({
  1. required String replicationConfigArn,
  2. ComputeConfig? computeConfig,
  3. String? replicationConfigIdentifier,
  4. String? replicationSettings,
  5. MigrationTypeValue? replicationType,
  6. String? sourceEndpointArn,
  7. String? supplementalSettings,
  8. String? tableMappings,
  9. String? targetEndpointArn,
})

Modifies an existing DMS Serverless replication configuration that you can use to start a replication. This command includes input validation and logic to check the state of any replication that uses this configuration. You can only modify a replication configuration before any replication that uses it has started. As soon as you have initially started a replication with a given configuiration, you can't modify that configuration, even if you stop it.

Other run statuses that allow you to run this command include FAILED and CREATED. A provisioning state that allows you to run this command is FAILED_PROVISION.

May throw AccessDeniedFault. May throw InvalidResourceStateFault. May throw InvalidSubnet. May throw KMSKeyNotAccessibleFault. May throw ReplicationSubnetGroupDoesNotCoverEnoughAZs. May throw ResourceNotFoundFault.

Parameter replicationConfigArn : The Amazon Resource Name of the replication to modify.

Parameter computeConfig : Configuration parameters for provisioning an DMS Serverless replication.

Parameter replicationConfigIdentifier : The new replication config to apply to the replication.

Parameter replicationSettings : The settings for the replication.

Parameter replicationType : The type of replication.

Parameter sourceEndpointArn : The Amazon Resource Name (ARN) of the source endpoint for this DMS serverless replication configuration.

Parameter supplementalSettings : Additional settings for the replication.

Parameter tableMappings : Table mappings specified in the replication.

Parameter targetEndpointArn : The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.

Implementation

Future<ModifyReplicationConfigResponse> modifyReplicationConfig({
  required String replicationConfigArn,
  ComputeConfig? computeConfig,
  String? replicationConfigIdentifier,
  String? replicationSettings,
  MigrationTypeValue? replicationType,
  String? sourceEndpointArn,
  String? supplementalSettings,
  String? tableMappings,
  String? targetEndpointArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.ModifyReplicationConfig'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ReplicationConfigArn': replicationConfigArn,
      if (computeConfig != null) 'ComputeConfig': computeConfig,
      if (replicationConfigIdentifier != null)
        'ReplicationConfigIdentifier': replicationConfigIdentifier,
      if (replicationSettings != null)
        'ReplicationSettings': replicationSettings,
      if (replicationType != null) 'ReplicationType': replicationType.value,
      if (sourceEndpointArn != null) 'SourceEndpointArn': sourceEndpointArn,
      if (supplementalSettings != null)
        'SupplementalSettings': supplementalSettings,
      if (tableMappings != null) 'TableMappings': tableMappings,
      if (targetEndpointArn != null) 'TargetEndpointArn': targetEndpointArn,
    },
  );

  return ModifyReplicationConfigResponse.fromJson(jsonResponse.body);
}