Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func BoolMap(src map[string]bool) map[string]*bool
- func BoolSlice(src []bool) []*bool
- func BoolValue(v *bool) bool
- func BoolValueMap(src map[string]*bool) map[string]bool
- func BoolValueSlice(src []*bool) []bool
- func Float64(v float64) *float64
- func Float64Map(src map[string]float64) map[string]*float64
- func Float64Slice(src []float64) []*float64
- func Float64Value(v *float64) float64
- func Float64ValueMap(src map[string]*float64) map[string]float64
- func Float64ValueSlice(src []*float64) []float64
- func GetVpcIDFromEC2Metadata(metadata *ec2metadata.EC2Metadata) (string, error)
- func Int(v int) *int
- func Int64(v int64) *int64
- func Int64Map(src map[string]int64) map[string]*int64
- func Int64Slice(src []int64) []*int64
- func Int64Value(v *int64) int64
- func Int64ValueMap(src map[string]*int64) map[string]int64
- func Int64ValueSlice(src []*int64) []int64
- func IntMap(src map[string]int) map[string]*int
- func IntSlice(src []int) []*int
- func IntValue(v *int) int
- func IntValueMap(src map[string]*int) map[string]int
- func IntValueSlice(src []*int) []int
- func MillisecondsTimeValue(v *int64) time.Time
- func NewSession(awsconfig *aws.Config, AWSDebug bool, mc metric.Collector, ce bool, ...) *session.Session
- func SecondsTimeValue(v *int64) time.Time
- func String(v string) *string
- func StringMap(src map[string]string) map[string]*string
- func StringSlice(src []string) []*string
- func StringValue(v *string) string
- func StringValueMap(src map[string]*string) map[string]string
- func StringValueSlice(src []*string) []string
- func Time(v time.Time) *time.Time
- func TimeMap(src map[string]time.Time) map[string]*time.Time
- func TimeSlice(src []time.Time) []*time.Time
- func TimeUnixMilli(t time.Time) int64
- func TimeValue(v *time.Time) time.Time
- func TimeValueMap(src map[string]*time.Time) map[string]time.Time
- func TimeValueSlice(src []*time.Time) []time.Time
- type ACMAPI
- type Cloud
- func (c *Cloud) ACMAvailable() bool
- func (c *Cloud) AddELBV2TagsWithContext(ctx context.Context, i *elbv2.AddTagsInput) (*elbv2.AddTagsOutput, error)
- func (c *Cloud) AddListenerCertificates(ctx context.Context, i *elbv2.AddListenerCertificatesInput) (*elbv2.AddListenerCertificatesOutput, error)
- func (c *Cloud) AssociateWAF(ctx context.Context, resourceArn *string, webACLId *string) (*wafregional.AssociateWebACLOutput, error)
- func (c *Cloud) AssociateWAFV2(ctx context.Context, resourceArn *string, webACLARN *string) (*wafv2.AssociateWebACLOutput, error)
- func (c *Cloud) AuthorizeSecurityGroupIngressWithContext(ctx context.Context, i *ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
- func (c *Cloud) CreateEC2TagsWithContext(ctx context.Context, i *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)
- func (c *Cloud) CreateListenerWithContext(ctx context.Context, i *elbv2.CreateListenerInput) (*elbv2.CreateListenerOutput, error)
- func (c *Cloud) CreateLoadBalancerWithContext(ctx context.Context, i *elbv2.CreateLoadBalancerInput) (*elbv2.CreateLoadBalancerOutput, error)
- func (c *Cloud) CreateProtection(ctx context.Context, resourceArn *string, protectionName *string) (*shield.CreateProtectionOutput, error)
- func (c *Cloud) CreateRuleWithContext(ctx context.Context, i *elbv2.CreateRuleInput) (*elbv2.CreateRuleOutput, error)
- func (c *Cloud) CreateSecurityGroupWithContext(ctx context.Context, i *ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
- func (c *Cloud) CreateTargetGroupWithContext(ctx context.Context, i *elbv2.CreateTargetGroupInput) (*elbv2.CreateTargetGroupOutput, error)
- func (c *Cloud) DeleteEC2TagsWithContext(ctx context.Context, i *ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)
- func (c *Cloud) DeleteListenersByArn(ctx context.Context, lsArn string) error
- func (c *Cloud) DeleteLoadBalancerByArn(ctx context.Context, arn string) error
- func (c *Cloud) DeleteProtection(ctx context.Context, protectionID *string) (*shield.DeleteProtectionOutput, error)
- func (c *Cloud) DeleteRuleWithContext(ctx context.Context, i *elbv2.DeleteRuleInput) (*elbv2.DeleteRuleOutput, error)
- func (c *Cloud) DeleteSecurityGroupByID(ctx context.Context, groupID string) error
- func (c *Cloud) DeleteTargetGroupByArn(ctx context.Context, arn string) error
- func (c *Cloud) DeregisterTargetsWithContext(ctx context.Context, i *elbv2.DeregisterTargetsInput) (*elbv2.DeregisterTargetsOutput, error)
- func (c *Cloud) DescribeCertificate(ctx context.Context, certArn string) (*acm.CertificateDetail, error)
- func (c *Cloud) DescribeELBV2TagsWithContext(ctx context.Context, i *elbv2.DescribeTagsInput) (*elbv2.DescribeTagsOutput, error)
- func (c *Cloud) DescribeListenerCertificates(ctx context.Context, lsArn string) ([]*elbv2.Certificate, error)
- func (c *Cloud) DescribeLoadBalancerAttributesWithContext(ctx context.Context, i *elbv2.DescribeLoadBalancerAttributesInput) (*elbv2.DescribeLoadBalancerAttributesOutput, error)
- func (c *Cloud) DescribeNetworkInterfaces(ctx context.Context, input *ec2.DescribeNetworkInterfacesInput) ([]*ec2.NetworkInterface, error)
- func (c *Cloud) DescribeSecurityGroups(ctx context.Context, input *ec2.DescribeSecurityGroupsInput) ([]*ec2.SecurityGroup, error)
- func (c *Cloud) DescribeTargetGroupAttributesWithContext(ctx context.Context, i *elbv2.DescribeTargetGroupAttributesInput) (*elbv2.DescribeTargetGroupAttributesOutput, error)
- func (c *Cloud) DescribeTargetHealthWithContext(ctx context.Context, i *elbv2.DescribeTargetHealthInput) (*elbv2.DescribeTargetHealthOutput, error)
- func (c *Cloud) DisassociateWAF(ctx context.Context, resourceArn *string) (*wafregional.DisassociateWebACLOutput, error)
- func (c *Cloud) DisassociateWAFV2(ctx context.Context, resourceArn *string) (*wafv2.DisassociateWebACLOutput, error)
- func (c *Cloud) GetClusterName() string
- func (c *Cloud) GetClusterSubnets(tagSubnetType string) ([]*ec2.Subnet, error)
- func (c *Cloud) GetInstancesByIDs(instanceIDs []string) ([]*ec2.Instance, error)
- func (c *Cloud) GetLoadBalancerByArn(ctx context.Context, arn string) (*elbv2.LoadBalancer, error)
- func (c *Cloud) GetLoadBalancerByName(ctx context.Context, name string) (*elbv2.LoadBalancer, error)
- func (c *Cloud) GetProtection(ctx context.Context, resourceArn *string) (*shield.Protection, error)
- func (c *Cloud) GetResourcesByFilters(tagFilters map[string][]string, resourceTypeFilters ...string) ([]string, error)
- func (c *Cloud) GetRules(ctx context.Context, listenerArn string) ([]*elbv2.Rule, error)
- func (c *Cloud) GetSecurityGroupByID(groupID string) (*ec2.SecurityGroup, error)
- func (c *Cloud) GetSecurityGroupByName(groupName string) (*ec2.SecurityGroup, error)
- func (c *Cloud) GetSecurityGroupsByName(ctx context.Context, names []string) (groups []*ec2.SecurityGroup, err error)
- func (c *Cloud) GetSubnetsByNameOrID(ctx context.Context, nameOrIDs []string) (subnets []*ec2.Subnet, err error)
- func (c *Cloud) GetSubscriptionStatus(ctx context.Context) (*shield.GetSubscriptionStateOutput, error)
- func (c *Cloud) GetTargetGroupByArn(ctx context.Context, arn string) (*elbv2.TargetGroup, error)
- func (c *Cloud) GetTargetGroupByName(ctx context.Context, name string) (*elbv2.TargetGroup, error)
- func (c *Cloud) GetVpcID() string
- func (c *Cloud) GetVpcWithContext(ctx context.Context) (*ec2.Vpc, error)
- func (c *Cloud) GetWAFV2WebACLSummary(ctx context.Context, resourceArn *string) (*wafv2.WebACL, error)
- func (c *Cloud) GetWebACLSummary(ctx context.Context, resourceArn *string) (*waf.WebACLSummary, error)
- func (c *Cloud) ListCertificates(ctx context.Context, input *acm.ListCertificatesInput) ([]*acm.CertificateSummary, error)
- func (c *Cloud) ListListenersByLoadBalancer(ctx context.Context, lbArn string) ([]*elbv2.Listener, error)
- func (c *Cloud) ModifyListenerWithContext(ctx context.Context, i *elbv2.ModifyListenerInput) (*elbv2.ModifyListenerOutput, error)
- func (c *Cloud) ModifyLoadBalancerAttributesWithContext(ctx context.Context, i *elbv2.ModifyLoadBalancerAttributesInput) (*elbv2.ModifyLoadBalancerAttributesOutput, error)
- func (c *Cloud) ModifyNetworkInterfaceAttributeWithContext(ctx context.Context, i *ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
- func (c *Cloud) ModifyRuleWithContext(ctx context.Context, i *elbv2.ModifyRuleInput) (*elbv2.ModifyRuleOutput, error)
- func (c *Cloud) ModifyTargetGroupAttributesWithContext(ctx context.Context, i *elbv2.ModifyTargetGroupAttributesInput) (*elbv2.ModifyTargetGroupAttributesOutput, error)
- func (c *Cloud) ModifyTargetGroupWithContext(ctx context.Context, i *elbv2.ModifyTargetGroupInput) (*elbv2.ModifyTargetGroupOutput, error)
- func (c *Cloud) RegisterTargetsWithContext(ctx context.Context, i *elbv2.RegisterTargetsInput) (*elbv2.RegisterTargetsOutput, error)
- func (c *Cloud) RemoveELBV2TagsWithContext(ctx context.Context, i *elbv2.RemoveTagsInput) (*elbv2.RemoveTagsOutput, error)
- func (c *Cloud) RemoveListenerCertificates(ctx context.Context, i *elbv2.RemoveListenerCertificatesInput) (*elbv2.RemoveListenerCertificatesOutput, error)
- func (c *Cloud) RevokeSecurityGroupIngressWithContext(ctx context.Context, i *ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error)
- func (c *Cloud) SetIpAddressTypeWithContext(ctx context.Context, i *elbv2.SetIpAddressTypeInput) (*elbv2.SetIpAddressTypeOutput, error)
- func (c *Cloud) SetSecurityGroupsWithContext(ctx context.Context, i *elbv2.SetSecurityGroupsInput) (*elbv2.SetSecurityGroupsOutput, error)
- func (c *Cloud) SetSubnetsWithContext(ctx context.Context, i *elbv2.SetSubnetsInput) (*elbv2.SetSubnetsOutput, error)
- func (c *Cloud) ShieldAvailable(ctx context.Context) (bool, error)
- func (c *Cloud) StatusACM() func() error
- func (c *Cloud) StatusEC2() func() error
- func (c *Cloud) StatusELBV2() func() error
- func (c *Cloud) StatusIAM() func() error
- func (c *Cloud) TagResourcesWithContext(ctx context.Context, i *resourcegroupstaggingapi.TagResourcesInput) (*resourcegroupstaggingapi.TagResourcesOutput, error)
- func (c *Cloud) UntagResourcesWithContext(ctx context.Context, i *resourcegroupstaggingapi.UntagResourcesInput) (*resourcegroupstaggingapi.UntagResourcesOutput, error)
- func (c *Cloud) WAFRegionalAvailable() bool
- func (c *Cloud) WebACLExists(ctx context.Context, webACLId *string) (bool, error)
- type CloudAPI
- type CloudConfig
- type EC2API
- type ELBV2API
- type HealthChecker
- type IAMAPI
- type ResourceGroupsTaggingAPIAPI
- type ShieldAPI
- type WAFRegionalAPI
- type WAFV2API
Constants ¶
const ( TagNameCluster = "kubernetes.io/cluster" TagNameSubnetInternalELB = "kubernetes.io/role/internal-elb" TagNameSubnetPublicELB = "kubernetes.io/role/elb" )
const ( ResourceTypeEnumELBLoadBalancer = "elasticloadbalancing:loadbalancer" ResourceTypeEnumELBTargetGroup = "elasticloadbalancing:targetgroup" ResourceTypeEnumEC2SecurityGroup = "ec2:security-group" )
Variables ¶
This section is empty.
Functions ¶
func BoolValue ¶
BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.
func BoolValueMap ¶
BoolValueMap converts a string map of bool pointers into a string map of bool values
func BoolValueSlice ¶
BoolValueSlice converts a slice of bool pointers into a slice of bool values
func Float64Map ¶
Float64Map converts a string map of float64 values into a string map of float64 pointers
func Float64Slice ¶
Float64Slice converts a slice of float64 values into a slice of float64 pointers
func Float64Value ¶
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
func Float64ValueMap ¶
Float64ValueMap converts a string map of float64 pointers into a string map of float64 values
func Float64ValueSlice ¶
Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values
func GetVpcIDFromEC2Metadata ¶
func GetVpcIDFromEC2Metadata(metadata *ec2metadata.EC2Metadata) (string, error)
func Int64Slice ¶
Int64Slice converts a slice of int64 values into a slice of int64 pointers
func Int64Value ¶
Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.
func Int64ValueMap ¶
Int64ValueMap converts a string map of int64 pointers into a string map of int64 values
func Int64ValueSlice ¶
Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values
func IntValueMap ¶
IntValueMap converts a string map of int pointers into a string map of int values
func IntValueSlice ¶
IntValueSlice converts a slice of int pointers into a slice of int values
func MillisecondsTimeValue ¶
MillisecondsTimeValue converts an int64 pointer to a time.Time value representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
func NewSession ¶
func NewSession(awsconfig *aws.Config, AWSDebug bool, mc metric.Collector, ce bool, cc *cache.Config) *session.Session
NewSession returns an AWS session based off of the provided AWS config
func SecondsTimeValue ¶
SecondsTimeValue converts an int64 pointer to a time.Time value representing seconds since Epoch or time.Time{} if the pointer is nil.
func StringMap ¶
StringMap converts a string map of string values into a string map of string pointers
func StringSlice ¶
StringSlice converts a slice of string values into a slice of string pointers
func StringValue ¶
StringValue returns the value of the string pointer passed in or "" if the pointer is nil.
func StringValueMap ¶
StringValueMap converts a string map of string pointers into a string map of string values
func StringValueSlice ¶
StringValueSlice converts a slice of string pointers into a slice of string values
func TimeMap ¶
TimeMap converts a string map of time.Time values into a string map of time.Time pointers
func TimeUnixMilli ¶
TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". The result is undefined if the Unix time cannot be represented by an int64. Which includes calling TimeUnixMilli on a zero Time is undefined.
This utility is useful for service API's such as CloudWatch Logs which require their unix time values to be in milliseconds.
See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.
func TimeValue ¶
TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.
func TimeValueMap ¶
TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values
Types ¶
type ACMAPI ¶
type ACMAPI interface { // StatusACM validates ACM connectivity StatusACM() func() error // ACMAvailable whether ACM service is available ACMAvailable() bool // ListCertificates returns a list of certificate objects from ACM ListCertificates(ctx context.Context, input *acm.ListCertificatesInput) ([]*acm.CertificateSummary, error) // DescribeCertificate is an wrapper around acm.DescribeCertificate DescribeCertificate(ctx context.Context, certArn string) (*acm.CertificateDetail, error) }
ACMAPI is our wrapper ACM API interface
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
func (*Cloud) ACMAvailable ¶
func (*Cloud) AddELBV2TagsWithContext ¶
func (c *Cloud) AddELBV2TagsWithContext(ctx context.Context, i *elbv2.AddTagsInput) (*elbv2.AddTagsOutput, error)
func (*Cloud) AddListenerCertificates ¶ added in v1.1.1
func (c *Cloud) AddListenerCertificates(ctx context.Context, i *elbv2.AddListenerCertificatesInput) (*elbv2.AddListenerCertificatesOutput, error)
func (*Cloud) AssociateWAF ¶
func (c *Cloud) AssociateWAF(ctx context.Context, resourceArn *string, webACLId *string) (*wafregional.AssociateWebACLOutput, error)
AssociateWAF WAF ACL to resource.
func (*Cloud) AssociateWAFV2 ¶ added in v1.1.7
func (c *Cloud) AssociateWAFV2(ctx context.Context, resourceArn *string, webACLARN *string) (*wafv2.AssociateWebACLOutput, error)
AssociateWAFV2 WAF ACL to resource.
func (*Cloud) AuthorizeSecurityGroupIngressWithContext ¶
func (c *Cloud) AuthorizeSecurityGroupIngressWithContext(ctx context.Context, i *ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
func (*Cloud) CreateEC2TagsWithContext ¶
func (c *Cloud) CreateEC2TagsWithContext(ctx context.Context, i *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)
func (*Cloud) CreateListenerWithContext ¶
func (c *Cloud) CreateListenerWithContext(ctx context.Context, i *elbv2.CreateListenerInput) (*elbv2.CreateListenerOutput, error)
func (*Cloud) CreateLoadBalancerWithContext ¶
func (c *Cloud) CreateLoadBalancerWithContext(ctx context.Context, i *elbv2.CreateLoadBalancerInput) (*elbv2.CreateLoadBalancerOutput, error)
func (*Cloud) CreateProtection ¶ added in v1.1.6
func (*Cloud) CreateRuleWithContext ¶
func (c *Cloud) CreateRuleWithContext(ctx context.Context, i *elbv2.CreateRuleInput) (*elbv2.CreateRuleOutput, error)
func (*Cloud) CreateSecurityGroupWithContext ¶
func (c *Cloud) CreateSecurityGroupWithContext(ctx context.Context, i *ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
func (*Cloud) CreateTargetGroupWithContext ¶
func (c *Cloud) CreateTargetGroupWithContext(ctx context.Context, i *elbv2.CreateTargetGroupInput) (*elbv2.CreateTargetGroupOutput, error)
func (*Cloud) DeleteEC2TagsWithContext ¶
func (c *Cloud) DeleteEC2TagsWithContext(ctx context.Context, i *ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)
func (*Cloud) DeleteListenersByArn ¶
func (*Cloud) DeleteLoadBalancerByArn ¶
func (*Cloud) DeleteProtection ¶ added in v1.1.6
func (*Cloud) DeleteRuleWithContext ¶
func (c *Cloud) DeleteRuleWithContext(ctx context.Context, i *elbv2.DeleteRuleInput) (*elbv2.DeleteRuleOutput, error)
func (*Cloud) DeleteSecurityGroupByID ¶
func (*Cloud) DeleteTargetGroupByArn ¶
DeleteTargetGroupByArn deletes TargetGroup instance by arn
func (*Cloud) DeregisterTargetsWithContext ¶
func (c *Cloud) DeregisterTargetsWithContext(ctx context.Context, i *elbv2.DeregisterTargetsInput) (*elbv2.DeregisterTargetsOutput, error)
func (*Cloud) DescribeCertificate ¶ added in v1.1.3
func (*Cloud) DescribeELBV2TagsWithContext ¶
func (c *Cloud) DescribeELBV2TagsWithContext(ctx context.Context, i *elbv2.DescribeTagsInput) (*elbv2.DescribeTagsOutput, error)
func (*Cloud) DescribeListenerCertificates ¶ added in v1.1.1
func (*Cloud) DescribeLoadBalancerAttributesWithContext ¶
func (c *Cloud) DescribeLoadBalancerAttributesWithContext(ctx context.Context, i *elbv2.DescribeLoadBalancerAttributesInput) (*elbv2.DescribeLoadBalancerAttributesOutput, error)
func (*Cloud) DescribeNetworkInterfaces ¶ added in v1.1.2
func (c *Cloud) DescribeNetworkInterfaces(ctx context.Context, input *ec2.DescribeNetworkInterfacesInput) ([]*ec2.NetworkInterface, error)
func (*Cloud) DescribeSecurityGroups ¶ added in v1.1.3
func (c *Cloud) DescribeSecurityGroups(ctx context.Context, input *ec2.DescribeSecurityGroupsInput) ([]*ec2.SecurityGroup, error)
func (*Cloud) DescribeTargetGroupAttributesWithContext ¶
func (c *Cloud) DescribeTargetGroupAttributesWithContext(ctx context.Context, i *elbv2.DescribeTargetGroupAttributesInput) (*elbv2.DescribeTargetGroupAttributesOutput, error)
func (*Cloud) DescribeTargetHealthWithContext ¶
func (c *Cloud) DescribeTargetHealthWithContext(ctx context.Context, i *elbv2.DescribeTargetHealthInput) (*elbv2.DescribeTargetHealthOutput, error)
func (*Cloud) DisassociateWAF ¶
func (c *Cloud) DisassociateWAF(ctx context.Context, resourceArn *string) (*wafregional.DisassociateWebACLOutput, error)
DisassociateWAF WAF ACL from resource.
func (*Cloud) DisassociateWAFV2 ¶ added in v1.1.7
func (c *Cloud) DisassociateWAFV2(ctx context.Context, resourceArn *string) (*wafv2.DisassociateWebACLOutput, error)
DisassociateWAFV2 WAFv2 ACL from resource.
func (*Cloud) GetClusterName ¶ added in v1.1.3
func (*Cloud) GetClusterSubnets ¶
func (*Cloud) GetInstancesByIDs ¶
func (*Cloud) GetLoadBalancerByArn ¶
func (*Cloud) GetLoadBalancerByName ¶
func (*Cloud) GetProtection ¶ added in v1.1.6
func (*Cloud) GetResourcesByFilters ¶
func (*Cloud) GetSecurityGroupByID ¶
func (c *Cloud) GetSecurityGroupByID(groupID string) (*ec2.SecurityGroup, error)
func (*Cloud) GetSecurityGroupByName ¶
func (c *Cloud) GetSecurityGroupByName(groupName string) (*ec2.SecurityGroup, error)
func (*Cloud) GetSecurityGroupsByName ¶
func (*Cloud) GetSubnetsByNameOrID ¶
func (*Cloud) GetSubscriptionStatus ¶ added in v1.1.6
func (*Cloud) GetTargetGroupByArn ¶
func (*Cloud) GetTargetGroupByName ¶
GetTargetGroupByName retrieve TargetGroup instance by name
func (*Cloud) GetVpcWithContext ¶ added in v1.1.2
GetVpcWithContext returns the VPC for the configured VPC ID
func (*Cloud) GetWAFV2WebACLSummary ¶ added in v1.1.7
func (c *Cloud) GetWAFV2WebACLSummary(ctx context.Context, resourceArn *string) (*wafv2.WebACL, error)
GetWAFV2WebACLSummary return associated summary for resource.
func (*Cloud) GetWebACLSummary ¶
func (c *Cloud) GetWebACLSummary(ctx context.Context, resourceArn *string) (*waf.WebACLSummary, error)
GetWebACLSummary return associated summary for resource.
func (*Cloud) ListCertificates ¶ added in v1.1.2
func (c *Cloud) ListCertificates(ctx context.Context, input *acm.ListCertificatesInput) ([]*acm.CertificateSummary, error)
ListCertificates returns a list of certificates from ACM Apply a filter to the query using the status parameter
func (*Cloud) ListListenersByLoadBalancer ¶
func (*Cloud) ModifyListenerWithContext ¶
func (c *Cloud) ModifyListenerWithContext(ctx context.Context, i *elbv2.ModifyListenerInput) (*elbv2.ModifyListenerOutput, error)
func (*Cloud) ModifyLoadBalancerAttributesWithContext ¶
func (c *Cloud) ModifyLoadBalancerAttributesWithContext(ctx context.Context, i *elbv2.ModifyLoadBalancerAttributesInput) (*elbv2.ModifyLoadBalancerAttributesOutput, error)
func (*Cloud) ModifyNetworkInterfaceAttributeWithContext ¶
func (c *Cloud) ModifyNetworkInterfaceAttributeWithContext(ctx context.Context, i *ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
func (*Cloud) ModifyRuleWithContext ¶
func (c *Cloud) ModifyRuleWithContext(ctx context.Context, i *elbv2.ModifyRuleInput) (*elbv2.ModifyRuleOutput, error)
func (*Cloud) ModifyTargetGroupAttributesWithContext ¶
func (c *Cloud) ModifyTargetGroupAttributesWithContext(ctx context.Context, i *elbv2.ModifyTargetGroupAttributesInput) (*elbv2.ModifyTargetGroupAttributesOutput, error)
func (*Cloud) ModifyTargetGroupWithContext ¶
func (c *Cloud) ModifyTargetGroupWithContext(ctx context.Context, i *elbv2.ModifyTargetGroupInput) (*elbv2.ModifyTargetGroupOutput, error)
func (*Cloud) RegisterTargetsWithContext ¶
func (c *Cloud) RegisterTargetsWithContext(ctx context.Context, i *elbv2.RegisterTargetsInput) (*elbv2.RegisterTargetsOutput, error)
func (*Cloud) RemoveELBV2TagsWithContext ¶
func (c *Cloud) RemoveELBV2TagsWithContext(ctx context.Context, i *elbv2.RemoveTagsInput) (*elbv2.RemoveTagsOutput, error)
func (*Cloud) RemoveListenerCertificates ¶ added in v1.1.1
func (c *Cloud) RemoveListenerCertificates(ctx context.Context, i *elbv2.RemoveListenerCertificatesInput) (*elbv2.RemoveListenerCertificatesOutput, error)
func (*Cloud) RevokeSecurityGroupIngressWithContext ¶
func (c *Cloud) RevokeSecurityGroupIngressWithContext(ctx context.Context, i *ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error)
func (*Cloud) SetIpAddressTypeWithContext ¶
func (c *Cloud) SetIpAddressTypeWithContext(ctx context.Context, i *elbv2.SetIpAddressTypeInput) (*elbv2.SetIpAddressTypeOutput, error)
func (*Cloud) SetSecurityGroupsWithContext ¶
func (c *Cloud) SetSecurityGroupsWithContext(ctx context.Context, i *elbv2.SetSecurityGroupsInput) (*elbv2.SetSecurityGroupsOutput, error)
func (*Cloud) SetSubnetsWithContext ¶
func (c *Cloud) SetSubnetsWithContext(ctx context.Context, i *elbv2.SetSubnetsInput) (*elbv2.SetSubnetsOutput, error)
func (*Cloud) ShieldAvailable ¶ added in v1.1.6
func (*Cloud) StatusELBV2 ¶
StatusELBV2 validates ELBV2 connectivity
func (*Cloud) TagResourcesWithContext ¶
func (c *Cloud) TagResourcesWithContext(ctx context.Context, i *resourcegroupstaggingapi.TagResourcesInput) (*resourcegroupstaggingapi.TagResourcesOutput, error)
func (*Cloud) UntagResourcesWithContext ¶
func (c *Cloud) UntagResourcesWithContext(ctx context.Context, i *resourcegroupstaggingapi.UntagResourcesInput) (*resourcegroupstaggingapi.UntagResourcesOutput, error)
func (*Cloud) WAFRegionalAvailable ¶
type CloudAPI ¶
type CloudAPI interface { ACMAPI EC2API ELBV2API IAMAPI ResourceGroupsTaggingAPIAPI ShieldAPI WAFRegionalAPI WAFV2API GetClusterName() string GetVpcID() string }
func New ¶
func New(cfg CloudConfig, clusterName string, mc metric.Collector, ce bool, cc *cache.Config) (CloudAPI, error)
Initialize the global AWS clients. But due to huge number of aws clients, it's best to have one container AWS client that embed these aws clients. TODO: remove clusterName dependency TODO: remove mc dependency like https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws_metrics.go
type CloudConfig ¶
configuration for cloud
func (*CloudConfig) BindEnv ¶
func (cfg *CloudConfig) BindEnv() error
func (*CloudConfig) BindFlags ¶
func (cfg *CloudConfig) BindFlags(fs *pflag.FlagSet)
type EC2API ¶
type EC2API interface { GetSubnetsByNameOrID(context.Context, []string) ([]*ec2.Subnet, error) // StatusEC2 validates EC2 connectivity StatusEC2() func() error // GetInstancesByIDs retrieves ec2 instances by slice of instanceID GetInstancesByIDs([]string) ([]*ec2.Instance, error) // GetSecurityGroupByID retrieves securityGroup by securityGroupID GetSecurityGroupByID(string) (*ec2.SecurityGroup, error) // GetSecurityGroupByName retrieves securityGroup by securityGroupName(SecurityGroup names within vpc are unique) GetSecurityGroupByName(string) (*ec2.SecurityGroup, error) // GetSecurityGroupsByName retrieves securityGroups by securityGroupName(SecurityGroup names within vpc are unique) GetSecurityGroupsByName(context.Context, []string) ([]*ec2.SecurityGroup, error) // GetClusterSubnets retrieves the subnets associated with the cluster, by matching tags GetClusterSubnets(string) ([]*ec2.Subnet, error) // DeleteSecurityGroupByID delete securityGroup by securityGroupID DeleteSecurityGroupByID(context.Context, string) error // DescribeNetworkInterfaces list network interfaces. DescribeNetworkInterfaces(context.Context, *ec2.DescribeNetworkInterfacesInput) ([]*ec2.NetworkInterface, error) // DescribeSecurityGroups list security groups. DescribeSecurityGroups(context.Context, *ec2.DescribeSecurityGroupsInput) ([]*ec2.SecurityGroup, error) ModifyNetworkInterfaceAttributeWithContext(context.Context, *ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error) CreateSecurityGroupWithContext(context.Context, *ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error) AuthorizeSecurityGroupIngressWithContext(context.Context, *ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error) RevokeSecurityGroupIngressWithContext(context.Context, *ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error) CreateEC2TagsWithContext(context.Context, *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error) DeleteEC2TagsWithContext(context.Context, *ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error) // GetVpcWithContext returns the VPC for the configured VPC ID GetVpcWithContext(context.Context) (*ec2.Vpc, error) }
EC2API is our wrapper EC2 API interface
type ELBV2API ¶
type ELBV2API interface { StatusELBV2() func() error GetRules(context.Context, string) ([]*elbv2.Rule, error) // ListListenersByLoadBalancer gets all listeners for loadbalancer. ListListenersByLoadBalancer(context.Context, string) ([]*elbv2.Listener, error) // DeleteListenersByArn deletes listener DeleteListenersByArn(context.Context, string) error // GetLoadBalancerByName retrieve LoadBalancer instance by arn GetLoadBalancerByArn(context.Context, string) (*elbv2.LoadBalancer, error) // GetLoadBalancerByName retrieve LoadBalancer instance by name GetLoadBalancerByName(context.Context, string) (*elbv2.LoadBalancer, error) // DeleteLoadBalancerByArn deletes LoadBalancer instance by arn DeleteLoadBalancerByArn(context.Context, string) error // GetTargetGroupByArn retrieve TargetGroup instance by arn GetTargetGroupByArn(context.Context, string) (*elbv2.TargetGroup, error) // GetTargetGroupByName retrieve TargetGroup instance by name GetTargetGroupByName(context.Context, string) (*elbv2.TargetGroup, error) // DeleteTargetGroupByArn deletes TargetGroup instance by arn DeleteTargetGroupByArn(context.Context, string) error DescribeTargetGroupAttributesWithContext(context.Context, *elbv2.DescribeTargetGroupAttributesInput) (*elbv2.DescribeTargetGroupAttributesOutput, error) ModifyTargetGroupAttributesWithContext(context.Context, *elbv2.ModifyTargetGroupAttributesInput) (*elbv2.ModifyTargetGroupAttributesOutput, error) CreateTargetGroupWithContext(context.Context, *elbv2.CreateTargetGroupInput) (*elbv2.CreateTargetGroupOutput, error) ModifyTargetGroupWithContext(context.Context, *elbv2.ModifyTargetGroupInput) (*elbv2.ModifyTargetGroupOutput, error) RegisterTargetsWithContext(context.Context, *elbv2.RegisterTargetsInput) (*elbv2.RegisterTargetsOutput, error) DeregisterTargetsWithContext(context.Context, *elbv2.DeregisterTargetsInput) (*elbv2.DeregisterTargetsOutput, error) DescribeTargetHealthWithContext(context.Context, *elbv2.DescribeTargetHealthInput) (*elbv2.DescribeTargetHealthOutput, error) CreateRuleWithContext(context.Context, *elbv2.CreateRuleInput) (*elbv2.CreateRuleOutput, error) ModifyRuleWithContext(context.Context, *elbv2.ModifyRuleInput) (*elbv2.ModifyRuleOutput, error) DeleteRuleWithContext(context.Context, *elbv2.DeleteRuleInput) (*elbv2.DeleteRuleOutput, error) SetSecurityGroupsWithContext(context.Context, *elbv2.SetSecurityGroupsInput) (*elbv2.SetSecurityGroupsOutput, error) CreateListenerWithContext(context.Context, *elbv2.CreateListenerInput) (*elbv2.CreateListenerOutput, error) ModifyListenerWithContext(context.Context, *elbv2.ModifyListenerInput) (*elbv2.ModifyListenerOutput, error) DescribeLoadBalancerAttributesWithContext(context.Context, *elbv2.DescribeLoadBalancerAttributesInput) (*elbv2.DescribeLoadBalancerAttributesOutput, error) ModifyLoadBalancerAttributesWithContext(context.Context, *elbv2.ModifyLoadBalancerAttributesInput) (*elbv2.ModifyLoadBalancerAttributesOutput, error) CreateLoadBalancerWithContext(context.Context, *elbv2.CreateLoadBalancerInput) (*elbv2.CreateLoadBalancerOutput, error) SetIpAddressTypeWithContext(context.Context, *elbv2.SetIpAddressTypeInput) (*elbv2.SetIpAddressTypeOutput, error) SetSubnetsWithContext(context.Context, *elbv2.SetSubnetsInput) (*elbv2.SetSubnetsOutput, error) DescribeELBV2TagsWithContext(context.Context, *elbv2.DescribeTagsInput) (*elbv2.DescribeTagsOutput, error) AddELBV2TagsWithContext(context.Context, *elbv2.AddTagsInput) (*elbv2.AddTagsOutput, error) RemoveELBV2TagsWithContext(context.Context, *elbv2.RemoveTagsInput) (*elbv2.RemoveTagsOutput, error) DescribeListenerCertificates(context.Context, string) ([]*elbv2.Certificate, error) AddListenerCertificates(context.Context, *elbv2.AddListenerCertificatesInput) (*elbv2.AddListenerCertificatesOutput, error) RemoveListenerCertificates(context.Context, *elbv2.RemoveListenerCertificatesInput) (*elbv2.RemoveListenerCertificatesOutput, error) }
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
func NewHealthChecker ¶
func NewHealthChecker(cloud CloudAPI) *HealthChecker
Constructs a new healthChecker
func (*HealthChecker) Check ¶
func (c *HealthChecker) Check(_ *http.Request) error
TODO, validate the call health check frequency
func (*HealthChecker) Name ¶
func (c *HealthChecker) Name() string
type IAMAPI ¶
type IAMAPI interface { // StatusIAM validates IAM connectivity StatusIAM() func() error }
IAMAPI is our wrapper IAM API interface
type ResourceGroupsTaggingAPIAPI ¶
type ResourceGroupsTaggingAPIAPI interface { // GetResourcesByFilters fetches resources ARNs by tagFilters and 0 or more resourceTypesFilters GetResourcesByFilters(tagFilters map[string][]string, resourceTypeFilters ...string) ([]string, error) TagResourcesWithContext(context.Context, *resourcegroupstaggingapi.TagResourcesInput) (*resourcegroupstaggingapi.TagResourcesOutput, error) UntagResourcesWithContext(context.Context, *resourcegroupstaggingapi.UntagResourcesInput) (*resourcegroupstaggingapi.UntagResourcesOutput, error) }
type ShieldAPI ¶ added in v1.1.6
type ShieldAPI interface { ShieldAvailable(ctx context.Context) (bool, error) GetSubscriptionStatus(ctx context.Context) (*shield.GetSubscriptionStateOutput, error) GetProtection(ctx context.Context, resourceArn *string) (*shield.Protection, error) CreateProtection(ctx context.Context, resourceArn *string, protectionName *string) (*shield.CreateProtectionOutput, error) DeleteProtection(ctx context.Context, protectionID *string) (*shield.DeleteProtectionOutput, error) }
type WAFRegionalAPI ¶
type WAFRegionalAPI interface { WebACLExists(ctx context.Context, webACLId *string) (bool, error) GetWebACLSummary(ctx context.Context, resourceArn *string) (*waf.WebACLSummary, error) AssociateWAF(ctx context.Context, resourceArn *string, webACLId *string) (*wafregional.AssociateWebACLOutput, error) DisassociateWAF(ctx context.Context, resourceArn *string) (*wafregional.DisassociateWebACLOutput, error) // WAFRegionalAvailable whether WAFRegional service are available. WAFRegionalAvailable() bool }
type WAFV2API ¶ added in v1.1.7
type WAFV2API interface { GetWAFV2WebACLSummary(ctx context.Context, webACLId *string) (*wafv2.WebACL, error) AssociateWAFV2(ctx context.Context, resourceArn *string, webACLId *string) (*wafv2.AssociateWebACLOutput, error) DisassociateWAFV2(ctx context.Context, resourceArn *string) (*wafv2.DisassociateWebACLOutput, error) }