updateDataSource method

Future<void> updateDataSource({
  1. required String applicationId,
  2. required String dataSourceId,
  3. required String indexId,
  4. Object? configuration,
  5. String? description,
  6. String? displayName,
  7. DocumentEnrichmentConfiguration? documentEnrichmentConfiguration,
  8. MediaExtractionConfiguration? mediaExtractionConfiguration,
  9. String? roleArn,
  10. String? syncSchedule,
  11. DataSourceVpcConfiguration? vpcConfiguration,
})

Updates an existing Amazon Q Business data source connector.

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

Parameter applicationId : The identifier of the Amazon Q Business application the data source is attached to.

Parameter dataSourceId : The identifier of the data source connector.

Parameter indexId : The identifier of the index attached to the data source connector.

Parameter description : The description of the data source connector.

Parameter displayName : A name of the data source connector.

Parameter mediaExtractionConfiguration : The configuration for extracting information from media in documents for your data source.

Parameter roleArn : The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.

Parameter syncSchedule : The chosen update frequency for your data source.

Implementation

Future<void> updateDataSource({
  required String applicationId,
  required String dataSourceId,
  required String indexId,
  Object? configuration,
  String? description,
  String? displayName,
  DocumentEnrichmentConfiguration? documentEnrichmentConfiguration,
  MediaExtractionConfiguration? mediaExtractionConfiguration,
  String? roleArn,
  String? syncSchedule,
  DataSourceVpcConfiguration? vpcConfiguration,
}) async {
  final $payload = <String, dynamic>{
    if (configuration != null) 'configuration': configuration,
    if (description != null) 'description': description,
    if (displayName != null) 'displayName': displayName,
    if (documentEnrichmentConfiguration != null)
      'documentEnrichmentConfiguration': documentEnrichmentConfiguration,
    if (mediaExtractionConfiguration != null)
      'mediaExtractionConfiguration': mediaExtractionConfiguration,
    if (roleArn != null) 'roleArn': roleArn,
    if (syncSchedule != null) 'syncSchedule': syncSchedule,
    if (vpcConfiguration != null) 'vpcConfiguration': vpcConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/indices/${Uri.encodeComponent(indexId)}/datasources/${Uri.encodeComponent(dataSourceId)}',
    exceptionFnMap: _exceptionFns,
  );
}