Skip to content

put_job_success_result async

put_job_success_result(
    job_id: JobId,
    *,
    config_overrides: Optional[AsyncCodePipelineClientConfig] = None,
    current_revision: Optional[CurrentRevision] = None,
    continuation_token: Optional[ContinuationToken] = None,
    execution_details: Optional[ExecutionDetails] = None,
    output_variables: Optional[OutputVariablesMap] = None,
) -> None

Represents the success of a job as returned to the pipeline by a job worker. Used for custom actions only.

Parameters:

  • job_id (JobId) –

    The unique system-generated ID of the job that succeeded. This is the same ID returned from PollForJobs.

  • current_revision (Optional[CurrentRevision], default: None ) –

    The ID of the current revision of the artifact successfully worked on by the job.

  • continuation_token (Optional[ContinuationToken], default: None ) –

    A token generated by a job worker, such as a CodeDeploy deployment ID, that a successful job provides to identify a custom action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the custom action. When the action is complete, no continuation token should be supplied.

  • execution_details (Optional[ExecutionDetails], default: None ) –

    The execution details of the successful job, such as the actions taken by the job worker.

  • output_variables (Optional[OutputVariablesMap], default: None ) –

    Key-value pairs produced as output by a job worker that can be made available to a downstream action configuration. outputVariables can be included only when there is no continuation token on the request.

Raises:

Source code in docs_src/capo_codepipeline/_services/async_code_pipeline.py
async def put_job_success_result(
    self,
    job_id: "capo_codepipeline.types.job_id.JobId",
    *,
    config_overrides: Optional[AsyncCodePipelineClientConfig] = None,
    current_revision: Optional[
        "capo_codepipeline.types.current_revision.CurrentRevision"
    ] = None,
    continuation_token: Optional[
        "capo_codepipeline.types.continuation_token.ContinuationToken"
    ] = None,
    execution_details: Optional[
        "capo_codepipeline.types.execution_details.ExecutionDetails"
    ] = None,
    output_variables: Optional[
        "capo_codepipeline.types.output_variables_map.OutputVariablesMap"
    ] = None,
) -> None:
    """<p>Represents the success of a job as returned to the pipeline by a job worker. Used for custom actions only.</p>

    Args:
        job_id: <p>The unique system-generated ID of the job that succeeded. This is the same ID returned from <code>PollForJobs</code>.</p>
        current_revision: <p>The ID of the current revision of the artifact successfully worked on by the job.</p>
        continuation_token: <p>A token generated by a job worker, such as a CodeDeploy deployment ID, that a successful job provides to identify a custom action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the custom action. When the action is complete, no continuation token should be supplied.</p>
        execution_details: <p>The execution details of the successful job, such as the actions taken by the job worker.</p>
        output_variables: <p>Key-value pairs produced as output by a job worker that can be made available to a downstream action configuration. <code>outputVariables</code> can be included only when there is no continuation token on the request.</p>

    Raises:
        capo_codepipeline.errors.invalid_job_state_exception.InvalidJobStateException: <p>The job state was specified in an invalid format.</p>
        capo_codepipeline.errors.job_not_found_exception.JobNotFoundException: <p>The job was specified in an invalid format or cannot be found.</p>
        capo_codepipeline.errors.output_variables_size_exceeded_exception.OutputVariablesSizeExceededException: <p>Exceeded the total size limit for all variables in the pipeline.</p>
        capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
        capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codepipeline.types.put_job_success_result_input.PutJobSuccessResultInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_codepipeline._operations.code_pipeline_20150709.put_job_success_result

        (
            output,
            http_response,
        ) = await capo_codepipeline._operations.code_pipeline_20150709.put_job_success_result.async_put_job_success_result(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutJobSuccessResult")
    )
    input_: capo_codepipeline.types.put_job_success_result_input.PutJobSuccessResultInput = {
        "job_id": job_id
    }
    if current_revision is not None:
        input_["current_revision"] = current_revision
    if continuation_token is not None:
        input_["continuation_token"] = continuation_token
    if execution_details is not None:
        input_["execution_details"] = execution_details
    if output_variables is not None:
        input_["output_variables"] = output_variables

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