Skip to content

list_service_quota_warnings async

list_service_quota_warnings(
    *,
    config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None,
    plan_arns: Optional[PlanArnList] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListServiceQuotaWarningsResponse

Lists the service quota warnings for the plans that you can access. Region switch creates a warning when the applied quota value in one Region of a plan is lower than the value required for the matching resource in another Region or account in the plan.

Returns the warnings for the plans that you own and for plans that are shared with your account through Resource Access Manager (RAM). To return warnings for specific plans, provide a list of plan Amazon Resource Names (ARNs). Region switch ignores any plan ARN that you can't access. If you don't provide any plan ARNs, Region switch returns the warnings for all of your accessible plans.

Parameters:

  • plan_arns (Optional[PlanArnList], default: None ) –

    The Amazon Resource Names (ARNs) of the plans to return service quota warnings for. You can specify up to 100 plan ARNs. Region switch ignores any plan ARN that you can't access. If you omit this parameter, Region switch returns the warnings for all of your accessible plans.

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

    The maximum number of results to return with this call. Valid values are 1 to 100. If you don't specify a value, the operation returns up to the maximum number of results.

  • 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:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

    HTTP Status Code: 403

  • InternalServerException –

    The request processing has failed because of an unknown error, exception, or failure.

    HTTP Status Code: 500

  • UnknownServiceError –

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

Source code in docs_src/capo_arc_region_switch/_services/async_arc_regionswitch.py
async def list_service_quota_warnings(
    self,
    *,
    config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None,
    plan_arns: Optional[
        "capo_arc_region_switch.types.plan_arn_list.PlanArnList"
    ] = 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_service_quota_warnings_response.ListServiceQuotaWarningsResponse":
    """<p>Lists the service quota warnings for the plans that you can access. Region switch creates a warning when the applied quota value in one Region of a plan is lower than the value required for the matching resource in another Region or account in the plan.</p> <p>Returns the warnings for the plans that you own and for plans that are shared with your account through Resource Access Manager (RAM). To return warnings for specific plans, provide a list of plan Amazon Resource Names (ARNs). Region switch ignores any plan ARN that you can't access. If you don't provide any plan ARNs, Region switch returns the warnings for all of your accessible plans.</p>

    Args:
        plan_arns: <p>The Amazon Resource Names (ARNs) of the plans to return service quota warnings for. You can specify up to 100 plan ARNs. Region switch ignores any plan ARN that you can't access. If you omit this parameter, Region switch returns the warnings for all of your accessible plans.</p>
        max_results: <p>The maximum number of results to return with this call. Valid values are <code>1</code> to <code>100</code>. If you don't specify a value, the operation returns up to the maximum number of results.</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.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</p> <p>HTTP Status Code: 500</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.list_service_quota_warnings_request.ListServiceQuotaWarningsRequest]",
    ) -> AsyncOperationResponse[
        "capo_arc_region_switch.types.list_service_quota_warnings_response.ListServiceQuotaWarningsResponse"
    ]:
        import capo_arc_region_switch._operations.arc_region_switch.list_service_quota_warnings

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListServiceQuotaWarnings")
    )
    input_: capo_arc_region_switch.types.list_service_quota_warnings_request.ListServiceQuotaWarningsRequest = {}
    if plan_arns is not None:
        input_["plan_arns"] = plan_arns
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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