From 902165111fceb05a768b33c7413854038fd079e2 Mon Sep 17 00:00:00 2001 From: Paul Maddox Date: Sat, 9 Oct 2021 00:06:09 +0000 Subject: [PATCH] fix(schema): CloudFormation Updates --- cloudformation/all.go | 25 +++ ...-codestarnotifications-notificationrule.go | 15 ++ cloudformation/iot/aws-iot-jobtemplate.go | 152 ++++++++++++++++++ .../synthetics/aws-synthetics-canary.go | 5 + .../aws-synthetics-canary_artifactconfig.go | 35 ++++ .../aws-synthetics-canary_s3encryption.go | 40 +++++ schema/cloudformation.go | 129 +++++++++++++++ schema/cloudformation.schema.json | 129 +++++++++++++++ schema/sam.go | 129 +++++++++++++++ schema/sam.schema.json | 129 +++++++++++++++ 10 files changed, 788 insertions(+) create mode 100644 cloudformation/iot/aws-iot-jobtemplate.go create mode 100644 cloudformation/synthetics/aws-synthetics-canary_artifactconfig.go create mode 100644 cloudformation/synthetics/aws-synthetics-canary_s3encryption.go diff --git a/cloudformation/all.go b/cloudformation/all.go index 567ff144d7..c7e0437e16 100644 --- a/cloudformation/all.go +++ b/cloudformation/all.go @@ -632,6 +632,7 @@ func AllResources() map[string]Resource { "AWS::IoT::Dimension": &iot.Dimension{}, "AWS::IoT::DomainConfiguration": &iot.DomainConfiguration{}, "AWS::IoT::FleetMetric": &iot.FleetMetric{}, + "AWS::IoT::JobTemplate": &iot.JobTemplate{}, "AWS::IoT::MitigationAction": &iot.MitigationAction{}, "AWS::IoT::Policy": &iot.Policy{}, "AWS::IoT::PolicyPrincipalAttachment": &iot.PolicyPrincipalAttachment{}, @@ -11821,6 +11822,30 @@ func (t *Template) GetIoTFleetMetricWithName(name string) (*iot.FleetMetric, err return nil, fmt.Errorf("resource %q of type iot.FleetMetric not found", name) } +// GetAllIoTJobTemplateResources retrieves all iot.JobTemplate items from an AWS CloudFormation template +func (t *Template) GetAllIoTJobTemplateResources() map[string]*iot.JobTemplate { + results := map[string]*iot.JobTemplate{} + for name, untyped := range t.Resources { + switch resource := untyped.(type) { + case *iot.JobTemplate: + results[name] = resource + } + } + return results +} + +// GetIoTJobTemplateWithName retrieves all iot.JobTemplate items from an AWS CloudFormation template +// whose logical ID matches the provided name. Returns an error if not found. +func (t *Template) GetIoTJobTemplateWithName(name string) (*iot.JobTemplate, error) { + if untyped, ok := t.Resources[name]; ok { + switch resource := untyped.(type) { + case *iot.JobTemplate: + return resource, nil + } + } + return nil, fmt.Errorf("resource %q of type iot.JobTemplate not found", name) +} + // GetAllIoTMitigationActionResources retrieves all iot.MitigationAction items from an AWS CloudFormation template func (t *Template) GetAllIoTMitigationActionResources() map[string]*iot.MitigationAction { results := map[string]*iot.MitigationAction{} diff --git a/cloudformation/codestarnotifications/aws-codestarnotifications-notificationrule.go b/cloudformation/codestarnotifications/aws-codestarnotifications-notificationrule.go index 769922c740..4055b2468f 100644 --- a/cloudformation/codestarnotifications/aws-codestarnotifications-notificationrule.go +++ b/cloudformation/codestarnotifications/aws-codestarnotifications-notificationrule.go @@ -12,11 +12,21 @@ import ( // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html type NotificationRule struct { + // CreatedBy AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-createdby + CreatedBy string `json:"CreatedBy,omitempty"` + // DetailType AWS CloudFormation Property // Required: true // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-detailtype DetailType string `json:"DetailType,omitempty"` + // EventTypeId AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-eventtypeid + EventTypeId string `json:"EventTypeId,omitempty"` + // EventTypeIds AWS CloudFormation Property // Required: true // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-eventtypeids @@ -42,6 +52,11 @@ type NotificationRule struct { // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-tags Tags interface{} `json:"Tags,omitempty"` + // TargetAddress AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-targetaddress + TargetAddress string `json:"TargetAddress,omitempty"` + // Targets AWS CloudFormation Property // Required: true // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-targets diff --git a/cloudformation/iot/aws-iot-jobtemplate.go b/cloudformation/iot/aws-iot-jobtemplate.go new file mode 100644 index 0000000000..f649cfba40 --- /dev/null +++ b/cloudformation/iot/aws-iot-jobtemplate.go @@ -0,0 +1,152 @@ +package iot + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/awslabs/goformation/v5/cloudformation/policies" + "github.com/awslabs/goformation/v5/cloudformation/tags" +) + +// JobTemplate AWS CloudFormation Resource (AWS::IoT::JobTemplate) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html +type JobTemplate struct { + + // AbortConfig AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-abortconfig + AbortConfig interface{} `json:"AbortConfig,omitempty"` + + // Description AWS CloudFormation Property + // Required: true + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-description + Description string `json:"Description,omitempty"` + + // Document AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-document + Document string `json:"Document,omitempty"` + + // DocumentSource AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-documentsource + DocumentSource string `json:"DocumentSource,omitempty"` + + // JobArn AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-jobarn + JobArn string `json:"JobArn,omitempty"` + + // JobExecutionsRolloutConfig AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-jobexecutionsrolloutconfig + JobExecutionsRolloutConfig interface{} `json:"JobExecutionsRolloutConfig,omitempty"` + + // JobTemplateId AWS CloudFormation Property + // Required: true + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-jobtemplateid + JobTemplateId string `json:"JobTemplateId,omitempty"` + + // PresignedUrlConfig AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-presignedurlconfig + PresignedUrlConfig interface{} `json:"PresignedUrlConfig,omitempty"` + + // Tags AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-tags + Tags []tags.Tag `json:"Tags,omitempty"` + + // TimeoutConfig AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-timeoutconfig + TimeoutConfig interface{} `json:"TimeoutConfig,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 *JobTemplate) AWSCloudFormationType() string { + return "AWS::IoT::JobTemplate" +} + +// 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 JobTemplate) MarshalJSON() ([]byte, error) { + type Properties JobTemplate + 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 *JobTemplate) UnmarshalJSON(b []byte) error { + type Properties JobTemplate + 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 = JobTemplate(*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/synthetics/aws-synthetics-canary.go b/cloudformation/synthetics/aws-synthetics-canary.go index 6d522458a3..61a9f56e08 100644 --- a/cloudformation/synthetics/aws-synthetics-canary.go +++ b/cloudformation/synthetics/aws-synthetics-canary.go @@ -13,6 +13,11 @@ import ( // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html type Canary struct { + // ArtifactConfig AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-artifactconfig + ArtifactConfig *Canary_ArtifactConfig `json:"ArtifactConfig,omitempty"` + // ArtifactS3Location AWS CloudFormation Property // Required: true // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-artifacts3location diff --git a/cloudformation/synthetics/aws-synthetics-canary_artifactconfig.go b/cloudformation/synthetics/aws-synthetics-canary_artifactconfig.go new file mode 100644 index 0000000000..b23eddd37e --- /dev/null +++ b/cloudformation/synthetics/aws-synthetics-canary_artifactconfig.go @@ -0,0 +1,35 @@ +package synthetics + +import ( + "github.com/awslabs/goformation/v5/cloudformation/policies" +) + +// Canary_ArtifactConfig AWS CloudFormation Resource (AWS::Synthetics::Canary.ArtifactConfig) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-artifactconfig.html +type Canary_ArtifactConfig struct { + + // S3Encryption AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-artifactconfig.html#cfn-synthetics-canary-artifactconfig-s3encryption + S3Encryption interface{} `json:"S3Encryption,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 *Canary_ArtifactConfig) AWSCloudFormationType() string { + return "AWS::Synthetics::Canary.ArtifactConfig" +} diff --git a/cloudformation/synthetics/aws-synthetics-canary_s3encryption.go b/cloudformation/synthetics/aws-synthetics-canary_s3encryption.go new file mode 100644 index 0000000000..29e27a329d --- /dev/null +++ b/cloudformation/synthetics/aws-synthetics-canary_s3encryption.go @@ -0,0 +1,40 @@ +package synthetics + +import ( + "github.com/awslabs/goformation/v5/cloudformation/policies" +) + +// Canary_S3Encryption AWS CloudFormation Resource (AWS::Synthetics::Canary.S3Encryption) +// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-s3encryption.html +type Canary_S3Encryption struct { + + // EncryptionMode AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-s3encryption.html#cfn-synthetics-canary-s3encryption-encryptionmode + EncryptionMode string `json:"EncryptionMode,omitempty"` + + // KmsKeyArn AWS CloudFormation Property + // Required: false + // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-s3encryption.html#cfn-synthetics-canary-s3encryption-kmskeyarn + KmsKeyArn string `json:"KmsKeyArn,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 *Canary_S3Encryption) AWSCloudFormationType() string { + return "AWS::Synthetics::Canary.S3Encryption" +} diff --git a/schema/cloudformation.go b/schema/cloudformation.go index 21045913d2..b810dd1565 100644 --- a/schema/cloudformation.go +++ b/schema/cloudformation.go @@ -23817,9 +23817,15 @@ var CloudformationSchema = `{ "Properties": { "additionalProperties": false, "properties": { + "CreatedBy": { + "type": "string" + }, "DetailType": { "type": "string" }, + "EventTypeId": { + "type": "string" + }, "EventTypeIds": { "items": { "type": "string" @@ -23838,6 +23844,9 @@ var CloudformationSchema = `{ "Tags": { "type": "object" }, + "TargetAddress": { + "type": "string" + }, "Targets": { "items": { "$ref": "#/definitions/AWS::CodeStarNotifications::NotificationRule.Target" @@ -62223,6 +62232,99 @@ var CloudformationSchema = `{ ], "type": "object" }, + "AWS::IoT::JobTemplate": { + "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": { + "AbortConfig": { + "type": "object" + }, + "Description": { + "type": "string" + }, + "Document": { + "type": "string" + }, + "DocumentSource": { + "type": "string" + }, + "JobArn": { + "type": "string" + }, + "JobExecutionsRolloutConfig": { + "type": "object" + }, + "JobTemplateId": { + "type": "string" + }, + "PresignedUrlConfig": { + "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "TimeoutConfig": { + "type": "object" + } + }, + "required": [ + "Description", + "JobTemplateId" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::JobTemplate" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::IoT::MitigationAction": { "additionalProperties": false, "properties": { @@ -109051,6 +109153,9 @@ var CloudformationSchema = `{ "Properties": { "additionalProperties": false, "properties": { + "ArtifactConfig": { + "$ref": "#/definitions/AWS::Synthetics::Canary.ArtifactConfig" + }, "ArtifactS3Location": { "type": "string" }, @@ -109126,6 +109231,15 @@ var CloudformationSchema = `{ ], "type": "object" }, + "AWS::Synthetics::Canary.ArtifactConfig": { + "additionalProperties": false, + "properties": { + "S3Encryption": { + "type": "object" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.BaseScreenshot": { "additionalProperties": false, "properties": { @@ -109192,6 +109306,18 @@ var CloudformationSchema = `{ }, "type": "object" }, + "AWS::Synthetics::Canary.S3Encryption": { + "additionalProperties": false, + "properties": { + "EncryptionMode": { + "type": "string" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.Schedule": { "additionalProperties": false, "properties": { @@ -115213,6 +115339,9 @@ var CloudformationSchema = `{ { "$ref": "#/definitions/AWS::IoT::FleetMetric" }, + { + "$ref": "#/definitions/AWS::IoT::JobTemplate" + }, { "$ref": "#/definitions/AWS::IoT::MitigationAction" }, diff --git a/schema/cloudformation.schema.json b/schema/cloudformation.schema.json index 56a3442116..110a276acf 100644 --- a/schema/cloudformation.schema.json +++ b/schema/cloudformation.schema.json @@ -23814,9 +23814,15 @@ "Properties": { "additionalProperties": false, "properties": { + "CreatedBy": { + "type": "string" + }, "DetailType": { "type": "string" }, + "EventTypeId": { + "type": "string" + }, "EventTypeIds": { "items": { "type": "string" @@ -23835,6 +23841,9 @@ "Tags": { "type": "object" }, + "TargetAddress": { + "type": "string" + }, "Targets": { "items": { "$ref": "#/definitions/AWS::CodeStarNotifications::NotificationRule.Target" @@ -62220,6 +62229,99 @@ ], "type": "object" }, + "AWS::IoT::JobTemplate": { + "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": { + "AbortConfig": { + "type": "object" + }, + "Description": { + "type": "string" + }, + "Document": { + "type": "string" + }, + "DocumentSource": { + "type": "string" + }, + "JobArn": { + "type": "string" + }, + "JobExecutionsRolloutConfig": { + "type": "object" + }, + "JobTemplateId": { + "type": "string" + }, + "PresignedUrlConfig": { + "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "TimeoutConfig": { + "type": "object" + } + }, + "required": [ + "Description", + "JobTemplateId" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::JobTemplate" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::IoT::MitigationAction": { "additionalProperties": false, "properties": { @@ -109048,6 +109150,9 @@ "Properties": { "additionalProperties": false, "properties": { + "ArtifactConfig": { + "$ref": "#/definitions/AWS::Synthetics::Canary.ArtifactConfig" + }, "ArtifactS3Location": { "type": "string" }, @@ -109123,6 +109228,15 @@ ], "type": "object" }, + "AWS::Synthetics::Canary.ArtifactConfig": { + "additionalProperties": false, + "properties": { + "S3Encryption": { + "type": "object" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.BaseScreenshot": { "additionalProperties": false, "properties": { @@ -109189,6 +109303,18 @@ }, "type": "object" }, + "AWS::Synthetics::Canary.S3Encryption": { + "additionalProperties": false, + "properties": { + "EncryptionMode": { + "type": "string" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.Schedule": { "additionalProperties": false, "properties": { @@ -115210,6 +115336,9 @@ { "$ref": "#/definitions/AWS::IoT::FleetMetric" }, + { + "$ref": "#/definitions/AWS::IoT::JobTemplate" + }, { "$ref": "#/definitions/AWS::IoT::MitigationAction" }, diff --git a/schema/sam.go b/schema/sam.go index 506704f3ef..7284ccbb86 100644 --- a/schema/sam.go +++ b/schema/sam.go @@ -23817,9 +23817,15 @@ var SamSchema = `{ "Properties": { "additionalProperties": false, "properties": { + "CreatedBy": { + "type": "string" + }, "DetailType": { "type": "string" }, + "EventTypeId": { + "type": "string" + }, "EventTypeIds": { "items": { "type": "string" @@ -23838,6 +23844,9 @@ var SamSchema = `{ "Tags": { "type": "object" }, + "TargetAddress": { + "type": "string" + }, "Targets": { "items": { "$ref": "#/definitions/AWS::CodeStarNotifications::NotificationRule.Target" @@ -62223,6 +62232,99 @@ var SamSchema = `{ ], "type": "object" }, + "AWS::IoT::JobTemplate": { + "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": { + "AbortConfig": { + "type": "object" + }, + "Description": { + "type": "string" + }, + "Document": { + "type": "string" + }, + "DocumentSource": { + "type": "string" + }, + "JobArn": { + "type": "string" + }, + "JobExecutionsRolloutConfig": { + "type": "object" + }, + "JobTemplateId": { + "type": "string" + }, + "PresignedUrlConfig": { + "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "TimeoutConfig": { + "type": "object" + } + }, + "required": [ + "Description", + "JobTemplateId" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::JobTemplate" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::IoT::MitigationAction": { "additionalProperties": false, "properties": { @@ -111437,6 +111539,9 @@ var SamSchema = `{ "Properties": { "additionalProperties": false, "properties": { + "ArtifactConfig": { + "$ref": "#/definitions/AWS::Synthetics::Canary.ArtifactConfig" + }, "ArtifactS3Location": { "type": "string" }, @@ -111512,6 +111617,15 @@ var SamSchema = `{ ], "type": "object" }, + "AWS::Synthetics::Canary.ArtifactConfig": { + "additionalProperties": false, + "properties": { + "S3Encryption": { + "type": "object" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.BaseScreenshot": { "additionalProperties": false, "properties": { @@ -111578,6 +111692,18 @@ var SamSchema = `{ }, "type": "object" }, + "AWS::Synthetics::Canary.S3Encryption": { + "additionalProperties": false, + "properties": { + "EncryptionMode": { + "type": "string" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.Schedule": { "additionalProperties": false, "properties": { @@ -117879,6 +118005,9 @@ var SamSchema = `{ { "$ref": "#/definitions/AWS::IoT::FleetMetric" }, + { + "$ref": "#/definitions/AWS::IoT::JobTemplate" + }, { "$ref": "#/definitions/AWS::IoT::MitigationAction" }, diff --git a/schema/sam.schema.json b/schema/sam.schema.json index 5ea80f2764..7267db43f1 100644 --- a/schema/sam.schema.json +++ b/schema/sam.schema.json @@ -23814,9 +23814,15 @@ "Properties": { "additionalProperties": false, "properties": { + "CreatedBy": { + "type": "string" + }, "DetailType": { "type": "string" }, + "EventTypeId": { + "type": "string" + }, "EventTypeIds": { "items": { "type": "string" @@ -23835,6 +23841,9 @@ "Tags": { "type": "object" }, + "TargetAddress": { + "type": "string" + }, "Targets": { "items": { "$ref": "#/definitions/AWS::CodeStarNotifications::NotificationRule.Target" @@ -62220,6 +62229,99 @@ ], "type": "object" }, + "AWS::IoT::JobTemplate": { + "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": { + "AbortConfig": { + "type": "object" + }, + "Description": { + "type": "string" + }, + "Document": { + "type": "string" + }, + "DocumentSource": { + "type": "string" + }, + "JobArn": { + "type": "string" + }, + "JobExecutionsRolloutConfig": { + "type": "object" + }, + "JobTemplateId": { + "type": "string" + }, + "PresignedUrlConfig": { + "type": "object" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "TimeoutConfig": { + "type": "object" + } + }, + "required": [ + "Description", + "JobTemplateId" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::JobTemplate" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::IoT::MitigationAction": { "additionalProperties": false, "properties": { @@ -111434,6 +111536,9 @@ "Properties": { "additionalProperties": false, "properties": { + "ArtifactConfig": { + "$ref": "#/definitions/AWS::Synthetics::Canary.ArtifactConfig" + }, "ArtifactS3Location": { "type": "string" }, @@ -111509,6 +111614,15 @@ ], "type": "object" }, + "AWS::Synthetics::Canary.ArtifactConfig": { + "additionalProperties": false, + "properties": { + "S3Encryption": { + "type": "object" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.BaseScreenshot": { "additionalProperties": false, "properties": { @@ -111575,6 +111689,18 @@ }, "type": "object" }, + "AWS::Synthetics::Canary.S3Encryption": { + "additionalProperties": false, + "properties": { + "EncryptionMode": { + "type": "string" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Synthetics::Canary.Schedule": { "additionalProperties": false, "properties": { @@ -117876,6 +118002,9 @@ { "$ref": "#/definitions/AWS::IoT::FleetMetric" }, + { + "$ref": "#/definitions/AWS::IoT::JobTemplate" + }, { "$ref": "#/definitions/AWS::IoT::MitigationAction" },