Documentation ¶
Index ¶
- func CheckBucketEncryption(bucket string, region string) bool
- func CheckCertificateStatus(certificate *acm.DescribeCertificateOutput, region string)
- func CheckECRRepositoryLifecyclePolicy(repositoryName string, region string) bool
- func CheckIfRecoredSetValueInRoute53(record string, value string, hostedZoneID string, region string) bool
- func CreateLambdaCloudwatchAlarm(region string, functionName string, metricName string, namespace string, ...) bool
- func DeleteEcrImages(repo string, digest []string, region string, apply bool)
- func DeleteNetworkInterface(region string, networkInterfaceID string, apply bool) bool
- func DeleteRdsSnapshots(rdsSnapshots []RdsSnapshotInfo, older int, region string, apply bool, ...)
- func DeleteUnusedAcmCertificates(region string, apply bool)
- func DescribeAcmCertificate(region string, arnCertificate string) *acm.DescribeCertificateOutput
- func EcrDescribeImages(repositoryName string, region string, keep int) ([]*ecr.ImageDetail, int)
- func GetAcmCertificates(region string) []*acm.CertificateSummary
- func GetAllAwsAzs(region string) (azs []string, err error)
- func GetAllAwsRegions() ([]string, error)
- func GetAllEC2Instances(region string, lifeCycle string, state string) []*ec2.Reservation
- func GetAllEc2Events(region string, out string)
- func GetAllElasticNetworkInterfaces(region string, filter string) []*ec2.NetworkInterface
- func GetAllLambdaInRegion(region string, arn string) []*lambda.FunctionConfiguration
- func GetAllRds(region string, rdsType string, out string)
- func GetAllRdsDBClusters(region string, out string)
- func GetAllReservations(region string, state string) map[string]int64
- func GetAllS3Buckets() []*s3.Bucket
- func GetAwsServiceCost() *pricing.GetProductsOutput
- func GetCloudwatchGroups(region string) []*cloudwatchlogs.LogGroup
- func GetDefaultAwsRegion() (region string)
- func GetDomainHostedZoneID(domain string, region string) (domainHostedZoneID string, exists bool)
- func GetECRRepositories(region string) []*ecr.Repository
- func GetS3BucketLocation(bucket string) string
- func GetS3PublicAccess(bucket string, region string)
- func InitAwsSession(region string) (*session.Session, error)
- func ListCloudwatchAlarms(region string) []*cloudwatch.MetricAlarm
- func PrintRdsSnapshotInformation(rdsSnapshotInformation []RdsSnapshotInfo, region string, out string)
- func SetCloudwatchGroupsExpiry(region string, retention int64, cloudwatchGroups []*cloudwatchlogs.LogGroup, ...)
- func SetEcrRepoImageScanOnPush(repositoryName string, region string, scanOnPush bool)
- func SetEcrRepositoryLifecyclePolicy(repositoryName string, days int, region string)
- func SummariesEC2Instances(ec2Slice []*ec2.Reservation) map[string]int64
- type Ec2Event
- type ImageArr
- type RdsSnapshotInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBucketEncryption ¶ added in v0.0.7
CheckBucketEncryption check if bucket encryption is set
func CheckCertificateStatus ¶
func CheckCertificateStatus(certificate *acm.DescribeCertificateOutput, region string)
CheckCertificateStatus checking certificate status
func CheckECRRepositoryLifecyclePolicy ¶
CheckECRRepositoryLifecyclePolicy for a repository in a region
func CheckIfRecoredSetValueInRoute53 ¶
func CheckIfRecoredSetValueInRoute53(record string, value string, hostedZoneID string, region string) bool
CheckIfRecoredSetValueInRoute53 Checks if a recored exists in Route53
func CreateLambdaCloudwatchAlarm ¶
func CreateLambdaCloudwatchAlarm(region string, functionName string, metricName string, namespace string, threshold float64, action string) bool
CreateLambdaCloudwatchAlarm will create a new alarm for cloudwatch
func DeleteEcrImages ¶ added in v0.0.7
DeleteEcrImages delete according to image digest
func DeleteNetworkInterface ¶ added in v0.0.6
DeleteNetworkInterface delete by id
func DeleteRdsSnapshots ¶
func DeleteRdsSnapshots(rdsSnapshots []RdsSnapshotInfo, older int, region string, apply bool, rdsType string, out string)
DeleteRdsSnapshots for deleting snapshots by date
func DeleteUnusedAcmCertificates ¶
DeleteUnusedAcmCertificates deletes all unused certificate in a region
func DescribeAcmCertificate ¶
func DescribeAcmCertificate(region string, arnCertificate string) *acm.DescribeCertificateOutput
DescribeAcmCertificate to list certificate metadata
func EcrDescribeImages ¶ added in v0.0.7
EcrDescribeImages get details on images
func GetAcmCertificates ¶
func GetAcmCertificates(region string) []*acm.CertificateSummary
GetAcmCertificates retrieves all certificates
func GetAllAwsAzs ¶
GetAllAwsAzs retrieval all available azs in a region
func GetAllAwsRegions ¶
GetAllAwsRegions will retrieve all aws regions
func GetAllEC2Instances ¶ added in v0.0.8
func GetAllEC2Instances(region string, lifeCycle string, state string) []*ec2.Reservation
GetAllEC2Instances get all instances
func GetAllEc2Events ¶
GetAllEc2Events will check for all events
func GetAllElasticNetworkInterfaces ¶ added in v0.0.6
func GetAllElasticNetworkInterfaces(region string, filter string) []*ec2.NetworkInterface
GetAllElasticNetworkInterfaces get all NICs
func GetAllLambdaInRegion ¶ added in v0.0.10
func GetAllLambdaInRegion(region string, arn string) []*lambda.FunctionConfiguration
GetAllLambdaInRegion List all lambdas in a region
func GetAllRdsDBClusters ¶
GetAllRdsDBClusters get all rds db clusters
func GetAllReservations ¶ added in v0.0.8
GetAllReservations retrieve all reservations
func GetAllS3Buckets ¶ added in v0.0.7
GetAllS3Buckets retrieves all the buckets in a region
func GetAwsServiceCost ¶
func GetAwsServiceCost() *pricing.GetProductsOutput
GetAwsServiceCost use to get a product code for getting price
func GetCloudwatchGroups ¶
func GetCloudwatchGroups(region string) []*cloudwatchlogs.LogGroup
GetCloudwatchGroups getting all cloudwatch groups in a region
func GetDefaultAwsRegion ¶
func GetDefaultAwsRegion() (region string)
GetDefaultAwsRegion resolve default region
func GetDomainHostedZoneID ¶
GetDomainHostedZoneID function get domain name and return its hosted zone id and if exists
func GetECRRepositories ¶
func GetECRRepositories(region string) []*ecr.Repository
GetECRRepositories from aws region
func GetS3BucketLocation ¶ added in v0.0.7
GetS3BucketLocation get a bucket region
func GetS3PublicAccess ¶ added in v0.0.14
GetS3PublicAccess get public access to s3 bucket
func InitAwsSession ¶
InitAwsSession initialize aws session
func ListCloudwatchAlarms ¶
func ListCloudwatchAlarms(region string) []*cloudwatch.MetricAlarm
ListCloudwatchAlarms list all cloudwatch alarms
func PrintRdsSnapshotInformation ¶
func PrintRdsSnapshotInformation(rdsSnapshotInformation []RdsSnapshotInfo, region string, out string)
PrintRdsSnapshotInformation print the needed snapshot information
func SetCloudwatchGroupsExpiry ¶
func SetCloudwatchGroupsExpiry(region string, retention int64, cloudwatchGroups []*cloudwatchlogs.LogGroup, apply bool, override bool)
SetCloudwatchGroupsExpiry Set expiry on a cloudwatch group
func SetEcrRepoImageScanOnPush ¶
SetEcrRepoImageScanOnPush set image scan on push configuration on ecr repository
func SetEcrRepositoryLifecyclePolicy ¶
SetEcrRepositoryLifecyclePolicy set the life time policy
func SummariesEC2Instances ¶ added in v0.0.13
func SummariesEC2Instances(ec2Slice []*ec2.Reservation) map[string]int64
SummariesEC2Instances summarizes into map instances by type and count them
Types ¶
type RdsSnapshotInfo ¶
type RdsSnapshotInfo struct {
// contains filtered or unexported fields
}
RdsSnapshotInfo rds snapshot struct
func GetRDSSnapshots ¶
func GetRDSSnapshots(resourceName string, rdsType string, region string, out string) []RdsSnapshotInfo
GetRDSSnapshots get all snapshot for instance(s) or clusters