Skip to content

list_plans_in_region

list_plans_in_region(
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListPlansInRegionResponse

Lists all Region switch plans in your Amazon Web Services account that are available in the current Amazon Web Services Region.

Parameters:

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

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

  • next_token (Optional[NextToken], 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 list_plans_in_region(
    self,
    *,
    config_overrides: Optional[ARCRegionswitchClientConfig] = None,
    max_results: Optional[
        "capo_arc_region_switch.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_arc_region_switch.types.next_token.NextToken"
    ] = None,
) -> "capo_arc_region_switch.types.list_plans_in_region_response.ListPlansInRegionResponse":
    """<p>Lists all Region switch plans in your Amazon Web Services account that are available in the current Amazon Web Services Region.</p>

    Args:
        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.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_arc_region_switch.types.list_plans_in_region_request.ListPlansInRegionRequest]",
    ) -> OperationResponse[
        "capo_arc_region_switch.types.list_plans_in_region_response.ListPlansInRegionResponse"
    ]:
        import capo_arc_region_switch._operations.arc_region_switch.list_plans_in_region

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPlansInRegion")
    )
    input_: capo_arc_region_switch.types.list_plans_in_region_request.ListPlansInRegionRequest = {}
    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