Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
fix(schema): CloudFormation Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMaddox committed Aug 20, 2021
1 parent 2b8e243 commit 29b95cb
Show file tree
Hide file tree
Showing 29 changed files with 2,319 additions and 7 deletions.
25 changes: 25 additions & 0 deletions cloudformation/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ func AllResources() map[string]Resource {
"AWS::WAFRegional::WebACLAssociation": &wafregional.WebACLAssociation{},
"AWS::WAFRegional::XssMatchSet": &wafregional.XssMatchSet{},
"AWS::WAFv2::IPSet": &wafv2.IPSet{},
"AWS::WAFv2::LoggingConfiguration": &wafv2.LoggingConfiguration{},
"AWS::WAFv2::RegexPatternSet": &wafv2.RegexPatternSet{},
"AWS::WAFv2::RuleGroup": &wafv2.RuleGroup{},
"AWS::WAFv2::WebACL": &wafv2.WebACL{},
Expand Down Expand Up @@ -19717,6 +19718,30 @@ func (t *Template) GetWAFv2IPSetWithName(name string) (*wafv2.IPSet, error) {
return nil, fmt.Errorf("resource %q of type wafv2.IPSet not found", name)
}

// GetAllWAFv2LoggingConfigurationResources retrieves all wafv2.LoggingConfiguration items from an AWS CloudFormation template
func (t *Template) GetAllWAFv2LoggingConfigurationResources() map[string]*wafv2.LoggingConfiguration {
results := map[string]*wafv2.LoggingConfiguration{}
for name, untyped := range t.Resources {
switch resource := untyped.(type) {
case *wafv2.LoggingConfiguration:
results[name] = resource
}
}
return results
}

// GetWAFv2LoggingConfigurationWithName retrieves all wafv2.LoggingConfiguration items from an AWS CloudFormation template
// whose logical ID matches the provided name. Returns an error if not found.
func (t *Template) GetWAFv2LoggingConfigurationWithName(name string) (*wafv2.LoggingConfiguration, error) {
if untyped, ok := t.Resources[name]; ok {
switch resource := untyped.(type) {
case *wafv2.LoggingConfiguration:
return resource, nil
}
}
return nil, fmt.Errorf("resource %q of type wafv2.LoggingConfiguration not found", name)
}

// GetAllWAFv2RegexPatternSetResources retrieves all wafv2.RegexPatternSet items from an AWS CloudFormation template
func (t *Template) GetAllWAFv2RegexPatternSetResources() map[string]*wafv2.RegexPatternSet {
results := map[string]*wafv2.RegexPatternSet{}
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/apigateway/aws-apigateway-domainname.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ type DomainName struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-mutualtlsauthentication
MutualTlsAuthentication *DomainName_MutualTlsAuthentication `json:"MutualTlsAuthentication,omitempty"`

// OwnershipVerificationCertificateArn AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-ownershipverificationcertificatearn
OwnershipVerificationCertificateArn string `json:"OwnershipVerificationCertificateArn,omitempty"`

// RegionalCertificateArn AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-regionalcertificatearn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ type DomainName_DomainNameConfiguration struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-endpointtype
EndpointType string `json:"EndpointType,omitempty"`

// OwnershipVerificationCertificateArn AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-ownershipverificationcertificatearn
OwnershipVerificationCertificateArn string `json:"OwnershipVerificationCertificateArn,omitempty"`

// SecurityPolicy AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-securitypolicy
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/autoscaling/aws-autoscaling-scalingpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ type ScalingPolicy struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-policytype
PolicyType string `json:"PolicyType,omitempty"`

// PredictiveScalingConfiguration AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration
PredictiveScalingConfiguration *ScalingPolicy_PredictiveScalingConfiguration `json:"PredictiveScalingConfiguration,omitempty"`

// ScalingAdjustment AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-scalingadjustment
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package autoscaling

import (
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// ScalingPolicy_PredictiveScalingConfiguration AWS CloudFormation Resource (AWS::AutoScaling::ScalingPolicy.PredictiveScalingConfiguration)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html
type ScalingPolicy_PredictiveScalingConfiguration struct {

// MaxCapacityBreachBehavior AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-maxcapacitybreachbehavior
MaxCapacityBreachBehavior string `json:"MaxCapacityBreachBehavior,omitempty"`

// MaxCapacityBuffer AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-maxcapacitybuffer
MaxCapacityBuffer int `json:"MaxCapacityBuffer,omitempty"`

// MetricSpecifications AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-metricspecifications
MetricSpecifications []ScalingPolicy_PredictiveScalingMetricSpecification `json:"MetricSpecifications,omitempty"`

// Mode AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-mode
Mode string `json:"Mode,omitempty"`

// SchedulingBufferTime AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-schedulingbuffertime
SchedulingBufferTime int `json:"SchedulingBufferTime,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *ScalingPolicy_PredictiveScalingConfiguration) AWSCloudFormationType() string {
return "AWS::AutoScaling::ScalingPolicy.PredictiveScalingConfiguration"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package autoscaling

import (
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// ScalingPolicy_PredictiveScalingMetricSpecification AWS CloudFormation Resource (AWS::AutoScaling::ScalingPolicy.PredictiveScalingMetricSpecification)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html
type ScalingPolicy_PredictiveScalingMetricSpecification struct {

// PredefinedLoadMetricSpecification AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-predefinedloadmetricspecification
PredefinedLoadMetricSpecification *ScalingPolicy_PredictiveScalingPredefinedLoadMetric `json:"PredefinedLoadMetricSpecification,omitempty"`

// PredefinedMetricPairSpecification AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-predefinedmetricpairspecification
PredefinedMetricPairSpecification *ScalingPolicy_PredictiveScalingPredefinedMetricPair `json:"PredefinedMetricPairSpecification,omitempty"`

// PredefinedScalingMetricSpecification AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-predefinedscalingmetricspecification
PredefinedScalingMetricSpecification *ScalingPolicy_PredictiveScalingPredefinedScalingMetric `json:"PredefinedScalingMetricSpecification,omitempty"`

// TargetValue AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-targetvalue
TargetValue float64 `json:"TargetValue"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *ScalingPolicy_PredictiveScalingMetricSpecification) AWSCloudFormationType() string {
return "AWS::AutoScaling::ScalingPolicy.PredictiveScalingMetricSpecification"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package autoscaling

import (
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// ScalingPolicy_PredictiveScalingPredefinedLoadMetric AWS CloudFormation Resource (AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedLoadMetric)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric.html
type ScalingPolicy_PredictiveScalingPredefinedLoadMetric struct {

// PredefinedMetricType AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric-predefinedmetrictype
PredefinedMetricType string `json:"PredefinedMetricType,omitempty"`

// ResourceLabel AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric-resourcelabel
ResourceLabel string `json:"ResourceLabel,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *ScalingPolicy_PredictiveScalingPredefinedLoadMetric) AWSCloudFormationType() string {
return "AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedLoadMetric"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package autoscaling

import (
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// ScalingPolicy_PredictiveScalingPredefinedMetricPair AWS CloudFormation Resource (AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedMetricPair)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair.html
type ScalingPolicy_PredictiveScalingPredefinedMetricPair struct {

// PredefinedMetricType AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair-predefinedmetrictype
PredefinedMetricType string `json:"PredefinedMetricType,omitempty"`

// ResourceLabel AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair-resourcelabel
ResourceLabel string `json:"ResourceLabel,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *ScalingPolicy_PredictiveScalingPredefinedMetricPair) AWSCloudFormationType() string {
return "AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedMetricPair"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package autoscaling

import (
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// ScalingPolicy_PredictiveScalingPredefinedScalingMetric AWS CloudFormation Resource (AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedScalingMetric)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric.html
type ScalingPolicy_PredictiveScalingPredefinedScalingMetric struct {

// PredefinedMetricType AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric-predefinedmetrictype
PredefinedMetricType string `json:"PredefinedMetricType,omitempty"`

// ResourceLabel AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric-resourcelabel
ResourceLabel string `json:"ResourceLabel,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *ScalingPolicy_PredictiveScalingPredefinedScalingMetric) AWSCloudFormationType() string {
return "AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedScalingMetric"
}
10 changes: 10 additions & 0 deletions cloudformation/codebuild/aws-codebuild-project.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ type Project struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-queuedtimeoutinminutes
QueuedTimeoutInMinutes int `json:"QueuedTimeoutInMinutes,omitempty"`

// ResourceAccessRole AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-resourceaccessrole
ResourceAccessRole string `json:"ResourceAccessRole,omitempty"`

// SecondaryArtifacts AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-secondaryartifacts
Expand Down Expand Up @@ -118,6 +123,11 @@ type Project struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-triggers
Triggers *Project_ProjectTriggers `json:"Triggers,omitempty"`

// Visibility AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-visibility
Visibility string `json:"Visibility,omitempty"`

// VpcConfig AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-vpcconfig
Expand Down
Loading

0 comments on commit 29b95cb

Please sign in to comment.