Skip to content

list_plan_executions

list_plan_executions(
    plan_arn: PlanArn,
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    max_results: Optional[ListExecutionsMaxResults] = None,
    next_token: Optional[str] = None,
    state: Optional[ExecutionState] = None,
) -> ListPlanExecutionsResponse

Lists the executions of a Region switch plan. This operation returns information about both current and historical executions.

Parameters:

  • plan_arn (PlanArn) –

    The ARN for the plan.

  • max_results (Optional[ListExecutionsMaxResults], 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.

  • state (Optional[ExecutionState], default: None ) –

    The state of the plan execution. For example, the plan execution might be In Progress.

Raises:

Source code in docs_src/capo_arc_region_switch/_services/arc_regionswitch.py
def list_plan_executions(
    self,
    plan_arn: "capo_arc_region_switch.types.plan_arn.PlanArn",
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    max_results: Optional[
        "capo_arc_region_switch.types.list_executions_max_results.ListExecutionsMaxResults"
    ] = None,
    next_token: Optional[str] = None,
    state: Optional[
        "capo_arc_region_switch.types.execution_state.ExecutionState"
    ] = None,
) -> "capo_arc_region_switch.types.list_plan_executions_response.ListPlanExecutionsResponse":
    """<p>Lists the executions of a Region switch plan. This operation returns information about both current and historical executions.</p>

    Args:
        plan_arn: <p>The ARN for the plan.</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>
        state: <p>The state of the plan execution. For example, the plan execution might be In Progress.</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.list_plan_executions_request.ListPlanExecutionsRequest]",
    ) -> OperationResponse[
        "capo_arc_region_switch.types.list_plan_executions_response.ListPlanExecutionsResponse"
    ]:
        import capo_arc_region_switch._operations.arc_region_switch.list_plan_executions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPlanExecutions")
    )
    input_: capo_arc_region_switch.types.list_plan_executions_request.ListPlanExecutionsRequest = {
        "plan_arn": plan_arn
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if state is not None:
        input_["state"] = state

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