This document provides an overview of all available packages and their methods in the AWS Metadata library.
The AWS Metadata library is organized into focused packages, each providing specific functionality:
Import: github.com/myerscode/aws-meta/pkg/partitions
Functions for working with AWS partitions:
AllPartitionNames()- Get all partition namesList()- Get detailed partition informationCommercialPartitions()- Get commercial partitionsSovereignPartitions()- Get sovereign partitionsIsolatedPartitions()- Get isolated partitions
Import: github.com/myerscode/aws-meta/pkg/regions
Functions for working with AWS regions:
ListAllRegions()- Get comprehensive region information with partition mapping and service availability
Import: github.com/myerscode/aws-meta/pkg/services
Functions for working with AWS services and regions:
ServiceMeta()- Get detailed service metadata for all servicesServiceMetaForRegion()- Get detailed service metadata for services in a specific regionAllRegionNames()- Get all region namesAllServiceNames()- Get all service namesServicesInRegion()- Get services available in a regionServiceOperationsByServiceId()- Get operations by service IDServiceOperationsByServiceName()- Get operations by service nameServiceOperations()- Alias for ServiceOperationsByServiceId
import "github.com/myerscode/aws-meta/pkg/partitions"
// Get all partition names
partitionNames := partitions.AllPartitionNames()
fmt.Printf("Available partitions: %v\n", partitionNames)
// Get detailed partition information
partitionList, err := partitions.List()
if err != nil {
log.Fatal(err)
}import "github.com/myerscode/aws-meta/pkg/regions"
// Get comprehensive region information
regionList, err := regions.ListAllRegions()
if err != nil {
log.Fatal(err)
}
for _, region := range regionList {
fmt.Printf("Region: %s (%s)\n", region.RegionId, region.RegionName)
fmt.Printf(" Partition: %s\n", region.PartitionID)
fmt.Printf(" Services: %d\n", len(region.Services))
}import "github.com/myerscode/aws-meta/pkg/services"
// Get detailed service metadata
allServices, err := services.ServiceMeta()
if err != nil {
log.Fatal(err)
}
fmt.Printf("Total services: %d\n", len(allServices))
// Get detailed service metadata for a specific region
regionServices, err := services.ServiceMetaForRegion("us-east-1")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Services available in us-east-1: %d\n", len(regionServices))
// Get all regions
regions := services.AllRegionNames()
fmt.Printf("Total regions: %d\n", len(regions))
for _, region := range regions[:5] { // Show first 5
fmt.Printf(" - %s\n", region)
}For detailed documentation on each package's functions, see the individual package documentation pages linked above.
All data is sourced from the official AWS Botocore library, ensuring accuracy and up-to-date information:
- Partitions: From
botocore/data/partitions.json - Regions: From
botocore/data/endpoints.json - Services: From
botocore/data/*/service-*.jsonfiles - Operations: Extracted from individual service definition files
All functions that return errors follow Go conventions:
- Success:
errorisnil - Failure:
errorcontains a descriptive message - Input validation: Invalid inputs return specific error messages
- Case sensitivity: All inputs are case-sensitive and must match AWS conventions
- All data is loaded from pre-generated manifest files
- Functions return quickly as data is already parsed and sorted
- No network calls are made during function execution
- Data is cached in memory after first access
For complete, runnable examples, see the examples/ directory:
examples/list-all/- General usage examplesexamples/services-in-region/- Regional service availabilityexamples/service-operations/- Service operation listingsexamples/partition-types/- Partition categorizationexamples/list-partitions/- Detailed partition informationexamples/list-regions/- Comprehensive region information