createDataSetExportTask method

Future<CreateDataSetExportTaskResponse> createDataSetExportTask({
  1. required String applicationId,
  2. required DataSetExportConfig exportConfig,
  3. String? clientToken,
  4. String? kmsKeyId,
})

Starts a data set export task for a specific application.

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

Parameter applicationId : The unique identifier of the application for which you want to export data sets.

Parameter exportConfig : The data set export task configuration.

Parameter clientToken : Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create a data set export. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.

Parameter kmsKeyId : The identifier of a customer managed key.

Implementation

Future<CreateDataSetExportTaskResponse> createDataSetExportTask({
  required String applicationId,
  required DataSetExportConfig exportConfig,
  String? clientToken,
  String? kmsKeyId,
}) async {
  final $payload = <String, dynamic>{
    'exportConfig': exportConfig,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/dataset-export-task',
    exceptionFnMap: _exceptionFns,
  );
  return CreateDataSetExportTaskResponse.fromJson(response);
}