modifyDataProvider method
Modifies the specified data provider using the provided settings.
May throw AccessDeniedFault.
May throw FailedDependencyFault.
May throw InvalidResourceStateFault.
May throw ResourceNotFoundFault.
Parameter dataProviderIdentifier :
The identifier of the data provider. Identifiers must begin with a letter
and must contain only ASCII letters, digits, and hyphens. They can't end
with a hyphen, or contain two consecutive hyphens.
Parameter dataProviderName :
The name of the data provider.
Parameter description :
A user-friendly description of the data provider.
Parameter engine :
The type of database engine for the data provider. Valid values include
"aurora", "aurora-postgresql",
"mysql", "oracle", "postgres",
"sqlserver", redshift, mariadb,
mongodb, db2, db2-zos,
docdb, and sybase. A value of
"aurora" represents Amazon Aurora MySQL-Compatible Edition.
Parameter exactSettings :
If this attribute is Y, the current call to
ModifyDataProvider replaces all existing data provider
settings with the exact settings that you specify in this call. If this
attribute is N, the current call to ModifyDataProvider does
two things:
- It replaces any data provider settings that already exist with new values, for settings with the same names.
- It creates new data provider settings that you specify in the call, for settings with different names.
Parameter settings :
The settings in JSON format for a data provider.
Parameter virtual :
Indicates whether the data provider is virtual.
Implementation
Future<ModifyDataProviderResponse> modifyDataProvider({
required String dataProviderIdentifier,
String? dataProviderName,
String? description,
String? engine,
bool? exactSettings,
DataProviderSettings? settings,
bool? virtual,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.ModifyDataProvider'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DataProviderIdentifier': dataProviderIdentifier,
if (dataProviderName != null) 'DataProviderName': dataProviderName,
if (description != null) 'Description': description,
if (engine != null) 'Engine': engine,
if (exactSettings != null) 'ExactSettings': exactSettings,
if (settings != null) 'Settings': settings,
if (virtual != null) 'Virtual': virtual,
},
);
return ModifyDataProviderResponse.fromJson(jsonResponse.body);
}