...

Package awsrulesfn

import "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
Overview
Index
Subdirectories

Overview ▾

Package awsrulesfn provides AWS focused endpoint rule functions for evaluating endpoint resolution rules.

func IsVirtualHostableS3Bucket

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.

type ARN

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

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].

type OptionalStringSlice

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 (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

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"`
}

type PartitionConfig

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

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

type RegionOverrides struct {
    Name               *string `json:"name"`
    DnsSuffix          *string `json:"dnsSuffix"`
    DualStackDnsSuffix *string `json:"dualStackDnsSuffix"`
    SupportsFIPS       *bool   `json:"supportsFIPS"`
    SupportsDualStack  *bool   `json:"supportsDualStack"`
}

Subdirectories

Name Synopsis
..