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

CloudFormation Updates #398

Merged
merged 1 commit into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
5 changes: 5 additions & 0 deletions cloudformation/ce/aws-ce-costcategory.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ type CostCategory struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-rules
Rules string `json:"Rules,omitempty"`

// SplitChargeRules AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-splitchargerules
SplitChargeRules string `json:"SplitChargeRules,omitempty"`

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

Expand Down
Loading