cloudformation

package
v0.0.0-...-bdfbe2f Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWSStackName                     = "AWS::StackName"
	AWSRegion                        = "AWS::Region"
	LoadBalancerResourceName         = "LoadBalancer"
	ListnerResourceName              = "Listener"
	SecurityGroupIngressResourceName = "SecurityGroupIngress"
	TargetGroupResourceName          = "TargetGroup"
	OutputKeyIngressRules            = "IngressRules"
	OutputKeyNLBEndpoint             = "NLBHostName"
)

const is constance values for resource naming used to build cf templates

Variables

CompleteStatuses contains all CloudFormation status strings that we consider to be complete for a vpn

FailedStatuses contains all CloudFormation status strings that we consider to be failed for a vpn

PendingStatuses contains all CloudFormation status strings that we consider to be pending for a vpn

Functions

func BuildNLBTemplateFromIngressRule

func BuildNLBTemplateFromIngressRule(cfg *TemplateConfig) *cfn.Template

BuildNLBTemplateFromIngressRule generates the cloudformation template according to the config provided

func DeleteComplete

func DeleteComplete(status string) bool

func DescribeStack

func DescribeStack(cfnSvc cloudformationiface.CloudFormationAPI, stackName string) (*cloudformation.Stack, error)

func GetResourceID

func GetResourceID(cfnSvc cloudformationiface.CloudFormationAPI, stackName string, logicalID string) (string, error)

func IsComplete

func IsComplete(status string) bool

IsComplete tests if the specified string is considered a completed cloudformation stack state

func IsDeleting

func IsDeleting(status string) bool

IsDeleting tests if the stack status is DELETE_IN_PROGRESS

func IsDoesNotExist

func IsDoesNotExist(err error, stackName string) bool

func IsFailed

func IsFailed(status string) bool

IsFailed tests if the specified string is considered a failed cloudformation stack state

func IsPending

func IsPending(status string) bool

IsPending tests if the specified string is considered a pending cloudformation stack state

func StackDoesNotExist

func StackDoesNotExist(err error) bool

StackDoesNotExist Checks if the error recieved for DescribeStacks denotes if the stack is non exsistent

func StackOutputMap

func StackOutputMap(stack *cloudformation.Stack) map[string]string

Types

type APIKey

type APIKey struct {
	CustomerID         string `json:"customer_id"`
	GenerateDistinctID bool   `json:"generate_distinct_id"`
	Name               string `json:"name"`
}

type APIResource

type APIResource struct {
	Path              string   `json:"path"`
	CachingEnabled    bool     `json:"caching_enabled"`
	Methods           []string `json:"method"`
	ProxyPathParams   []Param  `json:"path_params"`
	ProxyQueryParams  []Param  `json:"query_params"`
	ProxyHeaderParams []Param  `json:"header_params"`
}

type AllPrinciplesPolicyDocument

type AllPrinciplesPolicyDocument struct {
	Version   string                   `json:"Version"`
	Statement []AllPrinciplesStatement `json:"Statement"`
}

type AllPrinciplesStatement

type AllPrinciplesStatement struct {
	Effect    string   `json:"Effect"`
	Principal string   `json:"Principal"`
	Action    []string `json:"Action"`
	Resource  []string `json:"Resource"`
}

type MethodThrottlingParametersObject

type MethodThrottlingParametersObject struct {
	Path       string  `json:"path"`
	BurstLimit int     `json:"burst_limit"`
	RateLimit  float64 `json:"rate_limit"`
}

type Output

type Output struct {
	Value string
}

type Param

type Param struct {
	Param    string `json:"param"`
	Required bool   `json:"required"`
}

type PolicyDocument

type PolicyDocument struct {
	Version   string      `json:"Version"`
	Statement []Statement `json:"Statement"`
}

type Statement

type Statement struct {
	Effect    string              `json:"Effect"`
	Principal map[string][]string `json:"Principal"`
	Action    []string            `json:"Action"`
	Resource  []string            `json:"Resource"`
}

type TemplateConfig

type TemplateConfig struct {
	Network  *network.Network
	Rule     extensionsv1beta1.IngressRule
	NodePort int
}

TemplateConfig is the structure of configuration used to provide data to build the cf template

type UsagePlan

type UsagePlan struct {
	PlanName                   string                             `json:"plan_name"`
	Description                string                             `json:"description"`
	APIKeys                    []APIKey                           `json:"api_keys"`
	QuotaLimit                 int                                `json:"quota_limit"`
	QuotaOffset                int                                `json:"quota_offset"`
	QuotaPeriod                string                             `json:"quota_period"`
	ThrottleBurstLimit         int                                `json:"throttle_burst_limit"`
	ThrottleRateLimit          float64                            `json:"throttle_rate_limit"`
	MethodThrottlingParameters []MethodThrottlingParametersObject `json:"method_throttling_parameters"`
}

Jump to

Keyboard shortcuts

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