Documentation
¶
Overview ¶
Package vpc provides the data structures and logic necessary to enumerate and integrate AWS VPC resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct { VPC types.Vpc `json:"vpc" yaml:"vpc"` Region string `json:"region" yaml:"region"` }
The Instance struct contains the VPC data that was enumerated, wrapping the AWS values
type Report ¶
type Report struct { AccountID string `json:"account_id" yaml:"account_id"` VPCs []Instance `json:"vpcs" yaml:"vpcs"` Errors []string `json:"errors" yaml:"errors"` }
The Report struct contains the account ID that the VPCs were discovered in, the resources themselves, and any non-fatal errors that occurred during the execution of the `methodaws vpc enumerate` subcommand.
func EnumerateVPC ¶
EnumerateVPC lists the VPCs available to the caller and returns a Report struct for each specified region. The Report contains all non-fatal errors that occurred during the execution of the `methodaws vpc enumerate` subcommand. This method consolidates individual region reports into a single report.
func EnumerateVPCForRegion ¶ added in v0.0.18
func EnumerateVPCForRegion(ctx context.Context, cfg aws.Config, region string) (report Report, err error)
EnumerateVPCForRegion lists the VPCs available to the caller for a particular regionand returns a Report struct. The Report contains all non-fatal errors that occurred during the execution of the `methodaws vpc enumerate` subcommand. EnumerateVPCForRegion will return an error if the account ID cannot be retrieved.