Documentation ¶
Index ¶
- func AuthenticateToEks(clusterName string, clusterUrl string, roleArn string, ...) (*kubernetes.Clientset, error)
- func CloudformationSession(sess session.Session, region string) *cloudformation.CloudFormation
- func CreateSession(region string) *session.Session
- func CreateSessionWithoutRegion() (*session.Session, error)
- func DeleteDetachedPolicies(sessions *AWSSessions, dryRun bool)
- func DeleteExpiredBuckets(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredClusterSnapshots(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredCompleteRDSParameterGroups(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredDocumentDBClusters(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredEC2Instances(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredEKSClusters(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredElasticIps(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredElasticacheDatabases(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredElasticacheSnapshots(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredIAM(sessions *AWSSessions, options *AwsOptions)
- func DeleteExpiredInstanceProfiles(sessions *AWSSessions, options *AwsOptions)
- func DeleteExpiredKeyPairs(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredKeys(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredLambdaFunctions(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredLoadBalancers(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredLogs(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredNatGateways(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredOpenIDConnectProviders(sessions *AWSSessions, options *AwsOptions)
- func DeleteExpiredRDSDatabases(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredRDSSubnetGroups(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredRepositories(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredRoles(sessions *AWSSessions, options *AwsOptions)
- func DeleteExpiredSQSQueues(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredSnapshots(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredStacks(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredStateMachines(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredUsers(sessions *AWSSessions, options *AwsOptions)
- func DeleteExpiredVPC(sessions AWSSessions, options AwsOptions)
- func DeleteExpiredVolumes(sessions AWSSessions, options AwsOptions)
- func DeleteFargateProfile(eksSession *eks.EKS, fargateProfile FargateProfile, options *AwsOptions) error
- func DeleteGroups(iamSession *iam.IAM, dryRun bool)
- func DeleteInternetGatewaysByIds(ec2Session *ec2.EC2, internetGateways []InternetGateway, vpcId string)
- func DeleteLoadBalancerByVpcId(lbSession *elbv2.ELBV2, vpc VpcInfo, dryRun bool)
- func DeleteNatGatewaysByIds(ec2Session *ec2.EC2, natGateways []NatGateway)
- func DeleteNetworkInterfacesByVpcId(ec2Session *ec2.EC2, vpcId string)
- func DeleteRDSDatabase(svc rds.RDS, database rdsDatabase)
- func DeleteRDSSubnetGroup(svc rds.RDS, dbSubnetGroupName string)
- func DeleteRouteTablesByIds(ec2Session *ec2.EC2, routeTables []RouteTable)
- func DeleteSecurityGroupsByIds(ec2Session *ec2.EC2, securityGroups []SecurityGroup)
- func DeleteSubnetsByIds(ec2Session *ec2.EC2, subnets []Subnet)
- func DeleteUnlinkedECSubnetGroups(sessions AWSSessions, options AwsOptions)
- func DeleteUnlinkedLogs(sessions AWSSessions, options AwsOptions)
- func DeleteVPCLinkedResourcesWithQuota(sessions AWSSessions, options AwsOptions)
- func ElasticacheSession(sess session.Session, region string) *elasticache.ElastiCache
- func GetAllVPCs(ec2Session *ec2.EC2) []*ec2.Vpc
- func GetClusterDetails(svc eks.EKS, cluster *string, region string, tagName string) eksCluster
- func GetRDSInstanceInfos(svc rds.RDS, databaseIdentifier string) (rdsDatabase, error)
- func GetVpcsIdsByClusterNameTag(ec2Session ec2.EC2, clusterName string) []*string
- func HandleRolePolicies(iamSession *iam.IAM, roleName string)
- func HandleUserPolicies(iamSession *iam.IAM, userName string)
- func LambdaSession(sess session.Session, region string) *lambda.Lambda
- func ListClusters(svc eks.EKS) ([]*string, error)
- func ListTaggedEKSClusters(svc eks.EKS, options *AwsOptions) ([]eksCluster, error)
- func RdsSession(sess session.Session, region string) *rds.RDS
- func ReleaseElasticIps(ec2Session *ec2.EC2, eips []ElasticIp)
- func RunPlecoAWS(cmd *cobra.Command, regions []string, interval int64, wg *sync.WaitGroup, ...)
- func SqsSession(sess session.Session, region string) *sqs.SQS
- func TagLoadBalancersForDeletion(lbSession *elbv2.ELBV2, tagKey string, loadBalancersList []ElasticLoadBalancer, ...) error
- func TagLogsForDeletion(svc *cloudwatchlogs.CloudWatchLogs, tagName string, clusterId string, ...) error
- func TagVolumesFromEksClusterForDeletion(ec2Session *ec2.EC2, tagKey string, clusterName string) error
- type AWSSessions
- type AwsOptions
- type CloudformationStack
- type CompleteKey
- type CompleteLogGroup
- type EBSVolume
- type EC2Instance
- type ElasticIp
- type ElasticLoadBalancer
- type FargateProfile
- type InstanceProfile
- type InternetGateway
- type KeyPair
- type NatGateway
- type NetworkInterface
- type OpenIDConnectProvider
- type Policy
- type RDSParameterGroups
- type RDSSubnetGroup
- type Repository
- type Role
- type RouteTable
- type SecurityGroup
- type Subnet
- type User
- type VpcInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateToEks ¶
func CloudformationSession ¶
func CloudformationSession(sess session.Session, region string) *cloudformation.CloudFormation
func CreateSession ¶
func DeleteDetachedPolicies ¶
func DeleteDetachedPolicies(sessions *AWSSessions, dryRun bool)
func DeleteExpiredBuckets ¶
func DeleteExpiredBuckets(sessions AWSSessions, options AwsOptions)
func DeleteExpiredClusterSnapshots ¶
func DeleteExpiredClusterSnapshots(sessions AWSSessions, options AwsOptions)
func DeleteExpiredCompleteRDSParameterGroups ¶
func DeleteExpiredCompleteRDSParameterGroups(sessions AWSSessions, options AwsOptions)
func DeleteExpiredDocumentDBClusters ¶
func DeleteExpiredDocumentDBClusters(sessions AWSSessions, options AwsOptions)
func DeleteExpiredEC2Instances ¶
func DeleteExpiredEC2Instances(sessions AWSSessions, options AwsOptions)
func DeleteExpiredEKSClusters ¶
func DeleteExpiredEKSClusters(sessions AWSSessions, options AwsOptions)
func DeleteExpiredElasticIps ¶
func DeleteExpiredElasticIps(sessions AWSSessions, options AwsOptions)
func DeleteExpiredElasticacheDatabases ¶
func DeleteExpiredElasticacheDatabases(sessions AWSSessions, options AwsOptions)
func DeleteExpiredElasticacheSnapshots ¶ added in v0.13.27
func DeleteExpiredElasticacheSnapshots(sessions AWSSessions, options AwsOptions)
func DeleteExpiredIAM ¶
func DeleteExpiredIAM(sessions *AWSSessions, options *AwsOptions)
func DeleteExpiredInstanceProfiles ¶
func DeleteExpiredInstanceProfiles(sessions *AWSSessions, options *AwsOptions)
func DeleteExpiredKeyPairs ¶
func DeleteExpiredKeyPairs(sessions AWSSessions, options AwsOptions)
func DeleteExpiredKeys ¶
func DeleteExpiredKeys(sessions AWSSessions, options AwsOptions)
func DeleteExpiredLambdaFunctions ¶
func DeleteExpiredLambdaFunctions(sessions AWSSessions, options AwsOptions)
func DeleteExpiredLoadBalancers ¶
func DeleteExpiredLoadBalancers(sessions AWSSessions, options AwsOptions)
func DeleteExpiredLogs ¶
func DeleteExpiredLogs(sessions AWSSessions, options AwsOptions)
func DeleteExpiredNatGateways ¶
func DeleteExpiredNatGateways(sessions AWSSessions, options AwsOptions)
func DeleteExpiredOpenIDConnectProviders ¶
func DeleteExpiredOpenIDConnectProviders(sessions *AWSSessions, options *AwsOptions)
func DeleteExpiredRDSDatabases ¶
func DeleteExpiredRDSDatabases(sessions AWSSessions, options AwsOptions)
func DeleteExpiredRDSSubnetGroups ¶
func DeleteExpiredRDSSubnetGroups(sessions AWSSessions, options AwsOptions)
func DeleteExpiredRepositories ¶
func DeleteExpiredRepositories(sessions AWSSessions, options AwsOptions)
func DeleteExpiredRoles ¶
func DeleteExpiredRoles(sessions *AWSSessions, options *AwsOptions)
func DeleteExpiredSQSQueues ¶
func DeleteExpiredSQSQueues(sessions AWSSessions, options AwsOptions)
func DeleteExpiredSnapshots ¶
func DeleteExpiredSnapshots(sessions AWSSessions, options AwsOptions)
func DeleteExpiredStacks ¶
func DeleteExpiredStacks(sessions AWSSessions, options AwsOptions)
func DeleteExpiredStateMachines ¶
func DeleteExpiredStateMachines(sessions AWSSessions, options AwsOptions)
func DeleteExpiredUsers ¶
func DeleteExpiredUsers(sessions *AWSSessions, options *AwsOptions)
func DeleteExpiredVPC ¶
func DeleteExpiredVPC(sessions AWSSessions, options AwsOptions)
func DeleteExpiredVolumes ¶
func DeleteExpiredVolumes(sessions AWSSessions, options AwsOptions)
func DeleteFargateProfile ¶ added in v0.16.0
func DeleteFargateProfile(eksSession *eks.EKS, fargateProfile FargateProfile, options *AwsOptions) error
func DeleteGroups ¶
func DeleteInternetGatewaysByIds ¶
func DeleteInternetGatewaysByIds(ec2Session *ec2.EC2, internetGateways []InternetGateway, vpcId string)
func DeleteNatGatewaysByIds ¶
func DeleteNatGatewaysByIds(ec2Session *ec2.EC2, natGateways []NatGateway)
func DeleteRDSDatabase ¶
func DeleteRDSSubnetGroup ¶
func DeleteRouteTablesByIds ¶
func DeleteRouteTablesByIds(ec2Session *ec2.EC2, routeTables []RouteTable)
func DeleteSecurityGroupsByIds ¶
func DeleteSecurityGroupsByIds(ec2Session *ec2.EC2, securityGroups []SecurityGroup)
func DeleteSubnetsByIds ¶
func DeleteUnlinkedECSubnetGroups ¶
func DeleteUnlinkedECSubnetGroups(sessions AWSSessions, options AwsOptions)
func DeleteUnlinkedLogs ¶
func DeleteUnlinkedLogs(sessions AWSSessions, options AwsOptions)
func DeleteVPCLinkedResourcesWithQuota ¶
func DeleteVPCLinkedResourcesWithQuota(sessions AWSSessions, options AwsOptions)
DeleteVPCLinkedResourcesWithQuota is used to delete some resources linked to a vpc without deleting the vpc itself. This will avoid quota issues on some resources
func ElasticacheSession ¶
func ElasticacheSession(sess session.Session, region string) *elasticache.ElastiCache
func GetClusterDetails ¶
func GetRDSInstanceInfos ¶
func HandleRolePolicies ¶
func HandleUserPolicies ¶
func ListTaggedEKSClusters ¶
func ListTaggedEKSClusters(svc eks.EKS, options *AwsOptions) ([]eksCluster, error)
func ReleaseElasticIps ¶
func RunPlecoAWS ¶
func TagLogsForDeletion ¶
func TagLogsForDeletion(svc *cloudwatchlogs.CloudWatchLogs, tagName string, clusterId string, TTL int64) error
Types ¶
type AWSSessions ¶
type AWSSessions struct { RDS *rds.RDS ElastiCache *elasticache.ElastiCache EKS *eks.EKS ELB *elbv2.ELBV2 EC2 *ec2.EC2 S3 *s3.S3 CloudWatchLogs *cloudwatchlogs.CloudWatchLogs KMS *kms.KMS IAM *iam.IAM ECR *ecr.ECR SQS *sqs.SQS LambdaFunction *lambda.Lambda SFN *sfn.SFN CloudFormation *cloudformation.CloudFormation }
type AwsOptions ¶
type AwsOptions struct { TagName string TagValue string DisableTTLCheck bool IsDestroyingCommand bool DryRun bool EnableRDS bool EnableElastiCache bool EnableEKS bool EnableELB bool EnableEBS bool EnableVPC bool EnableS3 bool EnableCloudWatchLogs bool EnableKMS bool EnableIAM bool EnableSSH bool EnableDocumentDB bool EnableECR bool EnableSQS bool EnableLambda bool EnableSFN bool EnableCloudFormation bool EnableEC2Instance bool }
type CloudformationStack ¶
type CloudformationStack struct {
common.CloudProviderResource
}
type CompleteKey ¶
type CompleteKey struct { common.CloudProviderResource Status string KeyManager string }
type CompleteLogGroup ¶
type CompleteLogGroup struct { common.CloudProviderResource // contains filtered or unexported fields }
type EBSVolume ¶
type EBSVolume struct { common.CloudProviderResource Status string }
type EC2Instance ¶
type EC2Instance struct {
common.CloudProviderResource
}
type ElasticIp ¶
type ElasticIp struct { common.CloudProviderResource AssociationId string Ip string }
type ElasticLoadBalancer ¶
type ElasticLoadBalancer struct { common.CloudProviderResource Arn string Status string VpcId string Tags []*elbv2.Tag PublicIps []string }
func ListExpiredLoadBalancers ¶
func ListExpiredLoadBalancers(eksSession *eks.EKS, lbSession *elbv2.ELBV2, options *AwsOptions) ([]ElasticLoadBalancer, error)
func ListLoadBalancers ¶
func ListLoadBalancers(lbSession *elbv2.ELBV2, tagName string) ([]ElasticLoadBalancer, error)
type FargateProfile ¶ added in v0.16.0
type FargateProfile struct { ClusterName string FargateProfileName string Status string IsExpired bool }
func ListExpiredFargateProfiles ¶ added in v0.16.0
func ListExpiredFargateProfiles(eksSession *eks.EKS, clusterName string, options *AwsOptions) []FargateProfile
type InstanceProfile ¶
type InstanceProfile struct { common.CloudProviderResource InstanceProfileName string Roles []*iam.Role }
type InternetGateway ¶
type InternetGateway struct { Id string CreationDate time.Time IsProtected bool // contains filtered or unexported fields }
func GetInternetGatewaysIdsByVpcId ¶
func GetInternetGatewaysIdsByVpcId(ec2Session *ec2.EC2, vpcId string, tagName string) []InternetGateway
type KeyPair ¶
type KeyPair struct { common.CloudProviderResource KeyName string }
type NatGateway ¶
type NatGateway struct {
common.CloudProviderResource
}
func GetNatGatewaysIdsByVpcId ¶
func GetNatGatewaysIdsByVpcId(ec2Session *ec2.EC2, options *AwsOptions, vpcId string) []NatGateway
type NetworkInterface ¶
func GetNetworkInterfacesByVpcId ¶
func GetNetworkInterfacesByVpcId(ec2Session *ec2.EC2, vpcId string) []NetworkInterface
type OpenIDConnectProvider ¶
type OpenIDConnectProvider struct { common.CloudProviderResource OpenIDConnectProviderName string }
type RDSParameterGroups ¶
type RDSParameterGroups struct { common.CloudProviderResource ID string }
type RDSSubnetGroup ¶
type RDSSubnetGroup struct { common.CloudProviderResource ID string }
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
type Role ¶
type Role struct { common.CloudProviderResource InstanceProfile []*iam.InstanceProfile }
type RouteTable ¶
type RouteTable struct { Id string CreationDate time.Time Associations []*ec2.RouteTableAssociation IsProtected bool // contains filtered or unexported fields }
func GetRouteTablesIdsByVpcId ¶
func GetRouteTablesIdsByVpcId(ec2Session *ec2.EC2, vpcId string, tagName string) []RouteTable
type SecurityGroup ¶
type SecurityGroup struct { Id string CreationDate time.Time IsProtected bool IpPermissionIngress []*ec2.IpPermission IpPermissionEgress []*ec2.IpPermission // contains filtered or unexported fields }
func GetSecurityGroupsIdsByVpcId ¶
func GetSecurityGroupsIdsByVpcId(ec2Session *ec2.EC2, vpcId string, tagName string) []SecurityGroup
type Subnet ¶
type User ¶
type User struct {
common.CloudProviderResource
}
type VpcInfo ¶
type VpcInfo struct { common.CloudProviderResource SecurityGroups []SecurityGroup NatGateways []NatGateway InternetGateways []InternetGateway Subnets []Subnet RouteTables []RouteTable ElasticIps []ElasticIp NetworkInterfaces []NetworkInterface Status string }
Source Files ¶
- cloudformation_stack.go
- conn.go
- db_documentdb.go
- db_elasticache.go
- db_rds.go
- ec2_ebs.go
- ec2_elb.go
- ec2_instance.go
- ec2_ssh.go
- eks_ecr.go
- eks_fargate_profile.go
- eks_root.go
- iam_groups.go
- iam_instance_profile.go
- iam_oidc.go
- iam_policies.go
- iam_roles.go
- iam_root.go
- iam_users.go
- kms_root.go
- lambda_function.go
- logs_cloudwatch.go
- run.go
- s3_root.go
- sqs_queue.go
- statemachine_root.go
- vpc_eip.go
- vpc_igw.go
- vpc_ng.go
- vpc_ni.go
- vpc_root.go
- vpc_rtb.go
- vpc_sg.go
- vpc_subnet.go
Click to show internal directories.
Click to hide internal directories.