Skip to content

Commit

Permalink
fix(schema): CloudFormation Updates (awslabs#347)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Maddox <paul.maddox@gmail.com>
  • Loading branch information
github-actions[bot] and PaulMaddox authored Feb 9, 2021
1 parent 941eb7c commit d49d514
Show file tree
Hide file tree
Showing 47 changed files with 6,462 additions and 3,749 deletions.
100 changes: 100 additions & 0 deletions cloudformation/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ func AllResources() map[string]Resource {
"AWS::EC2::Volume": &ec2.Volume{},
"AWS::EC2::VolumeAttachment": &ec2.VolumeAttachment{},
"AWS::ECR::PublicRepository": &ecr.PublicRepository{},
"AWS::ECR::RegistryPolicy": &ecr.RegistryPolicy{},
"AWS::ECR::ReplicationConfiguration": &ecr.ReplicationConfiguration{},
"AWS::ECR::Repository": &ecr.Repository{},
"AWS::ECS::CapacityProvider": &ecs.CapacityProvider{},
"AWS::ECS::Cluster": &ecs.Cluster{},
Expand All @@ -432,6 +434,7 @@ func AllResources() map[string]Resource {
"AWS::EMR::Step": &emr.Step{},
"AWS::EMRContainers::VirtualCluster": &emrcontainers.VirtualCluster{},
"AWS::ElastiCache::CacheCluster": &elasticache.CacheCluster{},
"AWS::ElastiCache::GlobalReplicationGroup": &elasticache.GlobalReplicationGroup{},
"AWS::ElastiCache::ParameterGroup": &elasticache.ParameterGroup{},
"AWS::ElastiCache::ReplicationGroup": &elasticache.ReplicationGroup{},
"AWS::ElastiCache::SecurityGroup": &elasticache.SecurityGroup{},
Expand Down Expand Up @@ -525,6 +528,7 @@ func AllResources() map[string]Resource {
"AWS::IVS::PlaybackKeyPair": &ivs.PlaybackKeyPair{},
"AWS::IVS::StreamKey": &ivs.StreamKey{},
"AWS::ImageBuilder::Component": &imagebuilder.Component{},
"AWS::ImageBuilder::ContainerRecipe": &imagebuilder.ContainerRecipe{},
"AWS::ImageBuilder::DistributionConfiguration": &imagebuilder.DistributionConfiguration{},
"AWS::ImageBuilder::Image": &imagebuilder.Image{},
"AWS::ImageBuilder::ImagePipeline": &imagebuilder.ImagePipeline{},
Expand Down Expand Up @@ -7070,6 +7074,54 @@ func (t *Template) GetECRPublicRepositoryWithName(name string) (*ecr.PublicRepos
return nil, fmt.Errorf("resource %q of type ecr.PublicRepository not found", name)
}

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

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

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

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

// GetAllECRRepositoryResources retrieves all ecr.Repository items from an AWS CloudFormation template
func (t *Template) GetAllECRRepositoryResources() map[string]*ecr.Repository {
results := map[string]*ecr.Repository{}
Expand Down Expand Up @@ -7550,6 +7602,30 @@ func (t *Template) GetElastiCacheCacheClusterWithName(name string) (*elasticache
return nil, fmt.Errorf("resource %q of type elasticache.CacheCluster not found", name)
}

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

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

// GetAllElastiCacheParameterGroupResources retrieves all elasticache.ParameterGroup items from an AWS CloudFormation template
func (t *Template) GetAllElastiCacheParameterGroupResources() map[string]*elasticache.ParameterGroup {
results := map[string]*elasticache.ParameterGroup{}
Expand Down Expand Up @@ -9782,6 +9858,30 @@ func (t *Template) GetImageBuilderComponentWithName(name string) (*imagebuilder.
return nil, fmt.Errorf("resource %q of type imagebuilder.Component not found", name)
}

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

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

// GetAllImageBuilderDistributionConfigurationResources retrieves all imagebuilder.DistributionConfiguration items from an AWS CloudFormation template
func (t *Template) GetAllImageBuilderDistributionConfigurationResources() map[string]*imagebuilder.DistributionConfiguration {
results := map[string]*imagebuilder.DistributionConfiguration{}
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/appmesh/aws-appmesh-gatewayroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
type GatewayRoute struct {

// GatewayRouteName AWS CloudFormation Property
// Required: true
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-gatewayroute.html#cfn-appmesh-gatewayroute-gatewayroutename
GatewayRouteName string `json:"GatewayRouteName,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion cloudformation/appmesh/aws-appmesh-mesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
type Mesh struct {

// MeshName AWS CloudFormation Property
// Required: true
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-mesh.html#cfn-appmesh-mesh-meshname
MeshName string `json:"MeshName,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion cloudformation/appmesh/aws-appmesh-route.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Route struct {
MeshOwner string `json:"MeshOwner,omitempty"`

// RouteName AWS CloudFormation Property
// Required: true
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html#cfn-appmesh-route-routename
RouteName string `json:"RouteName,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion cloudformation/appmesh/aws-appmesh-virtualgateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type VirtualGateway struct {
Tags []tags.Tag `json:"Tags,omitempty"`

// VirtualGatewayName AWS CloudFormation Property
// Required: true
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-virtualgateway.html#cfn-appmesh-virtualgateway-virtualgatewayname
VirtualGatewayName string `json:"VirtualGatewayName,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion cloudformation/appmesh/aws-appmesh-virtualnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type VirtualNode struct {
Tags []tags.Tag `json:"Tags,omitempty"`

// VirtualNodeName AWS CloudFormation Property
// Required: true
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-virtualnode.html#cfn-appmesh-virtualnode-virtualnodename
VirtualNodeName string `json:"VirtualNodeName,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion cloudformation/appmesh/aws-appmesh-virtualrouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type VirtualRouter struct {
Tags []tags.Tag `json:"Tags,omitempty"`

// VirtualRouterName AWS CloudFormation Property
// Required: true
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-virtualrouter.html#cfn-appmesh-virtualrouter-virtualroutername
VirtualRouterName string `json:"VirtualRouterName,omitempty"`

Expand Down
6 changes: 6 additions & 0 deletions cloudformation/cassandra/aws-cassandra-keyspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"

"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v4/cloudformation/tags"
)

// Keyspace AWS CloudFormation Resource (AWS::Cassandra::Keyspace)
Expand All @@ -17,6 +18,11 @@ type Keyspace struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-keyspace.html#cfn-cassandra-keyspace-keyspacename
KeyspaceName string `json:"KeyspaceName,omitempty"`

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

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

Expand Down
11 changes: 11 additions & 0 deletions cloudformation/cassandra/aws-cassandra-table.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"

"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v4/cloudformation/tags"
)

// Table AWS CloudFormation Resource (AWS::Cassandra::Table)
Expand All @@ -32,6 +33,11 @@ type Table struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-partitionkeycolumns
PartitionKeyColumns []Table_Column `json:"PartitionKeyColumns,omitempty"`

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

// RegularColumns AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-regularcolumns
Expand All @@ -42,6 +48,11 @@ type Table struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-tablename
TableName string `json:"TableName,omitempty"`

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

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

Expand Down
5 changes: 5 additions & 0 deletions cloudformation/cloudwatch/aws-cloudwatch-metricstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ type MetricStream struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-name
Name string `json:"Name,omitempty"`

// OutputFormat AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-outputformat
OutputFormat string `json:"OutputFormat,omitempty"`

// RoleArn AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-rolearn
Expand Down
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-cognito-userpoolclient-analyticsconfiguration.html
type UserPoolClient_AnalyticsConfiguration struct {

// ApplicationArn AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolclient-analyticsconfiguration.html#cfn-cognito-userpoolclient-analyticsconfiguration-applicationarn
ApplicationArn string `json:"ApplicationArn,omitempty"`

// ApplicationId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolclient-analyticsconfiguration.html#cfn-cognito-userpoolclient-analyticsconfiguration-applicationid
Expand Down
35 changes: 35 additions & 0 deletions cloudformation/databrew/aws-databrew-job_csvoutputoptions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package databrew

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

// Job_CsvOutputOptions AWS CloudFormation Resource (AWS::DataBrew::Job.CsvOutputOptions)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-csvoutputoptions.html
type Job_CsvOutputOptions struct {

// Delimiter AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-csvoutputoptions.html#cfn-databrew-job-csvoutputoptions-delimiter
Delimiter string `json:"Delimiter,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 *Job_CsvOutputOptions) AWSCloudFormationType() string {
return "AWS::DataBrew::Job.CsvOutputOptions"
}
5 changes: 5 additions & 0 deletions cloudformation/databrew/aws-databrew-job_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ type Job_Output struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-format
Format string `json:"Format,omitempty"`

// FormatOptions AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-formatoptions
FormatOptions *Job_OutputFormatOptions `json:"FormatOptions,omitempty"`

// Location AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-location
Expand Down
35 changes: 35 additions & 0 deletions cloudformation/databrew/aws-databrew-job_outputformatoptions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package databrew

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

// Job_OutputFormatOptions AWS CloudFormation Resource (AWS::DataBrew::Job.OutputFormatOptions)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-outputformatoptions.html
type Job_OutputFormatOptions struct {

// Csv AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-outputformatoptions.html#cfn-databrew-job-outputformatoptions-csv
Csv *Job_CsvOutputOptions `json:"Csv,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 *Job_OutputFormatOptions) AWSCloudFormationType() string {
return "AWS::DataBrew::Job.OutputFormatOptions"
}
Loading

0 comments on commit d49d514

Please sign in to comment.