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
- 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.
- Connect to VMware Cloud on AWS GovCloud VMC Service using PowerCLI, generate an API Refresh Token.
- 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"
- Create an OAuth Security Context and log in to VMC Service.
$oauthSecurityContext = New-VcsOAuthSecurityContext -VcsServer $CSPEndpoint -ApiToken $RefreshToken
- Connect to VMware Cloud on AWS GovCloud VMC Service.
Connect-Vmc -Server $VMCEndpoint -OAuthSecurityContext $oauthSecurityContext
- After a successful connection, run any VMC Service cmdlets such as the Get-VmcSddc.