Skip to content

activate_pipeline

activate_pipeline(
    pipeline_id: id,
    *,
    config_overrides: Optional[DataPipelineClientConfig] = None,
    parameter_values: Optional[ParameterValueList] = None,
    start_timestamp: Optional[timestamp] = None,
) -> ActivatePipelineOutput

Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.

If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call DeactivatePipeline.

To activate a finished pipeline, modify the end date for the pipeline and then activate it.

POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ActivatePipeline Content-Length: 39 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE"} HTTP/1.1 200 x-amzn-RequestId: ee19d5bf-074e-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 2 Date: Mon, 12 Nov 2012 17:50:53 GMT {}

Parameters:

  • pipeline_id (id) –

    The ID of the pipeline.

  • parameter_values (Optional[ParameterValueList], default: None ) –

    A list of parameter values to pass to the pipeline at activation.

  • start_timestamp (Optional[timestamp], default: None ) –

    The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.

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.

  • PipelineDeletedException –

    The specified pipeline has been deleted.

  • PipelineNotFoundException –

    The specified pipeline was not found. Verify that you used the correct user and account identifiers.

  • 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 activate_pipeline(
    self,
    pipeline_id: "capo_data_pipeline.types.id.id",
    *,
    config_overrides: Optional[DataPipelineClientConfig] = None,
    parameter_values: Optional[
        "capo_data_pipeline.types.parameter_value_list.ParameterValueList"
    ] = None,
    start_timestamp: Optional[
        "capo_data_pipeline.types.timestamp.timestamp"
    ] = None,
) -> "capo_data_pipeline.types.activate_pipeline_output.ActivatePipelineOutput":
    """<p>Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.</p> <p>If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call <a>DeactivatePipeline</a>.</p> <p>To activate a finished pipeline, modify the end date for the pipeline and then activate it.</p> <examples> <request> POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ActivatePipeline Content-Length: 39 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE"} </request> <response> HTTP/1.1 200 x-amzn-RequestId: ee19d5bf-074e-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 2 Date: Mon, 12 Nov 2012 17:50:53 GMT {} </response> </examples>

    Args:
        pipeline_id: <p>The ID of the pipeline.</p>
        parameter_values: <p>A list of parameter values to pass to the pipeline at activation.</p>
        start_timestamp: <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</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.pipeline_deleted_exception.PipelineDeletedException: <p>The specified pipeline has been deleted.</p>
        capo_data_pipeline.errors.pipeline_not_found_exception.PipelineNotFoundException: <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</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.activate_pipeline_input.ActivatePipelineInput]",
    ) -> OperationResponse[
        "capo_data_pipeline.types.activate_pipeline_output.ActivatePipelineOutput"
    ]:
        import capo_data_pipeline._operations.data_pipeline.activate_pipeline

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ActivatePipeline")
    )
    input_: capo_data_pipeline.types.activate_pipeline_input.ActivatePipelineInput = {
        "pipeline_id": pipeline_id
    }
    if parameter_values is not None:
        input_["parameter_values"] = parameter_values
    if start_timestamp is not None:
        input_["start_timestamp"] = start_timestamp

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