Documentation
¶
Overview ¶
Package utils provides common utility functions used across the methodaws codebase.
Package utils provides common utility functions used across the methodaws codebase.
Index ¶
- func AWSDNSSuffixForRegion(region string) (string, error)
- func BuildGlobalARNForRegion(region, service, accountID, resource string) (string, error)
- func BuildRegionalARN(region, service, accountID, resource string) (string, error)
- func BuildRelatedARN(sourceARN, service, region, resource string) (string, error)
- func GetAWSRegions(ctx context.Context, cfg aws.Config, selectedRegions []string) ([]string, error)
- func GetAccountID(ctx context.Context, awsConfig aws.Config) (string, error)
- func IsCommercialAWSRegion(region string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AWSDNSSuffixForRegion ¶ added in v0.3.0
AWSDNSSuffixForRegion returns the service endpoint suffix for the partition that owns region.
func BuildGlobalARNForRegion ¶ added in v0.3.0
BuildGlobalARNForRegion builds a global-resource ARN in the partition that owns region.
func BuildRegionalARN ¶ added in v0.3.0
BuildRegionalARN builds an ARN using the AWS partition that owns region.
func BuildRelatedARN ¶ added in v0.3.0
BuildRelatedARN builds an ARN using the partition and account from an authoritative source ARN.
func GetAWSRegions ¶ added in v0.0.49
func GetAccountID ¶ added in v0.0.47
GetAccountID retrieves the account ID for the given AWS configuration. It returns the account ID as a string and an error if the account ID cannot be retrieved.
func IsCommercialAWSRegion ¶ added in v0.3.0
IsCommercialAWSRegion reports whether region belongs to the standard commercial AWS partition.
Types ¶
This section is empty.