Skip to content

get_account_plan_state

get_account_plan_state(
    *, config_overrides: Optional[FreeTierClientConfig] = None
) -> GetAccountPlanStateResponse

This returns all of the information related to the state of the account plan related to Free Tier.

Raises:

Examples:

Fetching account plan state by id

>>> client.get_account_plan_state()
Attempt to fetch account plan state by id with insufficient permissions
>>> client.get_account_plan_state()
Internal service error
>>> client.get_account_plan_state()
Attempt to fetch plan state by id for an account without account plan
>>> client.get_account_plan_state()
Request rate exceeds limits
>>> client.get_account_plan_state()
Source code in docs_src/capo_freetier/_services/free_tier.py
def get_account_plan_state(
    self, *, config_overrides: Optional[FreeTierClientConfig] = None
) -> "capo_freetier.types.get_account_plan_state_response.GetAccountPlanStateResponse":
    """<p> This returns all of the information related to the state of the account plan related to Free Tier. </p>

    Raises:
        capo_freetier.errors.access_denied_exception.AccessDeniedException: <p> You don't have sufficient access to perform this action. </p>
        capo_freetier.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of your request.</p>
        capo_freetier.errors.resource_not_found_exception.ResourceNotFoundException: <p> This exception is thrown when the requested resource cannot be found. </p>
        capo_freetier.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_freetier.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_freetier.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Fetching account plan state by id

        >>> client.get_account_plan_state()
        Attempt to fetch account plan state by id with insufficient permissions

        >>> client.get_account_plan_state()
        Internal service error

        >>> client.get_account_plan_state()
        Attempt to fetch plan state by id for an account without account plan

        >>> client.get_account_plan_state()
        Request rate exceeds limits

        >>> client.get_account_plan_state()
    """

    def _handler(
        req: "OperationRequest[capo_freetier.types.get_account_plan_state_request.GetAccountPlanStateRequest]",
    ) -> OperationResponse[
        "capo_freetier.types.get_account_plan_state_response.GetAccountPlanStateResponse"
    ]:
        import capo_freetier._operations.aws_free_tier_service.get_account_plan_state

        output, http_response = (
            capo_freetier._operations.aws_free_tier_service.get_account_plan_state.get_account_plan_state(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAccountPlanState")
    )
    input_: capo_freetier.types.get_account_plan_state_request.GetAccountPlanStateRequest = {}

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