/// <summary> /// The get ftp host. /// </summary> /// <param name="vendor"> /// The vendor. /// </param> /// <param name="region"> /// The region. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> /// <exception cref="ComputeApiException"> /// </exception> public string GetFtpHost(KnownApiVendor vendor, KnownApiRegion region) { string key = string.Concat(vendor.ToString(), '-', region.ToString()); if (!KnownApiHostNames.ContainsKey(key)) { throw new ApiHostNotFoundException(vendor, region); } return(KnownFtpHostNames[key]); }
/// <summary> /// Return an known CaaS URI based on vendor and region /// </summary> /// <param name="vendor"> /// The vendor /// </param> /// <param name="region"> /// The region /// </param> /// <returns> /// The <see cref="Uri"/>. /// </returns> public Uri GetBaseUri(KnownApiVendor vendor, KnownApiRegion region) { const string urltemplate = "https://{0}/"; string key = string.Concat(vendor.ToString(), '-', region.ToString()); if (!KnownApiHostNames.ContainsKey(key)) { throw new ApiHostNotFoundException(vendor, region); } string apiurl = string.Format(urltemplate, KnownApiHostNames[key]); return(new Uri(apiurl)); }