Class AWSPublicIpAddressRanges
This class can be used to discover the public address ranges for AWS. The information is retrieved from the publicly accessible https://ip-ranges.amazonaws.com/ip-ranges.json file.
public class AWSPublicIpAddressRanges
- Inheritance
-
AWSPublicIpAddressRanges
- Inherited Members
Remarks
The information in this file is generated from our internal system-of-record and is authoritative. You can expect it to change several times per week and should poll accordingly.
Fields
AmazonServiceKey
public const string AmazonServiceKey = "AMAZON"
Field Value
CloudFrontServiceKey
public const string CloudFrontServiceKey = "CLOUDFRONT"
Field Value
EC2ServiceKey
public const string EC2ServiceKey = "EC2"
Field Value
GlobalRegionIdentifier
Region identifier string for ROUTE53 and CLOUDFRONT ranges
public const string GlobalRegionIdentifier = "GLOBAL"
Field Value
Route53HealthChecksServiceKey
public const string Route53HealthChecksServiceKey = "ROUTE53_HEALTHCHECKS"
Field Value
Route53ServiceKey
public const string Route53ServiceKey = "ROUTE53"
Field Value
Properties
AllAddressRanges
Collection of all public IP ranges.
public IEnumerable<AWSPublicIpAddressRange> AllAddressRanges { get; }
Property Value
CreateDate
The publication date and time of the file that was downloaded and parsed.
public DateTime CreateDate { get; }
Property Value
ServiceKeys
Collection of service keys found in the data file.
public IEnumerable<string> ServiceKeys { get; }
Property Value
Methods
AddressRangesByNetworkBorderGroup(string)
Filtered collection of public IP ranges for the given network border group.
public IEnumerable<AWSPublicIpAddressRange> AddressRangesByNetworkBorderGroup(string networkBorderGroup)
Parameters
networkBorderGroup
string
Returns
AddressRangesByRegion(string)
Filtered collection of public IP ranges for the given region (us-east-1 etc) or GLOBAL.
public IEnumerable<AWSPublicIpAddressRange> AddressRangesByRegion(string regionIdentifier)
Parameters
regionIdentifier
string
Returns
AddressRangesByServiceKey(string)
Filtered collection of public IP ranges for the given service key
public IEnumerable<AWSPublicIpAddressRange> AddressRangesByServiceKey(string serviceKey)
Parameters
serviceKey
string
Returns
Load()
Downloads the most recent copy of the endpoint address file and parses it to a collection of address range objects.
public static AWSPublicIpAddressRanges Load()
Returns
Load(IWebProxy)
Downloads the most recent copy of the endpoint address file and parses it to a collection of address range objects.
public static AWSPublicIpAddressRanges Load(IWebProxy proxy)
Parameters
proxy
IWebProxy