GetZone

Returns a zone object with all of its related IBM Security-specific data given the zone name.

Syntax

IZone GetZone(string zoneName)

Parameter

Specify the following parameter when using this method:

Parameter Description
zoneName The name of the individual zone object to retrieve.

Return value

If the operation is successful, GetZone returns the named zone object and its related data as:

Centrify.DirectControl.API.IZone

Discussion

This method requires the full path to the individual zone object you want to retrieve.

This method uses the Active Directory canonical name for the zone. The canonical name for the zone uses the following naming structure:

domain_name/container_name/[container_name...]/zone_name

For example, if you use the default parent location for zones, the canonical name for the “default” zone is:

domain_name/Program Data/Centrify/Zones/default

Exceptions

GetZone may throw one of the following exceptions:

  • ArgumentNullException if no zoneName parameter is passed.

  • ApplicationException if the specified zone name is not valid.

Example

The following code sample illustrates using this method in a script:

...
'Specify the zone you want to work with
Set objZone = cims.GetZone("ajax.org/UNIX/Zones/east_div”)
...