func IsVirtualHostableS3Bucket(input string, allowSubDomains bool) bool
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.
ARN provides AWS ARN components broken out into a data structure.
type ARN struct { Partition string Service string Region string AccountId string ResourceId OptionalStringSlice }
func ParseARN(input string) *ARN
ParseARN returns an ARN value parsed from the input string provided. If the ARN cannot be parsed nil will be returned, and error added to [ErrorCollector].
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.
type OptionalStringSlice []string
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.
Partition provides the metadata describing an AWS partition.
type Partition struct { ID string `json:"id"` Regions map[string]RegionOverrides `json:"regions"` RegionRegex string `json:"regionRegex"` DefaultConfig PartitionConfig `json:"outputs"` }
PartitionConfig provides the endpoint metadata for an AWS region or partition.
type PartitionConfig struct { Name string `json:"name"` DnsSuffix string `json:"dnsSuffix"` DualStackDnsSuffix string `json:"dualStackDnsSuffix"` SupportsFIPS bool `json:"supportsFIPS"` SupportsDualStack bool `json:"supportsDualStack"` }
func GetPartition(region string) *PartitionConfig
GetPartition returns an AWS Partition for the region provided. If the partition cannot be determined nil will be returned.
type RegionOverrides struct { Name *string `json:"name"` DnsSuffix *string `json:"dnsSuffix"` DualStackDnsSuffix *string `json:"dualStackDnsSuffix"` SupportsFIPS *bool `json:"supportsFIPS"` SupportsDualStack *bool `json:"supportsDualStack"` }
Name | Synopsis |
---|---|
.. |