[VMC] Programmatically finding if a specific vCenter is hosted in a VMC on AWS SDDC
book
Article ID: 329419
calendar_today
Updated On:
Products
VMware Cloud on AWS
Issue/Introduction
Guide on how to find out whether or not a specific vCenter is hosted in a VMC on AWS SDDC programmatically.
Environment
VMC on AWS
Resolution
Due to the way VMC on AWS SDDCs are structured, certain aspects, such as the VAMI API, are restricted from customer access, blocking API calls that would work on-premises from working in an SDDC vCenter instance.
Because of this, the only programmatic way to find out if a vCenter is living in an SDDC is to match the FQDN of the vCenter to the standardized FQDN format for all SDDC vCenters.
The standardized format is vcenter.sddc-a-b-c-d.vmwarevmc.com.
From this format, any vCenter with an FQDN that matches *.vmwarevmc.com is presumed to be living within an SDDC.
If you have a vCenter connection already established through a PowerCLI session and you need to determine if this vCenter is within an SDDC, two methods can be followed: