Documentation ¶
Overview ¶
Package awsrulesfn provides AWS focused endpoint rule functions for evaluating endpoint resolution rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsVirtualHostableS3Bucket ¶
IsVirtualHostableS3Bucket returns if the input is a DNS compatible bucket name and can be used with Amazon S3 virtual hosted style addressing. Similar to [rulesfn.IsValidHostLabel] with the added restriction that the length of label must be [3:63] characters long, all lowercase, and not formatted as an IP address.
Types ¶
type ARN ¶
type ARN struct { Partition string Service string Region string AccountId string ResourceId OptionalStringSlice }
ARN provides AWS ARN components broken out into a data structure.
type OptionalStringSlice ¶
type OptionalStringSlice []string
OptionalStringSlice provides a helper to safely get the index of a string slice that may be out of bounds. Returns pointer to string if index is valid. Otherwise returns nil.
func (OptionalStringSlice) Get ¶
func (s OptionalStringSlice) Get(i int) *string
Get returns a string pointer of the string at index i if the index is valid. Otherwise returns nil.
type Partition ¶
type Partition struct { ID string `json:"id"` Regions map[string]RegionOverrides `json:"regions"` RegionRegex string `json:"regionRegex"` DefaultConfig PartitionConfig `json:"outputs"` }
Partition provides the metadata describing an AWS partition.
type PartitionConfig ¶
type PartitionConfig struct { Name string `json:"name"` DnsSuffix string `json:"dnsSuffix"` DualStackDnsSuffix string `json:"dualStackDnsSuffix"` SupportsFIPS bool `json:"supportsFIPS"` SupportsDualStack bool `json:"supportsDualStack"` ImplicitGlobalRegion string `json:"implicitGlobalRegion"` }
PartitionConfig provides the endpoint metadata for an AWS region or partition.
func GetPartition ¶
func GetPartition(region string) *PartitionConfig
GetPartition returns an AWS Partition for the region provided. If the partition cannot be determined nil will be returned.