Table of Contents

Class RegionFinder

Namespace
Amazon.Util.Internal
Assembly
AWSSDK.Core.dll

Finds region string in the endpoint string using predefined rules If predefined rules fail to match the region, regular expression strings provided in endpoints.json are used to find the region. If regular expressions also fail, then a default region is returned.

public class RegionFinder : IDisposable
Inheritance
RegionFinder
Implements
Inherited Members

Properties

Instance

Gets the singleton.

public static RegionFinder Instance { get; }

Property Value

RegionFinder

Methods

Dispose()

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

FindFuzzyRegion(string)

Find region in the endpoint using endpoints.json region regexs If there doesn't exist a match, return null

public IRegionEndpoint FindFuzzyRegion(string endpoint)

Parameters

endpoint string

Returns

IRegionEndpoint

First matched region from right to left in the given endpoint or null

FindRegion(string)

Finds the region in the provided endpoint parsing from right to left Try to find exact match of the region in endpoints.json If there doesn't exist an exact match, find a fuzzy match Else return default region

public IRegionEndpoint FindRegion(string endpoint)

Parameters

endpoint string

Endpoint string

Returns

IRegionEndpoint

First successfully parsed region from right to left in the given endpoint or default region

GetAuthority(string)

Returns the Domain Name System host name

public static string GetAuthority(string url)

Parameters

url string

URL string

Returns

string

A String containing the authority component of the URL