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!

preguntada hace 2 años228 visualizaciones
1 Respuesta
0

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

profile pictureAWS
EXPERTO
kentrad
respondido hace 2 años
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas