updateDataSource method
Updates a data source.
May throw AccessDeniedException.
May throw ConflictException.
May throw CustomerManagedKeyUnavailableException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter awsAccountId :
The Amazon Web Services account ID.
Parameter dataSourceId :
The ID of the data source. This ID is unique per Amazon Web Services
Region for each Amazon Web Services account.
Parameter name :
A display name for the data source.
Parameter credentials :
The credentials that Amazon Quick Sight that uses to connect to your
underlying source. Currently, only credentials based on user name and
password are supported.
Parameter dataSourceParameters :
The parameters that Amazon Quick Sight uses to connect to your underlying
source.
Parameter sslProperties :
Secure Socket Layer (SSL) properties that apply when Amazon Quick Sight
connects to your underlying source.
Parameter vpcConnectionProperties :
Use this parameter only when you want Amazon Quick Sight to use a VPC
connection when connecting to your underlying source.
Implementation
Future<UpdateDataSourceResponse> updateDataSource({
required String awsAccountId,
required String dataSourceId,
required String name,
DataSourceCredentials? credentials,
DataSourceParameters? dataSourceParameters,
SslProperties? sslProperties,
VpcConnectionProperties? vpcConnectionProperties,
}) async {
final $payload = <String, dynamic>{
'Name': name,
if (credentials != null) 'Credentials': credentials,
if (dataSourceParameters != null)
'DataSourceParameters': dataSourceParameters,
if (sslProperties != null) 'SslProperties': sslProperties,
if (vpcConnectionProperties != null)
'VpcConnectionProperties': vpcConnectionProperties,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/data-sources/${Uri.encodeComponent(dataSourceId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDataSourceResponse.fromJson(response);
}