createInferenceScheduler method
- required InferenceInputConfiguration dataInputConfiguration,
- required InferenceOutputConfiguration dataOutputConfiguration,
- required DataUploadFrequency dataUploadFrequency,
- required String inferenceSchedulerName,
- required String modelName,
- required String roleArn,
- String? clientToken,
- int? dataDelayOffsetInMinutes,
- String? serverSideKmsKeyId,
- List<
Tag> ? tags,
Creates a scheduled inference. Scheduling an inference is setting up a continuous real-time inference plan to analyze new measurement data. When setting up the schedule, you provide an S3 bucket location for the input data, assign it a delimiter between separate entries in the data, set an offset delay if desired, and set the frequency of inferencing. You must also provide an S3 bucket location for the output data.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter dataInputConfiguration :
Specifies configuration information for the input data for the inference
scheduler, including delimiter, format, and dataset location.
Parameter dataOutputConfiguration :
Specifies configuration information for the output results for the
inference scheduler, including the S3 location for the output.
Parameter dataUploadFrequency :
How often data is uploaded to the source Amazon S3 bucket for the input
data. The value chosen is the length of time between data uploads. For
instance, if you select 5 minutes, Amazon Lookout for Equipment will
upload the real-time data to the source bucket once every 5 minutes. This
frequency also determines how often Amazon Lookout for Equipment runs
inference on your data.
For more information, see Understanding the inference process.
Parameter inferenceSchedulerName :
The name of the inference scheduler being created.
Parameter modelName :
The name of the previously trained machine learning model being used to
create the inference scheduler.
Parameter roleArn :
The Amazon Resource Name (ARN) of a role with permission to access the
data source being used for the inference.
Parameter clientToken :
A unique identifier for the request. If you do not set the client request
token, Amazon Lookout for Equipment generates one.
Parameter dataDelayOffsetInMinutes :
The interval (in minutes) of planned delay at the start of each inference
segment. For example, if inference is set to run every ten minutes, the
delay is set to five minutes and the time is 09:08. The inference
scheduler will wake up at the configured interval (which, without a delay
configured, would be 09:10) plus the additional five minute delay time (so
09:15) to check your Amazon S3 bucket. The delay provides a buffer for you
to upload data at the same frequency, so that you don't have to stop and
restart the scheduler when uploading new data.
For more information, see Understanding the inference process.
Parameter serverSideKmsKeyId :
Provides the identifier of the KMS key used to encrypt inference scheduler
data by Amazon Lookout for Equipment.
Parameter tags :
Any tags associated with the inference scheduler.
Implementation
Future<CreateInferenceSchedulerResponse> createInferenceScheduler({
required InferenceInputConfiguration dataInputConfiguration,
required InferenceOutputConfiguration dataOutputConfiguration,
required DataUploadFrequency dataUploadFrequency,
required String inferenceSchedulerName,
required String modelName,
required String roleArn,
String? clientToken,
int? dataDelayOffsetInMinutes,
String? serverSideKmsKeyId,
List<Tag>? tags,
}) async {
_s.validateNumRange(
'dataDelayOffsetInMinutes',
dataDelayOffsetInMinutes,
0,
60,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'AWSLookoutEquipmentFrontendService.CreateInferenceScheduler'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DataInputConfiguration': dataInputConfiguration,
'DataOutputConfiguration': dataOutputConfiguration,
'DataUploadFrequency': dataUploadFrequency.value,
'InferenceSchedulerName': inferenceSchedulerName,
'ModelName': modelName,
'RoleArn': roleArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (dataDelayOffsetInMinutes != null)
'DataDelayOffsetInMinutes': dataDelayOffsetInMinutes,
if (serverSideKmsKeyId != null)
'ServerSideKmsKeyId': serverSideKmsKeyId,
if (tags != null) 'Tags': tags,
},
);
return CreateInferenceSchedulerResponse.fromJson(jsonResponse.body);
}