Skip to content

report_task_runner_heartbeat

report_task_runner_heartbeat(
    taskrunner_id: id,
    *,
    config_overrides: Optional[DataPipelineClientConfig] = None,
    worker_group: Optional[string] = None,
    hostname: Optional[id] = None,
) -> ReportTaskRunnerHeartbeatOutput

Task runners call ReportTaskRunnerHeartbeat every 15 minutes to indicate that they are operational. If the AWS Data Pipeline Task Runner is launched on a resource managed by AWS Data Pipeline, the web service can use this call to detect when the task runner application has failed and restart a new instance.

POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ReportTaskRunnerHeartbeat Content-Length: 84 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"taskrunnerId": "1234567890", "workerGroup": "wg-12345", "hostname": "example.com"} Status: x-amzn-RequestId: b3104dc5-0734-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 20 Date: Mon, 12 Nov 2012 17:50:53 GMT {"terminate": false}

Parameters:

  • taskrunner_id (id) –

    The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application. If you have written a custom task runner, you should assign a unique identifier for the task runner.

  • worker_group (Optional[string], default: None ) –

    The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for workerGroup. There are no wildcard values permitted in workerGroup; the string must be an exact, case-sensitive, match.

  • hostname (Optional[id], default: None ) –

    The public DNS name of the task runner.

Raises:

  • InternalServiceError –

    An internal service error occurred.

  • InvalidRequestException –

    The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.

  • UnknownServiceError –

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

Source code in docs_src/capo_data_pipeline/_services/data_pipeline.py
def report_task_runner_heartbeat(
    self,
    taskrunner_id: "capo_data_pipeline.types.id.id",
    *,
    config_overrides: Optional[DataPipelineClientConfig] = None,
    worker_group: Optional["capo_data_pipeline.types.string.string"] = None,
    hostname: Optional["capo_data_pipeline.types.id.id"] = None,
) -> "capo_data_pipeline.types.report_task_runner_heartbeat_output.ReportTaskRunnerHeartbeatOutput":
    """<p>Task runners call <code>ReportTaskRunnerHeartbeat</code> every 15 minutes to indicate that they are operational. If the AWS Data Pipeline Task Runner is launched on a resource managed by AWS Data Pipeline, the web service can use this call to detect when the task runner application has failed and restart a new instance.</p> <examples> <request> POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ReportTaskRunnerHeartbeat Content-Length: 84 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"taskrunnerId": "1234567890", "workerGroup": "wg-12345", "hostname": "example.com"} </request> <response> Status: x-amzn-RequestId: b3104dc5-0734-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 20 Date: Mon, 12 Nov 2012 17:50:53 GMT {"terminate": false} </response> </examples>

    Args:
        taskrunner_id: <p>The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application. If you have written a custom task runner, you should assign a unique identifier for the task runner.</p>
        worker_group: <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
        hostname: <p>The public DNS name of the task runner.</p>

    Raises:
        capo_data_pipeline.errors.internal_service_error.InternalServiceError: <p>An internal service error occurred.</p>
        capo_data_pipeline.errors.invalid_request_exception.InvalidRequestException: <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
        capo_data_pipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_data_pipeline.types.report_task_runner_heartbeat_input.ReportTaskRunnerHeartbeatInput]",
    ) -> OperationResponse[
        "capo_data_pipeline.types.report_task_runner_heartbeat_output.ReportTaskRunnerHeartbeatOutput"
    ]:
        import capo_data_pipeline._operations.data_pipeline.report_task_runner_heartbeat

        output, http_response = (
            capo_data_pipeline._operations.data_pipeline.report_task_runner_heartbeat.report_task_runner_heartbeat(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ReportTaskRunnerHeartbeat")
    )
    input_: capo_data_pipeline.types.report_task_runner_heartbeat_input.ReportTaskRunnerHeartbeatInput = {
        "taskrunner_id": taskrunner_id
    }
    if worker_group is not None:
        input_["worker_group"] = worker_group
    if hostname is not None:
        input_["hostname"] = hostname

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output