Skip to content

Commit

Permalink
fix(schema): CloudFormation Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMaddox committed Jul 22, 2021
1 parent a40b836 commit a2d10fb
Show file tree
Hide file tree
Showing 31 changed files with 2,220 additions and 66 deletions.
51 changes: 51 additions & 0 deletions cloudformation/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ import (
"github.com/awslabs/goformation/v5/cloudformation/licensemanager"
"github.com/awslabs/goformation/v5/cloudformation/location"
"github.com/awslabs/goformation/v5/cloudformation/logs"
"github.com/awslabs/goformation/v5/cloudformation/lookoutequipment"
"github.com/awslabs/goformation/v5/cloudformation/lookoutmetrics"
"github.com/awslabs/goformation/v5/cloudformation/lookoutvision"
"github.com/awslabs/goformation/v5/cloudformation/macie"
Expand Down Expand Up @@ -689,7 +690,9 @@ func AllResources() map[string]Resource {
"AWS::Logs::LogStream": &logs.LogStream{},
"AWS::Logs::MetricFilter": &logs.MetricFilter{},
"AWS::Logs::QueryDefinition": &logs.QueryDefinition{},
"AWS::Logs::ResourcePolicy": &logs.ResourcePolicy{},
"AWS::Logs::SubscriptionFilter": &logs.SubscriptionFilter{},
"AWS::LookoutEquipment::InferenceScheduler": &lookoutequipment.InferenceScheduler{},
"AWS::LookoutMetrics::Alert": &lookoutmetrics.Alert{},
"AWS::LookoutMetrics::AnomalyDetector": &lookoutmetrics.AnomalyDetector{},
"AWS::LookoutVision::Project": &lookoutvision.Project{},
Expand Down Expand Up @@ -13343,6 +13346,30 @@ func (t *Template) GetLogsQueryDefinitionWithName(name string) (*logs.QueryDefin
return nil, fmt.Errorf("resource %q of type logs.QueryDefinition not found", name)
}

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

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

// GetAllLogsSubscriptionFilterResources retrieves all logs.SubscriptionFilter items from an AWS CloudFormation template
func (t *Template) GetAllLogsSubscriptionFilterResources() map[string]*logs.SubscriptionFilter {
results := map[string]*logs.SubscriptionFilter{}
Expand All @@ -13367,6 +13394,30 @@ func (t *Template) GetLogsSubscriptionFilterWithName(name string) (*logs.Subscri
return nil, fmt.Errorf("resource %q of type logs.SubscriptionFilter not found", name)
}

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

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

// GetAllLookoutMetricsAlertResources retrieves all lookoutmetrics.Alert items from an AWS CloudFormation template
func (t *Template) GetAllLookoutMetricsAlertResources() map[string]*lookoutmetrics.Alert {
results := map[string]*lookoutmetrics.Alert{}
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/cassandra/aws-cassandra-table.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ type Table struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-clusteringkeycolumns
ClusteringKeyColumns []Table_ClusteringKeyColumn `json:"ClusteringKeyColumns,omitempty"`

// EncryptionSpecification AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-encryptionspecification
EncryptionSpecification *Table_EncryptionSpecification `json:"EncryptionSpecification,omitempty"`

// KeyspaceName AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-keyspacename
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package cassandra

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

// Table_EncryptionSpecification AWS CloudFormation Resource (AWS::Cassandra::Table.EncryptionSpecification)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-encryptionspecification.html
type Table_EncryptionSpecification struct {

// EncryptionType AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-encryptionspecification.html#cfn-cassandra-table-encryptionspecification-encryptiontype
EncryptionType string `json:"EncryptionType,omitempty"`

// KmsKeyIdentifier AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-encryptionspecification.html#cfn-cassandra-table-encryptionspecification-kmskeyidentifier
KmsKeyIdentifier string `json:"KmsKeyIdentifier,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 *Table_EncryptionSpecification) AWSCloudFormationType() string {
return "AWS::Cassandra::Table.EncryptionSpecification"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import (
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricdataquery.html
type Alarm_MetricDataQuery struct {

// AccountId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricdataquery.html#cfn-cloudwatch-alarm-metricdataquery-accountid
AccountId string `json:"AccountId,omitempty"`

// Expression AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricdataquery.html#cfn-cloudwatch-alarm-metricdataquery-expression
Expand Down
15 changes: 15 additions & 0 deletions cloudformation/ec2/aws-ec2-transitgateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ type TransitGateway struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-amazonsideasn
AmazonSideAsn int `json:"AmazonSideAsn,omitempty"`

// AssociationDefaultRouteTableId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-associationdefaultroutetableid
AssociationDefaultRouteTableId string `json:"AssociationDefaultRouteTableId,omitempty"`

// AutoAcceptSharedAttachments AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-autoacceptsharedattachments
Expand Down Expand Up @@ -48,11 +53,21 @@ type TransitGateway struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-multicastsupport
MulticastSupport string `json:"MulticastSupport,omitempty"`

// PropagationDefaultRouteTableId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-propagationdefaultroutetableid
PropagationDefaultRouteTableId string `json:"PropagationDefaultRouteTableId,omitempty"`

// Tags AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-tags
Tags []tags.Tag `json:"Tags,omitempty"`

// TransitGatewayCidrBlocks AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-transitgatewaycidrblocks
TransitGatewayCidrBlocks []string `json:"TransitGatewayCidrBlocks,omitempty"`

// VpnEcmpSupport AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html#cfn-ec2-transitgateway-vpnecmpsupport
Expand Down
10 changes: 10 additions & 0 deletions cloudformation/ec2/aws-ec2-vpccidrblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ type VPCCidrBlock struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html#cfn-ec2-vpccidrblock-cidrblock
CidrBlock string `json:"CidrBlock,omitempty"`

// Ipv6CidrBlock AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html#cfn-ec2-vpccidrblock-ipv6cidrblock
Ipv6CidrBlock string `json:"Ipv6CidrBlock,omitempty"`

// Ipv6Pool AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html#cfn-ec2-vpccidrblock-ipv6pool
Ipv6Pool string `json:"Ipv6Pool,omitempty"`

// VpcId AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html#cfn-ec2-vpccidrblock-vpcid
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/glue/aws-glue-crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ type Crawler struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html#cfn-glue-crawler-name
Name string `json:"Name,omitempty"`

// RecrawlPolicy AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html#cfn-glue-crawler-recrawlpolicy
RecrawlPolicy *Crawler_RecrawlPolicy `json:"RecrawlPolicy,omitempty"`

// Role AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html#cfn-glue-crawler-role
Expand Down
35 changes: 35 additions & 0 deletions cloudformation/glue/aws-glue-crawler_recrawlpolicy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package glue

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

// Crawler_RecrawlPolicy AWS CloudFormation Resource (AWS::Glue::Crawler.RecrawlPolicy)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-recrawlpolicy.html
type Crawler_RecrawlPolicy struct {

// RecrawlBehavior AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-recrawlpolicy.html#cfn-glue-crawler-recrawlpolicy-recrawlbehavior
RecrawlBehavior string `json:"RecrawlBehavior,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 *Crawler_RecrawlPolicy) AWSCloudFormationType() string {
return "AWS::Glue::Crawler.RecrawlPolicy"
}
5 changes: 5 additions & 0 deletions cloudformation/glue/aws-glue-database_databaseinput.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import (
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html
type Database_DatabaseInput struct {

// CreateTableDefaultPermissions AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-createtabledefaultpermissions
CreateTableDefaultPermissions []Database_PrincipalPrivileges `json:"CreateTableDefaultPermissions,omitempty"`

// Description AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-description
Expand Down
10 changes: 5 additions & 5 deletions cloudformation/glue/aws-glue-partition_schemareference.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html
type Partition_SchemaReference struct {

// SchameVersionId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html#cfn-glue-partition-schemareference-schameversionid
SchameVersionId string `json:"SchameVersionId,omitempty"`

// SchemaId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html#cfn-glue-partition-schemareference-schemaid
SchemaId *Partition_SchemaId `json:"SchemaId,omitempty"`

// SchemaVersionId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html#cfn-glue-partition-schemareference-schemaversionid
SchemaVersionId string `json:"SchemaVersionId,omitempty"`

// SchemaVersionNumber AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html#cfn-glue-partition-schemareference-schemaversionnumber
Expand Down
10 changes: 5 additions & 5 deletions cloudformation/glue/aws-glue-table_schemareference.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-schemareference.html
type Table_SchemaReference struct {

// SchameVersionId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-schemareference.html#cfn-glue-table-schemareference-schameversionid
SchameVersionId string `json:"SchameVersionId,omitempty"`

// SchemaId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-schemareference.html#cfn-glue-table-schemareference-schemaid
SchemaId *Table_SchemaId `json:"SchemaId,omitempty"`

// SchemaVersionId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-schemareference.html#cfn-glue-table-schemareference-schemaversionid
SchemaVersionId string `json:"SchemaVersionId,omitempty"`

// SchemaVersionNumber AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-schemareference.html#cfn-glue-table-schemareference-schemaversionnumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type ContainerRecipe struct {
// InstanceConfiguration AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-containerrecipe.html#cfn-imagebuilder-containerrecipe-instanceconfiguration
InstanceConfiguration interface{} `json:"InstanceConfiguration,omitempty"`
InstanceConfiguration *ContainerRecipe_InstanceConfiguration `json:"InstanceConfiguration,omitempty"`

// KmsKeyId AWS CloudFormation Property
// Required: false
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/imagebuilder/aws-imagebuilder-imagerecipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import (
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html
type ImageRecipe struct {

// AdditionalInstanceConfiguration AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-additionalinstanceconfiguration
AdditionalInstanceConfiguration *ImageRecipe_AdditionalInstanceConfiguration `json:"AdditionalInstanceConfiguration,omitempty"`

// BlockDeviceMappings AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-blockdevicemappings
Expand Down
Loading

0 comments on commit a2d10fb

Please sign in to comment.