Skip to content

create_inference_scheduler async

create_inference_scheduler(
    model_name: ModelName,
    inference_scheduler_name: InferenceSchedulerName,
    data_upload_frequency: DataUploadFrequency,
    data_input_configuration: InferenceInputConfiguration,
    data_output_configuration: InferenceOutputConfiguration,
    role_arn: IamRoleArn,
    client_token: IdempotenceToken,
    *,
    config_overrides: Optional[AsyncLookoutEquipmentClientConfig] = None,
    data_delay_offset_in_minutes: Optional[DataDelayOffsetInMinutes] = None,
    server_side_kms_key_id: Optional[NameOrArn] = None,
    tags: Optional[TagList] = None,
) -> CreateInferenceSchedulerResponse

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.

Parameters:

  • model_name (ModelName) –

    The name of the previously trained machine learning model being used to create the inference scheduler.

  • inference_scheduler_name (InferenceSchedulerName) –

    The name of the inference scheduler being created.

  • data_delay_offset_in_minutes (Optional[DataDelayOffsetInMinutes], default: None ) –

    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.

  • data_upload_frequency (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.

  • data_input_configuration (InferenceInputConfiguration) –

    Specifies configuration information for the input data for the inference scheduler, including delimiter, format, and dataset location.

  • data_output_configuration (InferenceOutputConfiguration) –

    Specifies configuration information for the output results for the inference scheduler, including the S3 location for the output.

  • role_arn (IamRoleArn) –

    The Amazon Resource Name (ARN) of a role with permission to access the data source being used for the inference.

  • server_side_kms_key_id (Optional[NameOrArn], default: None ) –

    Provides the identifier of the KMS key used to encrypt inference scheduler data by Amazon Lookout for Equipment.

  • client_token (IdempotenceToken) –

    A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.

  • tags (Optional[TagList], default: None ) –

    Any tags associated with the inference scheduler.

Raises:

  • AccessDeniedException –

    The request could not be completed because you do not have access to the resource.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the target resource.

  • InternalServerException –

    Processing of the request has failed because of an unknown error, exception or failure.

  • ResourceNotFoundException –

    The resource requested could not be found. Verify the resource ID and retry your request.

  • ServiceQuotaExceededException –

    Resource limitations have been exceeded.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lookoutequipment/_services/async_lookout_equipment.py
async def create_inference_scheduler(
    self,
    model_name: "capo_lookoutequipment.types.model_name.ModelName",
    inference_scheduler_name: "capo_lookoutequipment.types.inference_scheduler_name.InferenceSchedulerName",
    data_upload_frequency: "capo_lookoutequipment.types.data_upload_frequency.DataUploadFrequency",
    data_input_configuration: "capo_lookoutequipment.types.inference_input_configuration.InferenceInputConfiguration",
    data_output_configuration: "capo_lookoutequipment.types.inference_output_configuration.InferenceOutputConfiguration",
    role_arn: "capo_lookoutequipment.types.iam_role_arn.IamRoleArn",
    client_token: "capo_lookoutequipment.types.idempotence_token.IdempotenceToken",
    *,
    config_overrides: Optional[AsyncLookoutEquipmentClientConfig] = None,
    data_delay_offset_in_minutes: Optional[
        "capo_lookoutequipment.types.data_delay_offset_in_minutes.DataDelayOffsetInMinutes"
    ] = None,
    server_side_kms_key_id: Optional[
        "capo_lookoutequipment.types.name_or_arn.NameOrArn"
    ] = None,
    tags: Optional["capo_lookoutequipment.types.tag_list.TagList"] = None,
) -> "capo_lookoutequipment.types.create_inference_scheduler_response.CreateInferenceSchedulerResponse":
    """<p> 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. </p>

    Args:
        model_name: <p>The name of the previously trained machine learning model being used to create the inference scheduler. </p>
        inference_scheduler_name: <p>The name of the inference scheduler being created. </p>
        data_delay_offset_in_minutes: <p>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.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/lookout-for-equipment/latest/ug/understanding-inference-process.html">Understanding the inference process</a>.</p>
        data_upload_frequency: <p> 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.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/lookout-for-equipment/latest/ug/understanding-inference-process.html">Understanding the inference process</a>.</p>
        data_input_configuration: <p>Specifies configuration information for the input data for the inference scheduler, including delimiter, format, and dataset location. </p>
        data_output_configuration: <p>Specifies configuration information for the output results for the inference scheduler, including the S3 location for the output. </p>
        role_arn: <p>The Amazon Resource Name (ARN) of a role with permission to access the data source being used for the inference. </p>
        server_side_kms_key_id: <p>Provides the identifier of the KMS key used to encrypt inference scheduler data by Amazon Lookout for Equipment. </p>
        client_token: <p> A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one. </p>
        tags: <p>Any tags associated with the inference scheduler. </p>

    Raises:
        capo_lookoutequipment.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have access to the resource. </p>
        capo_lookoutequipment.errors.conflict_exception.ConflictException: <p> The request could not be completed due to a conflict with the current state of the target resource. </p>
        capo_lookoutequipment.errors.internal_server_exception.InternalServerException: <p> Processing of the request has failed because of an unknown error, exception or failure. </p>
        capo_lookoutequipment.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource requested could not be found. Verify the resource ID and retry your request. </p>
        capo_lookoutequipment.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> Resource limitations have been exceeded. </p>
        capo_lookoutequipment.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_lookoutequipment.errors.validation_exception.ValidationException: <p> The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized. </p>
        capo_lookoutequipment.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lookoutequipment.types.create_inference_scheduler_request.CreateInferenceSchedulerRequest]",
    ) -> AsyncOperationResponse[
        "capo_lookoutequipment.types.create_inference_scheduler_response.CreateInferenceSchedulerResponse"
    ]:
        import capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.create_inference_scheduler

        (
            output,
            http_response,
        ) = await capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.create_inference_scheduler.async_create_inference_scheduler(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateInferenceScheduler")
    )
    input_: capo_lookoutequipment.types.create_inference_scheduler_request.CreateInferenceSchedulerRequest = {
        "model_name": model_name,
        "inference_scheduler_name": inference_scheduler_name,
        "data_upload_frequency": data_upload_frequency,
        "data_input_configuration": data_input_configuration,
        "data_output_configuration": data_output_configuration,
        "role_arn": role_arn,
        "client_token": client_token,
    }
    if data_delay_offset_in_minutes is not None:
        input_["data_delay_offset_in_minutes"] = data_delay_offset_in_minutes
    if server_side_kms_key_id is not None:
        input_["server_side_kms_key_id"] = server_side_kms_key_id
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output