Skip to content

get_plan_in_region async

get_plan_in_region(
    arn: PlanArn, *, config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None
) -> GetPlanInRegionResponse

Retrieves information about a Region switch plan in a specific Amazon Web Services Region. This operation is useful for getting Region-specific information about a plan.

Parameters:

  • arn (PlanArn) –

    The Amazon Resource Name (ARN) of the plan in Region.

Raises:

Source code in docs_src/capo_arc_region_switch/_services/async_arc_regionswitch.py
async def get_plan_in_region(
    self,
    arn: "capo_arc_region_switch.types.plan_arn.PlanArn",
    *,
    config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None,
) -> "capo_arc_region_switch.types.get_plan_in_region_response.GetPlanInRegionResponse":
    """<p>Retrieves information about a Region switch plan in a specific Amazon Web Services Region. This operation is useful for getting Region-specific information about a plan.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the plan in Region.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_arc_region_switch.types.get_plan_in_region_request.GetPlanInRegionRequest]",
    ) -> AsyncOperationResponse[
        "capo_arc_region_switch.types.get_plan_in_region_response.GetPlanInRegionResponse"
    ]:
        import capo_arc_region_switch._operations.arc_region_switch.get_plan_in_region

        (
            output,
            http_response,
        ) = await capo_arc_region_switch._operations.arc_region_switch.get_plan_in_region.async_get_plan_in_region(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_arc_region_switch.types.get_plan_in_region_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetPlanInRegion", redact_output=_redact_output),
    )
    input_: capo_arc_region_switch.types.get_plan_in_region_request.GetPlanInRegionRequest = {
        "arn": arn
    }

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