The account plan type for the Amazon Web Services account.
Parameters:
-
account_plan_type
(AccountPlanType)
–
The target account plan type. This makes it explicit about the change and latest value of the accountPlanType.
Raises:
Examples:
Upgrading an account plan to PAID
>>> client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade an account with insufficient permissions
>>> client.upgrade_account_plan(account_plan_type='PAID')
Attempt to downgrade an account from PAID to FREE
>>> client.upgrade_account_plan(account_plan_type='FREE')
Internal service error
>>> client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade a non-existent account plan
>>> client.upgrade_account_plan(account_plan_type='PAID')
Request rate exceeds limits
>>> client.upgrade_account_plan(account_plan_type='PAID')
Source code in docs_src/capo_freetier/_services/free_tier.py
| def upgrade_account_plan(
self,
account_plan_type: "capo_freetier.types.account_plan_type.AccountPlanType",
*,
config_overrides: Optional[FreeTierClientConfig] = None,
) -> "capo_freetier.types.upgrade_account_plan_response.UpgradeAccountPlanResponse":
"""<p> The account plan type for the Amazon Web Services account. </p>
Args:
account_plan_type: <p> The target account plan type. This makes it explicit about the change and latest value of the <code>accountPlanType</code>. </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:
Upgrading an account plan to PAID
>>> client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade an account with insufficient permissions
>>> client.upgrade_account_plan(account_plan_type='PAID')
Attempt to downgrade an account from PAID to FREE
>>> client.upgrade_account_plan(account_plan_type='FREE')
Internal service error
>>> client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade a non-existent account plan
>>> client.upgrade_account_plan(account_plan_type='PAID')
Request rate exceeds limits
>>> client.upgrade_account_plan(account_plan_type='PAID')
"""
def _handler(
req: "OperationRequest[capo_freetier.types.upgrade_account_plan_request.UpgradeAccountPlanRequest]",
) -> OperationResponse[
"capo_freetier.types.upgrade_account_plan_response.UpgradeAccountPlanResponse"
]:
import capo_freetier._operations.aws_free_tier_service.upgrade_account_plan
output, http_response = (
capo_freetier._operations.aws_free_tier_service.upgrade_account_plan.upgrade_account_plan(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpgradeAccountPlan")
)
input_: capo_freetier.types.upgrade_account_plan_request.UpgradeAccountPlanRequest = {
"account_plan_type": account_plan_type
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|