createIngestion method
Creates and starts a new SPICE ingestion on a dataset
Any ingestions operating on tagged datasets inherit the same tags automatically for use in access control. For an example, see How do I create an IAM policy to control access to Amazon EC2 resources using tags? in the AWS Knowledge Center. Tags are visible on the tagged dataset, but not on the ingestion resource.
May throw AccessDeniedException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw LimitExceededException. May throw ResourceExistsException. May throw InternalFailureException.
Parameter awsAccountId
:
The AWS account ID.
Parameter dataSetId
:
The ID of the dataset used in the ingestion.
Parameter ingestionId
:
An ID for the ingestion.
Implementation
Future<CreateIngestionResponse> createIngestion({
required String awsAccountId,
required String dataSetId,
required String ingestionId,
}) async {
ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
_s.validateStringLength(
'awsAccountId',
awsAccountId,
12,
12,
isRequired: true,
);
ArgumentError.checkNotNull(dataSetId, 'dataSetId');
ArgumentError.checkNotNull(ingestionId, 'ingestionId');
_s.validateStringLength(
'ingestionId',
ingestionId,
1,
128,
isRequired: true,
);
final response = await _protocol.send(
payload: null,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/data-sets/${Uri.encodeComponent(dataSetId)}/ingestions/${Uri.encodeComponent(ingestionId)}',
exceptionFnMap: _exceptionFns,
);
return CreateIngestionResponse.fromJson(response);
}