helpers

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCertificateStatus

func CheckCertificateStatus(certificate *acm.DescribeCertificateOutput, region string)

CheckCertificateStatus checking certificate status

func CheckECRRepositoryLifecyclePolicy

func CheckECRRepositoryLifecyclePolicy(repositoryName string, region string) bool

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 DeleteRdsSnapshots

func DeleteRdsSnapshots(rdsSnapshots []RdsSnapshotInfo, older int, region string, apply bool, rdsType string, out string)

DeleteRdsSnapshots for deleting snapshots by date

func DeleteUnusedAcmCertificates

func DeleteUnusedAcmCertificates(region string, apply bool)

DeleteUnusedAcmCertificates deletes all unused certificate in a region

func DescribeAcmCertificate

func DescribeAcmCertificate(region string, arnCertificate string) *acm.DescribeCertificateOutput

DescribeAcmCertificate to list certificate metadata

func EcrDeleteOldImageBuildsAndKeep

func EcrDeleteOldImageBuildsAndKeep(repositoryName string, region string, imagesToKeep int)

EcrDeleteOldImageBuildsAndKeep delete old images and keep only n last images

func GetAcmCertificates

func GetAcmCertificates(region string) []*acm.CertificateSummary

GetAcmCertificates retrives all certificates

func GetAllAwsAzs

func GetAllAwsAzs(region string) (azs []string, err error)

GetAllAwsAzs retriva all available azs in a region

func GetAllAwsRegions

func GetAllAwsRegions() ([]string, error)

GetAllAwsRegions will retrive all aws regions

func GetAllEc2Events

func GetAllEc2Events(region string, out string)

GetAllEc2Events will check for all events

func GetAllLmbdasInRegion

func GetAllLmbdasInRegion(region string, arn string) []*lambda.FunctionConfiguration

GetAllLmbdasInRegion List all lambdas in a region

func GetAllRds

func GetAllRds(region string, rdsType string, out string)

GetAllRds from a region

func GetAllRdsDBClusters

func GetAllRdsDBClusters(region string, out string)

GetAllRdsDBClusters get all rds db clusters

func GetAwsServiceCost

func GetAwsServiceCost() *pricing.GetProductsOutput

GetAwsServiceCost use to get a prouct 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 deafult region

func GetDomainHostedZoneID

func GetDomainHostedZoneID(domain string, region string) (domainHostedZoneID string, exists bool)

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 InitAwsSession

func InitAwsSession(region string) (*session.Session, error)

InitAwsSession initlize 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)

SetCloudwatchGroupsExpiry Set expiry on a cloudwatch group

func SetEcrRepoImageScanOnPush

func SetEcrRepoImageScanOnPush(repositoryName string, region string, scanOnPush bool)

SetEcrRepoImageScanOnPush set image scan on push configuration on ecr repository

func SetEcrRepositoryLifecyclePolicy

func SetEcrRepositoryLifecyclePolicy(repositoryName string, days int, region string)

SetEcrRepositoryLifecyclePolicy set the life time policy

Types

type Ec2Event

type Ec2Event struct {
	// contains filtered or unexported fields
}

Ec2Event struct

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

Jump to

Keyboard shortcuts

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