Documentation
¶
Index ¶
- Variables
- type Addresses
- type AutoScalingGroups
- type DHCPOptions
- type IAMInstanceProfiles
- type IAMRoles
- type Instances
- type Interface
- type InternetGateways
- type LaunchConfigurations
- type LoadBalancers
- type Route53ResourceRecordSets
- type RouteTables
- type SecurityGroups
- type Set
- type Subnets
- type Type
- type VPCs
- type Volumes
Constants ¶
This section is empty.
Variables ¶
var GlobalTypeList = []Type{ IAMInstanceProfiles{}, IAMRoles{}, Route53ResourceRecordSets{}, }
Non-regional AWS resource types, in dependency order
var RegionalTypeList = []Type{ LoadBalancers{}, AutoScalingGroups{}, LaunchConfigurations{}, Instances{}, Subnets{}, SecurityGroups{}, InternetGateways{}, RouteTables{}, VPCs{}, DHCPOptions{}, Volumes{}, Addresses{}, }
AWS resource types known to this script, in dependency order.
Functions ¶
This section is empty.
Types ¶
type DHCPOptions ¶
type DHCPOptions struct{}
DHCPOptions: http://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.DescribeDhcpOptions
func (DHCPOptions) MarkAndSweep ¶
type IAMInstanceProfiles ¶
type IAMInstanceProfiles struct{}
IAM Instance Profiles
func (IAMInstanceProfiles) MarkAndSweep ¶
type Interface ¶
type Interface interface { // ARN returns the AWS ARN for the resource // (c.f. http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). This // is only used for uniqueness in the Mark set, but ARNs are // intended to be globally unique across regions and accounts, so // that works. ARN() string // ResourceKey() returns a per-resource key, because ARNs might conflict if two objects // with the same name are created at different times (e.g. IAM roles) ResourceKey() string }
type LaunchConfigurations ¶
type LaunchConfigurations struct{}
LaunchConfigurations: http://docs.aws.amazon.com/sdk-for-go/api/service/autoscaling/#AutoScaling.DescribeLaunchConfigurations
func (LaunchConfigurations) MarkAndSweep ¶
type Route53ResourceRecordSets ¶
type Route53ResourceRecordSets struct{}
func (Route53ResourceRecordSets) MarkAndSweep ¶
type SecurityGroups ¶
type SecurityGroups struct{}
SecurityGroups: http://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.DescribeSecurityGroups
func (SecurityGroups) MarkAndSweep ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set keeps track of the first time we saw a particular ARN, and the global TTL. See Mark() for more details.
func (*Set) Mark ¶
Mark marks a particular resource as currently present, and advises on whether it should be deleted. If Mark(r) returns true, the TTL has expired for r and it should be deleted.
func (*Set) MarkComplete ¶
MarkComplete figures out which ARNs were in previous passes but not this one, and eliminates them. It should only be run after all resources have been marked.
type Subnets ¶
type Subnets struct{}
Subnets: http://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.DescribeSubnets
type Type ¶
type Type interface { // MarkAndSweep queries the resource in a specific region, using // the provided session (which has account-number acct), calling // res.Mark(<resource>) on each resource and deleting // appropriately. MarkAndSweep(sess *session.Session, acct string, region string, res *Set) error }