How to get used VCPU's by calling API

0

I would like to call the API to get back the number of VCPU's used by all running instances in the region, so I can run some preflight checks before I create new instances, to see if there are enough VCPU's available, without increasing the quota. Is there a way to do that, instead of iterating all vm instances and getting their used VCPU's? Thanks!

질문됨 2년 전228회 조회
1개 답변
0

I think you can find the code to do this in this solution: AWS Limit Monitor.

profile pictureAWS
전문가
kentrad
답변함 2년 전
  • Could not find it. Could you please be more specific? I have also found that I can do: 'client.servicequotasClient.GetServiceQuota(ctx, &servicequotas.GetServiceQuotaInput{ QuotaCode: aws.String(quotaCode), ServiceCode: aws.String(serviceCode)})' However, the returned quota value, is the current limit. But not the utilization, which I need.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠