Skip to content

Commit

Permalink
fix(schema): version attribute of Function::S3Location in SAM is opti…
Browse files Browse the repository at this point in the history
…onal (awslabs#226)

SAM specification marks this field as optional but is marked as required
in this repo.
SAM spec is here - https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#s3-location-object

See generate/sam-2016-10-31.json for the change. The rest of the changes
come from running `go generate`.

fixes awslabs#87
  • Loading branch information
nija-at authored and PaulMaddox committed Oct 9, 2019
1 parent 7422994 commit 14b754c
Show file tree
Hide file tree
Showing 72 changed files with 7,526 additions and 89 deletions.
175 changes: 175 additions & 0 deletions cloudformation/all.go

Large diffs are not rendered by default.

Expand Up @@ -46,6 +46,11 @@ type AWSApplicationAutoScalingScalableTarget struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalabletarget.html#cfn-applicationautoscaling-scalabletarget-servicenamespace
ServiceNamespace string `json:"ServiceNamespace,omitempty"`

// SuspendedState AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalabletarget.html#cfn-applicationautoscaling-scalabletarget-suspendedstate
SuspendedState *AWSApplicationAutoScalingScalableTarget_SuspendedState `json:"SuspendedState,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

Expand Down
@@ -0,0 +1,73 @@
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSApplicationAutoScalingScalableTarget_SuspendedState AWS CloudFormation Resource (AWS::ApplicationAutoScaling::ScalableTarget.SuspendedState)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html
type AWSApplicationAutoScalingScalableTarget_SuspendedState struct {

// DynamicScalingInSuspended AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html#cfn-applicationautoscaling-scalabletarget-suspendedstate-dynamicscalinginsuspended
DynamicScalingInSuspended bool `json:"DynamicScalingInSuspended,omitempty"`

// DynamicScalingOutSuspended AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html#cfn-applicationautoscaling-scalabletarget-suspendedstate-dynamicscalingoutsuspended
DynamicScalingOutSuspended bool `json:"DynamicScalingOutSuspended,omitempty"`

// ScheduledScalingSuspended AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html#cfn-applicationautoscaling-scalabletarget-suspendedstate-scheduledscalingsuspended
ScheduledScalingSuspended bool `json:"ScheduledScalingSuspended,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSApplicationAutoScalingScalableTarget_SuspendedState) AWSCloudFormationType() string {
return "AWS::ApplicationAutoScaling::ScalableTarget.SuspendedState"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSApplicationAutoScalingScalableTarget_SuspendedState) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSApplicationAutoScalingScalableTarget_SuspendedState) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSApplicationAutoScalingScalableTarget_SuspendedState) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSApplicationAutoScalingScalableTarget_SuspendedState) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// DeletionPolicy returns the AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSApplicationAutoScalingScalableTarget_SuspendedState) DeletionPolicy() policies.DeletionPolicy {
return r._deletionPolicy
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSApplicationAutoScalingScalableTarget_SuspendedState) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}
68 changes: 68 additions & 0 deletions cloudformation/resources/aws-appmesh-route_duration.go
@@ -0,0 +1,68 @@
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSAppMeshRoute_Duration AWS CloudFormation Resource (AWS::AppMesh::Route.Duration)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-duration.html
type AWSAppMeshRoute_Duration struct {

// Unit AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-duration.html#cfn-appmesh-route-duration-unit
Unit string `json:"Unit,omitempty"`

// Value AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-duration.html#cfn-appmesh-route-duration-value
Value int `json:"Value"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSAppMeshRoute_Duration) AWSCloudFormationType() string {
return "AWS::AppMesh::Route.Duration"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSAppMeshRoute_Duration) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSAppMeshRoute_Duration) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSAppMeshRoute_Duration) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSAppMeshRoute_Duration) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// DeletionPolicy returns the AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSAppMeshRoute_Duration) DeletionPolicy() policies.DeletionPolicy {
return r._deletionPolicy
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSAppMeshRoute_Duration) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}
83 changes: 83 additions & 0 deletions cloudformation/resources/aws-appmesh-route_headermatchmethod.go
@@ -0,0 +1,83 @@
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSAppMeshRoute_HeaderMatchMethod AWS CloudFormation Resource (AWS::AppMesh::Route.HeaderMatchMethod)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-headermatchmethod.html
type AWSAppMeshRoute_HeaderMatchMethod struct {

// Exact AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-headermatchmethod.html#cfn-appmesh-route-headermatchmethod-exact
Exact string `json:"Exact,omitempty"`

// Prefix AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-headermatchmethod.html#cfn-appmesh-route-headermatchmethod-prefix
Prefix string `json:"Prefix,omitempty"`

// Range AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-headermatchmethod.html#cfn-appmesh-route-headermatchmethod-range
Range *AWSAppMeshRoute_MatchRange `json:"Range,omitempty"`

// Regex AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-headermatchmethod.html#cfn-appmesh-route-headermatchmethod-regex
Regex string `json:"Regex,omitempty"`

// Suffix AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-headermatchmethod.html#cfn-appmesh-route-headermatchmethod-suffix
Suffix string `json:"Suffix,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSAppMeshRoute_HeaderMatchMethod) AWSCloudFormationType() string {
return "AWS::AppMesh::Route.HeaderMatchMethod"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSAppMeshRoute_HeaderMatchMethod) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSAppMeshRoute_HeaderMatchMethod) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSAppMeshRoute_HeaderMatchMethod) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSAppMeshRoute_HeaderMatchMethod) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// DeletionPolicy returns the AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSAppMeshRoute_HeaderMatchMethod) DeletionPolicy() policies.DeletionPolicy {
return r._deletionPolicy
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSAppMeshRoute_HeaderMatchMethod) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}
78 changes: 78 additions & 0 deletions cloudformation/resources/aws-appmesh-route_httpretrypolicy.go
@@ -0,0 +1,78 @@
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSAppMeshRoute_HttpRetryPolicy AWS CloudFormation Resource (AWS::AppMesh::Route.HttpRetryPolicy)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html
type AWSAppMeshRoute_HttpRetryPolicy struct {

// HttpRetryEvents AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-httpretryevents
HttpRetryEvents []string `json:"HttpRetryEvents,omitempty"`

// MaxRetries AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-maxretries
MaxRetries int `json:"MaxRetries"`

// PerRetryTimeout AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-perretrytimeout
PerRetryTimeout *AWSAppMeshRoute_Duration `json:"PerRetryTimeout,omitempty"`

// TcpRetryEvents AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httpretrypolicy.html#cfn-appmesh-route-httpretrypolicy-tcpretryevents
TcpRetryEvents []string `json:"TcpRetryEvents,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSAppMeshRoute_HttpRetryPolicy) AWSCloudFormationType() string {
return "AWS::AppMesh::Route.HttpRetryPolicy"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSAppMeshRoute_HttpRetryPolicy) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSAppMeshRoute_HttpRetryPolicy) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSAppMeshRoute_HttpRetryPolicy) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSAppMeshRoute_HttpRetryPolicy) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// DeletionPolicy returns the AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSAppMeshRoute_HttpRetryPolicy) DeletionPolicy() policies.DeletionPolicy {
return r._deletionPolicy
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSAppMeshRoute_HttpRetryPolicy) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}
5 changes: 5 additions & 0 deletions cloudformation/resources/aws-appmesh-route_httproute.go
Expand Up @@ -16,6 +16,11 @@ type AWSAppMeshRoute_HttpRoute struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httproute.html#cfn-appmesh-route-httproute-match
Match *AWSAppMeshRoute_HttpRouteMatch `json:"Match,omitempty"`

// RetryPolicy AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-httproute.html#cfn-appmesh-route-httproute-retrypolicy
RetryPolicy *AWSAppMeshRoute_HttpRetryPolicy `json:"RetryPolicy,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

Expand Down

0 comments on commit 14b754c

Please sign in to comment.