For your public cloud account added in CSM, you can get a list of supported regions and restrict access to specific regions.

  • To get a list of specific regions, run the following API:
    GET https://<csm-IP>/csmapi/api/v1/csm/supported-regions
    Note: If you do not see all the available regions in your AWS account, check whether you have enabled regions in your AWS account. See AWS documentations for details on enabling regions.
  • To restrict regions in Microsoft Azure, run the following API:
    PUT https://<csm-IP>/api/v1/csm/azure/accounts/<account_id>/desired-regions
    
    Example Request:
    PUT https://<nsx-csm>/api/v1/csm/azure/accounts/9174ffd1-41b1-42d6-a28d-05c61a0698e2/desired-regions
    {
      "regions": [
        {
          "id": "westus",
          "display_name": "westus",
          "enabled": true,
        },
        {
          "id": "eastus2",
          "display_name": "eastus2",
          "enabled": false,
        }
      ]
    }
    
  • To restrict regions in AWS, run the following API:
    PUT https://<csm-IP>/api/v1/csm/aws/accounts/<account_id>/desired-regions
    
    Example Request:
    PUT https://<nsx-csm>/api/v1/csm/aws/accounts/9174ffd1-41b1-42d6-a28d-05c61a0698e2/desired-regions
    {
      "default_client_region": "us-east-1",
      "regions": [
        {
          "id": "us-west-2",
          "display_name": "Oregon",
          "enabled": false,
        },
        {
          "id": "us-east-1",
          "display_name": "N. Virginia",
          "enabled": true,
        }
      ]
    }

See the latest version of the NSX API Guide at https://code.vmware.com/ for API details.