在 VMware Aria Operations 可以連線至 vCenter 並開始收集資料之前,需要確認介面卡執行個體探索到的資料來源提供的是有效的憑證。您的 PATCH 要求包括要求內文 (即用於建立介面卡之 POST 要求的回應),提供了憑證有效的證明。
必要條件
確認您有用於建立介面卡之 POST 要求的回應。請參閱 介面卡執行個體 中的回應。
程序
- ♦ 提出 PATCH 要求,以向系統通知使用者已接受 vCenter 提供的憑證。
PATCH https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/adapters
範例: 憑證驗證
在此範例中,PATCH 要求的要求內文與用於建立介面卡執行個體之 POST 要求的回應相同。
要求標頭:
PATCH https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/adapters以 JSON 格式撰寫的要求內文:
{ "resourceKey": { "name": "VC Adapter Instance", "adapterKindKey": "VMWARE", "resourceKindKey": "VMwareAdapter Instance", "resourceIdentifiers": [ { "identifierType": { "name": "AUTODISCOVERY", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "true" }, { "identifierType": { "name": "DISABLE_COMPUTATION_BASED_ON_CONSUMERS", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "DV_PORT_GROUP_DISABLED", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "DVS_DISABLED", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "PROCESSCHANGEEVENTS", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "true" }, { "identifierType": { "name": "VCURL", "dataType": "STRING", "isPartOfUniqueness": true }, "value": "https://12.345.678.9" }, { "identifierType": { "name": "VM_FOLDER_DISABLED", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "VM_LIMIT", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" } ] }, "description": "A vCenter Adapter Instance for VC 12.345.678.9", "collectorId": 1, "collectorGroupId": "909c2fbf-2c2c-4957-9a75-21bf2a887d31", "credentialInstanceId": "65081a8d-d462-43b2-b4e0-596eaf3d497e", "monitoringInterval": 5, "adapter-certificates": [ { "thumbprint": "2520fb4351bc91ee7b82ef7cc54a8d88fa893da9", "certificateDetails": "[ Version: V3 Subject: C=US, CN=12.345.678.9 Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11 Key: Sun RSA public key, 2048 bits modulus: ... Validity: [From: Wed Jul 15 19:26:51 UTC 2015, To: Tue Jul 08 11:26:30 UTC 2025] Issuer: O=W12R2UINanduVC, C=US, DC=local, DC=vsphere, CN=CA ... ... ]" } ], ... "id": "a97bd204-e3e5-404b-a219-e2b20cf158d2" }
以 JSON 撰寫的回應:
{ "resourceKey": { "name": "VC Adapter Instance", "adapterKindKey": "VMWARE", "resourceKindKey": "VMwareAdapter Instance", "resourceIdentifiers": [ { "identifierType": { "name": "AUTODISCOVERY", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "true" }, { "identifierType": { "name": "DISABLE_COMPUTATION_BASED_ON_CONSUMERS", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "DV_PORT_GROUP_DISABLED", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "DVS_DISABLED", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "PROCESSCHANGEEVENTS", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "true" }, { "identifierType": { "name": "VCURL", "dataType": "STRING", "isPartOfUniqueness": true }, "value": "https://12.345.678.9" }, { "identifierType": { "name": "VM_FOLDER_DISABLED", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" }, { "identifierType": { "name": "VM_LIMIT", "dataType": "STRING", "isPartOfUniqueness": false }, "value": "" } ] }, "description": "A vCenter Adapter Instance for VC 12.345.678.9", "collectorId": 1, "collectorGroupId": "909c2fbf-2c2c-4957-9a75-21bf2a887d31", "credentialInstanceId": "65081a8d-d462-43b2-b4e0-596eaf3d497e", "monitoringInterval": 5, ... "id": "a97bd204-e3e5-404b-a219-e2b20cf158d2" }
此回應與要求內文相同,不含 adapter-certificates 區段。