2 Answers
- Newest
- Most votes
- Most comments
0
Hi, and thank you for the answer.
I can get a list of accounts with list_accounts with the following command:
aws organizations list-accounts
However to use the GetServiceQuota API I believe I need to send ServiceCode and QuotaCode like this:
aws service-quotas get-service-quota --service-code dynamodb --quota-code <code>
I thought I could find i.e ServiceCode with following command, but it didn't return any info for organization accounts:
aws service-quotas list-services
It did return a long list of information of other services, though.
Jonas
answered a year ago
0
Hi THere
You can use the GetServiceQuota API . You can take the "Value" output and compare it to the number of accounts in your org. You can use the list_accounts API to get a count.
Relevant content
- asked 3 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
This likely because you are at the default quota of 10. In that case you use the list-aws-default-service-quotas command.
example:
aws service-quotas list-aws-default-service-quotas --service-code organizations --query "Quotas[?contains(QuotaCode, 'L-29A0C5DF')]"
Hi,
We have increased the quota from 10 to 50, so I guess something should have showed up.
list-aws-default-service-quotas does return quotas for service-code organizations, but list-service-quotas does not:
aws service-quotas list-aws-default-service-quotas --service-code organizations --query "Quotas[?contains(QuotaCode, 'L-29A0C5DF')]" --region us-east-1
[ { "ServiceCode": "organizations", "ServiceName": "AWS Organizations", "QuotaArn": "arn:aws:servicequotas:::organizations/L-29A0C5DF", "QuotaCode": "L-29A0C5DF", "QuotaName": "Default maximum number of accounts", "Value": 10.0, "Unit": "None", "Adjustable": true, "GlobalQuota": true } ]
aws service-quotas list-service-quotas --service-code organizations --region us-east-1
{ "Quotas": [] }