Returns a summary of all flat-rate pricing subscriptions in the calling account.
Parameters:
-
next_token
(Optional[str], default:
None
)
–
A token from a previous ListSubscriptions response. If the response included a nextToken, there are more results available. Pass this value to retrieve the next page of results.
Raises:
-
AccessDeniedException
–
You do not have the required permissions to perform this operation. Verify that your IAM policy grants access to this action.
-
InternalServerException
–
An unexpected error occurred on the server. Retry the request.
-
ResourceNotFoundException
–
The specified subscription was not found. Verify that the ARN is correct and that the subscription belongs to your account.
-
ThrottlingException
–
The request rate exceeds the allowed limit. Wait briefly and retry the request.
-
ValidationException
–
The request failed a business rule validation. For example, the specified resource might already be associated with another subscription, or the subscription might not be in the required state for this operation.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
List all subscriptions
>>> await client.list_subscriptions()
Source code in docs_src/capo_pricing_plan_manager/_services/async_pricing_plan_manager.py
| async def list_subscriptions(
self,
*,
config_overrides: Optional[AsyncPricingPlanManagerClientConfig] = None,
next_token: Optional[str] = None,
) -> "capo_pricing_plan_manager.types.list_subscriptions_output.ListSubscriptionsOutput":
"""<p>Returns a summary of all flat-rate pricing subscriptions in the calling account.</p>
Args:
next_token: <p>A token from a previous <code>ListSubscriptions</code> response. If the response included a <code>nextToken</code>, there are more results available. Pass this value to retrieve the next page of results.</p>
Raises:
capo_pricing_plan_manager.errors.access_denied_exception.AccessDeniedException: <p>You do not have the required permissions to perform this operation. Verify that your IAM policy grants access to this action.</p>
capo_pricing_plan_manager.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred on the server. Retry the request.</p>
capo_pricing_plan_manager.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified subscription was not found. Verify that the ARN is correct and that the subscription belongs to your account.</p>
capo_pricing_plan_manager.errors.throttling_exception.ThrottlingException: <p>The request rate exceeds the allowed limit. Wait briefly and retry the request.</p>
capo_pricing_plan_manager.errors.validation_exception.ValidationException: <p>The request failed a business rule validation. For example, the specified resource might already be associated with another subscription, or the subscription might not be in the required state for this operation.</p>
capo_pricing_plan_manager.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List all subscriptions
>>> await client.list_subscriptions()
"""
async def _handler(
req: "AsyncOperationRequest[capo_pricing_plan_manager.types.list_subscriptions_input.ListSubscriptionsInput]",
) -> AsyncOperationResponse[
"capo_pricing_plan_manager.types.list_subscriptions_output.ListSubscriptionsOutput"
]:
import capo_pricing_plan_manager._operations.aws_pricing_plan_manager.list_subscriptions
(
output,
http_response,
) = await capo_pricing_plan_manager._operations.aws_pricing_plan_manager.list_subscriptions.async_list_subscriptions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListSubscriptions")
)
input_: capo_pricing_plan_manager.types.list_subscriptions_input.ListSubscriptionsInput = {}
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
|