createDataIntegration method

Future<CreateDataIntegrationResponse> createDataIntegration({
  1. required String kmsKey,
  2. required String name,
  3. String? clientToken,
  4. String? description,
  5. FileConfiguration? fileConfiguration,
  6. Map<String, Map<String, List<String>>>? objectConfiguration,
  7. ScheduleConfiguration? scheduleConfig,
  8. String? sourceURI,
  9. Map<String, String>? tags,
})

Creates and persists a DataIntegration resource.

May throw AccessDeniedException. May throw DuplicateResourceException. May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceQuotaExceededException. May throw ThrottlingException.

Parameter kmsKey : The KMS key ARN for the DataIntegration.

Parameter name : The name of the DataIntegration.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Parameter description : A description of the DataIntegration.

Parameter fileConfiguration : The configuration for what files should be pulled from the source.

Parameter objectConfiguration : The configuration for what data should be pulled from the source.

Parameter scheduleConfig : The name of the data and how often it should be pulled from the source.

Parameter sourceURI : The URI of the data source.

Parameter tags : The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

Implementation

Future<CreateDataIntegrationResponse> createDataIntegration({
  required String kmsKey,
  required String name,
  String? clientToken,
  String? description,
  FileConfiguration? fileConfiguration,
  Map<String, Map<String, List<String>>>? objectConfiguration,
  ScheduleConfiguration? scheduleConfig,
  String? sourceURI,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'KmsKey': kmsKey,
    'Name': name,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'Description': description,
    if (fileConfiguration != null) 'FileConfiguration': fileConfiguration,
    if (objectConfiguration != null)
      'ObjectConfiguration': objectConfiguration,
    if (scheduleConfig != null) 'ScheduleConfig': scheduleConfig,
    if (sourceURI != null) 'SourceURI': sourceURI,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/dataIntegrations',
    exceptionFnMap: _exceptionFns,
  );
  return CreateDataIntegrationResponse.fromJson(response);
}