Skip to main content

Region

A class in Alta.Api.DataTransferModels, Alta.Api.DataTransferModels.Models.Shared.

A server region, with the fixed list of known regions. Note the constructor arguments are swapped in the presets: FriendlyName holds the code (USEast1) and ShortName holds the long name.

Constructors​

MemberWhat it is
Region(string friendlyName, string shortName)Creates a Region from friendlyName and shortName.

Fields​

MemberWhat it is
static readonly Region ApNortheast1Asia Pacific (Tokyo).
static readonly Region ApSoutheast2Asia Pacific (Sydney).
static readonly Region CnNorth1China (Beijing).
static readonly Region EuCentral1EU Central (Frankfurt).
static readonly Region UsEast1US East (Virginia).
static readonly Region UsEast2US East (Ohio).
static readonly Region UsWest1US West (N. California).
1 private and internal field
MemberWhat it is
private static HashSet<Region> allRegionsBacking set for AllRegions.

Properties​

MemberWhat it is
static IEnumerable<Region> AllRegions { get; }All seven preset regions, built on first use.
string FriendlyName { get; }For the presets this holds the code, such as USEast1, because the constructor arguments are swapped.
string ShortName { get; }For the presets this holds the long name, such as US East (Virginia). This is what goes into JSON.

Methods​

MemberWhat it is
static Region Parse(string name)Finds the preset whose ShortName matches, which for the presets is the long name like US East (Virginia). Returns null if none.