In VMware Cloud on AWS GovCloud, you can access both the VMC service and vCenter Server. You can connect to VMware Cloud on AWS GovCloud VMC Service using API Refresh Token.

Procedure

  1. To generate an API token in VMware Cloud on AWS GovCloud, navigate to https:// console.cloud-us-gov.vmware.com /csp/gateway/portal/#/user/tokens and click Generate Token URL.
  2. Connect to VMware Cloud on AWS GovCloud VMC Service using PowerCLI, generate an API Refresh Token.
  3. Create variables to store the VMC API Refresh Token with the GovCloud endpoints.
    $RefreshToken = "abc123"
    $CSPEndpoint = "console.cloud-us-gov.vmware.com"
    $VMCEndpoint = "www.vmc-us-gov.vmware.com"
  4. Create an OAuth Security Context and log in to VMC Service.
    $oauthSecurityContext = New-VcsOAuthSecurityContext -VcsServer $CSPEndpoint -ApiToken $RefreshToken
  5. Connect to VMware Cloud on AWS GovCloud VMC Service.
    Connect-Vmc -Server $VMCEndpoint -OAuthSecurityContext $oauthSecurityContext
  6. After a successful connection, run any VMC Service cmdlets such as the Get-VmcSddc.