createBillOfMaterialsImportJob method
CreateBillOfMaterialsImportJob creates an import job for the Product Bill Of Materials (BOM) entity. For information on the product_bom entity, see the AWS Supply Chain User Guide.
The CSV file must be located in an Amazon S3 location accessible to AWS Supply Chain. It is recommended to use the same Amazon S3 bucket created during your AWS Supply Chain instance creation.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter instanceId :
The AWS Supply Chain instance identifier.
Parameter s3uri :
The S3 URI of the CSV file to be imported. The bucket must grant
permissions for AWS Supply Chain to read the file.
Parameter clientToken :
An idempotency token ensures the API request is only completed no more
than once. This way, retrying the request will not trigger the operation
multiple times. A client token is a unique, case-sensitive string of 33 to
128 ASCII characters. To make an idempotent API request, specify a client
token in the request. You should not reuse the same client token for other
requests. If you retry a successful request with the same client token,
the request will succeed with no further actions being taken, and you will
receive the same API response as the original successful request.
Implementation
Future<CreateBillOfMaterialsImportJobResponse>
createBillOfMaterialsImportJob({
required String instanceId,
required String s3uri,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
's3uri': s3uri,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/api/configuration/instances/${Uri.encodeComponent(instanceId)}/bill-of-materials-import-jobs',
exceptionFnMap: _exceptionFns,
);
return CreateBillOfMaterialsImportJobResponse.fromJson(response);
}