partitions

package
v0.85.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllPartitionNames

func AllPartitionNames() []string

AllPartitionNames returns a list of all AWS partition names.

Returns:

  • []string: A list of all partition names (e.g., "aws", "aws-cn", "aws-us-gov")

Example:

partitions := partitions.AllPartitionNames()
fmt.Printf("Available partitions: %v\n", partitions)

func CommercialPartitions

func CommercialPartitions() ([]string, error)

CommercialPartitions returns a list of AWS commercial partition names. Commercial partitions are the standard AWS partitions available to the general public. This typically includes just the main "aws" partition.

Returns:

  • []string: A sorted list of commercial partition names (e.g., "aws")

Example:

partitions, err := partitions.CommercialPartitions()
if err != nil {
    log.Fatal(err)
}
fmt.Printf("Found %d commercial partitions\n", len(partitions))

func IsolatedPartitions

func IsolatedPartitions() ([]string, error)

IsolatedPartitions returns a list of AWS isolated partition names. Isolated partitions are air-gapped environments for highly sensitive workloads. These typically include partitions with "iso" in their name.

Returns:

  • []string: A sorted list of isolated partition names (e.g., "aws-iso", "aws-iso-b", "aws-iso-e", "aws-iso-f")

Example:

partitions, err := partitions.IsolatedPartitions()
if err != nil {
    log.Fatal(err)
}
fmt.Printf("Found %d isolated partitions\n", len(partitions))

func List

func List() (aws.PartitionSchemas, error)

List returns detailed information about all AWS partitions. This includes partition metadata such as DNS suffixes, region regex patterns, and the list of regions within each partition.

Returns:

  • aws.PartitionSchemas: A slice of partition schemas containing detailed partition information
  • error: An error if there's an issue reading the manifest

Example:

partitions, err := partitions.List()
if err != nil {
    log.Fatal(err)
}
for _, partition := range partitions {
    fmt.Printf("Partition: %s\n", partition.ID)
    fmt.Printf("  DNS Suffix: %s\n", partition.DNSSuffix)
    fmt.Printf("  Regions: %d\n", len(partition.Regions))
}

func SovereignPartitions

func SovereignPartitions() ([]string, error)

SovereignPartitions returns a list of AWS sovereign partition names. Sovereign partitions are operated by local entities to meet specific regulatory requirements. These include China, GovCloud, and EU Sovereign Cloud partitions.

Returns:

  • []string: A sorted list of sovereign partition names (e.g., "aws-cn", "aws-us-gov", "aws-eusc")

Example:

partitions, err := partitions.SovereignPartitions()
if err != nil {
    log.Fatal(err)
}
fmt.Printf("Found %d sovereign partitions\n", len(partitions))

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL