- Newest
- Most votes
- Most comments
Why don't you want to use "ServiceCode"?
I think we can use "ServiceCode" and check the quota in "list_service_quotas".
Is there any reason why this is not possible?
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/service-quotas/client/list_service_quotas.html#
From the question, it's little unclear why there is a requirement to avoid passing service code, when we need to get service quotas for a specific service as that's a required parameter. describe_account_attributes is an ec2 api which doesn't require any additional parameters so both are completely different and these two shouldn't be compared as servicequotas is generic while latter one is specific to ec2.
CLI:
aws service-quotas list-service-quotas --service-code vpc --query 'Quotas[*].[QuotaName,Value]' --profile <profile>
Boto3:
sq_client = boto3.client('service-quotas')
sq_client = list_service_quotas(ServiceCode='vpc')
Service Quotas API is designed to keep every service in it and to get the result specific to one service, we have to have that service code specified.
Relevant content
- asked 5 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago