accounts

package
v0.0.0-...-8caed39 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: OSL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package accounts provides AWS Organizations member account discovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDefaultAWSConfig

func LoadDefaultAWSConfig(ctx context.Context) (aws.Config, error)

LoadDefaultAWSConfig is a convenience wrapper around aws-sdk-go-v2 config loading.

Types

type OrgDiscoveryResult

type OrgDiscoveryResult struct {
	Accounts []config.CloudAccount
}

OrgDiscoveryResult holds the list of member accounts found during discovery. Discovery is all-or-nothing: a pagination error is returned as a function error, not accumulated here. There is no partial-success path.

func DiscoverOrgAccounts

func DiscoverOrgAccounts(ctx context.Context, cfg aws.Config) (*OrgDiscoveryResult, error)

DiscoverOrgAccounts uses the AWS Organizations API on the management account to list all member accounts. It returns CloudAccount records suitable for saving — they are NOT automatically persisted.

The caller is responsible for using the appropriate credentials for the management account (e.g., resolved via the credentials package).

Jump to

Keyboard shortcuts

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