Starting with VMware Cloud Director 10.5, you can use the VMware Cloud Director API to manage proxy routing for specific destinations in your environment.

By using the VMware Cloud Director, you can configure rules that specify which proxy to use for access to specific destination hosts, for example, internal identity providers, catalogs, and so on.

Note: When a system administrator configures system organization proxy routing rules, these rules apply for all tenants in the VMware Cloud Director environment, unless an organization administrator configures proxy rules that override them.

When you create a proxy rule for your organization, you configure a backend proxy that is positioned between VMware Cloud Director and the destination host in your environment and functions as an access endpoint for this host.

For details on creating proxy configuration objects, see ProxyConfiguration in VMware Cloud Director OpenAPI Reference.

Procedure

  1. Run a GET request to retrieve the VMware Cloud Director provided proxies that are available in your environment.
    GET  https://{api_host}/cloudapi/1.0.0/proxyConfigurations
  2. Make a note of the URN ID of the proxy configuration that you want to use.
  3. To create a proxy rule, run a POST request.
    POST https://{api_host}/cloudapi/1.0.0/proxyRule

    In the body of the request, include the URN for the proxy, as well the FQDN and port for the destination host for which you want to use it, and credentials, if necessary.

    {
      "name": "proxy_sample_name",
      "destination": "https://example.intranet.com:10101",
      "proxy": {
        "name": "proxy_name",
        "id": "URN_1"
      },
      "priority": 0
    }

    Here, the value of the priority parameter indicates the relative preference of the rule in relation to other rules for the same destination, with lower numerical value indicated higher priority.

View and Edit the Proxy Routing Rules for Your VMware Cloud Director Environment

You can use the VMware Cloud Director OpenAPI to view the existing proxy routing rules for your organization.

Procedure

  1. Run a GET request.
    GET  https://{api_host}/cloudapi/1.0.0/proxyRules
    The response returns a list of the proxy rules that are configured in your organization.
  2. To retrieve details about a specific proxy routing rule, make a note of its ID (URN), and run a GET request.
    GET  https://{api_host}/cloudapi/1.0.0/proxyRule/proxy_rule_URN
  3. To update an existing proxy rule, run a PUT request.
    PUT https://{api_host}/cloudapi/1.0.0/proxyRule/proxy_rule_URN
    In the body of the request, enter the updated proxy configuration rule.
    {
      "name": "proxy_sample_name",
      "destination": "https://example.intranet.com:10101",
      "proxy": {
        "name": "proxy_name_2",
        "id": "URN_2"
      },
      "priority": 0
    }
  4. To delete a proxy rule that you don't need anymore, run a DELETE request.
    DELETE https://{api_host}/cloudapi/1.0.0/proxyRule/proxy_rule_URN