updateDataSource method

Future<UpdateDataSourceOutput> updateDataSource({
  1. required String domainIdentifier,
  2. required String identifier,
  3. List<FormInput>? assetFormsInput,
  4. DataSourceConfigurationInput? configuration,
  5. String? description,
  6. EnableSetting? enableSetting,
  7. String? name,
  8. bool? publishOnImport,
  9. RecommendationConfiguration? recommendation,
  10. bool? retainPermissionsOnRevokeFailure,
  11. ScheduleConfiguration? schedule,
})

Updates the specified data source in Amazon DataZone.

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

Parameter domainIdentifier : The identifier of the domain in which to update a data source.

Parameter identifier : The identifier of the data source to be updated.

Parameter assetFormsInput : The asset forms to be updated as part of the UpdateDataSource action.

Parameter configuration : The configuration to be updated as part of the UpdateDataSource action.

Parameter description : The description to be updated as part of the UpdateDataSource action.

Parameter enableSetting : The enable setting to be updated as part of the UpdateDataSource action.

Parameter name : The name to be updated as part of the UpdateDataSource action.

Parameter publishOnImport : The publish on import setting to be updated as part of the UpdateDataSource action.

Parameter recommendation : The recommendation to be updated as part of the UpdateDataSource action.

Parameter retainPermissionsOnRevokeFailure : Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.

Parameter schedule : The schedule to be updated as part of the UpdateDataSource action.

Implementation

Future<UpdateDataSourceOutput> updateDataSource({
  required String domainIdentifier,
  required String identifier,
  List<FormInput>? assetFormsInput,
  DataSourceConfigurationInput? configuration,
  String? description,
  EnableSetting? enableSetting,
  String? name,
  bool? publishOnImport,
  RecommendationConfiguration? recommendation,
  bool? retainPermissionsOnRevokeFailure,
  ScheduleConfiguration? schedule,
}) async {
  final $payload = <String, dynamic>{
    if (assetFormsInput != null) 'assetFormsInput': assetFormsInput,
    if (configuration != null) 'configuration': configuration,
    if (description != null) 'description': description,
    if (enableSetting != null) 'enableSetting': enableSetting.value,
    if (name != null) 'name': name,
    if (publishOnImport != null) 'publishOnImport': publishOnImport,
    if (recommendation != null) 'recommendation': recommendation,
    if (retainPermissionsOnRevokeFailure != null)
      'retainPermissionsOnRevokeFailure': retainPermissionsOnRevokeFailure,
    if (schedule != null) 'schedule': schedule,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/data-sources/${Uri.encodeComponent(identifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDataSourceOutput.fromJson(response);
}