Touchstone 11.0 API Reference
GetZoneSets Method (ObjectManagementServiceClient)
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ObjectManagementServiceClient Class : GetZoneSets Method
Contains a GetZoneSetsRequest that identifies the Business Unit SID and SQL Instance SID associated with the zone sets to retrieve.
Retrieves a set of zone sets.

A zone set is a collection of one or more zones that you can use when you run analyses. A zone is a collection of geography items. A geography item is a region, country, area, or subarea. For example, you can create a zone set named "Pacific Northwest" that comprises three zones: the U.S. state of Oregon, the U.S. state of Washington, and the Canadian Province of British Columbia.

These zone sets differ from the zone sets used for geospatial analyses in Touchstone®.

You can create and manage zone sets from the Administration Console in the software user interface.

Syntax
Public Function GetZoneSets( _
   ByVal request As GetZoneSetsRequest _
) As GetZoneSetsResponse
Dim instance As ObjectManagementServiceClient
Dim request As GetZoneSetsRequest
Dim value As GetZoneSetsResponse
 
value = instance.GetZoneSets(request)

Parameters

request
Contains a GetZoneSetsRequest that identifies the Business Unit SID and SQL Instance SID associated with the zone sets to retrieve.

Return Value

A GetZoneSetsResponse that contains a list of the zone sets in the specified business unit and SQL Server instance.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

Example
The following example shows how to retrieve a list of the existing Zone Sets in a given Business Unit and SQL Server Instance using the GetZoneSets() method:
using AIR.Services.Common.Data;
using AIR.Services.ObjectManagement.Api;
using System;
            
class SnippetGetZoneSets
{
    private static void GetZoneSets(int businessUnitSid, int sqlInstanceSid)
    {
        ObjectManagementServiceClient client = new ObjectManagementServiceClient();
        GetZoneSetsRequest request = new GetZoneSetsRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        GetZoneSetsResponse response = client.GetZoneSets(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (var set in response.ZoneSets)
            {
                Console.WriteLine("Name: " + set.Name + " Sid: " + set.Sid + " Description: " + set.Description);
            }
        }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ObjectManagementServiceClient Class
ObjectManagementServiceClient Members