어댑터에 필요한 개체 유형을 식별한 후에는 개체 유형에 대한 매개 변수 값을 제공하여 어댑터 인스턴스를 생성합니다. POST 요청에 필수 매개 변수가 포함된 요청 본문이 포함되어 있습니다.

어댑터 인스턴스를 생성하려면 VCURL 설정이 필수입니다.

사전 요구 사항

vCenter에 대한 IP 주소 및 자격 증명이 있는지 확인합니다.

프로시저

  1. 어댑터 인스턴스를 생성하려면 POST 요청을 수행합니다.
    POST https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/adapters
  2. 응답을 검토하여 vSphere 솔루션 및 해당 어댑터 유형의 이름을 찾습니다.
    어댑터 인스턴스의 응답 부분을 참조하십시오.

예: 어댑터 인스턴스

이 예에서는 다음 매개 변수를 사용하여 vCenter에 대한 어댑터 인스턴스를 생성합니다.

  • 표시 이름: VC 어댑터 인스턴스
  • 설명: VC 12.345.678.9용 vCenter 어댑터 인스턴스
  • vCenter Server IP 주소: https://12.345.678.9
  • 자격 증명 이름: VC-Credential-1
  • 사용자 이름: [email protected]
  • 비밀번호: VC-dummy-passwd

AUTODISCOVERYPROCESSCHANGEEVENTS는 선택 사항이지만 요청 본문과 응답에 리소스 식별자의 추가 예제를 표시하기 위해 포함됩니다.

요청 헤더:
POST https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/adapters
JSON 형식의 요청 본문:
{
  "name" : "VC Adapter Instance",
  "description" : "A vCenter Adapter Instance for VC 12.345.678.9",
  "collectorId" : "1",
  "adapterKindKey" : "VMWARE",
  "resourceIdentifiers" : [ 
    {
      "name" : "AUTODISCOVERY",
      "value" : "true"
    }, 
    {
      "name" : "PROCESSCHANGEEVENTS",
      "value" : "true"
    }, 
    {
      "name" : "VCURL",
      "value" : "https://12.345.678.9"
    } 
  ],
  "credential" : {
    "id" : null,
    "name" : "VC-Credential-1",
    "adapterKindKey" : "VMWARE",
    "credentialKindKey" : "PRINCIPALCREDENTIAL",
    "fields" : [ 
      {
        "name" : "USER",
        "value" : "[email protected]"
      }, 
      {
        "name" : "PASSWORD",
        "value" : "VC-dummy-passwd"
      } 
    ],
  },
}
JSON의 응답 코드 조각:
201 Created
{
  "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"
}

API는 개체를 고유하게 식별하는 내부 생성 UUID를 사용하여 새 어댑터를 생성합니다. API 응답에는 vCenter 12.345.678.9가 제공하는 인증서가 포함됩니다. 어댑터 인스턴스 ID 값은 데이터 모니터링 및 수집을 시작하는 데 사용됩니다.