From 551356c0fd30ccd06e28ed7104d02278e2865f86 Mon Sep 17 00:00:00 2001 From: Paul Maddox Date: Fri, 6 Nov 2020 00:22:35 +0000 Subject: [PATCH] fix(schema): CloudFormation Updates --- cloudformation/all.go | 100 +++++ .../aws-batch-jobdefinition_evaluateonexit.go | 50 +++ .../aws-batch-jobdefinition_retrystrategy.go | 5 + .../cloudwatch/aws-cloudwatch-metricstream.go | 132 ++++++ ...udwatch-metricstream_metricstreamfilter.go | 35 ++ .../codeartifact/aws-codeartifact-domain.go | 6 + .../aws-codeartifact-repository.go | 6 + cloudformation/events/aws-events-archive.go | 121 +++++ .../iot/aws-iot-domainconfiguration.go | 141 ++++++ ...ot-domainconfiguration_authorizerconfig.go | 40 ++ ...nconfiguration_servercertificatesummary.go | 45 ++ .../iot/aws-iot-domainconfiguration_tags.go | 35 ++ .../kendra/aws-kendra-datasource.go | 4 +- ...ra-datasource_s3datasourceconfiguration.go | 5 + cloudformation/rds/aws-rds-globalcluster.go | 131 ++++++ .../aws-secretsmanager-resourcepolicy.go | 5 + schema/cloudformation.go | 423 +++++++++++++++++- schema/cloudformation.schema.json | 423 +++++++++++++++++- schema/sam.go | 423 +++++++++++++++++- schema/sam.schema.json | 423 +++++++++++++++++- 20 files changed, 2543 insertions(+), 10 deletions(-) create mode 100644 cloudformation/batch/aws-batch-jobdefinition_evaluateonexit.go create mode 100644 cloudformation/cloudwatch/aws-cloudwatch-metricstream.go create mode 100644 cloudformation/cloudwatch/aws-cloudwatch-metricstream_metricstreamfilter.go create mode 100644 cloudformation/events/aws-events-archive.go create mode 100644 cloudformation/iot/aws-iot-domainconfiguration.go create mode 100644 cloudformation/iot/aws-iot-domainconfiguration_authorizerconfig.go create mode 100644 cloudformation/iot/aws-iot-domainconfiguration_servercertificatesummary.go create mode 100644 cloudformation/iot/aws-iot-domainconfiguration_tags.go create mode 100644 cloudformation/rds/aws-rds-globalcluster.go diff --git a/cloudformation/all.go b/cloudformation/all.go index 550fd7e95f..1f66536bad 100644 --- a/cloudformation/all.go +++ b/cloudformation/all.go @@ -251,6 +251,7 @@ func AllResources() map[string]Resource { "AWS::CloudWatch::CompositeAlarm": &cloudwatch.CompositeAlarm{}, "AWS::CloudWatch::Dashboard": &cloudwatch.Dashboard{}, "AWS::CloudWatch::InsightRule": &cloudwatch.InsightRule{}, + "AWS::CloudWatch::MetricStream": &cloudwatch.MetricStream{}, "AWS::CodeArtifact::Domain": &codeartifact.Domain{}, "AWS::CodeArtifact::Repository": &codeartifact.Repository{}, "AWS::CodeBuild::Project": &codebuild.Project{}, @@ -411,6 +412,7 @@ func AllResources() map[string]Resource { "AWS::EventSchemas::Registry": &eventschemas.Registry{}, "AWS::EventSchemas::RegistryPolicy": &eventschemas.RegistryPolicy{}, "AWS::EventSchemas::Schema": &eventschemas.Schema{}, + "AWS::Events::Archive": &events.Archive{}, "AWS::Events::EventBus": &events.EventBus{}, "AWS::Events::EventBusPolicy": &events.EventBusPolicy{}, "AWS::Events::Rule": &events.Rule{}, @@ -489,6 +491,7 @@ func AllResources() map[string]Resource { "AWS::IoT1Click::Project": &iot1click.Project{}, "AWS::IoT::Authorizer": &iot.Authorizer{}, "AWS::IoT::Certificate": &iot.Certificate{}, + "AWS::IoT::DomainConfiguration": &iot.DomainConfiguration{}, "AWS::IoT::Policy": &iot.Policy{}, "AWS::IoT::PolicyPrincipalAttachment": &iot.PolicyPrincipalAttachment{}, "AWS::IoT::ProvisioningTemplate": &iot.ProvisioningTemplate{}, @@ -609,6 +612,7 @@ func AllResources() map[string]Resource { "AWS::RDS::DBSecurityGroupIngress": &rds.DBSecurityGroupIngress{}, "AWS::RDS::DBSubnetGroup": &rds.DBSubnetGroup{}, "AWS::RDS::EventSubscription": &rds.EventSubscription{}, + "AWS::RDS::GlobalCluster": &rds.GlobalCluster{}, "AWS::RDS::OptionGroup": &rds.OptionGroup{}, "AWS::Redshift::Cluster": &redshift.Cluster{}, "AWS::Redshift::ClusterParameterGroup": &redshift.ClusterParameterGroup{}, @@ -3466,6 +3470,30 @@ func (t *Template) GetCloudWatchInsightRuleWithName(name string) (*cloudwatch.In return nil, fmt.Errorf("resource %q of type cloudwatch.InsightRule not found", name) } +// GetAllCloudWatchMetricStreamResources retrieves all cloudwatch.MetricStream items from an AWS CloudFormation template +func (t *Template) GetAllCloudWatchMetricStreamResources() map[string]*cloudwatch.MetricStream { + results := map[string]*cloudwatch.MetricStream{} + for name, untyped := range t.Resources { + switch resource := untyped.(type) { + case *cloudwatch.MetricStream: + results[name] = resource + } + } + return results +} + +// GetCloudWatchMetricStreamWithName retrieves all cloudwatch.MetricStream items from an AWS CloudFormation template +// whose logical ID matches the provided name. Returns an error if not found. +func (t *Template) GetCloudWatchMetricStreamWithName(name string) (*cloudwatch.MetricStream, error) { + if untyped, ok := t.Resources[name]; ok { + switch resource := untyped.(type) { + case *cloudwatch.MetricStream: + return resource, nil + } + } + return nil, fmt.Errorf("resource %q of type cloudwatch.MetricStream not found", name) +} + // GetAllCodeArtifactDomainResources retrieves all codeartifact.Domain items from an AWS CloudFormation template func (t *Template) GetAllCodeArtifactDomainResources() map[string]*codeartifact.Domain { results := map[string]*codeartifact.Domain{} @@ -7306,6 +7334,30 @@ func (t *Template) GetEventSchemasSchemaWithName(name string) (*eventschemas.Sch return nil, fmt.Errorf("resource %q of type eventschemas.Schema not found", name) } +// GetAllEventsArchiveResources retrieves all events.Archive items from an AWS CloudFormation template +func (t *Template) GetAllEventsArchiveResources() map[string]*events.Archive { + results := map[string]*events.Archive{} + for name, untyped := range t.Resources { + switch resource := untyped.(type) { + case *events.Archive: + results[name] = resource + } + } + return results +} + +// GetEventsArchiveWithName retrieves all events.Archive items from an AWS CloudFormation template +// whose logical ID matches the provided name. Returns an error if not found. +func (t *Template) GetEventsArchiveWithName(name string) (*events.Archive, error) { + if untyped, ok := t.Resources[name]; ok { + switch resource := untyped.(type) { + case *events.Archive: + return resource, nil + } + } + return nil, fmt.Errorf("resource %q of type events.Archive not found", name) +} + // GetAllEventsEventBusResources retrieves all events.EventBus items from an AWS CloudFormation template func (t *Template) GetAllEventsEventBusResources() map[string]*events.EventBus { results := map[string]*events.EventBus{} @@ -9178,6 +9230,30 @@ func (t *Template) GetIoTCertificateWithName(name string) (*iot.Certificate, err return nil, fmt.Errorf("resource %q of type iot.Certificate not found", name) } +// GetAllIoTDomainConfigurationResources retrieves all iot.DomainConfiguration items from an AWS CloudFormation template +func (t *Template) GetAllIoTDomainConfigurationResources() map[string]*iot.DomainConfiguration { + results := map[string]*iot.DomainConfiguration{} + for name, untyped := range t.Resources { + switch resource := untyped.(type) { + case *iot.DomainConfiguration: + results[name] = resource + } + } + return results +} + +// GetIoTDomainConfigurationWithName retrieves all iot.DomainConfiguration items from an AWS CloudFormation template +// whose logical ID matches the provided name. Returns an error if not found. +func (t *Template) GetIoTDomainConfigurationWithName(name string) (*iot.DomainConfiguration, error) { + if untyped, ok := t.Resources[name]; ok { + switch resource := untyped.(type) { + case *iot.DomainConfiguration: + return resource, nil + } + } + return nil, fmt.Errorf("resource %q of type iot.DomainConfiguration not found", name) +} + // GetAllIoTPolicyResources retrieves all iot.Policy items from an AWS CloudFormation template func (t *Template) GetAllIoTPolicyResources() map[string]*iot.Policy { results := map[string]*iot.Policy{} @@ -12058,6 +12134,30 @@ func (t *Template) GetRDSEventSubscriptionWithName(name string) (*rds.EventSubsc return nil, fmt.Errorf("resource %q of type rds.EventSubscription not found", name) } +// GetAllRDSGlobalClusterResources retrieves all rds.GlobalCluster items from an AWS CloudFormation template +func (t *Template) GetAllRDSGlobalClusterResources() map[string]*rds.GlobalCluster { + results := map[string]*rds.GlobalCluster{} + for name, untyped := range t.Resources { + switch resource := untyped.(type) { + case *rds.GlobalCluster: + results[name] = resource + } + } + return results +} + +// GetRDSGlobalClusterWithName retrieves all rds.GlobalCluster items from an AWS CloudFormation template +// whose logical ID matches the provided name. Returns an error if not found. +func (t *Template) GetRDSGlobalClusterWithName(name string) (*rds.GlobalCluster, error) { + if untyped, ok := t.Resources[name]; ok { + switch resource := untyped.(type) { + case *rds.GlobalCluster: + return resource, nil + } + } + return nil, fmt.Errorf("resource %q of type rds.GlobalCluster not found", name) +} + // GetAllRDSOptionGroupResources retrieves all rds.OptionGroup items from an AWS CloudFormation template func (t *Template) GetAllRDSOptionGroupResources() map[string]*rds.OptionGroup { results := map[string]*rds.OptionGroup{} diff --git a/cloudformation/batch/aws-batch-jobdefinition_evaluateonexit.go b/cloudformation/batch/aws-batch-jobdefinition_evaluateonexit.go new file mode 100644 index 0000000000..656b6fa7ca --- /dev/null +++ b/cloudformation/batch/aws-batch-jobdefinition_evaluateonexit.go @@ -0,0 +1,50 @@ +package batch + +import ( + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// JobDefinition_EvaluateOnExit AWS CloudFormation Resource (AWS::Batch::JobDefinition.EvaluateOnExit) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html +type JobDefinition_EvaluateOnExit struct { + + // Action AWS CloudFormation Property + // Required: true + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-action + Action string `json:"Action,omitempty"` + + // OnExitCode AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onexitcode + OnExitCode string `json:"OnExitCode,omitempty"` + + // OnReason AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onreason + OnReason string `json:"OnReason,omitempty"` + + // OnStatusReason AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onstatusreason + OnStatusReason string `json:"OnStatusReason,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 *JobDefinition_EvaluateOnExit) AWSCloudFormationType() string { + return "AWS::Batch::JobDefinition.EvaluateOnExit" +} diff --git a/cloudformation/batch/aws-batch-jobdefinition_retrystrategy.go b/cloudformation/batch/aws-batch-jobdefinition_retrystrategy.go index 57f61d68ff..4b598ca10b 100644 --- a/cloudformation/batch/aws-batch-jobdefinition_retrystrategy.go +++ b/cloudformation/batch/aws-batch-jobdefinition_retrystrategy.go @@ -13,6 +13,11 @@ type JobDefinition_RetryStrategy struct { // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-retrystrategy.html#cfn-batch-jobdefinition-retrystrategy-attempts Attempts int `json:"Attempts,omitempty"` + // EvaluateOnExit AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-retrystrategy.html#cfn-batch-jobdefinition-retrystrategy-evaluateonexit + EvaluateOnExit []JobDefinition_EvaluateOnExit `json:"EvaluateOnExit,omitempty"` + // AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"` diff --git a/cloudformation/cloudwatch/aws-cloudwatch-metricstream.go b/cloudformation/cloudwatch/aws-cloudwatch-metricstream.go new file mode 100644 index 0000000000..06063b628b --- /dev/null +++ b/cloudformation/cloudwatch/aws-cloudwatch-metricstream.go @@ -0,0 +1,132 @@ +package cloudwatch + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/awslabs/goformation/v4/cloudformation/policies" + "github.com/awslabs/goformation/v4/cloudformation/tags" +) + +// MetricStream AWS CloudFormation Resource (AWS::CloudWatch::MetricStream) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html +type MetricStream struct { + + // ExcludeFilters AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-excludefilters + ExcludeFilters []MetricStream_MetricStreamFilter `json:"ExcludeFilters,omitempty"` + + // FirehoseArn AWS CloudFormation Property + // Required: true + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-firehosearn + FirehoseArn string `json:"FirehoseArn,omitempty"` + + // IncludeFilters AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-includefilters + IncludeFilters []MetricStream_MetricStreamFilter `json:"IncludeFilters,omitempty"` + + // Name AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-name + Name string `json:"Name,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 + RoleArn string `json:"RoleArn,omitempty"` + + // Tags AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-tags + Tags []tags.Tag `json:"Tags,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 *MetricStream) AWSCloudFormationType() string { + return "AWS::CloudWatch::MetricStream" +} + +// MarshalJSON is a custom JSON marshalling hook that embeds this object into +// an AWS CloudFormation JSON resource's 'Properties' field and adds a 'Type'. +func (r MetricStream) MarshalJSON() ([]byte, error) { + type Properties MetricStream + return json.Marshal(&struct { + Type string + Properties Properties + DependsOn []string `json:"DependsOn,omitempty"` + Metadata map[string]interface{} `json:"Metadata,omitempty"` + DeletionPolicy policies.DeletionPolicy `json:"DeletionPolicy,omitempty"` + UpdateReplacePolicy policies.UpdateReplacePolicy `json:"UpdateReplacePolicy,omitempty"` + Condition string `json:"Condition,omitempty"` + }{ + Type: r.AWSCloudFormationType(), + Properties: (Properties)(r), + DependsOn: r.AWSCloudFormationDependsOn, + Metadata: r.AWSCloudFormationMetadata, + DeletionPolicy: r.AWSCloudFormationDeletionPolicy, + UpdateReplacePolicy: r.AWSCloudFormationUpdateReplacePolicy, + Condition: r.AWSCloudFormationCondition, + }) +} + +// UnmarshalJSON is a custom JSON unmarshalling hook that strips the outer +// AWS CloudFormation resource object, and just keeps the 'Properties' field. +func (r *MetricStream) UnmarshalJSON(b []byte) error { + type Properties MetricStream + res := &struct { + Type string + Properties *Properties + DependsOn []string + Metadata map[string]interface{} + DeletionPolicy string + UpdateReplacePolicy string + Condition string + }{} + + dec := json.NewDecoder(bytes.NewReader(b)) + dec.DisallowUnknownFields() // Force error if unknown field is found + + if err := dec.Decode(&res); err != nil { + fmt.Printf("ERROR: %s\n", err) + return err + } + + // If the resource has no Properties set, it could be nil + if res.Properties != nil { + *r = MetricStream(*res.Properties) + } + if res.DependsOn != nil { + r.AWSCloudFormationDependsOn = res.DependsOn + } + if res.Metadata != nil { + r.AWSCloudFormationMetadata = res.Metadata + } + if res.DeletionPolicy != "" { + r.AWSCloudFormationDeletionPolicy = policies.DeletionPolicy(res.DeletionPolicy) + } + if res.UpdateReplacePolicy != "" { + r.AWSCloudFormationUpdateReplacePolicy = policies.UpdateReplacePolicy(res.UpdateReplacePolicy) + } + if res.Condition != "" { + r.AWSCloudFormationCondition = res.Condition + } + return nil +} diff --git a/cloudformation/cloudwatch/aws-cloudwatch-metricstream_metricstreamfilter.go b/cloudformation/cloudwatch/aws-cloudwatch-metricstream_metricstreamfilter.go new file mode 100644 index 0000000000..58c5534e5f --- /dev/null +++ b/cloudformation/cloudwatch/aws-cloudwatch-metricstream_metricstreamfilter.go @@ -0,0 +1,35 @@ +package cloudwatch + +import ( + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// MetricStream_MetricStreamFilter AWS CloudFormation Resource (AWS::CloudWatch::MetricStream.MetricStreamFilter) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html +type MetricStream_MetricStreamFilter struct { + + // Namespace AWS CloudFormation Property + // Required: true + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html#cfn-cloudwatch-metricstream-metricstreamfilter-namespace + Namespace string `json:"Namespace,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 *MetricStream_MetricStreamFilter) AWSCloudFormationType() string { + return "AWS::CloudWatch::MetricStream.MetricStreamFilter" +} diff --git a/cloudformation/codeartifact/aws-codeartifact-domain.go b/cloudformation/codeartifact/aws-codeartifact-domain.go index 8b36163656..6e67034e0b 100644 --- a/cloudformation/codeartifact/aws-codeartifact-domain.go +++ b/cloudformation/codeartifact/aws-codeartifact-domain.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/awslabs/goformation/v4/cloudformation/policies" + "github.com/awslabs/goformation/v4/cloudformation/tags" ) // Domain AWS CloudFormation Resource (AWS::CodeArtifact::Domain) @@ -22,6 +23,11 @@ type Domain struct { // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-domain.html#cfn-codeartifact-domain-permissionspolicydocument PermissionsPolicyDocument interface{} `json:"PermissionsPolicyDocument,omitempty"` + // Tags AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-domain.html#cfn-codeartifact-domain-tags + Tags []tags.Tag `json:"Tags,omitempty"` + // AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"` diff --git a/cloudformation/codeartifact/aws-codeartifact-repository.go b/cloudformation/codeartifact/aws-codeartifact-repository.go index 326be95beb..01bc144b61 100644 --- a/cloudformation/codeartifact/aws-codeartifact-repository.go +++ b/cloudformation/codeartifact/aws-codeartifact-repository.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/awslabs/goformation/v4/cloudformation/policies" + "github.com/awslabs/goformation/v4/cloudformation/tags" ) // Repository AWS CloudFormation Resource (AWS::CodeArtifact::Repository) @@ -32,6 +33,11 @@ type Repository struct { // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-repositoryname RepositoryName string `json:"RepositoryName,omitempty"` + // Tags AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-tags + Tags []tags.Tag `json:"Tags,omitempty"` + // Upstreams AWS CloudFormation Property // Required: false // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-upstreams diff --git a/cloudformation/events/aws-events-archive.go b/cloudformation/events/aws-events-archive.go new file mode 100644 index 0000000000..2d8950600b --- /dev/null +++ b/cloudformation/events/aws-events-archive.go @@ -0,0 +1,121 @@ +package events + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// Archive AWS CloudFormation Resource (AWS::Events::Archive) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html +type Archive struct { + + // Description AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-description + Description string `json:"Description,omitempty"` + + // EventPattern AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-eventpattern + EventPattern interface{} `json:"EventPattern,omitempty"` + + // RetentionDays AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-retentiondays + RetentionDays int `json:"RetentionDays,omitempty"` + + // SourceArn AWS CloudFormation Property + // Required: true + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-sourcearn + SourceArn string `json:"SourceArn,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 *Archive) AWSCloudFormationType() string { + return "AWS::Events::Archive" +} + +// MarshalJSON is a custom JSON marshalling hook that embeds this object into +// an AWS CloudFormation JSON resource's 'Properties' field and adds a 'Type'. +func (r Archive) MarshalJSON() ([]byte, error) { + type Properties Archive + return json.Marshal(&struct { + Type string + Properties Properties + DependsOn []string `json:"DependsOn,omitempty"` + Metadata map[string]interface{} `json:"Metadata,omitempty"` + DeletionPolicy policies.DeletionPolicy `json:"DeletionPolicy,omitempty"` + UpdateReplacePolicy policies.UpdateReplacePolicy `json:"UpdateReplacePolicy,omitempty"` + Condition string `json:"Condition,omitempty"` + }{ + Type: r.AWSCloudFormationType(), + Properties: (Properties)(r), + DependsOn: r.AWSCloudFormationDependsOn, + Metadata: r.AWSCloudFormationMetadata, + DeletionPolicy: r.AWSCloudFormationDeletionPolicy, + UpdateReplacePolicy: r.AWSCloudFormationUpdateReplacePolicy, + Condition: r.AWSCloudFormationCondition, + }) +} + +// UnmarshalJSON is a custom JSON unmarshalling hook that strips the outer +// AWS CloudFormation resource object, and just keeps the 'Properties' field. +func (r *Archive) UnmarshalJSON(b []byte) error { + type Properties Archive + res := &struct { + Type string + Properties *Properties + DependsOn []string + Metadata map[string]interface{} + DeletionPolicy string + UpdateReplacePolicy string + Condition string + }{} + + dec := json.NewDecoder(bytes.NewReader(b)) + dec.DisallowUnknownFields() // Force error if unknown field is found + + if err := dec.Decode(&res); err != nil { + fmt.Printf("ERROR: %s\n", err) + return err + } + + // If the resource has no Properties set, it could be nil + if res.Properties != nil { + *r = Archive(*res.Properties) + } + if res.DependsOn != nil { + r.AWSCloudFormationDependsOn = res.DependsOn + } + if res.Metadata != nil { + r.AWSCloudFormationMetadata = res.Metadata + } + if res.DeletionPolicy != "" { + r.AWSCloudFormationDeletionPolicy = policies.DeletionPolicy(res.DeletionPolicy) + } + if res.UpdateReplacePolicy != "" { + r.AWSCloudFormationUpdateReplacePolicy = policies.UpdateReplacePolicy(res.UpdateReplacePolicy) + } + if res.Condition != "" { + r.AWSCloudFormationCondition = res.Condition + } + return nil +} diff --git a/cloudformation/iot/aws-iot-domainconfiguration.go b/cloudformation/iot/aws-iot-domainconfiguration.go new file mode 100644 index 0000000000..f98dcc8544 --- /dev/null +++ b/cloudformation/iot/aws-iot-domainconfiguration.go @@ -0,0 +1,141 @@ +package iot + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// DomainConfiguration AWS CloudFormation Resource (AWS::IoT::DomainConfiguration) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html +type DomainConfiguration struct { + + // AuthorizerConfig AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-authorizerconfig + AuthorizerConfig *DomainConfiguration_AuthorizerConfig `json:"AuthorizerConfig,omitempty"` + + // DomainConfigurationName AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainconfigurationname + DomainConfigurationName string `json:"DomainConfigurationName,omitempty"` + + // DomainConfigurationStatus AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainconfigurationstatus + DomainConfigurationStatus string `json:"DomainConfigurationStatus,omitempty"` + + // DomainName AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainname + DomainName string `json:"DomainName,omitempty"` + + // ServerCertificateArns AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-servercertificatearns + ServerCertificateArns []string `json:"ServerCertificateArns,omitempty"` + + // ServiceType AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-servicetype + ServiceType string `json:"ServiceType,omitempty"` + + // Tags AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-tags + Tags *DomainConfiguration_Tags `json:"Tags,omitempty"` + + // ValidationCertificateArn AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-validationcertificatearn + ValidationCertificateArn string `json:"ValidationCertificateArn,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 *DomainConfiguration) AWSCloudFormationType() string { + return "AWS::IoT::DomainConfiguration" +} + +// MarshalJSON is a custom JSON marshalling hook that embeds this object into +// an AWS CloudFormation JSON resource's 'Properties' field and adds a 'Type'. +func (r DomainConfiguration) MarshalJSON() ([]byte, error) { + type Properties DomainConfiguration + return json.Marshal(&struct { + Type string + Properties Properties + DependsOn []string `json:"DependsOn,omitempty"` + Metadata map[string]interface{} `json:"Metadata,omitempty"` + DeletionPolicy policies.DeletionPolicy `json:"DeletionPolicy,omitempty"` + UpdateReplacePolicy policies.UpdateReplacePolicy `json:"UpdateReplacePolicy,omitempty"` + Condition string `json:"Condition,omitempty"` + }{ + Type: r.AWSCloudFormationType(), + Properties: (Properties)(r), + DependsOn: r.AWSCloudFormationDependsOn, + Metadata: r.AWSCloudFormationMetadata, + DeletionPolicy: r.AWSCloudFormationDeletionPolicy, + UpdateReplacePolicy: r.AWSCloudFormationUpdateReplacePolicy, + Condition: r.AWSCloudFormationCondition, + }) +} + +// UnmarshalJSON is a custom JSON unmarshalling hook that strips the outer +// AWS CloudFormation resource object, and just keeps the 'Properties' field. +func (r *DomainConfiguration) UnmarshalJSON(b []byte) error { + type Properties DomainConfiguration + res := &struct { + Type string + Properties *Properties + DependsOn []string + Metadata map[string]interface{} + DeletionPolicy string + UpdateReplacePolicy string + Condition string + }{} + + dec := json.NewDecoder(bytes.NewReader(b)) + dec.DisallowUnknownFields() // Force error if unknown field is found + + if err := dec.Decode(&res); err != nil { + fmt.Printf("ERROR: %s\n", err) + return err + } + + // If the resource has no Properties set, it could be nil + if res.Properties != nil { + *r = DomainConfiguration(*res.Properties) + } + if res.DependsOn != nil { + r.AWSCloudFormationDependsOn = res.DependsOn + } + if res.Metadata != nil { + r.AWSCloudFormationMetadata = res.Metadata + } + if res.DeletionPolicy != "" { + r.AWSCloudFormationDeletionPolicy = policies.DeletionPolicy(res.DeletionPolicy) + } + if res.UpdateReplacePolicy != "" { + r.AWSCloudFormationUpdateReplacePolicy = policies.UpdateReplacePolicy(res.UpdateReplacePolicy) + } + if res.Condition != "" { + r.AWSCloudFormationCondition = res.Condition + } + return nil +} diff --git a/cloudformation/iot/aws-iot-domainconfiguration_authorizerconfig.go b/cloudformation/iot/aws-iot-domainconfiguration_authorizerconfig.go new file mode 100644 index 0000000000..ff725b0535 --- /dev/null +++ b/cloudformation/iot/aws-iot-domainconfiguration_authorizerconfig.go @@ -0,0 +1,40 @@ +package iot + +import ( + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// DomainConfiguration_AuthorizerConfig AWS CloudFormation Resource (AWS::IoT::DomainConfiguration.AuthorizerConfig) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html +type DomainConfiguration_AuthorizerConfig struct { + + // AllowAuthorizerOverride AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html#cfn-iot-domainconfiguration-authorizerconfig-allowauthorizeroverride + AllowAuthorizerOverride bool `json:"AllowAuthorizerOverride,omitempty"` + + // DefaultAuthorizerName AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html#cfn-iot-domainconfiguration-authorizerconfig-defaultauthorizername + DefaultAuthorizerName string `json:"DefaultAuthorizerName,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 *DomainConfiguration_AuthorizerConfig) AWSCloudFormationType() string { + return "AWS::IoT::DomainConfiguration.AuthorizerConfig" +} diff --git a/cloudformation/iot/aws-iot-domainconfiguration_servercertificatesummary.go b/cloudformation/iot/aws-iot-domainconfiguration_servercertificatesummary.go new file mode 100644 index 0000000000..6701d00b3a --- /dev/null +++ b/cloudformation/iot/aws-iot-domainconfiguration_servercertificatesummary.go @@ -0,0 +1,45 @@ +package iot + +import ( + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// DomainConfiguration_ServerCertificateSummary AWS CloudFormation Resource (AWS::IoT::DomainConfiguration.ServerCertificateSummary) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html +type DomainConfiguration_ServerCertificateSummary struct { + + // ServerCertificateArn AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatearn + ServerCertificateArn string `json:"ServerCertificateArn,omitempty"` + + // ServerCertificateStatus AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatestatus + ServerCertificateStatus string `json:"ServerCertificateStatus,omitempty"` + + // ServerCertificateStatusDetail AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatestatusdetail + ServerCertificateStatusDetail string `json:"ServerCertificateStatusDetail,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 *DomainConfiguration_ServerCertificateSummary) AWSCloudFormationType() string { + return "AWS::IoT::DomainConfiguration.ServerCertificateSummary" +} diff --git a/cloudformation/iot/aws-iot-domainconfiguration_tags.go b/cloudformation/iot/aws-iot-domainconfiguration_tags.go new file mode 100644 index 0000000000..d105258f85 --- /dev/null +++ b/cloudformation/iot/aws-iot-domainconfiguration_tags.go @@ -0,0 +1,35 @@ +package iot + +import ( + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// DomainConfiguration_Tags AWS CloudFormation Resource (AWS::IoT::DomainConfiguration.Tags) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-tags.html +type DomainConfiguration_Tags struct { + + // Tags AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-tags.html#cfn-iot-domainconfiguration-tags-tags + Tags []interface{} `json:"Tags,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 *DomainConfiguration_Tags) AWSCloudFormationType() string { + return "AWS::IoT::DomainConfiguration.Tags" +} diff --git a/cloudformation/kendra/aws-kendra-datasource.go b/cloudformation/kendra/aws-kendra-datasource.go index 54dbc42eba..4058cc5cc7 100644 --- a/cloudformation/kendra/aws-kendra-datasource.go +++ b/cloudformation/kendra/aws-kendra-datasource.go @@ -13,7 +13,7 @@ import ( type DataSource struct { // DataSourceConfiguration AWS CloudFormation Property - // Required: true + // Required: false // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html#cfn-kendra-datasource-datasourceconfiguration DataSourceConfiguration *DataSource_DataSourceConfiguration `json:"DataSourceConfiguration,omitempty"` @@ -33,7 +33,7 @@ type DataSource struct { Name string `json:"Name,omitempty"` // RoleArn AWS CloudFormation Property - // Required: true + // Required: false // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html#cfn-kendra-datasource-rolearn RoleArn string `json:"RoleArn,omitempty"` diff --git a/cloudformation/kendra/aws-kendra-datasource_s3datasourceconfiguration.go b/cloudformation/kendra/aws-kendra-datasource_s3datasourceconfiguration.go index 57984a2cd6..e115c5788d 100644 --- a/cloudformation/kendra/aws-kendra-datasource_s3datasourceconfiguration.go +++ b/cloudformation/kendra/aws-kendra-datasource_s3datasourceconfiguration.go @@ -28,6 +28,11 @@ type DataSource_S3DataSourceConfiguration struct { // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-s3datasourceconfiguration.html#cfn-kendra-datasource-s3datasourceconfiguration-exclusionpatterns ExclusionPatterns *DataSource_DataSourceInclusionsExclusionsStrings `json:"ExclusionPatterns,omitempty"` + // InclusionPatterns AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-s3datasourceconfiguration.html#cfn-kendra-datasource-s3datasourceconfiguration-inclusionpatterns + InclusionPatterns *DataSource_DataSourceInclusionsExclusionsStrings `json:"InclusionPatterns,omitempty"` + // InclusionPrefixes AWS CloudFormation Property // Required: false // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-s3datasourceconfiguration.html#cfn-kendra-datasource-s3datasourceconfiguration-inclusionprefixes diff --git a/cloudformation/rds/aws-rds-globalcluster.go b/cloudformation/rds/aws-rds-globalcluster.go new file mode 100644 index 0000000000..17fec583b7 --- /dev/null +++ b/cloudformation/rds/aws-rds-globalcluster.go @@ -0,0 +1,131 @@ +package rds + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/awslabs/goformation/v4/cloudformation/policies" +) + +// GlobalCluster AWS CloudFormation Resource (AWS::RDS::GlobalCluster) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html +type GlobalCluster struct { + + // DeletionProtection AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-deletionprotection + DeletionProtection bool `json:"DeletionProtection,omitempty"` + + // Engine AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-engine + Engine string `json:"Engine,omitempty"` + + // EngineVersion AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-engineversion + EngineVersion string `json:"EngineVersion,omitempty"` + + // GlobalClusterIdentifier AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-globalclusteridentifier + GlobalClusterIdentifier string `json:"GlobalClusterIdentifier,omitempty"` + + // SourceDBClusterIdentifier AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-sourcedbclusteridentifier + SourceDBClusterIdentifier string `json:"SourceDBClusterIdentifier,omitempty"` + + // StorageEncrypted AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-storageencrypted + StorageEncrypted bool `json:"StorageEncrypted,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 *GlobalCluster) AWSCloudFormationType() string { + return "AWS::RDS::GlobalCluster" +} + +// MarshalJSON is a custom JSON marshalling hook that embeds this object into +// an AWS CloudFormation JSON resource's 'Properties' field and adds a 'Type'. +func (r GlobalCluster) MarshalJSON() ([]byte, error) { + type Properties GlobalCluster + return json.Marshal(&struct { + Type string + Properties Properties + DependsOn []string `json:"DependsOn,omitempty"` + Metadata map[string]interface{} `json:"Metadata,omitempty"` + DeletionPolicy policies.DeletionPolicy `json:"DeletionPolicy,omitempty"` + UpdateReplacePolicy policies.UpdateReplacePolicy `json:"UpdateReplacePolicy,omitempty"` + Condition string `json:"Condition,omitempty"` + }{ + Type: r.AWSCloudFormationType(), + Properties: (Properties)(r), + DependsOn: r.AWSCloudFormationDependsOn, + Metadata: r.AWSCloudFormationMetadata, + DeletionPolicy: r.AWSCloudFormationDeletionPolicy, + UpdateReplacePolicy: r.AWSCloudFormationUpdateReplacePolicy, + Condition: r.AWSCloudFormationCondition, + }) +} + +// UnmarshalJSON is a custom JSON unmarshalling hook that strips the outer +// AWS CloudFormation resource object, and just keeps the 'Properties' field. +func (r *GlobalCluster) UnmarshalJSON(b []byte) error { + type Properties GlobalCluster + res := &struct { + Type string + Properties *Properties + DependsOn []string + Metadata map[string]interface{} + DeletionPolicy string + UpdateReplacePolicy string + Condition string + }{} + + dec := json.NewDecoder(bytes.NewReader(b)) + dec.DisallowUnknownFields() // Force error if unknown field is found + + if err := dec.Decode(&res); err != nil { + fmt.Printf("ERROR: %s\n", err) + return err + } + + // If the resource has no Properties set, it could be nil + if res.Properties != nil { + *r = GlobalCluster(*res.Properties) + } + if res.DependsOn != nil { + r.AWSCloudFormationDependsOn = res.DependsOn + } + if res.Metadata != nil { + r.AWSCloudFormationMetadata = res.Metadata + } + if res.DeletionPolicy != "" { + r.AWSCloudFormationDeletionPolicy = policies.DeletionPolicy(res.DeletionPolicy) + } + if res.UpdateReplacePolicy != "" { + r.AWSCloudFormationUpdateReplacePolicy = policies.UpdateReplacePolicy(res.UpdateReplacePolicy) + } + if res.Condition != "" { + r.AWSCloudFormationCondition = res.Condition + } + return nil +} diff --git a/cloudformation/secretsmanager/aws-secretsmanager-resourcepolicy.go b/cloudformation/secretsmanager/aws-secretsmanager-resourcepolicy.go index 7f21c1d6b4..2698c6fc97 100644 --- a/cloudformation/secretsmanager/aws-secretsmanager-resourcepolicy.go +++ b/cloudformation/secretsmanager/aws-secretsmanager-resourcepolicy.go @@ -12,6 +12,11 @@ import ( // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html type ResourcePolicy struct { + // BlockPublicPolicy AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html#cfn-secretsmanager-resourcepolicy-blockpublicpolicy + BlockPublicPolicy bool `json:"BlockPublicPolicy,omitempty"` + // ResourcePolicy AWS CloudFormation Property // Required: true // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html#cfn-secretsmanager-resourcepolicy-resourcepolicy diff --git a/schema/cloudformation.go b/schema/cloudformation.go index 0276e86f57..10a87cbee6 100644 --- a/schema/cloudformation.go +++ b/schema/cloudformation.go @@ -13156,6 +13156,27 @@ var CloudformationSchema = `{ }, "type": "object" }, + "AWS::Batch::JobDefinition.EvaluateOnExit": { + "additionalProperties": false, + "properties": { + "Action": { + "type": "string" + }, + "OnExitCode": { + "type": "string" + }, + "OnReason": { + "type": "string" + }, + "OnStatusReason": { + "type": "string" + } + }, + "required": [ + "Action" + ], + "type": "object" + }, "AWS::Batch::JobDefinition.LinuxParameters": { "additionalProperties": false, "properties": { @@ -13277,6 +13298,12 @@ var CloudformationSchema = `{ "properties": { "Attempts": { "type": "number" + }, + "EvaluateOnExit": { + "items": { + "$ref": "#/definitions/AWS::Batch::JobDefinition.EvaluateOnExit" + }, + "type": "array" } }, "type": "object" @@ -16835,6 +16862,105 @@ var CloudformationSchema = `{ "properties": {}, "type": "object" }, + "AWS::CloudWatch::MetricStream": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "ExcludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "FirehoseArn": { + "type": "string" + }, + "IncludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "Name": { + "type": "string" + }, + "RoleArn": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "required": [ + "FirehoseArn", + "RoleArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::CloudWatch::MetricStream" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::CloudWatch::MetricStream.MetricStreamFilter": { + "additionalProperties": false, + "properties": { + "Namespace": { + "type": "string" + } + }, + "required": [ + "Namespace" + ], + "type": "object" + }, "AWS::CodeArtifact::Domain": { "additionalProperties": false, "properties": { @@ -16872,6 +16998,12 @@ var CloudformationSchema = `{ }, "PermissionsPolicyDocument": { "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -16947,6 +17079,12 @@ var CloudformationSchema = `{ "RepositoryName": { "type": "string" }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, "Upstreams": { "items": { "type": "string" @@ -37896,6 +38034,77 @@ var CloudformationSchema = `{ ], "type": "object" }, + "AWS::Events::Archive": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "Description": { + "type": "string" + }, + "EventPattern": { + "type": "object" + }, + "RetentionDays": { + "type": "number" + }, + "SourceArn": { + "type": "string" + } + }, + "required": [ + "SourceArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::Events::Archive" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::Events::EventBus": { "additionalProperties": false, "properties": { @@ -46871,6 +47080,127 @@ var CloudformationSchema = `{ ], "type": "object" }, + "AWS::IoT::DomainConfiguration": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "AuthorizerConfig": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.AuthorizerConfig" + }, + "DomainConfigurationName": { + "type": "string" + }, + "DomainConfigurationStatus": { + "type": "string" + }, + "DomainName": { + "type": "string" + }, + "ServerCertificateArns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ServiceType": { + "type": "string" + }, + "Tags": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.Tags" + }, + "ValidationCertificateArn": { + "type": "string" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::DomainConfiguration" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "AWS::IoT::DomainConfiguration.AuthorizerConfig": { + "additionalProperties": false, + "properties": { + "AllowAuthorizerOverride": { + "type": "boolean" + }, + "DefaultAuthorizerName": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.ServerCertificateSummary": { + "additionalProperties": false, + "properties": { + "ServerCertificateArn": { + "type": "string" + }, + "ServerCertificateStatus": { + "type": "string" + }, + "ServerCertificateStatusDetail": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.Tags": { + "additionalProperties": false, + "properties": { + "Tags": { + "items": { + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::IoT::Policy": { "additionalProperties": false, "properties": { @@ -50149,10 +50479,8 @@ var CloudformationSchema = `{ } }, "required": [ - "DataSourceConfiguration", "IndexId", "Name", - "RoleArn", "Type" ], "type": "object" @@ -50460,6 +50788,9 @@ var CloudformationSchema = `{ "ExclusionPatterns": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" }, + "InclusionPatterns": { + "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" + }, "InclusionPrefixes": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" } @@ -66597,6 +66928,79 @@ var CloudformationSchema = `{ ], "type": "object" }, + "AWS::RDS::GlobalCluster": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "DeletionProtection": { + "type": "boolean" + }, + "Engine": { + "type": "string" + }, + "EngineVersion": { + "type": "string" + }, + "GlobalClusterIdentifier": { + "type": "string" + }, + "SourceDBClusterIdentifier": { + "type": "string" + }, + "StorageEncrypted": { + "type": "boolean" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::RDS::GlobalCluster" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::RDS::OptionGroup": { "additionalProperties": false, "properties": { @@ -73674,6 +74078,9 @@ var CloudformationSchema = `{ "Properties": { "additionalProperties": false, "properties": { + "BlockPublicPolicy": { + "type": "boolean" + }, "ResourcePolicy": { "type": "object" }, @@ -80594,6 +81001,9 @@ var CloudformationSchema = `{ { "$ref": "#/definitions/AWS::CloudWatch::InsightRule" }, + { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream" + }, { "$ref": "#/definitions/AWS::CodeArtifact::Domain" }, @@ -81074,6 +81484,9 @@ var CloudformationSchema = `{ { "$ref": "#/definitions/AWS::EventSchemas::Schema" }, + { + "$ref": "#/definitions/AWS::Events::Archive" + }, { "$ref": "#/definitions/AWS::Events::EventBus" }, @@ -81308,6 +81721,9 @@ var CloudformationSchema = `{ { "$ref": "#/definitions/AWS::IoT::Certificate" }, + { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration" + }, { "$ref": "#/definitions/AWS::IoT::Policy" }, @@ -81668,6 +82084,9 @@ var CloudformationSchema = `{ { "$ref": "#/definitions/AWS::RDS::EventSubscription" }, + { + "$ref": "#/definitions/AWS::RDS::GlobalCluster" + }, { "$ref": "#/definitions/AWS::RDS::OptionGroup" }, diff --git a/schema/cloudformation.schema.json b/schema/cloudformation.schema.json index b03d4a658a..5b3be0bb3d 100644 --- a/schema/cloudformation.schema.json +++ b/schema/cloudformation.schema.json @@ -13153,6 +13153,27 @@ }, "type": "object" }, + "AWS::Batch::JobDefinition.EvaluateOnExit": { + "additionalProperties": false, + "properties": { + "Action": { + "type": "string" + }, + "OnExitCode": { + "type": "string" + }, + "OnReason": { + "type": "string" + }, + "OnStatusReason": { + "type": "string" + } + }, + "required": [ + "Action" + ], + "type": "object" + }, "AWS::Batch::JobDefinition.LinuxParameters": { "additionalProperties": false, "properties": { @@ -13274,6 +13295,12 @@ "properties": { "Attempts": { "type": "number" + }, + "EvaluateOnExit": { + "items": { + "$ref": "#/definitions/AWS::Batch::JobDefinition.EvaluateOnExit" + }, + "type": "array" } }, "type": "object" @@ -16832,6 +16859,105 @@ "properties": {}, "type": "object" }, + "AWS::CloudWatch::MetricStream": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "ExcludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "FirehoseArn": { + "type": "string" + }, + "IncludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "Name": { + "type": "string" + }, + "RoleArn": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "required": [ + "FirehoseArn", + "RoleArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::CloudWatch::MetricStream" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::CloudWatch::MetricStream.MetricStreamFilter": { + "additionalProperties": false, + "properties": { + "Namespace": { + "type": "string" + } + }, + "required": [ + "Namespace" + ], + "type": "object" + }, "AWS::CodeArtifact::Domain": { "additionalProperties": false, "properties": { @@ -16869,6 +16995,12 @@ }, "PermissionsPolicyDocument": { "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -16944,6 +17076,12 @@ "RepositoryName": { "type": "string" }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, "Upstreams": { "items": { "type": "string" @@ -37893,6 +38031,77 @@ ], "type": "object" }, + "AWS::Events::Archive": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "Description": { + "type": "string" + }, + "EventPattern": { + "type": "object" + }, + "RetentionDays": { + "type": "number" + }, + "SourceArn": { + "type": "string" + } + }, + "required": [ + "SourceArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::Events::Archive" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::Events::EventBus": { "additionalProperties": false, "properties": { @@ -46868,6 +47077,127 @@ ], "type": "object" }, + "AWS::IoT::DomainConfiguration": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "AuthorizerConfig": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.AuthorizerConfig" + }, + "DomainConfigurationName": { + "type": "string" + }, + "DomainConfigurationStatus": { + "type": "string" + }, + "DomainName": { + "type": "string" + }, + "ServerCertificateArns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ServiceType": { + "type": "string" + }, + "Tags": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.Tags" + }, + "ValidationCertificateArn": { + "type": "string" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::DomainConfiguration" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "AWS::IoT::DomainConfiguration.AuthorizerConfig": { + "additionalProperties": false, + "properties": { + "AllowAuthorizerOverride": { + "type": "boolean" + }, + "DefaultAuthorizerName": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.ServerCertificateSummary": { + "additionalProperties": false, + "properties": { + "ServerCertificateArn": { + "type": "string" + }, + "ServerCertificateStatus": { + "type": "string" + }, + "ServerCertificateStatusDetail": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.Tags": { + "additionalProperties": false, + "properties": { + "Tags": { + "items": { + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::IoT::Policy": { "additionalProperties": false, "properties": { @@ -50146,10 +50476,8 @@ } }, "required": [ - "DataSourceConfiguration", "IndexId", "Name", - "RoleArn", "Type" ], "type": "object" @@ -50457,6 +50785,9 @@ "ExclusionPatterns": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" }, + "InclusionPatterns": { + "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" + }, "InclusionPrefixes": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" } @@ -66594,6 +66925,79 @@ ], "type": "object" }, + "AWS::RDS::GlobalCluster": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "DeletionProtection": { + "type": "boolean" + }, + "Engine": { + "type": "string" + }, + "EngineVersion": { + "type": "string" + }, + "GlobalClusterIdentifier": { + "type": "string" + }, + "SourceDBClusterIdentifier": { + "type": "string" + }, + "StorageEncrypted": { + "type": "boolean" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::RDS::GlobalCluster" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::RDS::OptionGroup": { "additionalProperties": false, "properties": { @@ -73671,6 +74075,9 @@ "Properties": { "additionalProperties": false, "properties": { + "BlockPublicPolicy": { + "type": "boolean" + }, "ResourcePolicy": { "type": "object" }, @@ -80591,6 +80998,9 @@ { "$ref": "#/definitions/AWS::CloudWatch::InsightRule" }, + { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream" + }, { "$ref": "#/definitions/AWS::CodeArtifact::Domain" }, @@ -81071,6 +81481,9 @@ { "$ref": "#/definitions/AWS::EventSchemas::Schema" }, + { + "$ref": "#/definitions/AWS::Events::Archive" + }, { "$ref": "#/definitions/AWS::Events::EventBus" }, @@ -81305,6 +81718,9 @@ { "$ref": "#/definitions/AWS::IoT::Certificate" }, + { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration" + }, { "$ref": "#/definitions/AWS::IoT::Policy" }, @@ -81665,6 +82081,9 @@ { "$ref": "#/definitions/AWS::RDS::EventSubscription" }, + { + "$ref": "#/definitions/AWS::RDS::GlobalCluster" + }, { "$ref": "#/definitions/AWS::RDS::OptionGroup" }, diff --git a/schema/sam.go b/schema/sam.go index 556d61b4d8..ad49062707 100644 --- a/schema/sam.go +++ b/schema/sam.go @@ -13156,6 +13156,27 @@ var SamSchema = `{ }, "type": "object" }, + "AWS::Batch::JobDefinition.EvaluateOnExit": { + "additionalProperties": false, + "properties": { + "Action": { + "type": "string" + }, + "OnExitCode": { + "type": "string" + }, + "OnReason": { + "type": "string" + }, + "OnStatusReason": { + "type": "string" + } + }, + "required": [ + "Action" + ], + "type": "object" + }, "AWS::Batch::JobDefinition.LinuxParameters": { "additionalProperties": false, "properties": { @@ -13277,6 +13298,12 @@ var SamSchema = `{ "properties": { "Attempts": { "type": "number" + }, + "EvaluateOnExit": { + "items": { + "$ref": "#/definitions/AWS::Batch::JobDefinition.EvaluateOnExit" + }, + "type": "array" } }, "type": "object" @@ -16835,6 +16862,105 @@ var SamSchema = `{ "properties": {}, "type": "object" }, + "AWS::CloudWatch::MetricStream": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "ExcludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "FirehoseArn": { + "type": "string" + }, + "IncludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "Name": { + "type": "string" + }, + "RoleArn": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "required": [ + "FirehoseArn", + "RoleArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::CloudWatch::MetricStream" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::CloudWatch::MetricStream.MetricStreamFilter": { + "additionalProperties": false, + "properties": { + "Namespace": { + "type": "string" + } + }, + "required": [ + "Namespace" + ], + "type": "object" + }, "AWS::CodeArtifact::Domain": { "additionalProperties": false, "properties": { @@ -16872,6 +16998,12 @@ var SamSchema = `{ }, "PermissionsPolicyDocument": { "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -16947,6 +17079,12 @@ var SamSchema = `{ "RepositoryName": { "type": "string" }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, "Upstreams": { "items": { "type": "string" @@ -37896,6 +38034,77 @@ var SamSchema = `{ ], "type": "object" }, + "AWS::Events::Archive": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "Description": { + "type": "string" + }, + "EventPattern": { + "type": "object" + }, + "RetentionDays": { + "type": "number" + }, + "SourceArn": { + "type": "string" + } + }, + "required": [ + "SourceArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::Events::Archive" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::Events::EventBus": { "additionalProperties": false, "properties": { @@ -46871,6 +47080,127 @@ var SamSchema = `{ ], "type": "object" }, + "AWS::IoT::DomainConfiguration": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "AuthorizerConfig": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.AuthorizerConfig" + }, + "DomainConfigurationName": { + "type": "string" + }, + "DomainConfigurationStatus": { + "type": "string" + }, + "DomainName": { + "type": "string" + }, + "ServerCertificateArns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ServiceType": { + "type": "string" + }, + "Tags": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.Tags" + }, + "ValidationCertificateArn": { + "type": "string" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::DomainConfiguration" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "AWS::IoT::DomainConfiguration.AuthorizerConfig": { + "additionalProperties": false, + "properties": { + "AllowAuthorizerOverride": { + "type": "boolean" + }, + "DefaultAuthorizerName": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.ServerCertificateSummary": { + "additionalProperties": false, + "properties": { + "ServerCertificateArn": { + "type": "string" + }, + "ServerCertificateStatus": { + "type": "string" + }, + "ServerCertificateStatusDetail": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.Tags": { + "additionalProperties": false, + "properties": { + "Tags": { + "items": { + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::IoT::Policy": { "additionalProperties": false, "properties": { @@ -50149,10 +50479,8 @@ var SamSchema = `{ } }, "required": [ - "DataSourceConfiguration", "IndexId", "Name", - "RoleArn", "Type" ], "type": "object" @@ -50460,6 +50788,9 @@ var SamSchema = `{ "ExclusionPatterns": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" }, + "InclusionPatterns": { + "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" + }, "InclusionPrefixes": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" } @@ -66597,6 +66928,79 @@ var SamSchema = `{ ], "type": "object" }, + "AWS::RDS::GlobalCluster": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "DeletionProtection": { + "type": "boolean" + }, + "Engine": { + "type": "string" + }, + "EngineVersion": { + "type": "string" + }, + "GlobalClusterIdentifier": { + "type": "string" + }, + "SourceDBClusterIdentifier": { + "type": "string" + }, + "StorageEncrypted": { + "type": "boolean" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::RDS::GlobalCluster" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::RDS::OptionGroup": { "additionalProperties": false, "properties": { @@ -73674,6 +74078,9 @@ var SamSchema = `{ "Properties": { "additionalProperties": false, "properties": { + "BlockPublicPolicy": { + "type": "boolean" + }, "ResourcePolicy": { "type": "object" }, @@ -82395,6 +82802,9 @@ var SamSchema = `{ { "$ref": "#/definitions/AWS::CloudWatch::InsightRule" }, + { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream" + }, { "$ref": "#/definitions/AWS::CodeArtifact::Domain" }, @@ -82875,6 +83285,9 @@ var SamSchema = `{ { "$ref": "#/definitions/AWS::EventSchemas::Schema" }, + { + "$ref": "#/definitions/AWS::Events::Archive" + }, { "$ref": "#/definitions/AWS::Events::EventBus" }, @@ -83109,6 +83522,9 @@ var SamSchema = `{ { "$ref": "#/definitions/AWS::IoT::Certificate" }, + { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration" + }, { "$ref": "#/definitions/AWS::IoT::Policy" }, @@ -83469,6 +83885,9 @@ var SamSchema = `{ { "$ref": "#/definitions/AWS::RDS::EventSubscription" }, + { + "$ref": "#/definitions/AWS::RDS::GlobalCluster" + }, { "$ref": "#/definitions/AWS::RDS::OptionGroup" }, diff --git a/schema/sam.schema.json b/schema/sam.schema.json index 640fa1a5b8..96651dd0de 100644 --- a/schema/sam.schema.json +++ b/schema/sam.schema.json @@ -13153,6 +13153,27 @@ }, "type": "object" }, + "AWS::Batch::JobDefinition.EvaluateOnExit": { + "additionalProperties": false, + "properties": { + "Action": { + "type": "string" + }, + "OnExitCode": { + "type": "string" + }, + "OnReason": { + "type": "string" + }, + "OnStatusReason": { + "type": "string" + } + }, + "required": [ + "Action" + ], + "type": "object" + }, "AWS::Batch::JobDefinition.LinuxParameters": { "additionalProperties": false, "properties": { @@ -13274,6 +13295,12 @@ "properties": { "Attempts": { "type": "number" + }, + "EvaluateOnExit": { + "items": { + "$ref": "#/definitions/AWS::Batch::JobDefinition.EvaluateOnExit" + }, + "type": "array" } }, "type": "object" @@ -16832,6 +16859,105 @@ "properties": {}, "type": "object" }, + "AWS::CloudWatch::MetricStream": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "ExcludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "FirehoseArn": { + "type": "string" + }, + "IncludeFilters": { + "items": { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream.MetricStreamFilter" + }, + "type": "array" + }, + "Name": { + "type": "string" + }, + "RoleArn": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "required": [ + "FirehoseArn", + "RoleArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::CloudWatch::MetricStream" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::CloudWatch::MetricStream.MetricStreamFilter": { + "additionalProperties": false, + "properties": { + "Namespace": { + "type": "string" + } + }, + "required": [ + "Namespace" + ], + "type": "object" + }, "AWS::CodeArtifact::Domain": { "additionalProperties": false, "properties": { @@ -16869,6 +16995,12 @@ }, "PermissionsPolicyDocument": { "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -16944,6 +17076,12 @@ "RepositoryName": { "type": "string" }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, "Upstreams": { "items": { "type": "string" @@ -37893,6 +38031,77 @@ ], "type": "object" }, + "AWS::Events::Archive": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "Description": { + "type": "string" + }, + "EventPattern": { + "type": "object" + }, + "RetentionDays": { + "type": "number" + }, + "SourceArn": { + "type": "string" + } + }, + "required": [ + "SourceArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::Events::Archive" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::Events::EventBus": { "additionalProperties": false, "properties": { @@ -46868,6 +47077,127 @@ ], "type": "object" }, + "AWS::IoT::DomainConfiguration": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "AuthorizerConfig": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.AuthorizerConfig" + }, + "DomainConfigurationName": { + "type": "string" + }, + "DomainConfigurationStatus": { + "type": "string" + }, + "DomainName": { + "type": "string" + }, + "ServerCertificateArns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ServiceType": { + "type": "string" + }, + "Tags": { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration.Tags" + }, + "ValidationCertificateArn": { + "type": "string" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::DomainConfiguration" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "AWS::IoT::DomainConfiguration.AuthorizerConfig": { + "additionalProperties": false, + "properties": { + "AllowAuthorizerOverride": { + "type": "boolean" + }, + "DefaultAuthorizerName": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.ServerCertificateSummary": { + "additionalProperties": false, + "properties": { + "ServerCertificateArn": { + "type": "string" + }, + "ServerCertificateStatus": { + "type": "string" + }, + "ServerCertificateStatusDetail": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::IoT::DomainConfiguration.Tags": { + "additionalProperties": false, + "properties": { + "Tags": { + "items": { + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::IoT::Policy": { "additionalProperties": false, "properties": { @@ -50146,10 +50476,8 @@ } }, "required": [ - "DataSourceConfiguration", "IndexId", "Name", - "RoleArn", "Type" ], "type": "object" @@ -50457,6 +50785,9 @@ "ExclusionPatterns": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" }, + "InclusionPatterns": { + "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" + }, "InclusionPrefixes": { "$ref": "#/definitions/AWS::Kendra::DataSource.DataSourceInclusionsExclusionsStrings" } @@ -66594,6 +66925,79 @@ ], "type": "object" }, + "AWS::RDS::GlobalCluster": { + "additionalProperties": false, + "properties": { + "DeletionPolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + }, + "DependsOn": { + "anyOf": [ + { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + { + "items": { + "pattern": "^[a-zA-Z0-9]+$", + "type": "string" + }, + "type": "array" + } + ] + }, + "Metadata": { + "type": "object" + }, + "Properties": { + "additionalProperties": false, + "properties": { + "DeletionProtection": { + "type": "boolean" + }, + "Engine": { + "type": "string" + }, + "EngineVersion": { + "type": "string" + }, + "GlobalClusterIdentifier": { + "type": "string" + }, + "SourceDBClusterIdentifier": { + "type": "string" + }, + "StorageEncrypted": { + "type": "boolean" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::RDS::GlobalCluster" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::RDS::OptionGroup": { "additionalProperties": false, "properties": { @@ -73671,6 +74075,9 @@ "Properties": { "additionalProperties": false, "properties": { + "BlockPublicPolicy": { + "type": "boolean" + }, "ResourcePolicy": { "type": "object" }, @@ -82392,6 +82799,9 @@ { "$ref": "#/definitions/AWS::CloudWatch::InsightRule" }, + { + "$ref": "#/definitions/AWS::CloudWatch::MetricStream" + }, { "$ref": "#/definitions/AWS::CodeArtifact::Domain" }, @@ -82872,6 +83282,9 @@ { "$ref": "#/definitions/AWS::EventSchemas::Schema" }, + { + "$ref": "#/definitions/AWS::Events::Archive" + }, { "$ref": "#/definitions/AWS::Events::EventBus" }, @@ -83106,6 +83519,9 @@ { "$ref": "#/definitions/AWS::IoT::Certificate" }, + { + "$ref": "#/definitions/AWS::IoT::DomainConfiguration" + }, { "$ref": "#/definitions/AWS::IoT::Policy" }, @@ -83466,6 +83882,9 @@ { "$ref": "#/definitions/AWS::RDS::EventSubscription" }, + { + "$ref": "#/definitions/AWS::RDS::GlobalCluster" + }, { "$ref": "#/definitions/AWS::RDS::OptionGroup" },