vpc

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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"`
}

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

func EnumerateVPC(ctx context.Context, cfg aws.Config) (report Report, err error)

EnumerateVPC lists the VPCs available to the caller and returns a Report struct. The Report contains all non-fatal errors that occurred during the execution of the `methodaws vpc enumerate` subcommand. EnumerateVPC will return an error if the account ID cannot be retrieved.

Jump to

Keyboard shortcuts

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