updateDataSource method
Updates a direct-query data source. For more information, see Working with Amazon OpenSearch Service data source integrations with Amazon S3.
May throw BaseException.
May throw DependencyFailureException.
May throw DisabledOperationException.
May throw InternalException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter dataSourceType :
The type of data source.
Parameter domainName :
The name of the domain.
Parameter name :
The name of the data source to modify.
Parameter description :
A new description of the data source.
Parameter status :
The status of the data source update.
Implementation
Future<UpdateDataSourceResponse> updateDataSource({
required DataSourceType dataSourceType,
required String domainName,
required String name,
String? description,
DataSourceStatus? status,
}) async {
final $payload = <String, dynamic>{
'DataSourceType': dataSourceType,
if (description != null) 'Description': description,
if (status != null) 'Status': status.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}/dataSource/${Uri.encodeComponent(name)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDataSourceResponse.fromJson(response);
}