Activating an SDDC for VMware Aria Automation automatically deploys a VM and creates a VMware Cloud on AWS cloud account. You do not need a cloud proxy VM. The POST request to create a VMware Cloud on AWS cloud account only requires parameters specific to VMware Cloud on AWS and does not require a data collector ID.
If an SDDC has not been activated for VMware Aria Automation, you activate it using Automation Assembler. See Create a VMware Cloud on AWS cloud account in VMware Aria Automation for an SDDC within a US region.
Prerequisites
- Verify that all general prerequisites and prerequisites for the Automation Assembler Infrastructure as a Service (IaaS) service have been satisfied. See Prerequisites for API Use Case Examples.
- Verify that you have the following parameters for the new cloud account:
- SDDC name.
- vCenter private IP.
- NSX Manager IP.
- vCenter user name.
- vCenter data center ID.
- vCenter data center name.
Procedure
Example: Create a VMC Cloud Account with an SDDC activated for VMware Aria Automation
This example creates a VMware Cloud on AWS cloud account without requiring manual deployment of a cloud proxy VM.
Assign the required variables.
$ url='https://api.mgmt.cloud.vmware.com'
$ api_version='2021-07-15'
Assign the variables for the VMC cloud account.
$ vmc_sddc_name='sddc_example' $ vmc_vcenter_private_ip='10.2.224.4' $ vmc_nsx_manager_ip='nsxManager.sddc-10-182-161-25.mycompanyvmc.com' $ vmc_vcenter_username='[email protected]' $ vmc_vcenter_datacenter_id='Datacenter:datacenter-1' $ vmc_vcenter_datacenter_name='SDDC-Datacenter'
Create a VMC cloud account named vmc-account-SDDC-activated.
curl -X POST \ "$url/iaas/api/cloud-accounts?apiVersion=$api_version" \ -H "Authorization: Bearer $access_token" \ -H 'Content-Type: application/json' \ -d '{ "cloudAccountProperties": { "hostName": "'"$vmc_vcenter_private_ip"'", "acceptSelfSignedCertificate": "false" "nsxHostName": "'"$vmc_nsx_manager_ip"'", "sddcId": "'"$vmc_sddc_name"'" }, "privateKey": "ignore", "createDefaultZones": false, "regions": [ { "externalRegionId": "'"$vmc_vcenter_datacenter_id"'", "name": "'"$vmc_vcenter_datacenter_name"'" } ], "customProperties": { "environment": "aap" }, "cloudAccountType": "vmc", "name": "vmc-account-using-activated-SDDC", "privateKeyId": "'"$vmc_vcenter_username"'" }' | jq "."
The response includes a selfLink variable.
{ "progress": 0, "status": "INPROGRESS", "name": "Cloud account creation/update", "id": "a85d1476-1b11-45b0-8d14-91951385c95d", "selfLink": "/iaas/api/request-tracker/a85d1476-1b11-45b0-8d14-91951385c95d" }
Assign the selfLink variable.
selfLink_id='a85d1476-1b11-45b0-8d14-91951385c95d'
Use the selfLink variable to track the progress of the cloud account creation.
curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/request-tracker/$selfLink_id | jq "."
When the request completes successfully, the response shows the cloud account ID at the end of the resources
path.
{ "progress": 100, "status": "FINISHED", "resources": [ "/iaas/api/cloud-accounts/e6af1aa6-dc7a-4847-8adc-c4c73727e5b3" ], "name": "Cloud account creation/update", "id": "a85d1476-1b11-45b0-8d14-91951385c95d", "selfLink": "/iaas/api/request-tracker/a85d1476-1b11-45b0-8d14-91951385c95d" }