VMware Aria Operations 執行個體包含多個介面卡類型。若要尋找 vCenter 介面卡的介面卡類型,請建立 GET 要求以擷取所有介面卡類型的清單。API 回應包含介面卡監控的所有物件類型。
必要條件
確認您已登入 VMware Aria Operations 執行個體。
程序
範例: 判定 vCenter 介面卡的介面卡類型和物件類型
此範例會尋找 vCenter 介面卡的介面卡類型,以及介面卡型號定義中包含的所有物件類型。
要求標頭:
GET https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/adapterkinds Content-Type: application/json Authorization: CSPToken <csp auth token> Accept: application/json
其中 <csp auth token> 是您從 產生 Cloud Services 驗證 Token 中的回應取得的 Token。
vCenter 介面卡以 JSON 撰寫回應的程式碼片段:
200 OK
{ "key": "VMWARE", "name": "vCenter Adapter", "description": "Provides the connection information and credentials required...", "adapterKindType": "GENERAL", "describeVersion": 573, "identifiers": [], "resourceKinds": [ "ClusterComputeResource", "ComputeResource", "CustomDatacenter", "Datacenter", "Datastore", "StoragePod", "DatastoreFolder", "VM Entity Status", "Folder", "HostFolder", "HostSystem", "NetworkFolder", "ResourcePool", "VMwareAdapter Instance", "VirtualMachine", "VMFolder", "DistributedVirtualPortgroup", "VmwareDistributedVirtualSwitch", "vSphere World" ], ... }
針對 vCenter 介面卡,adapter-kind 金鑰為 VMWARE。resourceKinds 是 vCenter 介面卡監控的物件類型。針對虛擬機器物件類型,resourceKinds 為 VirtualMachine。