Skip to content

get_plan_execution

get_plan_execution(
    plan_arn: PlanArn,
    execution_id: ExecutionId,
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    max_results: Optional[GetPlanExecutionStepStatesMaxResults] = None,
    next_token: Optional[str] = None,
) -> GetPlanExecutionResponse

Retrieves detailed information about a specific plan execution. You must specify the plan ARN and execution ID.

Parameters:

  • plan_arn (PlanArn) –

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

  • execution_id (ExecutionId) –

    The execution identifier of a plan execution.

  • max_results (Optional[GetPlanExecutionStepStatesMaxResults], default: None ) –

    The number of objects that you want to return with this call.

  • next_token (Optional[str], default: None ) –

    Specifies that you want to receive the next page of results. Valid only if you received a nextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's nextToken response to request the next page of results.

Raises:

Source code in docs_src/capo_arc_region_switch/_services/arc_regionswitch.py
def get_plan_execution(
    self,
    plan_arn: "capo_arc_region_switch.types.plan_arn.PlanArn",
    execution_id: "capo_arc_region_switch.types.execution_id.ExecutionId",
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    max_results: Optional[
        "capo_arc_region_switch.types.get_plan_execution_step_states_max_results.GetPlanExecutionStepStatesMaxResults"
    ] = None,
    next_token: Optional[str] = None,
) -> "capo_arc_region_switch.types.get_plan_execution_response.GetPlanExecutionResponse":
    """<p>Retrieves detailed information about a specific plan execution. You must specify the plan ARN and execution ID.</p>

    Args:
        plan_arn: <p>The Amazon Resource Name (ARN) of the plan with the execution to retrieve.</p>
        execution_id: <p>The execution identifier of a plan execution.</p>
        max_results: <p>The number of objects that you want to return with this call.</p>
        next_token: <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>nextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>nextToken</code> response to request the next page of results.</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.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.get_plan_execution_request.GetPlanExecutionRequest]",
    ) -> OperationResponse[
        "capo_arc_region_switch.types.get_plan_execution_response.GetPlanExecutionResponse"
    ]:
        import capo_arc_region_switch._operations.arc_region_switch.get_plan_execution

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

    def _redact_output(
        output: "capo_arc_region_switch.types.get_plan_execution_response.GetPlanExecutionResponse",
    ) -> dict[str, Any]:
        import capo_arc_region_switch.types.get_plan_execution_response

        return capo_arc_region_switch.types.get_plan_execution_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetPlanExecution", redact_output=_redact_output),
    )
    input_: capo_arc_region_switch.types.get_plan_execution_request.GetPlanExecutionRequest = {
        "plan_arn": plan_arn,
        "execution_id": execution_id,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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