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
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade an account with insufficient permissions
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Attempt to downgrade an account from PAID to FREE
>>> await client.upgrade_account_plan(account_plan_type='FREE')
Internal service error
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade a non-existent account plan
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Request rate exceeds limits
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Source code in docs_src/capo_freetier/_services/async_free_tier.py
| async def upgrade_account_plan(
self,
account_plan_type: "capo_freetier.types.account_plan_type.AccountPlanType",
*,
config_overrides: Optional[AsyncFreeTierClientConfig] = 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
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade an account with insufficient permissions
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Attempt to downgrade an account from PAID to FREE
>>> await client.upgrade_account_plan(account_plan_type='FREE')
Internal service error
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Attempt to upgrade a non-existent account plan
>>> await client.upgrade_account_plan(account_plan_type='PAID')
Request rate exceeds limits
>>> await client.upgrade_account_plan(account_plan_type='PAID')
"""
async def _handler(
req: "AsyncOperationRequest[capo_freetier.types.upgrade_account_plan_request.UpgradeAccountPlanRequest]",
) -> AsyncOperationResponse[
"capo_freetier.types.upgrade_account_plan_response.UpgradeAccountPlanResponse"
]:
import capo_freetier._operations.aws_free_tier_service.upgrade_account_plan
(
output,
http_response,
) = await capo_freetier._operations.aws_free_tier_service.upgrade_account_plan.async_upgrade_account_plan(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|