cmd

package
v0.0.0-...-fe05ceb Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAllVpcs

func DeleteAllVpcs(sess *session.Session, force bool) error

func DeleteEips

func DeleteEips(sess *session.Session, eips []*ec2.Address) error

DeleteEips deletes the specified Elastic IPs.

func DeleteNacls

func DeleteNacls(sess *session.Session, nacls []*ec2.NetworkAcl) error

func DeleteNatGateways

func DeleteNatGateways(sess *session.Session, natGateways []*ec2.NatGateway) error

DeleteNatGateways deletes the specified NAT gateways and waits for them to be deleted.

func DeleteRouteTables

func DeleteRouteTables(sess *session.Session, tables []*ec2.RouteTable) error

func DeleteSgs

func DeleteSgs(sess *session.Session, sgs []*ec2.SecurityGroup) error

func DeleteSubnets

func DeleteSubnets(sess *session.Session, subnets []*ec2.Subnet) error

DeleteSubnets deletes the specified subnets.

func DeleteVpc

func DeleteVpc(sess *session.Session, vpc *ec2.Vpc, force bool) error

DeleteVpc deletes the specified VPC, along with all associated resources, in the specified session. change to vpc pointer

func DeleteVpcAndWait

func DeleteVpcAndWait(sess *session.Session, vpc *ec2.Vpc) error

DeleteVpcAndWait deletes the specified VPC and waits for it to be deleted.

func DeleteVpcEndpoints

func DeleteVpcEndpoints(sess *session.Session, vpcEndpoints []*ec2.VpcEndpoint) error

DeleteVpcEndpoints deletes the specified VPC endpoints.

func DetachAndDeleteIgws

func DetachAndDeleteIgws(sess *session.Session, igws []*ec2.InternetGateway) error

DetachAndDeleteIgws detaches and deletes the specified Internet gateways.

func Execute

func Execute()

func GetSession

func GetSession(profile, region string) (*session.Session, error)

GetSession creates a new AWS session using the provided profile and region.

func IterateOverProfiles

func IterateOverProfiles(profileList []string, fn func(string) error) error

IterateOverProfiles calls the provided function for each profile in the profileList.

func IterateOverRegions

func IterateOverRegions(regionList []string, fn func(string) error) error

IterateOverRegions calls the provided function for each region in the regionList.

func ListEipsForVpc

func ListEipsForVpc(sess *session.Session, vpcID string) ([]*ec2.Address, error)

ListEipsForVpc lists all Elastic IP addresses for the specified VPC ID in the specified session.

func ListIgwsForVpc

func ListIgwsForVpc(sess *session.Session, vpcID string) ([]*ec2.InternetGateway, error)

ListIgwsForVpc lists all Internet gateways for the specified VPC ID in the specified session.

func ListNaclsForVpc

func ListNaclsForVpc(sess *session.Session, vpc *ec2.Vpc) ([]*ec2.NetworkAcl, error)

func ListNatGatewaysForVpc

func ListNatGatewaysForVpc(sess *session.Session, vpcID string) ([]*ec2.NatGateway, error)

ListNatGatewaysForVpc lists all NAT gateways for the specified VPC ID in the specified session.

func ListRouteTablesForVpc

func ListRouteTablesForVpc(sess *session.Session, vpc *ec2.Vpc) ([]*ec2.RouteTable, error)

func ListSgsForVpc

func ListSgsForVpc(sess *session.Session, id string) ([]*ec2.SecurityGroup, error)

func ListSubnetsForVpc

func ListSubnetsForVpc(sess *session.Session, vpcID string) ([]*ec2.Subnet, error)

ListSubnetsForVpc lists all subnets for the specified VPC ID in the specified session.

func ListVpcEndpointsForVpc

func ListVpcEndpointsForVpc(sess *session.Session, vpcID string) ([]*ec2.VpcEndpoint, error)

ListVpcEndpointsForVpc lists all VPC endpoints for the specified VPC ID in the specified session.

func ListVpcs

func ListVpcs(sess *session.Session) ([]*ec2.Vpc, error)

ListVpcs lists all VPCs in the specified session.

func ReleaseEips

func ReleaseEips(sess *session.Session, eips []*ec2.Address) error

ReleaseEips releases the specified EIPs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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