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!

demandé il y a 2 ans228 vues
1 réponse
0

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

profile pictureAWS
EXPERT
kentrad
répondu il y a 2 ans
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions