Skip to content

update_plan_execution

update_plan_execution(
    plan_arn: PlanArn,
    execution_id: ExecutionId,
    action: UpdatePlanExecutionAction,
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    comment: Optional[ExecutionComment] = None,
) -> UpdatePlanExecutionResponse

Updates an in-progress plan execution. This operation allows you to modify certain aspects of the execution, such as adding a comment or changing the action.

Parameters:

  • plan_arn (PlanArn) –

    The Amazon Resource Name (ARN) of the plan with the execution to update.

  • execution_id (ExecutionId) –

    The execution identifier of a plan execution.

  • action (UpdatePlanExecutionAction) –

    The action specified for a plan execution, for example, Switch to Graceful or Pause.

  • comment (Optional[ExecutionComment], default: None ) –

    An optional comment about the plan execution.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

    HTTP Status Code: 403

  • IllegalStateException –

    The operation failed because the current state of the resource doesn't allow the operation to proceed.

    HTTP Status Code: 400

  • ResourceNotFoundException –

    The specified resource was not found.

    HTTP Status Code: 404

  • UnknownServiceError –

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

Source code in docs_src/capo_arc_region_switch/_services/arc_regionswitch.py
def update_plan_execution(
    self,
    plan_arn: "capo_arc_region_switch.types.plan_arn.PlanArn",
    execution_id: "capo_arc_region_switch.types.execution_id.ExecutionId",
    action: "capo_arc_region_switch.types.update_plan_execution_action.UpdatePlanExecutionAction",
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    comment: Optional[
        "capo_arc_region_switch.types.execution_comment.ExecutionComment"
    ] = None,
) -> "capo_arc_region_switch.types.update_plan_execution_response.UpdatePlanExecutionResponse":
    """<p>Updates an in-progress plan execution. This operation allows you to modify certain aspects of the execution, such as adding a comment or changing the action.</p>

    Args:
        plan_arn: <p>The Amazon Resource Name (ARN) of the plan with the execution to update.</p>
        execution_id: <p>The execution identifier of a plan execution.</p>
        action: <p>The action specified for a plan execution, for example, Switch to Graceful or Pause.</p>
        comment: <p>An optional comment about the plan execution.</p>

    Raises:
        capo_arc_region_switch.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p> <p>HTTP Status Code: 403</p>
        capo_arc_region_switch.errors.illegal_state_exception.IllegalStateException: <p>The operation failed because the current state of the resource doesn't allow the operation to proceed.</p> <p>HTTP Status Code: 400</p>
        capo_arc_region_switch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p> <p>HTTP Status Code: 404</p>
        capo_arc_region_switch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_arc_region_switch.types.update_plan_execution_request.UpdatePlanExecutionRequest]",
    ) -> OperationResponse[
        "capo_arc_region_switch.types.update_plan_execution_response.UpdatePlanExecutionResponse"
    ]:
        import capo_arc_region_switch._operations.arc_region_switch.update_plan_execution

        output, http_response = (
            capo_arc_region_switch._operations.arc_region_switch.update_plan_execution.update_plan_execution(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePlanExecution")
    )
    input_: capo_arc_region_switch.types.update_plan_execution_request.UpdatePlanExecutionRequest = {
        "plan_arn": plan_arn,
        "execution_id": execution_id,
        "action": action,
    }
    if comment is not None:
        input_["comment"] = comment

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