Using the Advanced Networking Services API, you can create an application group and then define rules for that group. Additionally, you can update and delete application groups by using the API.

You can use the application groups when configuring the edge gateway firewall, the distributed firewall, and the server pool for the load balancer.

1

Log in to vCloud Air as an administrator. See Log in to vCloud Air for information.

2

Create a login session with vCloud Director. See Create a Session for a Virtual Data Center in a Service for information.

1

To create an application group, submit a POST request using the following request header:

POST https://vchs.vmware.com/hybridity/api/scope/scopeId/applicationgroups

In the request header, include the OATH token and the Accept header that you obtained when creating a login session:

Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: vcloud-auth-token

Include the following elements in the request body:

{
  "objectId": "string",
  "revision": number,
  "name": "string",
  "description": "string",
  "scope" : [ {
      "id" : "string",
      "name" : "string",
      "objectType" : "string",
    }, ]
  "members" : [ {
      "objectId" : "string",
      "revision" : "string",
      "name" : "string",
      "description" : "string",
      "scope" : [ {
          "id": "string"},
          "name": "string"},
          "objectType": "string"}
        }, ]
    }, ]
}

For a description of each element, see Schema for Applications and Application Groups.

You can add applications as an array in the members object. To obtain the IDs of the applications configured for the gateway, see Manage Applications for information.

2

To delete an application group, perform the following steps:

a

If necessary, issue a GET request to obtain the ID of the application group. See List Application Groups for information.

Advanced Networking Services returns a list of all application groups configured for the gateway.

b

Using the application group object ID, issue the following DELETE request:

DELETE https://vchs.vmware.com/hybridity/api/scope/scopeId/applicationgroups/applicationGroupId

In the request header, include the OATH token and the Accept header that you obtained when creating a login session:

Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "vcloud-auth-token"

The server returns status 204 NO CONTENT in the response header. The server does not return a response body.

3

To delete a member from an application group, using the member ID, issue the following DELETE request:

DELETE https://vchs.vmware.com/hybridity/api/scope/scopeId/applicationgroups/applicationGroupId/members/memberId

In the request header, include the OATH token and the Accept header that you obtained when creating a login session.

The server returns status 204 NO CONTENT in the response header. The server does not return a response body.

Add the application group to the configuration for the edge gateway firewall, the distributed firewall, and the server pool for the load balancer.