From 3b53f8f34af1478b84a83b528357d99372ebfdd8 Mon Sep 17 00:00:00 2001 From: Xia Zhao Date: Thu, 16 Nov 2023 08:55:17 -0800 Subject: [PATCH 1/8] Added S3 onFailure destination for MSK and SelfManagedKafka --- .../combination/test_function_with_msk.py | 9 + ..._and_s3_onfailure_events_destinations.json | 22 + ..._and_s3_onfailure_events_destinations.yaml | 80 ++ .../schema_source/aws_serverless_function.py | 1 + samtranslator/model/eventsources/pull.py | 15 +- samtranslator/model/iam.py | 13 + samtranslator/schema/schema.json | 773 +++++++++++++++++- schema_source/cloudformation.schema.json | 770 ++++++++++++++++- schema_source/sam.schema.json | 3 + .../function_with_msk_s3_onfailure_dest.yaml | 20 + .../function_with_msk_s3_onfailure_dest.json | 114 +++ .../function_with_msk_s3_onfailure_dest.json | 114 +++ ..._invalid_stream_eventsource_dest_type.json | 6 +- .../function_with_msk_s3_onfailure_dest.json | 114 +++ 14 files changed, 2043 insertions(+), 11 deletions(-) create mode 100644 integration/resources/expected/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.json create mode 100644 integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml create mode 100644 tests/translator/input/function_with_msk_s3_onfailure_dest.yaml create mode 100644 tests/translator/output/aws-cn/function_with_msk_s3_onfailure_dest.json create mode 100644 tests/translator/output/aws-us-gov/function_with_msk_s3_onfailure_dest.json create mode 100644 tests/translator/output/function_with_msk_s3_onfailure_dest.json diff --git a/integration/combination/test_function_with_msk.py b/integration/combination/test_function_with_msk.py index 8fcb707be..c5be2d72a 100644 --- a/integration/combination/test_function_with_msk.py +++ b/integration/combination/test_function_with_msk.py @@ -28,6 +28,15 @@ def test_function_with_msk_trigger_using_manage_policy(self): parameters.append(self.generate_parameter("MskClusterName2", cluster_name)) self._common_validations_for_MSK("combination/function_with_msk_using_managed_policy", parameters) + def test_function_with_msk_trigger_and_s3_onfailure_events_destinations(self): + companion_stack_outputs = self.companion_stack_outputs + parameters = self.get_parameters(companion_stack_outputs) + cluster_name = "MskCluster3-" + generate_suffix() + parameters.append(self.generate_parameter("MskClusterName3", cluster_name)) + self._common_validations_for_MSK( + "combination/function_with_msk_trigger_and_s3_onfailure_events_destinations", parameters + ) + def _common_validations_for_MSK(self, file_name, parameters): self.create_and_verify_stack(file_name, parameters) diff --git a/integration/resources/expected/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.json b/integration/resources/expected/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.json new file mode 100644 index 000000000..e45f42ea5 --- /dev/null +++ b/integration/resources/expected/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.json @@ -0,0 +1,22 @@ +[ + { + "LogicalResourceId": "MyMskStreamProcessor", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaExecutionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyMskCluster", + "ResourceType": "AWS::MSK::Cluster" + }, + { + "LogicalResourceId": "MyMskStreamProcessorMyMskEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "PreCreatedS3Bucket", + "ResourceType": "AWS::S3::Bucket" + } +] diff --git a/integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml b/integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml new file mode 100644 index 000000000..98f2178ae --- /dev/null +++ b/integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml @@ -0,0 +1,80 @@ +Parameters: + PreCreatedSubnetOne: + Type: String + PreCreatedSubnetTwo: + Type: String + MskClusterName3: + Type: String + +Resources: + MyLambdaExecutionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Action: [sts:AssumeRole] + Effect: Allow + Principal: + Service: [lambda.amazonaws.com] + Policies: + - PolicyName: IntegrationTestExecution + PolicyDocument: + Statement: + - Action: [kafka:DescribeCluster, kafka:GetBootstrapBrokers, ec2:CreateNetworkInterface, + ec2:DescribeNetworkInterfaces, ec2:DescribeVpcs, ec2:DeleteNetworkInterface, + ec2:DescribeSubnets, ec2:DescribeSecurityGroups, logs:CreateLogGroup, + logs:CreateLogStream, logs:PutLogEvents] + Effect: Allow + Resource: '*' + ManagedPolicyArns: [arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole] + Tags: + - {Value: SAM, Key: lambda:createdBy} + + MyMskCluster: + Type: AWS::MSK::Cluster + Properties: + BrokerNodeGroupInfo: + ClientSubnets: + - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetTwo + InstanceType: kafka.t3.small + StorageInfo: + EBSStorageInfo: + VolumeSize: 1 + ClusterName: + Ref: MskClusterName3 + KafkaVersion: 2.4.1.1 + NumberOfBrokerNodes: 2 + + MyMskStreamProcessor: + Type: AWS::Serverless::Function + Properties: + Runtime: nodejs18.x + Handler: index.handler + CodeUri: ${codeuri} + Role: + Fn::GetAtt: [MyLambdaExecutionRole, Arn] + Events: + MyMskEvent: + Type: MSK + Properties: + StartingPosition: LATEST + Stream: + Ref: MyMskCluster + Topics: + - MyDummyTestTopic + DestinationConfig: + OnFailure: + Type: S3 + Destination: + Fn::GetAtt: + - PreCreatedS3Bucket + - Arn + + PreCreatedS3Bucket: + Type: AWS::S3::Bucket + DeletionPolicy: Delete + +Metadata: + SamTransformTest: true diff --git a/samtranslator/internal/schema_source/aws_serverless_function.py b/samtranslator/internal/schema_source/aws_serverless_function.py index 7f541ca45..99c5a8e87 100644 --- a/samtranslator/internal/schema_source/aws_serverless_function.py +++ b/samtranslator/internal/schema_source/aws_serverless_function.py @@ -414,6 +414,7 @@ class MSKEventProperties(BaseModel): Stream: PassThroughProp = mskeventproperties("Stream") Topics: PassThroughProp = mskeventproperties("Topics") SourceAccessConfigurations: Optional[PassThroughProp] = mskeventproperties("SourceAccessConfigurations") + DestinationConfig: Optional[PassThroughProp] # TODO: add documentation class MSKEvent(BaseModel): diff --git a/samtranslator/model/eventsources/pull.py b/samtranslator/model/eventsources/pull.py index 4c49c86b6..85d8aa2d8 100644 --- a/samtranslator/model/eventsources/pull.py +++ b/samtranslator/model/eventsources/pull.py @@ -172,13 +172,15 @@ def to_cloudformation(self, **kwargs): # type: ignore[no-untyped-def] # noqa: P # `Type` property is for sam to attach the right policies destination_type = on_failure.get("Type") - # SAM attaches the policies for SQS or SNS only if 'Type' is given + # SAM attaches the policies for SQS, SNS or S3 only if 'Type' is given if destination_type: # delete this field as its used internally for SAM to determine the policy del on_failure["Type"] - # the values 'SQS' and 'SNS' are allowed. No intrinsics are allowed - if destination_type not in ["SQS", "SNS"]: - raise InvalidEventException(self.logical_id, "The only valid values for 'Type' are 'SQS' and 'SNS'") + # the values 'SQS', 'SNS', and 'S3' are allowed. No intrinsics are allowed + if destination_type not in ["SQS", "SNS", "S3"]: + raise InvalidEventException( + self.logical_id, "The only valid values for 'Type' are 'SQS', 'SNS', and 'S3'" + ) if destination_type == "SQS": queue_arn = on_failure.get("Destination") destination_config_policy = IAMRolePolicies().sqs_send_message_role_policy( @@ -189,6 +191,11 @@ def to_cloudformation(self, **kwargs): # type: ignore[no-untyped-def] # noqa: P destination_config_policy = IAMRolePolicies().sns_publish_role_policy( sns_topic_arn, self.logical_id ) + elif destination_type == "S3": + s3_arn = on_failure.get("Destination") + destination_config_policy = IAMRolePolicies().s3_send_event_payload_role_policy( + s3_arn, self.logical_id + ) lambda_eventsourcemapping.DestinationConfig = self.DestinationConfig diff --git a/samtranslator/model/iam.py b/samtranslator/model/iam.py index 5d263096b..7588ef72d 100644 --- a/samtranslator/model/iam.py +++ b/samtranslator/model/iam.py @@ -126,6 +126,19 @@ def sns_publish_role_policy(cls, topic_arn: Any, logical_id: str) -> Dict[str, A "PolicyDocument": {"Statement": [{"Action": "sns:publish", "Effect": "Allow", "Resource": topic_arn}]}, } + @classmethod + def s3_send_event_payload_role_policy(cls, s3_arn: Any, logical_id: str) -> Dict[str, Any]: + s3_arn_with_wild_card = {"Fn::Join": ["/", [s3_arn, "*"]]} + return { + "PolicyName": logical_id + "S3Policy", + "PolicyDocument": { + "Statement": [ + {"Action": "s3:PutObject", "Effect": "Allow", "Resource": s3_arn_with_wild_card}, + {"Action": "s3:ListBucket", "Effect": "Allow", "Resource": s3_arn}, + ] + }, + } + @classmethod def event_bus_put_events_role_policy(cls, event_bus_arn: Any, logical_id: str) -> Dict[str, Any]: return { diff --git a/samtranslator/schema/schema.json b/samtranslator/schema/schema.json index f4e0c1e5d..c2a11f4bf 100644 --- a/samtranslator/schema/schema.json +++ b/samtranslator/schema/schema.json @@ -56213,6 +56213,770 @@ ], "type": "object" }, + "AWS::DevBatch::JobDefinition": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "ContainerProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" + }, + "EksProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksProperties" + }, + "JobDefinitionName": { + "type": "string" + }, + "NodeProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeProperties" + }, + "Parameters": { + "type": "object" + }, + "PlatformCapabilities": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PropagateTags": { + "type": "boolean" + }, + "RetryStrategy": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RetryStrategy" + }, + "SchedulingPriority": { + "type": "number" + }, + "Tags": { + "type": "object" + }, + "Timeout": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Timeout" + }, + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::DevBatch::JobDefinition" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.AuthorizationConfig": { + "additionalProperties": false, + "properties": { + "AccessPointId": { + "type": "string" + }, + "Iam": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.ContainerProperties": { + "additionalProperties": false, + "properties": { + "Command": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Environment": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Environment" + }, + "type": "array" + }, + "EphemeralStorage": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EphemeralStorage" + }, + "ExecutionRoleArn": { + "type": "string" + }, + "FargatePlatformConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.FargatePlatformConfiguration" + }, + "Image": { + "type": "string" + }, + "InstanceType": { + "type": "string" + }, + "JobRoleArn": { + "type": "string" + }, + "LinuxParameters": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LinuxParameters" + }, + "LogConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LogConfiguration" + }, + "Memory": { + "type": "number" + }, + "MountPoints": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.MountPoints" + }, + "type": "array" + }, + "NetworkConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NetworkConfiguration" + }, + "Privileged": { + "type": "boolean" + }, + "ReadonlyRootFilesystem": { + "type": "boolean" + }, + "ResourceRequirements": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ResourceRequirement" + }, + "type": "array" + }, + "RuntimePlatform": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RuntimePlatform" + }, + "Secrets": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" + }, + "type": "array" + }, + "Ulimits": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Ulimit" + }, + "type": "array" + }, + "User": { + "type": "string" + }, + "Vcpus": { + "type": "number" + }, + "Volumes": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Volumes" + }, + "type": "array" + } + }, + "required": [ + "Image" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Device": { + "additionalProperties": false, + "properties": { + "ContainerPath": { + "type": "string" + }, + "HostPath": { + "type": "string" + }, + "Permissions": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EfsVolumeConfiguration": { + "additionalProperties": false, + "properties": { + "AuthorizationConfig": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.AuthorizationConfig" + }, + "FileSystemId": { + "type": "string" + }, + "RootDirectory": { + "type": "string" + }, + "TransitEncryption": { + "type": "string" + }, + "TransitEncryptionPort": { + "type": "number" + } + }, + "required": [ + "FileSystemId" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainer": { + "additionalProperties": false, + "properties": { + "Args": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Command": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Env": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable" + }, + "type": "array" + }, + "Image": { + "type": "string" + }, + "ImagePullPolicy": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Resources": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerResourceRequirements" + }, + "SecurityContext": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerSecurityContext" + }, + "VolumeMounts": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerVolumeMount" + }, + "type": "array" + } + }, + "required": [ + "Image" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable": { + "additionalProperties": false, + "properties": { + "Name": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "required": [ + "Name" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerResourceRequirements": { + "additionalProperties": false, + "properties": { + "Limits": { + "type": "object" + }, + "Requests": { + "type": "object" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerSecurityContext": { + "additionalProperties": false, + "properties": { + "Privileged": { + "type": "boolean" + }, + "ReadOnlyRootFilesystem": { + "type": "boolean" + }, + "RunAsGroup": { + "type": "number" + }, + "RunAsNonRoot": { + "type": "boolean" + }, + "RunAsUser": { + "type": "number" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerVolumeMount": { + "additionalProperties": false, + "properties": { + "MountPath": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "ReadOnly": { + "type": "boolean" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksEmptyDir": { + "additionalProperties": false, + "properties": { + "Medium": { + "type": "string" + }, + "SizeLimit": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksHostPath": { + "additionalProperties": false, + "properties": { + "Path": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksProperties": { + "additionalProperties": false, + "properties": { + "PodProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.PodProperties" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksSecret": { + "additionalProperties": false, + "properties": { + "Optional": { + "type": "boolean" + }, + "SecretName": { + "type": "string" + } + }, + "required": [ + "SecretName" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksVolume": { + "additionalProperties": false, + "properties": { + "EmptyDir": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksEmptyDir" + }, + "HostPath": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksHostPath" + }, + "Name": { + "type": "string" + }, + "Secret": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksSecret" + } + }, + "required": [ + "Name" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Environment": { + "additionalProperties": false, + "properties": { + "Name": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EphemeralStorage": { + "additionalProperties": false, + "properties": { + "SizeInGiB": { + "type": "number" + } + }, + "required": [ + "SizeInGiB" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EvaluateOnExit": { + "additionalProperties": false, + "properties": { + "Action": { + "type": "string" + }, + "OnExitCode": { + "type": "string" + }, + "OnReason": { + "type": "string" + }, + "OnStatusReason": { + "type": "string" + } + }, + "required": [ + "Action" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.FargatePlatformConfiguration": { + "additionalProperties": false, + "properties": { + "PlatformVersion": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.LinuxParameters": { + "additionalProperties": false, + "properties": { + "Devices": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Device" + }, + "type": "array" + }, + "InitProcessEnabled": { + "type": "boolean" + }, + "MaxSwap": { + "type": "number" + }, + "SharedMemorySize": { + "type": "number" + }, + "Swappiness": { + "type": "number" + }, + "Tmpfs": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Tmpfs" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.LogConfiguration": { + "additionalProperties": false, + "properties": { + "LogDriver": { + "type": "string" + }, + "Options": { + "type": "object" + }, + "SecretOptions": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" + }, + "type": "array" + } + }, + "required": [ + "LogDriver" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Metadata": { + "additionalProperties": false, + "properties": { + "Labels": { + "type": "object" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.MountPoints": { + "additionalProperties": false, + "properties": { + "ContainerPath": { + "type": "string" + }, + "ReadOnly": { + "type": "boolean" + }, + "SourceVolume": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.NetworkConfiguration": { + "additionalProperties": false, + "properties": { + "AssignPublicIp": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.NodeProperties": { + "additionalProperties": false, + "properties": { + "MainNode": { + "type": "number" + }, + "NodeRangeProperties": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeRangeProperty" + }, + "type": "array" + }, + "NumNodes": { + "type": "number" + } + }, + "required": [ + "MainNode", + "NodeRangeProperties", + "NumNodes" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.NodeRangeProperty": { + "additionalProperties": false, + "properties": { + "Container": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" + }, + "TargetNodes": { + "type": "string" + } + }, + "required": [ + "TargetNodes" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.PodProperties": { + "additionalProperties": false, + "properties": { + "Containers": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainer" + }, + "type": "array" + }, + "DnsPolicy": { + "type": "string" + }, + "HostNetwork": { + "type": "boolean" + }, + "Metadata": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Metadata" + }, + "ServiceAccountName": { + "type": "string" + }, + "Volumes": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksVolume" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.ResourceRequirement": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.RetryStrategy": { + "additionalProperties": false, + "properties": { + "Attempts": { + "type": "number" + }, + "EvaluateOnExit": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EvaluateOnExit" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.RuntimePlatform": { + "additionalProperties": false, + "properties": { + "CpuArchitecture": { + "type": "string" + }, + "OperatingSystemFamily": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Secret": { + "additionalProperties": false, + "properties": { + "Name": { + "type": "string" + }, + "ValueFrom": { + "type": "string" + } + }, + "required": [ + "Name", + "ValueFrom" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Timeout": { + "additionalProperties": false, + "properties": { + "AttemptDurationSeconds": { + "type": "number" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Tmpfs": { + "additionalProperties": false, + "properties": { + "ContainerPath": { + "type": "string" + }, + "MountOptions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Size": { + "type": "number" + } + }, + "required": [ + "ContainerPath", + "Size" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Ulimit": { + "additionalProperties": false, + "properties": { + "HardLimit": { + "type": "number" + }, + "Name": { + "type": "string" + }, + "SoftLimit": { + "type": "number" + } + }, + "required": [ + "HardLimit", + "Name", + "SoftLimit" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Volumes": { + "additionalProperties": false, + "properties": { + "EfsVolumeConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EfsVolumeConfiguration" + }, + "Host": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.VolumesHost" + }, + "Name": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.VolumesHost": { + "additionalProperties": false, + "properties": { + "SourcePath": { + "type": "string" + } + }, + "type": "object" + }, "AWS::DevOpsGuru::LogAnomalyDetectionIntegration": { "additionalProperties": false, "properties": { @@ -85251,8 +86015,7 @@ } }, "required": [ - "Database", - "Sql" + "Database" ], "type": "object" }, @@ -250544,6 +251307,9 @@ "markdownDescription": "A string that configures how events will be read from Kafka topics\\. \n*Type*: String \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`AmazonManagedKafkaConfiguration`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html) property of an `AWS::Lambda::EventSourceMapping` resource\\.", "title": "ConsumerGroupId" }, + "DestinationConfig": { + "$ref": "#/definitions/PassThroughProp" + }, "FilterCriteria": { "allOf": [ { @@ -256673,6 +257439,9 @@ { "$ref": "#/definitions/AWS::Detective::OrganizationAdmin" }, + { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition" + }, { "$ref": "#/definitions/AWS::DevOpsGuru::LogAnomalyDetectionIntegration" }, diff --git a/schema_source/cloudformation.schema.json b/schema_source/cloudformation.schema.json index 9da4c54f4..72cfda18f 100644 --- a/schema_source/cloudformation.schema.json +++ b/schema_source/cloudformation.schema.json @@ -56185,6 +56185,770 @@ ], "type": "object" }, + "AWS::DevBatch::JobDefinition": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "ContainerProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" + }, + "EksProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksProperties" + }, + "JobDefinitionName": { + "type": "string" + }, + "NodeProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeProperties" + }, + "Parameters": { + "type": "object" + }, + "PlatformCapabilities": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PropagateTags": { + "type": "boolean" + }, + "RetryStrategy": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RetryStrategy" + }, + "SchedulingPriority": { + "type": "number" + }, + "Tags": { + "type": "object" + }, + "Timeout": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Timeout" + }, + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::DevBatch::JobDefinition" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.AuthorizationConfig": { + "additionalProperties": false, + "properties": { + "AccessPointId": { + "type": "string" + }, + "Iam": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.ContainerProperties": { + "additionalProperties": false, + "properties": { + "Command": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Environment": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Environment" + }, + "type": "array" + }, + "EphemeralStorage": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EphemeralStorage" + }, + "ExecutionRoleArn": { + "type": "string" + }, + "FargatePlatformConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.FargatePlatformConfiguration" + }, + "Image": { + "type": "string" + }, + "InstanceType": { + "type": "string" + }, + "JobRoleArn": { + "type": "string" + }, + "LinuxParameters": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LinuxParameters" + }, + "LogConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LogConfiguration" + }, + "Memory": { + "type": "number" + }, + "MountPoints": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.MountPoints" + }, + "type": "array" + }, + "NetworkConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NetworkConfiguration" + }, + "Privileged": { + "type": "boolean" + }, + "ReadonlyRootFilesystem": { + "type": "boolean" + }, + "ResourceRequirements": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ResourceRequirement" + }, + "type": "array" + }, + "RuntimePlatform": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RuntimePlatform" + }, + "Secrets": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" + }, + "type": "array" + }, + "Ulimits": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Ulimit" + }, + "type": "array" + }, + "User": { + "type": "string" + }, + "Vcpus": { + "type": "number" + }, + "Volumes": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Volumes" + }, + "type": "array" + } + }, + "required": [ + "Image" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Device": { + "additionalProperties": false, + "properties": { + "ContainerPath": { + "type": "string" + }, + "HostPath": { + "type": "string" + }, + "Permissions": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EfsVolumeConfiguration": { + "additionalProperties": false, + "properties": { + "AuthorizationConfig": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.AuthorizationConfig" + }, + "FileSystemId": { + "type": "string" + }, + "RootDirectory": { + "type": "string" + }, + "TransitEncryption": { + "type": "string" + }, + "TransitEncryptionPort": { + "type": "number" + } + }, + "required": [ + "FileSystemId" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainer": { + "additionalProperties": false, + "properties": { + "Args": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Command": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Env": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable" + }, + "type": "array" + }, + "Image": { + "type": "string" + }, + "ImagePullPolicy": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Resources": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerResourceRequirements" + }, + "SecurityContext": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerSecurityContext" + }, + "VolumeMounts": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerVolumeMount" + }, + "type": "array" + } + }, + "required": [ + "Image" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable": { + "additionalProperties": false, + "properties": { + "Name": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "required": [ + "Name" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerResourceRequirements": { + "additionalProperties": false, + "properties": { + "Limits": { + "type": "object" + }, + "Requests": { + "type": "object" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerSecurityContext": { + "additionalProperties": false, + "properties": { + "Privileged": { + "type": "boolean" + }, + "ReadOnlyRootFilesystem": { + "type": "boolean" + }, + "RunAsGroup": { + "type": "number" + }, + "RunAsNonRoot": { + "type": "boolean" + }, + "RunAsUser": { + "type": "number" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksContainerVolumeMount": { + "additionalProperties": false, + "properties": { + "MountPath": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "ReadOnly": { + "type": "boolean" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksEmptyDir": { + "additionalProperties": false, + "properties": { + "Medium": { + "type": "string" + }, + "SizeLimit": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksHostPath": { + "additionalProperties": false, + "properties": { + "Path": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksProperties": { + "additionalProperties": false, + "properties": { + "PodProperties": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.PodProperties" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksSecret": { + "additionalProperties": false, + "properties": { + "Optional": { + "type": "boolean" + }, + "SecretName": { + "type": "string" + } + }, + "required": [ + "SecretName" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EksVolume": { + "additionalProperties": false, + "properties": { + "EmptyDir": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksEmptyDir" + }, + "HostPath": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksHostPath" + }, + "Name": { + "type": "string" + }, + "Secret": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksSecret" + } + }, + "required": [ + "Name" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Environment": { + "additionalProperties": false, + "properties": { + "Name": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EphemeralStorage": { + "additionalProperties": false, + "properties": { + "SizeInGiB": { + "type": "number" + } + }, + "required": [ + "SizeInGiB" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.EvaluateOnExit": { + "additionalProperties": false, + "properties": { + "Action": { + "type": "string" + }, + "OnExitCode": { + "type": "string" + }, + "OnReason": { + "type": "string" + }, + "OnStatusReason": { + "type": "string" + } + }, + "required": [ + "Action" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.FargatePlatformConfiguration": { + "additionalProperties": false, + "properties": { + "PlatformVersion": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.LinuxParameters": { + "additionalProperties": false, + "properties": { + "Devices": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Device" + }, + "type": "array" + }, + "InitProcessEnabled": { + "type": "boolean" + }, + "MaxSwap": { + "type": "number" + }, + "SharedMemorySize": { + "type": "number" + }, + "Swappiness": { + "type": "number" + }, + "Tmpfs": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Tmpfs" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.LogConfiguration": { + "additionalProperties": false, + "properties": { + "LogDriver": { + "type": "string" + }, + "Options": { + "type": "object" + }, + "SecretOptions": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" + }, + "type": "array" + } + }, + "required": [ + "LogDriver" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Metadata": { + "additionalProperties": false, + "properties": { + "Labels": { + "type": "object" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.MountPoints": { + "additionalProperties": false, + "properties": { + "ContainerPath": { + "type": "string" + }, + "ReadOnly": { + "type": "boolean" + }, + "SourceVolume": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.NetworkConfiguration": { + "additionalProperties": false, + "properties": { + "AssignPublicIp": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.NodeProperties": { + "additionalProperties": false, + "properties": { + "MainNode": { + "type": "number" + }, + "NodeRangeProperties": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeRangeProperty" + }, + "type": "array" + }, + "NumNodes": { + "type": "number" + } + }, + "required": [ + "MainNode", + "NodeRangeProperties", + "NumNodes" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.NodeRangeProperty": { + "additionalProperties": false, + "properties": { + "Container": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" + }, + "TargetNodes": { + "type": "string" + } + }, + "required": [ + "TargetNodes" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.PodProperties": { + "additionalProperties": false, + "properties": { + "Containers": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainer" + }, + "type": "array" + }, + "DnsPolicy": { + "type": "string" + }, + "HostNetwork": { + "type": "boolean" + }, + "Metadata": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Metadata" + }, + "ServiceAccountName": { + "type": "string" + }, + "Volumes": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksVolume" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.ResourceRequirement": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.RetryStrategy": { + "additionalProperties": false, + "properties": { + "Attempts": { + "type": "number" + }, + "EvaluateOnExit": { + "items": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EvaluateOnExit" + }, + "type": "array" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.RuntimePlatform": { + "additionalProperties": false, + "properties": { + "CpuArchitecture": { + "type": "string" + }, + "OperatingSystemFamily": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Secret": { + "additionalProperties": false, + "properties": { + "Name": { + "type": "string" + }, + "ValueFrom": { + "type": "string" + } + }, + "required": [ + "Name", + "ValueFrom" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Timeout": { + "additionalProperties": false, + "properties": { + "AttemptDurationSeconds": { + "type": "number" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Tmpfs": { + "additionalProperties": false, + "properties": { + "ContainerPath": { + "type": "string" + }, + "MountOptions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Size": { + "type": "number" + } + }, + "required": [ + "ContainerPath", + "Size" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Ulimit": { + "additionalProperties": false, + "properties": { + "HardLimit": { + "type": "number" + }, + "Name": { + "type": "string" + }, + "SoftLimit": { + "type": "number" + } + }, + "required": [ + "HardLimit", + "Name", + "SoftLimit" + ], + "type": "object" + }, + "AWS::DevBatch::JobDefinition.Volumes": { + "additionalProperties": false, + "properties": { + "EfsVolumeConfiguration": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EfsVolumeConfiguration" + }, + "Host": { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition.VolumesHost" + }, + "Name": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::DevBatch::JobDefinition.VolumesHost": { + "additionalProperties": false, + "properties": { + "SourcePath": { + "type": "string" + } + }, + "type": "object" + }, "AWS::DevOpsGuru::LogAnomalyDetectionIntegration": { "additionalProperties": false, "properties": { @@ -85209,8 +85973,7 @@ } }, "required": [ - "Database", - "Sql" + "Database" ], "type": "object" }, @@ -249203,6 +249966,9 @@ { "$ref": "#/definitions/AWS::Detective::OrganizationAdmin" }, + { + "$ref": "#/definitions/AWS::DevBatch::JobDefinition" + }, { "$ref": "#/definitions/AWS::DevOpsGuru::LogAnomalyDetectionIntegration" }, diff --git a/schema_source/sam.schema.json b/schema_source/sam.schema.json index b5e1ccbd6..abfb1a1cb 100644 --- a/schema_source/sam.schema.json +++ b/schema_source/sam.schema.json @@ -2366,6 +2366,9 @@ "markdownDescription": "A string that configures how events will be read from Kafka topics\\. \n*Type*: String \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`AmazonManagedKafkaConfiguration`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html) property of an `AWS::Lambda::EventSourceMapping` resource\\.", "title": "ConsumerGroupId" }, + "DestinationConfig": { + "$ref": "#/definitions/PassThroughProp" + }, "FilterCriteria": { "allOf": [ { diff --git a/tests/translator/input/function_with_msk_s3_onfailure_dest.yaml b/tests/translator/input/function_with_msk_s3_onfailure_dest.yaml new file mode 100644 index 000000000..91acbf600 --- /dev/null +++ b/tests/translator/input/function_with_msk_s3_onfailure_dest.yaml @@ -0,0 +1,20 @@ +Resources: + MyMskStreamProcessor: + Type: AWS::Serverless::Function + Properties: + Runtime: nodejs12.x + Handler: index.handler + CodeUri: s3://sam-demo-bucket/kafka.zip + Events: + MyMskEvent: + Type: MSK + Properties: + StartingPosition: LATEST + Stream: !Sub arn:${AWS::Partition}:kafka:${AWS::Region}:012345678901:cluster/mycluster/6cc0432b-8618-4f44-bccc-e1fbd8fb7c4d-2 + Topics: + - MyDummyTestTopic + ConsumerGroupId: consumergroup1 + DestinationConfig: + OnFailure: + Type: S3 + Destination: !Sub arn:${AWS::Partition}:s3:::my-s3-arn diff --git a/tests/translator/output/aws-cn/function_with_msk_s3_onfailure_dest.json b/tests/translator/output/aws-cn/function_with_msk_s3_onfailure_dest.json new file mode 100644 index 000000000..b04313a5a --- /dev/null +++ b/tests/translator/output/aws-cn/function_with_msk_s3_onfailure_dest.json @@ -0,0 +1,114 @@ +{ + "Resources": { + "MyMskStreamProcessor": { + "Properties": { + "Code": { + "S3Bucket": "sam-demo-bucket", + "S3Key": "kafka.zip" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "MyMskStreamProcessorRole", + "Arn" + ] + }, + "Runtime": "nodejs12.x", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "MyMskStreamProcessorMyMskEvent": { + "Properties": { + "AmazonManagedKafkaEventSourceConfig": { + "ConsumerGroupId": "consumergroup1" + }, + "DestinationConfig": { + "OnFailure": { + "Destination": { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + } + } + }, + "EventSourceArn": { + "Fn::Sub": "arn:${AWS::Partition}:kafka:${AWS::Region}:012345678901:cluster/mycluster/6cc0432b-8618-4f44-bccc-e1fbd8fb7c4d-2" + }, + "FunctionName": { + "Ref": "MyMskStreamProcessor" + }, + "StartingPosition": "LATEST", + "Topics": [ + "MyDummyTestTopic" + ] + }, + "Type": "AWS::Lambda::EventSourceMapping" + }, + "MyMskStreamProcessorRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaMSKExecutionRole" + ], + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "/", + [ + { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + }, + "*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + } + } + ] + }, + "PolicyName": "MyMskStreamProcessorMyMskEventS3Policy" + } + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + } + } +} diff --git a/tests/translator/output/aws-us-gov/function_with_msk_s3_onfailure_dest.json b/tests/translator/output/aws-us-gov/function_with_msk_s3_onfailure_dest.json new file mode 100644 index 000000000..e9b5b458d --- /dev/null +++ b/tests/translator/output/aws-us-gov/function_with_msk_s3_onfailure_dest.json @@ -0,0 +1,114 @@ +{ + "Resources": { + "MyMskStreamProcessor": { + "Properties": { + "Code": { + "S3Bucket": "sam-demo-bucket", + "S3Key": "kafka.zip" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "MyMskStreamProcessorRole", + "Arn" + ] + }, + "Runtime": "nodejs12.x", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "MyMskStreamProcessorMyMskEvent": { + "Properties": { + "AmazonManagedKafkaEventSourceConfig": { + "ConsumerGroupId": "consumergroup1" + }, + "DestinationConfig": { + "OnFailure": { + "Destination": { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + } + } + }, + "EventSourceArn": { + "Fn::Sub": "arn:${AWS::Partition}:kafka:${AWS::Region}:012345678901:cluster/mycluster/6cc0432b-8618-4f44-bccc-e1fbd8fb7c4d-2" + }, + "FunctionName": { + "Ref": "MyMskStreamProcessor" + }, + "StartingPosition": "LATEST", + "Topics": [ + "MyDummyTestTopic" + ] + }, + "Type": "AWS::Lambda::EventSourceMapping" + }, + "MyMskStreamProcessorRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaMSKExecutionRole" + ], + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "/", + [ + { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + }, + "*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + } + } + ] + }, + "PolicyName": "MyMskStreamProcessorMyMskEventS3Policy" + } + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + } + } +} diff --git a/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json b/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json index a9c911511..562cb3744 100644 --- a/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json +++ b/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json @@ -4,12 +4,12 @@ "Number of errors found: 1. ", "Resource with id [MyFunction] is invalid. ", "Event with id [MyFunctionStreamEvent] is invalid. ", - "The only valid values for 'Type' are 'SQS' and 'SNS'" + "The only valid values for 'Type' are 'SQS', 'SNS', and 'S3'" ], - "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. Event with id [MyFunctionStreamEvent] is invalid. The only valid values for 'Type' are 'SQS' and 'SNS'", + "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. Event with id [MyFunctionStreamEvent] is invalid. The only valid values for 'Type' are 'SQS', 'SNS', and 'S3'", "errors": [ { - "errorMessage": "Resource with id [MyFunction] is invalid. Event with id [MyFunctionStreamEvent] is invalid. The only valid values for 'Type' are 'SQS' and 'SNS'" + "errorMessage": "Resource with id [MyFunction] is invalid. Event with id [MyFunctionStreamEvent] is invalid. The only valid values for 'Type' are 'SQS', 'SNS', and 'S3'" } ] } diff --git a/tests/translator/output/function_with_msk_s3_onfailure_dest.json b/tests/translator/output/function_with_msk_s3_onfailure_dest.json new file mode 100644 index 000000000..7c3ed5f19 --- /dev/null +++ b/tests/translator/output/function_with_msk_s3_onfailure_dest.json @@ -0,0 +1,114 @@ +{ + "Resources": { + "MyMskStreamProcessor": { + "Properties": { + "Code": { + "S3Bucket": "sam-demo-bucket", + "S3Key": "kafka.zip" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "MyMskStreamProcessorRole", + "Arn" + ] + }, + "Runtime": "nodejs12.x", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "MyMskStreamProcessorMyMskEvent": { + "Properties": { + "AmazonManagedKafkaEventSourceConfig": { + "ConsumerGroupId": "consumergroup1" + }, + "DestinationConfig": { + "OnFailure": { + "Destination": { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + } + } + }, + "EventSourceArn": { + "Fn::Sub": "arn:${AWS::Partition}:kafka:${AWS::Region}:012345678901:cluster/mycluster/6cc0432b-8618-4f44-bccc-e1fbd8fb7c4d-2" + }, + "FunctionName": { + "Ref": "MyMskStreamProcessor" + }, + "StartingPosition": "LATEST", + "Topics": [ + "MyDummyTestTopic" + ] + }, + "Type": "AWS::Lambda::EventSourceMapping" + }, + "MyMskStreamProcessorRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "arn:aws:iam::aws:policy/service-role/AWSLambdaMSKExecutionRole" + ], + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "/", + [ + { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + }, + "*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:${AWS::Partition}:s3:::my-s3-arn" + } + } + ] + }, + "PolicyName": "MyMskStreamProcessorMyMskEventS3Policy" + } + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + } + } +} From 625913c2acf39c6200f55c7e25cbabc93200c5ea Mon Sep 17 00:00:00 2001 From: Xia Zhao Date: Thu, 16 Nov 2023 17:00:42 +0000 Subject: [PATCH 2/8] Add support for Advanced logging in SAM --- docs/globals.rst | 1 + .../schema_source/aws_serverless_function.py | 3 + samtranslator/model/lambda_.py | 2 + samtranslator/model/sam_resources.py | 3 + samtranslator/plugins/globals/globals.py | 1 + samtranslator/schema/schema.json | 773 +----------------- schema_source/cloudformation.schema.json | 767 ----------------- schema_source/sam.schema.json | 6 + .../input/globals_for_function.yaml | 4 + .../output/aws-cn/globals_for_function.json | 6 + .../aws-us-gov/globals_for_function.json | 6 + .../error_globals_unsupported_property.json | 4 +- .../output/globals_for_function.json | 6 + 13 files changed, 46 insertions(+), 1536 deletions(-) diff --git a/docs/globals.rst b/docs/globals.rst index eb42c5a52..3fe3d2275 100644 --- a/docs/globals.rst +++ b/docs/globals.rst @@ -74,6 +74,7 @@ Currently, the following resources and properties are being supported: Architectures: EphemeralStorage: RuntimeManagementConfig: + LoggingConfig: Api: # Properties of AWS::Serverless::Api diff --git a/samtranslator/internal/schema_source/aws_serverless_function.py b/samtranslator/internal/schema_source/aws_serverless_function.py index 99c5a8e87..81cf160c5 100644 --- a/samtranslator/internal/schema_source/aws_serverless_function.py +++ b/samtranslator/internal/schema_source/aws_serverless_function.py @@ -507,6 +507,7 @@ class ScheduleV2Event(BaseModel): EphemeralStorage = Optional[PassThroughProp] SnapStart = Optional[PassThroughProp] # TODO: check the type RuntimeManagementConfig = Optional[PassThroughProp] # TODO: check the type +LoggingConfig = Optional[PassThroughProp] # TODO: add documentation class Properties(BaseModel): @@ -632,6 +633,7 @@ class Properties(BaseModel): Tracing: Optional[Tracing] = prop("Tracing") VersionDescription: Optional[PassThroughProp] = prop("VersionDescription") VpcConfig: Optional[VpcConfig] = prop("VpcConfig") + LoggingConfig: Optional[PassThroughProp] # TODO: add documentation class Globals(BaseModel): @@ -689,6 +691,7 @@ class Globals(BaseModel): ) SnapStart: Optional[SnapStart] = prop("SnapStart") RuntimeManagementConfig: Optional[RuntimeManagementConfig] = prop("RuntimeManagementConfig") + LoggingConfig: Optional[PassThroughProp] # TODO: add documentation class Resource(ResourceAttributes): diff --git a/samtranslator/model/lambda_.py b/samtranslator/model/lambda_.py index a5cb20a86..b79df9f4c 100644 --- a/samtranslator/model/lambda_.py +++ b/samtranslator/model/lambda_.py @@ -34,6 +34,7 @@ class LambdaFunction(Resource): "SnapStart": GeneratedProperty(), "EphemeralStorage": GeneratedProperty(), "RuntimeManagementConfig": GeneratedProperty(), + "LoggingConfig": GeneratedProperty(), } Code: Dict[str, Any] @@ -60,6 +61,7 @@ class LambdaFunction(Resource): SnapStart: Optional[Dict[str, Any]] EphemeralStorage: Optional[Dict[str, Any]] RuntimeManagementConfig: Optional[Dict[str, Any]] + LoggingConfig: Optional[Dict[str, Any]] runtime_attrs = {"name": lambda self: ref(self.logical_id), "arn": lambda self: fnGetAtt(self.logical_id, "Arn")} diff --git a/samtranslator/model/sam_resources.py b/samtranslator/model/sam_resources.py index 68d9a9e4d..f1382ea25 100644 --- a/samtranslator/model/sam_resources.py +++ b/samtranslator/model/sam_resources.py @@ -179,6 +179,7 @@ class SamFunction(SamResourceMacro): "SnapStart": PropertyType(False, IS_DICT), "FunctionUrlConfig": PropertyType(False, IS_DICT), "RuntimeManagementConfig": PassThroughProperty(False), + "LoggingConfig": PassThroughProperty(False), } FunctionName: Optional[Intrinsicable[str]] @@ -220,6 +221,7 @@ class SamFunction(SamResourceMacro): Architectures: Optional[List[Any]] SnapStart: Optional[Dict[str, Any]] FunctionUrlConfig: Optional[Dict[str, Any]] + LoggingConfig: Optional[Dict[str, Any]] event_resolver = ResourceTypeResolver( samtranslator.model.eventsources, @@ -603,6 +605,7 @@ def _construct_lambda_function(self, intrinsics_resolver: IntrinsicsResolver) -> lambda_function.CodeSigningConfigArn = self.CodeSigningConfigArn lambda_function.RuntimeManagementConfig = self.RuntimeManagementConfig # type: ignore[attr-defined] + lambda_function.LoggingConfig = self.LoggingConfig self._validate_package_type(lambda_function) return lambda_function diff --git a/samtranslator/plugins/globals/globals.py b/samtranslator/plugins/globals/globals.py index 46c54ea32..2bea29ba6 100644 --- a/samtranslator/plugins/globals/globals.py +++ b/samtranslator/plugins/globals/globals.py @@ -52,6 +52,7 @@ class Globals: "EphemeralStorage", "FunctionUrlConfig", "RuntimeManagementConfig", + "LoggingConfig", ], # Everything except # DefinitionBody: because its hard to reason about merge of Swagger dictionaries diff --git a/samtranslator/schema/schema.json b/samtranslator/schema/schema.json index c2a11f4bf..47549e27e 100644 --- a/samtranslator/schema/schema.json +++ b/samtranslator/schema/schema.json @@ -56213,770 +56213,6 @@ ], "type": "object" }, - "AWS::DevBatch::JobDefinition": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "ContainerProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" - }, - "EksProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksProperties" - }, - "JobDefinitionName": { - "type": "string" - }, - "NodeProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeProperties" - }, - "Parameters": { - "type": "object" - }, - "PlatformCapabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "PropagateTags": { - "type": "boolean" - }, - "RetryStrategy": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RetryStrategy" - }, - "SchedulingPriority": { - "type": "number" - }, - "Tags": { - "type": "object" - }, - "Timeout": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Timeout" - }, - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::DevBatch::JobDefinition" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.AuthorizationConfig": { - "additionalProperties": false, - "properties": { - "AccessPointId": { - "type": "string" - }, - "Iam": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.ContainerProperties": { - "additionalProperties": false, - "properties": { - "Command": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Environment": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Environment" - }, - "type": "array" - }, - "EphemeralStorage": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EphemeralStorage" - }, - "ExecutionRoleArn": { - "type": "string" - }, - "FargatePlatformConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.FargatePlatformConfiguration" - }, - "Image": { - "type": "string" - }, - "InstanceType": { - "type": "string" - }, - "JobRoleArn": { - "type": "string" - }, - "LinuxParameters": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LinuxParameters" - }, - "LogConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LogConfiguration" - }, - "Memory": { - "type": "number" - }, - "MountPoints": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.MountPoints" - }, - "type": "array" - }, - "NetworkConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NetworkConfiguration" - }, - "Privileged": { - "type": "boolean" - }, - "ReadonlyRootFilesystem": { - "type": "boolean" - }, - "ResourceRequirements": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ResourceRequirement" - }, - "type": "array" - }, - "RuntimePlatform": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RuntimePlatform" - }, - "Secrets": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" - }, - "type": "array" - }, - "Ulimits": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Ulimit" - }, - "type": "array" - }, - "User": { - "type": "string" - }, - "Vcpus": { - "type": "number" - }, - "Volumes": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Volumes" - }, - "type": "array" - } - }, - "required": [ - "Image" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Device": { - "additionalProperties": false, - "properties": { - "ContainerPath": { - "type": "string" - }, - "HostPath": { - "type": "string" - }, - "Permissions": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EfsVolumeConfiguration": { - "additionalProperties": false, - "properties": { - "AuthorizationConfig": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.AuthorizationConfig" - }, - "FileSystemId": { - "type": "string" - }, - "RootDirectory": { - "type": "string" - }, - "TransitEncryption": { - "type": "string" - }, - "TransitEncryptionPort": { - "type": "number" - } - }, - "required": [ - "FileSystemId" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainer": { - "additionalProperties": false, - "properties": { - "Args": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Command": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Env": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable" - }, - "type": "array" - }, - "Image": { - "type": "string" - }, - "ImagePullPolicy": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Resources": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerResourceRequirements" - }, - "SecurityContext": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerSecurityContext" - }, - "VolumeMounts": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerVolumeMount" - }, - "type": "array" - } - }, - "required": [ - "Image" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable": { - "additionalProperties": false, - "properties": { - "Name": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "required": [ - "Name" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerResourceRequirements": { - "additionalProperties": false, - "properties": { - "Limits": { - "type": "object" - }, - "Requests": { - "type": "object" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerSecurityContext": { - "additionalProperties": false, - "properties": { - "Privileged": { - "type": "boolean" - }, - "ReadOnlyRootFilesystem": { - "type": "boolean" - }, - "RunAsGroup": { - "type": "number" - }, - "RunAsNonRoot": { - "type": "boolean" - }, - "RunAsUser": { - "type": "number" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerVolumeMount": { - "additionalProperties": false, - "properties": { - "MountPath": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "ReadOnly": { - "type": "boolean" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksEmptyDir": { - "additionalProperties": false, - "properties": { - "Medium": { - "type": "string" - }, - "SizeLimit": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksHostPath": { - "additionalProperties": false, - "properties": { - "Path": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksProperties": { - "additionalProperties": false, - "properties": { - "PodProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.PodProperties" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksSecret": { - "additionalProperties": false, - "properties": { - "Optional": { - "type": "boolean" - }, - "SecretName": { - "type": "string" - } - }, - "required": [ - "SecretName" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksVolume": { - "additionalProperties": false, - "properties": { - "EmptyDir": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksEmptyDir" - }, - "HostPath": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksHostPath" - }, - "Name": { - "type": "string" - }, - "Secret": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksSecret" - } - }, - "required": [ - "Name" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Environment": { - "additionalProperties": false, - "properties": { - "Name": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EphemeralStorage": { - "additionalProperties": false, - "properties": { - "SizeInGiB": { - "type": "number" - } - }, - "required": [ - "SizeInGiB" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EvaluateOnExit": { - "additionalProperties": false, - "properties": { - "Action": { - "type": "string" - }, - "OnExitCode": { - "type": "string" - }, - "OnReason": { - "type": "string" - }, - "OnStatusReason": { - "type": "string" - } - }, - "required": [ - "Action" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.FargatePlatformConfiguration": { - "additionalProperties": false, - "properties": { - "PlatformVersion": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.LinuxParameters": { - "additionalProperties": false, - "properties": { - "Devices": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Device" - }, - "type": "array" - }, - "InitProcessEnabled": { - "type": "boolean" - }, - "MaxSwap": { - "type": "number" - }, - "SharedMemorySize": { - "type": "number" - }, - "Swappiness": { - "type": "number" - }, - "Tmpfs": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Tmpfs" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.LogConfiguration": { - "additionalProperties": false, - "properties": { - "LogDriver": { - "type": "string" - }, - "Options": { - "type": "object" - }, - "SecretOptions": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" - }, - "type": "array" - } - }, - "required": [ - "LogDriver" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Metadata": { - "additionalProperties": false, - "properties": { - "Labels": { - "type": "object" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.MountPoints": { - "additionalProperties": false, - "properties": { - "ContainerPath": { - "type": "string" - }, - "ReadOnly": { - "type": "boolean" - }, - "SourceVolume": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.NetworkConfiguration": { - "additionalProperties": false, - "properties": { - "AssignPublicIp": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.NodeProperties": { - "additionalProperties": false, - "properties": { - "MainNode": { - "type": "number" - }, - "NodeRangeProperties": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeRangeProperty" - }, - "type": "array" - }, - "NumNodes": { - "type": "number" - } - }, - "required": [ - "MainNode", - "NodeRangeProperties", - "NumNodes" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.NodeRangeProperty": { - "additionalProperties": false, - "properties": { - "Container": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" - }, - "TargetNodes": { - "type": "string" - } - }, - "required": [ - "TargetNodes" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.PodProperties": { - "additionalProperties": false, - "properties": { - "Containers": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainer" - }, - "type": "array" - }, - "DnsPolicy": { - "type": "string" - }, - "HostNetwork": { - "type": "boolean" - }, - "Metadata": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Metadata" - }, - "ServiceAccountName": { - "type": "string" - }, - "Volumes": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksVolume" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.ResourceRequirement": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.RetryStrategy": { - "additionalProperties": false, - "properties": { - "Attempts": { - "type": "number" - }, - "EvaluateOnExit": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EvaluateOnExit" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.RuntimePlatform": { - "additionalProperties": false, - "properties": { - "CpuArchitecture": { - "type": "string" - }, - "OperatingSystemFamily": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Secret": { - "additionalProperties": false, - "properties": { - "Name": { - "type": "string" - }, - "ValueFrom": { - "type": "string" - } - }, - "required": [ - "Name", - "ValueFrom" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Timeout": { - "additionalProperties": false, - "properties": { - "AttemptDurationSeconds": { - "type": "number" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Tmpfs": { - "additionalProperties": false, - "properties": { - "ContainerPath": { - "type": "string" - }, - "MountOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Size": { - "type": "number" - } - }, - "required": [ - "ContainerPath", - "Size" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Ulimit": { - "additionalProperties": false, - "properties": { - "HardLimit": { - "type": "number" - }, - "Name": { - "type": "string" - }, - "SoftLimit": { - "type": "number" - } - }, - "required": [ - "HardLimit", - "Name", - "SoftLimit" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Volumes": { - "additionalProperties": false, - "properties": { - "EfsVolumeConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EfsVolumeConfiguration" - }, - "Host": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.VolumesHost" - }, - "Name": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.VolumesHost": { - "additionalProperties": false, - "properties": { - "SourcePath": { - "type": "string" - } - }, - "type": "object" - }, "AWS::DevOpsGuru::LogAnomalyDetectionIntegration": { "additionalProperties": false, "properties": { @@ -253845,6 +253081,9 @@ "markdownDescription": "The list of `LayerVersion` ARNs that this function should use\\. The order specified here is the order in which they will be imported when running the Lambda function\\. \n*Type*: List \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`Layers`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers) property of an `AWS::Lambda::Function` resource\\.", "title": "Layers" }, + "LoggingConfig": { + "$ref": "#/definitions/PassThroughProp" + }, "MemorySize": { "allOf": [ { @@ -254190,6 +253429,9 @@ "markdownDescription": "The list of `LayerVersion` ARNs that this function should use\\. The order specified here is the order in which they will be imported when running the Lambda function\\. \n*Type*: List \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`Layers`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers) property of an `AWS::Lambda::Function` resource\\.", "title": "Layers" }, + "LoggingConfig": { + "$ref": "#/definitions/PassThroughProp" + }, "MemorySize": { "allOf": [ { @@ -257439,9 +256681,6 @@ { "$ref": "#/definitions/AWS::Detective::OrganizationAdmin" }, - { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition" - }, { "$ref": "#/definitions/AWS::DevOpsGuru::LogAnomalyDetectionIntegration" }, diff --git a/schema_source/cloudformation.schema.json b/schema_source/cloudformation.schema.json index 72cfda18f..6d16f000f 100644 --- a/schema_source/cloudformation.schema.json +++ b/schema_source/cloudformation.schema.json @@ -56185,770 +56185,6 @@ ], "type": "object" }, - "AWS::DevBatch::JobDefinition": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "ContainerProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" - }, - "EksProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksProperties" - }, - "JobDefinitionName": { - "type": "string" - }, - "NodeProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeProperties" - }, - "Parameters": { - "type": "object" - }, - "PlatformCapabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "PropagateTags": { - "type": "boolean" - }, - "RetryStrategy": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RetryStrategy" - }, - "SchedulingPriority": { - "type": "number" - }, - "Tags": { - "type": "object" - }, - "Timeout": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Timeout" - }, - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::DevBatch::JobDefinition" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.AuthorizationConfig": { - "additionalProperties": false, - "properties": { - "AccessPointId": { - "type": "string" - }, - "Iam": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.ContainerProperties": { - "additionalProperties": false, - "properties": { - "Command": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Environment": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Environment" - }, - "type": "array" - }, - "EphemeralStorage": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EphemeralStorage" - }, - "ExecutionRoleArn": { - "type": "string" - }, - "FargatePlatformConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.FargatePlatformConfiguration" - }, - "Image": { - "type": "string" - }, - "InstanceType": { - "type": "string" - }, - "JobRoleArn": { - "type": "string" - }, - "LinuxParameters": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LinuxParameters" - }, - "LogConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.LogConfiguration" - }, - "Memory": { - "type": "number" - }, - "MountPoints": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.MountPoints" - }, - "type": "array" - }, - "NetworkConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NetworkConfiguration" - }, - "Privileged": { - "type": "boolean" - }, - "ReadonlyRootFilesystem": { - "type": "boolean" - }, - "ResourceRequirements": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ResourceRequirement" - }, - "type": "array" - }, - "RuntimePlatform": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.RuntimePlatform" - }, - "Secrets": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" - }, - "type": "array" - }, - "Ulimits": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Ulimit" - }, - "type": "array" - }, - "User": { - "type": "string" - }, - "Vcpus": { - "type": "number" - }, - "Volumes": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Volumes" - }, - "type": "array" - } - }, - "required": [ - "Image" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Device": { - "additionalProperties": false, - "properties": { - "ContainerPath": { - "type": "string" - }, - "HostPath": { - "type": "string" - }, - "Permissions": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EfsVolumeConfiguration": { - "additionalProperties": false, - "properties": { - "AuthorizationConfig": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.AuthorizationConfig" - }, - "FileSystemId": { - "type": "string" - }, - "RootDirectory": { - "type": "string" - }, - "TransitEncryption": { - "type": "string" - }, - "TransitEncryptionPort": { - "type": "number" - } - }, - "required": [ - "FileSystemId" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainer": { - "additionalProperties": false, - "properties": { - "Args": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Command": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Env": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable" - }, - "type": "array" - }, - "Image": { - "type": "string" - }, - "ImagePullPolicy": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Resources": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerResourceRequirements" - }, - "SecurityContext": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerSecurityContext" - }, - "VolumeMounts": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainerVolumeMount" - }, - "type": "array" - } - }, - "required": [ - "Image" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerEnvironmentVariable": { - "additionalProperties": false, - "properties": { - "Name": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "required": [ - "Name" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerResourceRequirements": { - "additionalProperties": false, - "properties": { - "Limits": { - "type": "object" - }, - "Requests": { - "type": "object" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerSecurityContext": { - "additionalProperties": false, - "properties": { - "Privileged": { - "type": "boolean" - }, - "ReadOnlyRootFilesystem": { - "type": "boolean" - }, - "RunAsGroup": { - "type": "number" - }, - "RunAsNonRoot": { - "type": "boolean" - }, - "RunAsUser": { - "type": "number" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksContainerVolumeMount": { - "additionalProperties": false, - "properties": { - "MountPath": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "ReadOnly": { - "type": "boolean" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksEmptyDir": { - "additionalProperties": false, - "properties": { - "Medium": { - "type": "string" - }, - "SizeLimit": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksHostPath": { - "additionalProperties": false, - "properties": { - "Path": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksProperties": { - "additionalProperties": false, - "properties": { - "PodProperties": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.PodProperties" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksSecret": { - "additionalProperties": false, - "properties": { - "Optional": { - "type": "boolean" - }, - "SecretName": { - "type": "string" - } - }, - "required": [ - "SecretName" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EksVolume": { - "additionalProperties": false, - "properties": { - "EmptyDir": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksEmptyDir" - }, - "HostPath": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksHostPath" - }, - "Name": { - "type": "string" - }, - "Secret": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksSecret" - } - }, - "required": [ - "Name" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Environment": { - "additionalProperties": false, - "properties": { - "Name": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EphemeralStorage": { - "additionalProperties": false, - "properties": { - "SizeInGiB": { - "type": "number" - } - }, - "required": [ - "SizeInGiB" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.EvaluateOnExit": { - "additionalProperties": false, - "properties": { - "Action": { - "type": "string" - }, - "OnExitCode": { - "type": "string" - }, - "OnReason": { - "type": "string" - }, - "OnStatusReason": { - "type": "string" - } - }, - "required": [ - "Action" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.FargatePlatformConfiguration": { - "additionalProperties": false, - "properties": { - "PlatformVersion": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.LinuxParameters": { - "additionalProperties": false, - "properties": { - "Devices": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Device" - }, - "type": "array" - }, - "InitProcessEnabled": { - "type": "boolean" - }, - "MaxSwap": { - "type": "number" - }, - "SharedMemorySize": { - "type": "number" - }, - "Swappiness": { - "type": "number" - }, - "Tmpfs": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Tmpfs" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.LogConfiguration": { - "additionalProperties": false, - "properties": { - "LogDriver": { - "type": "string" - }, - "Options": { - "type": "object" - }, - "SecretOptions": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Secret" - }, - "type": "array" - } - }, - "required": [ - "LogDriver" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Metadata": { - "additionalProperties": false, - "properties": { - "Labels": { - "type": "object" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.MountPoints": { - "additionalProperties": false, - "properties": { - "ContainerPath": { - "type": "string" - }, - "ReadOnly": { - "type": "boolean" - }, - "SourceVolume": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.NetworkConfiguration": { - "additionalProperties": false, - "properties": { - "AssignPublicIp": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.NodeProperties": { - "additionalProperties": false, - "properties": { - "MainNode": { - "type": "number" - }, - "NodeRangeProperties": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.NodeRangeProperty" - }, - "type": "array" - }, - "NumNodes": { - "type": "number" - } - }, - "required": [ - "MainNode", - "NodeRangeProperties", - "NumNodes" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.NodeRangeProperty": { - "additionalProperties": false, - "properties": { - "Container": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.ContainerProperties" - }, - "TargetNodes": { - "type": "string" - } - }, - "required": [ - "TargetNodes" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.PodProperties": { - "additionalProperties": false, - "properties": { - "Containers": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksContainer" - }, - "type": "array" - }, - "DnsPolicy": { - "type": "string" - }, - "HostNetwork": { - "type": "boolean" - }, - "Metadata": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.Metadata" - }, - "ServiceAccountName": { - "type": "string" - }, - "Volumes": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EksVolume" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.ResourceRequirement": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.RetryStrategy": { - "additionalProperties": false, - "properties": { - "Attempts": { - "type": "number" - }, - "EvaluateOnExit": { - "items": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EvaluateOnExit" - }, - "type": "array" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.RuntimePlatform": { - "additionalProperties": false, - "properties": { - "CpuArchitecture": { - "type": "string" - }, - "OperatingSystemFamily": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Secret": { - "additionalProperties": false, - "properties": { - "Name": { - "type": "string" - }, - "ValueFrom": { - "type": "string" - } - }, - "required": [ - "Name", - "ValueFrom" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Timeout": { - "additionalProperties": false, - "properties": { - "AttemptDurationSeconds": { - "type": "number" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Tmpfs": { - "additionalProperties": false, - "properties": { - "ContainerPath": { - "type": "string" - }, - "MountOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Size": { - "type": "number" - } - }, - "required": [ - "ContainerPath", - "Size" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Ulimit": { - "additionalProperties": false, - "properties": { - "HardLimit": { - "type": "number" - }, - "Name": { - "type": "string" - }, - "SoftLimit": { - "type": "number" - } - }, - "required": [ - "HardLimit", - "Name", - "SoftLimit" - ], - "type": "object" - }, - "AWS::DevBatch::JobDefinition.Volumes": { - "additionalProperties": false, - "properties": { - "EfsVolumeConfiguration": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.EfsVolumeConfiguration" - }, - "Host": { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition.VolumesHost" - }, - "Name": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::DevBatch::JobDefinition.VolumesHost": { - "additionalProperties": false, - "properties": { - "SourcePath": { - "type": "string" - } - }, - "type": "object" - }, "AWS::DevOpsGuru::LogAnomalyDetectionIntegration": { "additionalProperties": false, "properties": { @@ -249966,9 +249202,6 @@ { "$ref": "#/definitions/AWS::Detective::OrganizationAdmin" }, - { - "$ref": "#/definitions/AWS::DevBatch::JobDefinition" - }, { "$ref": "#/definitions/AWS::DevOpsGuru::LogAnomalyDetectionIntegration" }, diff --git a/schema_source/sam.schema.json b/schema_source/sam.schema.json index abfb1a1cb..8e63394c0 100644 --- a/schema_source/sam.schema.json +++ b/schema_source/sam.schema.json @@ -5338,6 +5338,9 @@ "markdownDescription": "The list of `LayerVersion` ARNs that this function should use\\. The order specified here is the order in which they will be imported when running the Lambda function\\. \n*Type*: List \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`Layers`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers) property of an `AWS::Lambda::Function` resource\\.", "title": "Layers" }, + "LoggingConfig": { + "$ref": "#/definitions/PassThroughProp" + }, "MemorySize": { "allOf": [ { @@ -5860,6 +5863,9 @@ "markdownDescription": "The list of `LayerVersion` ARNs that this function should use\\. The order specified here is the order in which they will be imported when running the Lambda function\\. \n*Type*: List \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`Layers`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers) property of an `AWS::Lambda::Function` resource\\.", "title": "Layers" }, + "LoggingConfig": { + "$ref": "#/definitions/PassThroughProp" + }, "MemorySize": { "allOf": [ { diff --git a/tests/translator/input/globals_for_function.yaml b/tests/translator/input/globals_for_function.yaml index 2b8343c9e..3cd3dbcfc 100644 --- a/tests/translator/input/globals_for_function.yaml +++ b/tests/translator/input/globals_for_function.yaml @@ -30,6 +30,10 @@ Globals: Size: 1024 RuntimeManagementConfig: UpdateRuntimeOn: Auto + LoggingConfig: + LogGroup: myJsonStructuredLogs + + Resources: MinimalFunction: diff --git a/tests/translator/output/aws-cn/globals_for_function.json b/tests/translator/output/aws-cn/globals_for_function.json index 7bf633101..ab1407f8c 100644 --- a/tests/translator/output/aws-cn/globals_for_function.json +++ b/tests/translator/output/aws-cn/globals_for_function.json @@ -28,6 +28,9 @@ "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:layer:MyLayer2:2" } ], + "LoggingConfig": { + "LogGroup": "myJsonStructuredLogs" + }, "MemorySize": 512, "ReservedConcurrentExecutions": 100, "Role": { @@ -162,6 +165,9 @@ "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:layer:MyLayer:1" } ], + "LoggingConfig": { + "LogGroup": "myJsonStructuredLogs" + }, "MemorySize": 1024, "ReservedConcurrentExecutions": 50, "Role": { diff --git a/tests/translator/output/aws-us-gov/globals_for_function.json b/tests/translator/output/aws-us-gov/globals_for_function.json index 8405aa369..34e2d5cff 100644 --- a/tests/translator/output/aws-us-gov/globals_for_function.json +++ b/tests/translator/output/aws-us-gov/globals_for_function.json @@ -28,6 +28,9 @@ "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:layer:MyLayer2:2" } ], + "LoggingConfig": { + "LogGroup": "myJsonStructuredLogs" + }, "MemorySize": 512, "ReservedConcurrentExecutions": 100, "Role": { @@ -162,6 +165,9 @@ "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:layer:MyLayer:1" } ], + "LoggingConfig": { + "LogGroup": "myJsonStructuredLogs" + }, "MemorySize": 1024, "ReservedConcurrentExecutions": 50, "Role": { diff --git a/tests/translator/output/error_globals_unsupported_property.json b/tests/translator/output/error_globals_unsupported_property.json index 2ec0b0c96..b3e28e3c7 100644 --- a/tests/translator/output/error_globals_unsupported_property.json +++ b/tests/translator/output/error_globals_unsupported_property.json @@ -4,7 +4,7 @@ "Number of errors found: 1. ", "'Globals' section is invalid. ", "'SomeKey' is not a supported property of 'Function'. ", - "Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'PropagateTags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'AutoPublishAliasAllProperties', 'Layers', 'DeploymentPreference', 'RolePath', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig', 'FileSystemConfigs', 'CodeSigningConfigArn', 'Architectures', 'SnapStart', 'EphemeralStorage', 'FunctionUrlConfig']" + "Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'PropagateTags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'AutoPublishAliasAllProperties', 'Layers', 'DeploymentPreference', 'RolePath', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig', 'FileSystemConfigs', 'CodeSigningConfigArn', 'Architectures', 'SnapStart', 'EphemeralStorage', 'FunctionUrlConfig', 'LoggingConfig']" ], - "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'SomeKey' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'PropagateTags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'AutoPublishAliasAllProperties', 'Layers', 'DeploymentPreference', 'RolePath', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig', 'FileSystemConfigs', 'CodeSigningConfigArn', 'Architectures', 'SnapStart', 'EphemeralStorage', 'FunctionUrlConfig']" + "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'SomeKey' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'PropagateTags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'AutoPublishAliasAllProperties', 'Layers', 'DeploymentPreference', 'RolePath', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig', 'FileSystemConfigs', 'CodeSigningConfigArn', 'Architectures', 'SnapStart', 'EphemeralStorage', 'FunctionUrlConfig', 'LoggingConfig']" } diff --git a/tests/translator/output/globals_for_function.json b/tests/translator/output/globals_for_function.json index d401d4568..ae9543ab6 100644 --- a/tests/translator/output/globals_for_function.json +++ b/tests/translator/output/globals_for_function.json @@ -28,6 +28,9 @@ "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:layer:MyLayer2:2" } ], + "LoggingConfig": { + "LogGroup": "myJsonStructuredLogs" + }, "MemorySize": 512, "ReservedConcurrentExecutions": 100, "Role": { @@ -162,6 +165,9 @@ "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:layer:MyLayer:1" } ], + "LoggingConfig": { + "LogGroup": "myJsonStructuredLogs" + }, "MemorySize": 1024, "ReservedConcurrentExecutions": 50, "Role": { From e2d6f3792636e6056b1ec7341a84b14a1438f6e2 Mon Sep 17 00:00:00 2001 From: aws-sam-cli-bot <46753707+aws-sam-cli-bot@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:00:42 +0000 Subject: [PATCH 3/8] chore: bump version to 1.80.0 --- samtranslator/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index 1d8b1fa28..bd41b85a3 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = "1.77.0" +__version__ = "1.80.0" From b92191f648248c11bd67b01552c6c663a68912a1 Mon Sep 17 00:00:00 2001 From: aws-sam-cli-bot <46753707+aws-sam-cli-bot@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:35:29 +0000 Subject: [PATCH 4/8] chore: bump version to 1.81.0 --- samtranslator/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index d88191f46..10fa444db 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = "1.79.0" +__version__ = "1.81.0" From 8b82a3112be05928f3f0488f20816f1792fc697c Mon Sep 17 00:00:00 2001 From: Connor Robertson Date: Wed, 22 Nov 2023 15:29:42 -0800 Subject: [PATCH 5/8] Revert "Release 1.81.0 (to main)" (#3432) --- integration/combination/test_connectors.py | 1 - .../connector_appsync_to_eventbus.json | 38 - .../connector_appsync_to_eventbus.yaml | 192 -- .../single/test_basic_state_machine.py | 4 - pytest.ini | 2 - samtranslator/__init__.py | 2 +- .../schema_source/aws_serverless_function.py | 4 +- .../internal/schema_source/common.py | 1 - .../model/connector_profiles/profiles.json | 17 - samtranslator/model/eventsources/push.py | 3 - samtranslator/open_api/open_api.py | 4 - .../plugins/api/implicit_api_plugin.py | 8 +- samtranslator/plugins/globals/globals.py | 62 +- .../plugins/globals/globals_plugin.py | 14 +- samtranslator/schema/schema.json | 1884 +---------------- samtranslator/sdk/resource.py | 3 +- samtranslator/translator/translator.py | 4 - samtranslator/utils/actions.py | 60 - samtranslator/utils/traverse.py | 67 - schema_source/cloudformation.schema.json | 1796 +--------------- schema_source/sam.schema.json | 132 +- tests/plugins/globals/test_globals.py | 24 - .../input/connector_appsync_to_eventbus.yaml | 66 - .../input/error_api_invalid_auth.yaml | 16 - ..._function_with_invalid_ignore_globals.yaml | 12 - .../input/function_with_ignore_globals.yaml | 33 - .../input/layer_version_depends_on.yaml | 26 - ...te_replace_policy_and_deletion_policy.yaml | 59 - .../aws-cn/connector_appsync_to_eventbus.json | 121 -- .../aws-cn/function_with_ignore_globals.json | 169 -- .../aws-cn/layer_version_depends_on.json | 42 - ...te_replace_policy_and_deletion_policy.json | 412 ---- .../connector_appsync_to_eventbus.json | 121 -- .../function_with_ignore_globals.json | 169 -- .../aws-us-gov/layer_version_depends_on.json | 42 - ...te_replace_policy_and_deletion_policy.json | 412 ---- .../output/connector_appsync_to_eventbus.json | 121 -- .../output/error_api_invalid_auth.json | 8 +- ..._function_with_invalid_ignore_globals.json | 14 - .../output/function_with_ignore_globals.json | 169 -- .../output/layer_version_depends_on.json | 42 - ...te_replace_policy_and_deletion_policy.json | 404 ---- 42 files changed, 176 insertions(+), 6604 deletions(-) delete mode 100644 integration/resources/expected/combination/connector_appsync_to_eventbus.json delete mode 100644 integration/resources/templates/combination/connector_appsync_to_eventbus.yaml delete mode 100644 samtranslator/utils/actions.py delete mode 100644 samtranslator/utils/traverse.py delete mode 100644 tests/translator/input/connector_appsync_to_eventbus.yaml delete mode 100644 tests/translator/input/error_function_with_invalid_ignore_globals.yaml delete mode 100644 tests/translator/input/function_with_ignore_globals.yaml delete mode 100644 tests/translator/input/layer_version_depends_on.yaml delete mode 100644 tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml delete mode 100644 tests/translator/output/aws-cn/connector_appsync_to_eventbus.json delete mode 100644 tests/translator/output/aws-cn/function_with_ignore_globals.json delete mode 100644 tests/translator/output/aws-cn/layer_version_depends_on.json delete mode 100644 tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json delete mode 100644 tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json delete mode 100644 tests/translator/output/aws-us-gov/function_with_ignore_globals.json delete mode 100644 tests/translator/output/aws-us-gov/layer_version_depends_on.json delete mode 100644 tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json delete mode 100644 tests/translator/output/connector_appsync_to_eventbus.json delete mode 100644 tests/translator/output/error_function_with_invalid_ignore_globals.json delete mode 100644 tests/translator/output/function_with_ignore_globals.json delete mode 100644 tests/translator/output/layer_version_depends_on.json delete mode 100644 tests/translator/output/valid_update_replace_policy_and_deletion_policy.json diff --git a/integration/combination/test_connectors.py b/integration/combination/test_connectors.py index 63b156038..e9a2553a7 100644 --- a/integration/combination/test_connectors.py +++ b/integration/combination/test_connectors.py @@ -62,7 +62,6 @@ def tearDown(self): ("combination/connector_appsync_api_to_lambda",), ("combination/connector_appsync_to_lambda",), ("combination/connector_appsync_to_table",), - ("combination/connector_appsync_to_eventbus",), ("combination/connector_function_to_function",), ("combination/connector_restapi_to_function",), ("combination/connector_httpapi_to_function",), diff --git a/integration/resources/expected/combination/connector_appsync_to_eventbus.json b/integration/resources/expected/combination/connector_appsync_to_eventbus.json deleted file mode 100644 index c4da4cb98..000000000 --- a/integration/resources/expected/combination/connector_appsync_to_eventbus.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "LogicalResourceId": "ApiKey", - "ResourceType": "AWS::AppSync::ApiKey" - }, - { - "LogicalResourceId": "ApiSchema", - "ResourceType": "AWS::AppSync::GraphQLSchema" - }, - { - "LogicalResourceId": "AppSyncApi", - "ResourceType": "AWS::AppSync::GraphQLApi" - }, - { - "LogicalResourceId": "AppSyncEventBusDataSource", - "ResourceType": "AWS::AppSync::DataSource" - }, - { - "LogicalResourceId": "AppSyncSayHelloResolver", - "ResourceType": "AWS::AppSync::Resolver" - }, - { - "LogicalResourceId": "ConnectorPolicy", - "ResourceType": "AWS::IAM::ManagedPolicy" - }, - { - "LogicalResourceId": "EventBridgeRole", - "ResourceType": "AWS::IAM::Role" - }, - { - "LogicalResourceId": "EventBus", - "ResourceType": "AWS::Events::EventBus" - }, - { - "LogicalResourceId": "TriggerFunction", - "ResourceType": "AWS::Lambda::Function" - } -] diff --git a/integration/resources/templates/combination/connector_appsync_to_eventbus.yaml b/integration/resources/templates/combination/connector_appsync_to_eventbus.yaml deleted file mode 100644 index bc3ca12f0..000000000 --- a/integration/resources/templates/combination/connector_appsync_to_eventbus.yaml +++ /dev/null @@ -1,192 +0,0 @@ -Resources: - EventBus: - Type: AWS::Events::EventBus - Properties: - Name: !Sub "${AWS::StackName}-EventBus" - - EventBridgeRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - sts:AssumeRole - Principal: - Service: - - appsync.amazonaws.com - - lambda.amazonaws.com - - AppSyncApi: - Type: AWS::AppSync::GraphQLApi - Properties: - Name: AppSyncApi - AuthenticationType: API_KEY - - ApiSchema: - Type: AWS::AppSync::GraphQLSchema - Properties: - ApiId: !GetAtt AppSyncApi.ApiId - Definition: | - type EntryDetails { - ErrorCode: String - ErrorMessage: String - EventId: String! - } - - type PutEventsResult { - Entries: [EntryDetails!]! - FailedEntry: Int - } - - type Query { - sayHello: PutEventsResult! - } - - schema { - query: Query - } - - AppSyncEventBusDataSource: - Type: AWS::AppSync::DataSource - Properties: - ApiId: !GetAtt AppSyncApi.ApiId - Name: AppSyncEventBusDataSource - Type: AMAZON_EVENTBRIDGE - ServiceRoleArn: !GetAtt EventBridgeRole.Arn - EventBridgeConfig: - EventBusArn: !GetAtt 'EventBus.Arn' - - AppSyncSayHelloResolver: - DependsOn: ApiSchema - Type: AWS::AppSync::Resolver - Properties: - ApiId: !GetAtt AppSyncApi.ApiId - TypeName: Query - FieldName: sayHello - DataSourceName: !GetAtt AppSyncEventBusDataSource.Name - Runtime: - Name: APPSYNC_JS - RuntimeVersion: 1.0.0 - Code: | - import { util } from '@aws-appsync/utils'; - export function request(ctx) { - return { - "operation" : "PutEvents", - "events" : [{ - "source": "com.mycompany.myapp", - "detail": { - "key1" : "value1", - "key2" : "value2" - }, - "resources": ["Resource1", "Resource2"], - "detailType": "myDetailType" - }] - } - } - - export function response(ctx) { - if(ctx.error) - util.error(ctx.error.message, ctx.error.type, ctx.result) - else - return ctx.result - } - - Connector: - Type: AWS::Serverless::Connector - Properties: - Source: - Id: AppSyncEventBusDataSource - Destination: - Id: EventBus - Permissions: - - Write - - ApiKey: - Type: AWS::AppSync::ApiKey - Properties: - ApiId: !GetAtt AppSyncApi.ApiId - - TriggerFunction: - Type: AWS::Serverless::Function - Properties: - Role: !GetAtt EventBridgeRole.Arn - Environment: - Variables: - API_KEY: !GetAtt ApiKey.ApiKey - GRAPHQL_URL: !GetAtt AppSyncApi.GraphQLUrl - EventBusName: !Ref EventBus - Runtime: nodejs16.x - Handler: index.handler - InlineCode: | - const https = require("https"); - - exports.handler = async () => { - const queries = { - sayHello: /* GraphQL */ ` - query { - sayHello { - Entries { - ErrorCode - EventId - ErrorMessage - } - FailedEntry - } - } - `, - }; - - const fetch = async (url, options) => - new Promise((resolve, reject) => { - const req = https.request(url, options, (res) => { - const body = []; - res.on("data", (chunk) => body.push(chunk)); - res.on("end", () => { - const resString = Buffer.concat(body).toString(); - resolve(resString); - }); - }); - req.on("error", (err) => { - reject(err); - }); - req.on("timeout", () => { - req.destroy(); - reject(new Error("Request time out")); - }); - req.write(options.body); - req.end(); - }); - - const makeRequest = async (queryName) => { - const options = { - method: "POST", - headers: { - "x-api-key": process.env.API_KEY, - }, - body: JSON.stringify({ query: queries[queryName] }), - timeout: 600000, // ms - }; - - const response = await fetch(process.env.GRAPHQL_URL, options); - let body = JSON.parse(response); - const data = body.data?.[queryName]; - - if (body.errors !== undefined) { - throw JSON.stringify(body.errors); - } - - if (data.FailedEntry != null || data.ErrorCode != null ) { - throw new Error( - `${queryName} error: failed to send event to eventbus ${process.env.EventBusName}`); - } - - return body.data; - }; - - await makeRequest("sayHello"); - }; - -Metadata: - SamTransformTest: true diff --git a/integration/single/test_basic_state_machine.py b/integration/single/test_basic_state_machine.py index ddcca881d..5f58abe55 100644 --- a/integration/single/test_basic_state_machine.py +++ b/integration/single/test_basic_state_machine.py @@ -34,10 +34,6 @@ def test_basic_state_machine_with_tags(self): self._verify_tag_presence(tags, "TagOne", "ValueOne") self._verify_tag_presence(tags, "TagTwo", "ValueTwo") - @skipIf( - current_region_does_not_support([STATE_MACHINE_INLINE_DEFINITION]), - "StateMachine with inline definition is not supported in this testing region", - ) def test_state_machine_with_role_path(self): """ Creates a State machine with a Role Path diff --git a/pytest.ini b/pytest.ini index c130f7c2a..3fc1047ed 100644 --- a/pytest.ini +++ b/pytest.ini @@ -20,5 +20,3 @@ filterwarnings = ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning # Pytest warnings ignore::pytest.PytestUnraisableExceptionWarning - # https://github.com/urllib3/urllib3/blob/main/src/urllib3/poolmanager.py#L313 - ignore::DeprecationWarning:urllib3.*: diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index 10fa444db..bd41b85a3 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = "1.81.0" +__version__ = "1.80.0" diff --git a/samtranslator/internal/schema_source/aws_serverless_function.py b/samtranslator/internal/schema_source/aws_serverless_function.py index af97a1cbf..81cf160c5 100644 --- a/samtranslator/internal/schema_source/aws_serverless_function.py +++ b/samtranslator/internal/schema_source/aws_serverless_function.py @@ -628,7 +628,7 @@ class Properties(BaseModel): SnapStart: Optional[SnapStart] = prop("SnapStart") RuntimeManagementConfig: Optional[RuntimeManagementConfig] = prop("RuntimeManagementConfig") Tags: Optional[Tags] = prop("Tags") - PropagateTags: Optional[bool] = prop("PropagateTags") + PropagateTags: Optional[bool] # TODO: add docs Timeout: Optional[Timeout] = prop("Timeout") Tracing: Optional[Tracing] = prop("Tracing") VersionDescription: Optional[PassThroughProp] = prop("VersionDescription") @@ -659,7 +659,7 @@ class Globals(BaseModel): ["AWS::Lambda::Function", "Properties", "Environment"], ) Tags: Optional[Tags] = prop("Tags") - PropagateTags: Optional[bool] = prop("PropagateTags") + PropagateTags: Optional[bool] # TODO: add docs Tracing: Optional[Tracing] = prop("Tracing") KmsKeyArn: Optional[KmsKeyArn] = prop("KmsKeyArn") Layers: Optional[Layers] = prop("Layers") diff --git a/samtranslator/internal/schema_source/common.py b/samtranslator/internal/schema_source/common.py index b74e3877c..6ab0e41f5 100644 --- a/samtranslator/internal/schema_source/common.py +++ b/samtranslator/internal/schema_source/common.py @@ -99,4 +99,3 @@ class ResourceAttributes(BaseModel): Metadata: Optional[PassThroughProp] UpdateReplacePolicy: Optional[PassThroughProp] Condition: Optional[PassThroughProp] - IgnoreGlobals: Optional[Union[str, List[str]]] diff --git a/samtranslator/model/connector_profiles/profiles.json b/samtranslator/model/connector_profiles/profiles.json index 31769e16c..c1fb1e3d6 100644 --- a/samtranslator/model/connector_profiles/profiles.json +++ b/samtranslator/model/connector_profiles/profiles.json @@ -790,23 +790,6 @@ } } } - }, - "AWS::Events::EventBus": { - "Type": "AWS_IAM_ROLE_MANAGED_POLICY", - "Properties": { - "SourcePolicy": true, - "AccessCategories": { - "Write": { - "Statement": [ - { - "Effect": "Allow", - "Action": ["events:PutEvents"], - "Resource": ["%{Destination.Arn}"] - } - ] - } - } - } } }, "AWS::AppSync::GraphQLApi": { diff --git a/samtranslator/model/eventsources/push.py b/samtranslator/model/eventsources/push.py index 07552cd8c..a296edbc6 100644 --- a/samtranslator/model/eventsources/push.py +++ b/samtranslator/model/eventsources/push.py @@ -1116,11 +1116,8 @@ def add_auth_to_swagger( # noqa: PLR0912, PLR0913 ) auth_scopes = event_auth.get("AuthorizationScopes") - if auth_scopes: sam_expect(auth_scopes, event_id, "Auth.AuthorizationScopes", is_sam_event=True).to_be_a_list() - if not method_authorizer: - raise InvalidEventException(event_id, "AuthorizationScopes works only when Authorizer is set") apikey_required_setting = event_auth.get("ApiKeyRequired") apikey_required_setting_is_false = apikey_required_setting is not None and not apikey_required_setting diff --git a/samtranslator/open_api/open_api.py b/samtranslator/open_api/open_api.py index 1ccfa438b..0eb18bae3 100644 --- a/samtranslator/open_api/open_api.py +++ b/samtranslator/open_api/open_api.py @@ -518,10 +518,6 @@ def openapi(self) -> Dict[str, Any]: if self.security_schemes: self._doc.setdefault("components", Py27Dict()) - if not self._doc["components"]: - # explicitly set to dict to account for scenario where - # 'components' is explicitly set to None - self._doc["components"] = Py27Dict() self._doc["components"]["securitySchemes"] = self.security_schemes if self.info: diff --git a/samtranslator/plugins/api/implicit_api_plugin.py b/samtranslator/plugins/api/implicit_api_plugin.py index 454f40142..9de8ab270 100644 --- a/samtranslator/plugins/api/implicit_api_plugin.py +++ b/samtranslator/plugins/api/implicit_api_plugin.py @@ -496,8 +496,8 @@ def _update_resource_attributes_from_api_event( # noqa: PLR0913 method_conditions = api_dict_condition.setdefault(path, {}) method_conditions[method] = condition - api_dict_deletion = self.api_deletion_policies.setdefault(api_id, []) - api_dict_deletion.append(deletion_policy) + api_dict_deletion = self.api_deletion_policies.setdefault(api_id, set()) + api_dict_deletion.add(deletion_policy) - api_dict_update_replace = self.api_update_replace_policies.setdefault(api_id, []) - api_dict_update_replace.append(update_replace_policy) + api_dict_update_replace = self.api_update_replace_policies.setdefault(api_id, set()) + api_dict_update_replace.add(update_replace_policy) diff --git a/samtranslator/plugins/globals/globals.py b/samtranslator/plugins/globals/globals.py index 65adb6ac8..2bea29ba6 100644 --- a/samtranslator/plugins/globals/globals.py +++ b/samtranslator/plugins/globals/globals.py @@ -1,7 +1,6 @@ -import copy -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict, List -from samtranslator.model.exceptions import ExceptionWithMessage, InvalidResourceAttributeTypeException +from samtranslator.model.exceptions import ExceptionWithMessage from samtranslator.public.intrinsics import is_intrinsics from samtranslator.public.sdk.resource import SamResourceType from samtranslator.swagger.swagger import SwaggerEditor @@ -101,7 +100,7 @@ class Globals: SamResourceType.Function.value: ["RuntimeManagementConfig"], } - def __init__(self, template: Dict[str, Any]) -> None: + def __init__(self, template) -> None: # type: ignore[no-untyped-def] """ Constructs an instance of this object @@ -113,57 +112,12 @@ def __init__(self, template: Dict[str, Any]) -> None: # Sort the names for stability in list ordering self.supported_resource_section_names.sort() - self.template_globals: Dict[str, GlobalProperties] = {} + self.template_globals = {} if self._KEYWORD in template: self.template_globals = self._parse(template[self._KEYWORD]) # type: ignore[no-untyped-call] - def get_template_globals( - self, logical_id: str, resource_type: str, ignore_globals: Optional[Union[str, List[str]]] - ) -> "GlobalProperties": - """ - Get template globals but remove globals based on IgnoreGlobals attribute. - - :param string logical_id: LogicalId of the resource - :param string resource_type: Type of the resource (Ex: AWS::Serverless::Function) - :param dict ignore_globals: IgnoreGlobals resource attribute. It can be either 1) "*" string value - or list of string value, each value should be a valid property in Globals section - :return dict: processed template globals - """ - if not ignore_globals: - return self.template_globals[resource_type] - - if isinstance(ignore_globals, str) and ignore_globals == "*": - return GlobalProperties({}) - - if isinstance(ignore_globals, list): - global_props: GlobalProperties = copy.deepcopy(self.template_globals[resource_type]) - for key in ignore_globals: - if key not in global_props.global_properties: - raise InvalidResourceAttributeTypeException( - logical_id, - "IgnoreGlobals", - None, - f"Resource {logical_id} has invalid resource attribute 'IgnoreGlobals' on item '{key}'.", - ) - del global_props.global_properties[key] - return global_props - - # We raise exception for any non "*" or non-list input - raise InvalidResourceAttributeTypeException( - logical_id, - "IgnoreGlobals", - None, - f"Resource {logical_id} has invalid resource attribute 'IgnoreGlobals'.", - ) - - def merge( - self, - resource_type: str, - resource_properties: Dict[str, Any], - logical_id: str = "", - ignore_globals: Optional[Union[str, List[str]]] = None, - ) -> Any: + def merge(self, resource_type, resource_properties): # type: ignore[no-untyped-def] """ Adds global properties to the resource, if necessary. This method is a no-op if there are no global properties for this resource type @@ -177,12 +131,12 @@ def merge( # Nothing to do. Return the template unmodified return resource_properties - global_props = self.get_template_globals(logical_id, str(resource_type), ignore_globals) + global_props = self.template_globals[resource_type] - return global_props.merge(resource_properties) # type: ignore[no-untyped-call] + return global_props.merge(resource_properties) @classmethod - def del_section(cls, template: Dict[str, Any]) -> None: + def del_section(cls, template): # type: ignore[no-untyped-def] """ Helper method to delete the Globals section altogether from the template diff --git a/samtranslator/plugins/globals/globals_plugin.py b/samtranslator/plugins/globals/globals_plugin.py index bb1c1028e..6dd7b089c 100644 --- a/samtranslator/plugins/globals/globals_plugin.py +++ b/samtranslator/plugins/globals/globals_plugin.py @@ -1,7 +1,4 @@ -from typing import Any, Dict - from samtranslator.metrics.method_decorator import cw_timer -from samtranslator.model.exceptions import InvalidResourceAttributeTypeException from samtranslator.plugins.globals.globals import Globals, InvalidGlobalsSectionException from samtranslator.public.exceptions import InvalidDocumentException from samtranslator.public.plugins import BasePlugin @@ -16,7 +13,7 @@ class GlobalsPlugin(BasePlugin): """ @cw_timer(prefix="Plugin-Globals") - def on_before_transform_template(self, template_dict: Dict[str, Any]) -> None: + def on_before_transform_template(self, template_dict): # type: ignore[no-untyped-def] """ Hook method that runs before a template gets transformed. In this method, we parse and process Globals section from the template (if present). @@ -31,16 +28,11 @@ def on_before_transform_template(self, template_dict: Dict[str, Any]) -> None: # For each resource in template, try and merge with Globals if necessary template = SamTemplate(template_dict) for logicalId, resource in template.iterate(): - try: - resource.properties = global_section.merge( - str(resource.type), resource.properties, logicalId, resource.ignore_globals - ) - except InvalidResourceAttributeTypeException as ex: - raise InvalidDocumentException([ex]) from ex + resource.properties = global_section.merge(resource.type, resource.properties) # type: ignore[no-untyped-call] template.set(logicalId, resource) # Remove the Globals section from template if necessary - Globals.del_section(template_dict) + Globals.del_section(template_dict) # type: ignore[no-untyped-call] # If there was a global openApiVersion flag, check and convert swagger # to the right version diff --git a/samtranslator/schema/schema.json b/samtranslator/schema/schema.json index b8f6eaa33..47549e27e 100644 --- a/samtranslator/schema/schema.json +++ b/samtranslator/schema/schema.json @@ -2418,9 +2418,6 @@ "title": "AppId", "type": "string" }, - "Backend": { - "$ref": "#/definitions/AWS::Amplify::Branch.Backend" - }, "BasicAuthConfig": { "$ref": "#/definitions/AWS::Amplify::Branch.BasicAuthConfig", "markdownDescription": "The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .", @@ -2515,15 +2512,6 @@ ], "type": "object" }, - "AWS::Amplify::Branch.Backend": { - "additionalProperties": false, - "properties": { - "StackArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::Amplify::Branch.BasicAuthConfig": { "additionalProperties": false, "properties": { @@ -7418,13 +7406,7 @@ "title": "MutualTlsAuthentication" }, "Tags": { - "additionalProperties": true, "markdownDescription": "The collection of tags associated with a domain name.", - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, "title": "Tags", "type": "object" } @@ -8487,10 +8469,6 @@ "type": "string" } }, - "required": [ - "Key", - "Value" - ], "type": "object" }, "AWS::AppConfig::ConfigurationProfile": { @@ -8538,9 +8516,6 @@ "title": "Description", "type": "string" }, - "KmsKeyIdentifier": { - "type": "string" - }, "LocationUri": { "markdownDescription": "A URI to locate the configuration. You can specify the following:\n\n- For the AWS AppConfig hosted configuration store and for feature flags, specify `hosted` .\n- For an AWS Systems Manager Parameter Store parameter, specify either the parameter name in the format `ssm-parameter://` or the ARN.\n- For an AWS CodePipeline pipeline, specify the URI in the following format: `codepipeline` ://.\n- For an AWS Secrets Manager secret, specify the URI in the following format: `secretsmanager` ://.\n- For an Amazon S3 object, specify the URI in the following format: `s3:///` . Here is an example: `s3://my-bucket/my-app/us-east-1/my-config.json`\n- For an SSM document, specify either the document name in the format `ssm-document://` or the Amazon Resource Name (ARN).", "title": "LocationUri", @@ -12148,6 +12123,7 @@ "required": [ "KmsKey", "Name", + "ScheduleConfig", "SourceURI" ], "type": "object" @@ -22433,12 +22409,9 @@ "type": "array" }, "TopicARN": { - "items": { - "type": "string" - }, "markdownDescription": "The Amazon Resource Name (ARN) of the Amazon SNS topic.", "title": "TopicARN", - "type": "array" + "type": "string" } }, "required": [ @@ -31916,12 +31889,6 @@ "title": "Enabled", "type": "boolean" }, - "SingleHeaderPolicyConfig": { - "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig" - }, - "SingleWeightPolicyConfig": { - "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig" - }, "StagingDistributionDnsNames": { "items": { "type": "string" @@ -31934,9 +31901,6 @@ "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig", "markdownDescription": "Contains the parameters for routing production traffic from your primary to staging distributions.", "title": "TrafficConfig" - }, - "Type": { - "type": "string" } }, "required": [ @@ -31985,22 +31949,6 @@ ], "type": "object" }, - "AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig": { - "additionalProperties": false, - "properties": { - "Header": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "required": [ - "Header", - "Value" - ], - "type": "object" - }, "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightConfig": { "additionalProperties": false, "properties": { @@ -32020,21 +31968,6 @@ ], "type": "object" }, - "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig": { - "additionalProperties": false, - "properties": { - "SessionStickinessConfig": { - "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SessionStickinessConfig" - }, - "Weight": { - "type": "number" - } - }, - "required": [ - "Weight" - ], - "type": "object" - }, "AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig": { "additionalProperties": false, "properties": { @@ -40290,101 +40223,6 @@ ], "type": "object" }, - "AWS::Cognito::LogDeliveryConfiguration": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "LogConfigurations": { - "items": { - "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.LogConfiguration" - }, - "type": "array" - }, - "UserPoolId": { - "type": "string" - } - }, - "required": [ - "UserPoolId" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::Cognito::LogDeliveryConfiguration" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration": { - "additionalProperties": false, - "properties": { - "LogGroupArn": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::Cognito::LogDeliveryConfiguration.LogConfiguration": { - "additionalProperties": false, - "properties": { - "CloudWatchLogsConfiguration": { - "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration" - }, - "EventSource": { - "type": "string" - }, - "LogLevel": { - "type": "string" - } - }, - "type": "object" - }, "AWS::Cognito::UserPool": { "additionalProperties": false, "properties": { @@ -40533,13 +40371,7 @@ "type": "string" }, "UserPoolTags": { - "additionalProperties": true, "markdownDescription": "The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.", - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, "title": "UserPoolTags", "type": "object" }, @@ -46024,9 +45856,6 @@ "Properties": { "additionalProperties": false, "properties": { - "AgentAvailabilityTimer": { - "type": "string" - }, "DefaultOutboundQueueArn": { "type": "string" }, @@ -47187,12 +47016,6 @@ "markdownDescription": "The Amazon Resource Name (ARN) of the parent group.", "title": "ParentGroupArn", "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" } }, "required": [ @@ -47475,15 +47298,6 @@ ], "type": "object" }, - "AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig": { - "additionalProperties": false, - "properties": { - "DialingCapacity": { - "type": "number" - } - }, - "type": "object" - }, "AWS::ConnectCampaigns::Campaign.AnswerMachineDetectionConfig": { "additionalProperties": false, "properties": { @@ -47501,9 +47315,6 @@ "AWS::ConnectCampaigns::Campaign.DialerConfig": { "additionalProperties": false, "properties": { - "AgentlessDialerConfig": { - "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig" - }, "PredictiveDialerConfig": { "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.PredictiveDialerConfig", "markdownDescription": "The configuration of the predictive dialer.", @@ -47542,7 +47353,8 @@ } }, "required": [ - "ConnectContactFlowArn" + "ConnectContactFlowArn", + "ConnectQueueArn" ], "type": "object" }, @@ -47553,9 +47365,6 @@ "markdownDescription": "Bandwidth allocation for the predictive dialer.", "title": "BandwidthAllocation", "type": "number" - }, - "DialingCapacity": { - "type": "number" } }, "required": [ @@ -47570,9 +47379,6 @@ "markdownDescription": "Bandwidth allocation for the progressive dialer.", "title": "BandwidthAllocation", "type": "number" - }, - "DialingCapacity": { - "type": "number" } }, "required": [ @@ -47914,12 +47720,6 @@ "title": "DomainName", "type": "string" }, - "Matching": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Matching" - }, - "RuleBasedMatching": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.RuleBasedMatching" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -47955,214 +47755,6 @@ ], "type": "object" }, - "AWS::CustomerProfiles::Domain.AttributeTypesSelector": { - "additionalProperties": false, - "properties": { - "Address": { - "items": { - "type": "string" - }, - "type": "array" - }, - "AttributeMatchingModel": { - "type": "string" - }, - "EmailAddress": { - "items": { - "type": "string" - }, - "type": "array" - }, - "PhoneNumber": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "AttributeMatchingModel" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.AutoMerging": { - "additionalProperties": false, - "properties": { - "ConflictResolution": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" - }, - "Consolidation": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Consolidation" - }, - "Enabled": { - "type": "boolean" - }, - "MinAllowedConfidenceScoreForMerging": { - "type": "number" - } - }, - "required": [ - "Enabled" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.ConflictResolution": { - "additionalProperties": false, - "properties": { - "ConflictResolvingModel": { - "type": "string" - }, - "SourceName": { - "type": "string" - } - }, - "required": [ - "ConflictResolvingModel" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.Consolidation": { - "additionalProperties": false, - "properties": { - "MatchingAttributesList": { - "type": "object" - } - }, - "required": [ - "MatchingAttributesList" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.DomainStats": { - "additionalProperties": false, - "properties": { - "MeteringProfileCount": { - "type": "number" - }, - "ObjectCount": { - "type": "number" - }, - "ProfileCount": { - "type": "number" - }, - "TotalSize": { - "type": "number" - } - }, - "type": "object" - }, - "AWS::CustomerProfiles::Domain.ExportingConfig": { - "additionalProperties": false, - "properties": { - "S3Exporting": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.S3ExportingConfig" - } - }, - "type": "object" - }, - "AWS::CustomerProfiles::Domain.JobSchedule": { - "additionalProperties": false, - "properties": { - "DayOfTheWeek": { - "type": "string" - }, - "Time": { - "type": "string" - } - }, - "required": [ - "DayOfTheWeek", - "Time" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.Matching": { - "additionalProperties": false, - "properties": { - "AutoMerging": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AutoMerging" - }, - "Enabled": { - "type": "boolean" - }, - "ExportingConfig": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" - }, - "JobSchedule": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.JobSchedule" - } - }, - "required": [ - "Enabled" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.MatchingRule": { - "additionalProperties": false, - "properties": { - "Rule": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "Rule" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.RuleBasedMatching": { - "additionalProperties": false, - "properties": { - "AttributeTypesSelector": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AttributeTypesSelector" - }, - "ConflictResolution": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" - }, - "Enabled": { - "type": "boolean" - }, - "ExportingConfig": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" - }, - "MatchingRules": { - "items": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.MatchingRule" - }, - "type": "array" - }, - "MaxAllowedRuleLevelForMatching": { - "type": "number" - }, - "MaxAllowedRuleLevelForMerging": { - "type": "number" - }, - "Status": { - "type": "string" - } - }, - "required": [ - "Enabled" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.S3ExportingConfig": { - "additionalProperties": false, - "properties": { - "S3BucketName": { - "type": "string" - }, - "S3KeyName": { - "type": "string" - } - }, - "required": [ - "S3BucketName" - ], - "type": "object" - }, "AWS::CustomerProfiles::EventStream": { "additionalProperties": false, "properties": { @@ -71530,9 +71122,6 @@ "title": "SecurityGroupIds", "type": "array" }, - "SseSpecification": { - "$ref": "#/definitions/AWS::EC2::VerifiedAccessEndpoint.SseSpecification" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71628,18 +71217,6 @@ }, "type": "object" }, - "AWS::EC2::VerifiedAccessEndpoint.SseSpecification": { - "additionalProperties": false, - "properties": { - "CustomerManagedKeyEnabled": { - "type": "boolean" - }, - "KmsKeyArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::EC2::VerifiedAccessGroup": { "additionalProperties": false, "properties": { @@ -71690,9 +71267,6 @@ "title": "PolicyEnabled", "type": "boolean" }, - "SseSpecification": { - "$ref": "#/definitions/AWS::EC2::VerifiedAccessGroup.SseSpecification" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71733,18 +71307,6 @@ ], "type": "object" }, - "AWS::EC2::VerifiedAccessGroup.SseSpecification": { - "additionalProperties": false, - "properties": { - "CustomerManagedKeyEnabled": { - "type": "boolean" - }, - "KmsKeyArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::EC2::VerifiedAccessInstance": { "additionalProperties": false, "properties": { @@ -71785,9 +71347,6 @@ "title": "Description", "type": "string" }, - "FipsEnabled": { - "type": "boolean" - }, "LoggingConfigurations": { "$ref": "#/definitions/AWS::EC2::VerifiedAccessInstance.VerifiedAccessLogs", "markdownDescription": "The current logging configuration for the Verified Access instances.", @@ -72020,9 +71579,6 @@ "title": "PolicyReferenceName", "type": "string" }, - "SseSpecification": { - "$ref": "#/definitions/AWS::EC2::VerifiedAccessTrustProvider.SseSpecification" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -72121,18 +71677,6 @@ }, "type": "object" }, - "AWS::EC2::VerifiedAccessTrustProvider.SseSpecification": { - "additionalProperties": false, - "properties": { - "CustomerManagedKeyEnabled": { - "type": "boolean" - }, - "KmsKeyArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::EC2::Volume": { "additionalProperties": false, "properties": { @@ -83698,181 +83242,6 @@ }, "type": "object" }, - "AWS::EntityResolution::IdMappingWorkflow": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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" - }, - "IdMappingTechniques": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques" - }, - "InputSourceConfig": { - "items": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource" - }, - "type": "array" - }, - "OutputSourceConfig": { - "items": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource" - }, - "type": "array" - }, - "RoleArn": { - "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" - }, - "WorkflowName": { - "type": "string" - } - }, - "required": [ - "IdMappingTechniques", - "InputSourceConfig", - "OutputSourceConfig", - "RoleArn", - "WorkflowName" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::EntityResolution::IdMappingWorkflow" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques": { - "additionalProperties": false, - "properties": { - "IdMappingType": { - "type": "string" - }, - "ProviderProperties": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.ProviderProperties" - } - }, - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource": { - "additionalProperties": false, - "properties": { - "InputSourceARN": { - "type": "string" - }, - "SchemaArn": { - "type": "string" - } - }, - "required": [ - "InputSourceARN", - "SchemaArn" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource": { - "additionalProperties": false, - "properties": { - "KMSArn": { - "type": "string" - }, - "OutputS3Path": { - "type": "string" - } - }, - "required": [ - "OutputS3Path" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration": { - "additionalProperties": false, - "properties": { - "IntermediateS3Path": { - "type": "string" - } - }, - "required": [ - "IntermediateS3Path" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.ProviderProperties": { - "additionalProperties": false, - "properties": { - "IntermediateSourceConfiguration": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration" - }, - "ProviderConfiguration": { - "additionalProperties": true, - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, - "type": "object" - }, - "ProviderServiceArn": { - "type": "string" - } - }, - "required": [ - "ProviderServiceArn" - ], - "type": "object" - }, "AWS::EntityResolution::MatchingWorkflow": { "additionalProperties": false, "properties": { @@ -83988,18 +83357,6 @@ ], "type": "object" }, - "AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration": { - "additionalProperties": false, - "properties": { - "IntermediateS3Path": { - "type": "string" - } - }, - "required": [ - "IntermediateS3Path" - ], - "type": "object" - }, "AWS::EntityResolution::MatchingWorkflow.OutputAttribute": { "additionalProperties": false, "properties": { @@ -84040,36 +83397,9 @@ ], "type": "object" }, - "AWS::EntityResolution::MatchingWorkflow.ProviderProperties": { - "additionalProperties": false, - "properties": { - "IntermediateSourceConfiguration": { - "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration" - }, - "ProviderConfiguration": { - "additionalProperties": true, - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, - "type": "object" - }, - "ProviderServiceArn": { - "type": "string" - } - }, - "required": [ - "ProviderServiceArn" - ], - "type": "object" - }, "AWS::EntityResolution::MatchingWorkflow.ResolutionTechniques": { "additionalProperties": false, "properties": { - "ProviderProperties": { - "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.ProviderProperties" - }, "ResolutionType": { "type": "string" }, @@ -84210,9 +83540,6 @@ "MatchKey": { "type": "string" }, - "SubType": { - "type": "string" - }, "Type": { "type": "string" } @@ -85281,12 +84608,9 @@ "title": "Name", "type": "string" }, - "Policy": { - "type": "object" - }, "Tags": { "items": { - "$ref": "#/definitions/Tag" + "$ref": "#/definitions/AWS::Events::EventBus.TagEntry" }, "markdownDescription": "Tags to associate with the event bus.", "title": "Tags", @@ -85319,6 +84643,26 @@ ], "type": "object" }, + "AWS::Events::EventBus.TagEntry": { + "additionalProperties": false, + "properties": { + "Key": { + "markdownDescription": "A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.", + "title": "Key", + "type": "string" + }, + "Value": { + "markdownDescription": "The value for the specified tag key.", + "title": "Value", + "type": "string" + } + }, + "required": [ + "Key", + "Value" + ], + "type": "object" + }, "AWS::Events::EventBusPolicy": { "additionalProperties": false, "properties": { @@ -91103,9 +90447,6 @@ "title": "InstanceRoleARN", "type": "string" }, - "InstanceRoleCredentialsProvider": { - "type": "string" - }, "Locations": { "items": { "$ref": "#/definitions/AWS::GameLift::Fleet.LocationConfiguration" @@ -107432,12 +106773,6 @@ "title": "Description", "type": "string" }, - "DestinationPackageVersions": { - "items": { - "type": "string" - }, - "type": "array" - }, "Document": { "markdownDescription": "The job document.\n\nRequired if you don't specify a value for `documentSource` .", "title": "Document", @@ -108051,12 +107386,6 @@ "markdownDescription": "The policy name.", "title": "PolicyName", "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" } }, "required": [ @@ -108857,162 +108186,6 @@ }, "type": "object" }, - "AWS::IoT::SoftwarePackage": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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" - }, - "PackageName": { - "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" - } - }, - "type": "object" - }, - "Type": { - "enum": [ - "AWS::IoT::SoftwarePackage" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, - "AWS::IoT::SoftwarePackageVersion": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "Attributes": { - "additionalProperties": true, - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, - "type": "object" - }, - "Description": { - "type": "string" - }, - "PackageName": { - "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" - }, - "VersionName": { - "type": "string" - } - }, - "required": [ - "PackageName" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::IoT::SoftwarePackageVersion" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, "AWS::IoT::Thing": { "additionalProperties": false, "properties": { @@ -110057,12 +109230,6 @@ "title": "DestinationArn", "type": "string" }, - "Headers": { - "items": { - "$ref": "#/definitions/AWS::IoT::TopicRule.KafkaActionHeader" - }, - "type": "array" - }, "Key": { "markdownDescription": "The Kafka message key.", "title": "Key", @@ -110086,22 +109253,6 @@ ], "type": "object" }, - "AWS::IoT::TopicRule.KafkaActionHeader": { - "additionalProperties": false, - "properties": { - "Key": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "required": [ - "Key", - "Value" - ], - "type": "object" - }, "AWS::IoT::TopicRule.KinesisAction": { "additionalProperties": false, "properties": { @@ -120413,6 +119564,9 @@ "markdownDescription": "Provides the configuration information to connect to Microsoft SharePoint as your data source.", "title": "SharePointConfiguration" }, + "TemplateConfiguration": { + "$ref": "#/definitions/AWS::Kendra::DataSource.TemplateConfiguration" + }, "WebCrawlerConfiguration": { "$ref": "#/definitions/AWS::Kendra::DataSource.WebCrawlerConfiguration", "markdownDescription": "Provides the configuration information required for Amazon Kendra Web Crawler.", @@ -121359,6 +120513,18 @@ }, "type": "object" }, + "AWS::Kendra::DataSource.TemplateConfiguration": { + "additionalProperties": false, + "properties": { + "Template": { + "type": "string" + } + }, + "required": [ + "Template" + ], + "type": "object" + }, "AWS::Kendra::DataSource.WebCrawlerAuthenticationConfiguration": { "additionalProperties": false, "properties": { @@ -128097,9 +127263,6 @@ "title": "PackageType", "type": "string" }, - "Policy": { - "type": "object" - }, "ReservedConcurrentExecutions": { "markdownDescription": "The number of simultaneous executions to reserve for the function.", "title": "ReservedConcurrentExecutions", @@ -128359,9 +127522,6 @@ "AWS::Lambda::Function.VpcConfig": { "additionalProperties": false, "properties": { - "Ipv6AllowedForDualStack": { - "type": "boolean" - }, "SecurityGroupIds": { "items": { "type": "string" @@ -128882,9 +128042,6 @@ "$ref": "#/definitions/AWS::Lambda::Version.ProvisionedConcurrencyConfiguration", "markdownDescription": "Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.", "title": "ProvisionedConcurrencyConfig" - }, - "RuntimePolicy": { - "$ref": "#/definitions/AWS::Lambda::Version.RuntimePolicy" } }, "required": [ @@ -128927,21 +128084,6 @@ ], "type": "object" }, - "AWS::Lambda::Version.RuntimePolicy": { - "additionalProperties": false, - "properties": { - "RuntimeVersionArn": { - "type": "string" - }, - "UpdateRuntimeOn": { - "type": "string" - } - }, - "required": [ - "UpdateRuntimeOn" - ], - "type": "object" - }, "AWS::Lex::Bot": { "additionalProperties": false, "properties": { @@ -137273,235 +136415,6 @@ }, "type": "object" }, - "AWS::MSK::Replicator": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "CurrentVersion": { - "type": "string" - }, - "Description": { - "type": "string" - }, - "KafkaClusters": { - "items": { - "$ref": "#/definitions/AWS::MSK::Replicator.KafkaCluster" - }, - "type": "array" - }, - "ReplicationInfoList": { - "items": { - "$ref": "#/definitions/AWS::MSK::Replicator.ReplicationInfo" - }, - "type": "array" - }, - "ReplicatorName": { - "type": "string" - }, - "ServiceExecutionRoleArn": { - "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" - } - }, - "required": [ - "KafkaClusters", - "ReplicationInfoList", - "ReplicatorName", - "ServiceExecutionRoleArn" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::MSK::Replicator" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::MSK::Replicator.AmazonMskCluster": { - "additionalProperties": false, - "properties": { - "MskClusterArn": { - "type": "string" - } - }, - "required": [ - "MskClusterArn" - ], - "type": "object" - }, - "AWS::MSK::Replicator.ConsumerGroupReplication": { - "additionalProperties": false, - "properties": { - "ConsumerGroupsToExclude": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ConsumerGroupsToReplicate": { - "items": { - "type": "string" - }, - "type": "array" - }, - "DetectAndCopyNewConsumerGroups": { - "type": "boolean" - }, - "SynchroniseConsumerGroupOffsets": { - "type": "boolean" - } - }, - "required": [ - "ConsumerGroupsToReplicate" - ], - "type": "object" - }, - "AWS::MSK::Replicator.KafkaCluster": { - "additionalProperties": false, - "properties": { - "AmazonMskCluster": { - "$ref": "#/definitions/AWS::MSK::Replicator.AmazonMskCluster" - }, - "VpcConfig": { - "$ref": "#/definitions/AWS::MSK::Replicator.KafkaClusterClientVpcConfig" - } - }, - "required": [ - "AmazonMskCluster", - "VpcConfig" - ], - "type": "object" - }, - "AWS::MSK::Replicator.KafkaClusterClientVpcConfig": { - "additionalProperties": false, - "properties": { - "SecurityGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "SubnetIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "SubnetIds" - ], - "type": "object" - }, - "AWS::MSK::Replicator.ReplicationInfo": { - "additionalProperties": false, - "properties": { - "ConsumerGroupReplication": { - "$ref": "#/definitions/AWS::MSK::Replicator.ConsumerGroupReplication" - }, - "SourceKafkaClusterArn": { - "type": "string" - }, - "TargetCompressionType": { - "type": "string" - }, - "TargetKafkaClusterArn": { - "type": "string" - }, - "TopicReplication": { - "$ref": "#/definitions/AWS::MSK::Replicator.TopicReplication" - } - }, - "required": [ - "ConsumerGroupReplication", - "SourceKafkaClusterArn", - "TargetCompressionType", - "TargetKafkaClusterArn", - "TopicReplication" - ], - "type": "object" - }, - "AWS::MSK::Replicator.TopicReplication": { - "additionalProperties": false, - "properties": { - "CopyAccessControlListsForTopics": { - "type": "boolean" - }, - "CopyTopicConfigurations": { - "type": "boolean" - }, - "DetectAndCopyNewTopics": { - "type": "boolean" - }, - "TopicsToExclude": { - "items": { - "type": "string" - }, - "type": "array" - }, - "TopicsToReplicate": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "TopicsToReplicate" - ], - "type": "object" - }, "AWS::MSK::ServerlessCluster": { "additionalProperties": false, "properties": { @@ -148063,12 +146976,6 @@ "AWS::MediaTailor::Channel.HlsPlaylistSettings": { "additionalProperties": false, "properties": { - "AdMarkupType": { - "items": { - "type": "string" - }, - "type": "array" - }, "ManifestWindowSeconds": { "type": "number" } @@ -151412,9 +150319,6 @@ "title": "PeerAddress", "type": "string" }, - "SubnetArn": { - "type": "string" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -151932,17 +150836,11 @@ "Properties": { "additionalProperties": false, "properties": { - "CreatedAt": { - "type": "string" - }, "Description": { "markdownDescription": "A description of the global network.\n\nConstraints: Maximum length of 256 characters.", "title": "Description", "type": "string" }, - "State": { - "type": "string" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -165498,9 +164396,6 @@ "markdownDescription": "The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon QuickSight console, make sure that you have access to it.", "title": "ThemeArn", "type": "string" - }, - "ValidationStrategy": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ValidationStrategy" } }, "required": [ @@ -167928,21 +166823,9 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.DataPathType": { - "additionalProperties": false, - "properties": { - "PivotTableDataPathType": { - "type": "string" - } - }, - "type": "object" - }, "AWS::QuickSight::Analysis.DataPathValue": { "additionalProperties": false, "properties": { - "DataPathType": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.DataPathType" - }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -167954,6 +166837,10 @@ "type": "string" } }, + "required": [ + "FieldId", + "FieldValue" + ], "type": "object" }, "AWS::QuickSight::Analysis.DataSetIdentifierDeclaration": { @@ -169200,9 +168087,6 @@ "title": "MatchOperator", "type": "string" }, - "NullOption": { - "type": "string" - }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -171108,30 +169992,6 @@ }, "type": "object" }, - "AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" - } - }, - "type": "object" - }, - "AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" - } - }, - "type": "object" - }, "AWS::QuickSight::Analysis.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -171149,12 +170009,6 @@ "AWS::QuickSight::Analysis.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { - "ActualValue": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting" - }, - "ComparisonValue": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting" - }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -171252,16 +170106,10 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, - "Sparkline": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPISparklineOptions" - }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" - }, - "VisualLayoutOptions": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualLayoutOptions" } }, "type": "object" @@ -171307,27 +170155,6 @@ }, "type": "object" }, - "AWS::QuickSight::Analysis.KPISparklineOptions": { - "additionalProperties": false, - "properties": { - "Color": { - "type": "string" - }, - "TooltipVisibility": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Visibility": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.KPIVisual": { "additionalProperties": false, "properties": { @@ -171378,27 +170205,6 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.KPIVisualLayoutOptions": { - "additionalProperties": false, - "properties": { - "StandardLayout": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualStandardLayout" - } - }, - "type": "object" - }, - "AWS::QuickSight::Analysis.KPIVisualStandardLayout": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.LabelOptions": { "additionalProperties": false, "properties": { @@ -173693,12 +172499,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -174047,9 +172847,6 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, - "SeriesType": { - "type": "string" - }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Analysis.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -175675,9 +174472,6 @@ "title": "Order", "type": "array" }, - "PinnedFieldOptions": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TablePinnedFieldOptions" - }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableFieldOption" @@ -175774,18 +174568,6 @@ }, "type": "object" }, - "AWS::QuickSight::Analysis.TablePinnedFieldOptions": { - "additionalProperties": false, - "properties": { - "PinnedLeftFields": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "AWS::QuickSight::Analysis.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -176065,9 +174847,6 @@ "title": "ParameterName", "type": "string" }, - "RollingDate": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.RollingDateConfiguration" - }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -176389,31 +175168,6 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.TotalAggregationFunction": { - "additionalProperties": false, - "properties": { - "SimpleTotalAggregationFunction": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::QuickSight::Analysis.TotalAggregationOption": { - "additionalProperties": false, - "properties": { - "FieldId": { - "type": "string" - }, - "TotalAggregationFunction": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationFunction" - } - }, - "required": [ - "FieldId", - "TotalAggregationFunction" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.TotalOptions": { "additionalProperties": false, "properties": { @@ -176432,12 +175186,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -176667,18 +175415,6 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.ValidationStrategy": { - "additionalProperties": false, - "properties": { - "Mode": { - "type": "string" - } - }, - "required": [ - "Mode" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -177396,9 +176132,6 @@ "title": "ThemeArn", "type": "string" }, - "ValidationStrategy": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ValidationStrategy" - }, "VersionDescription": { "markdownDescription": "A description for the first version of the dashboard being created.", "title": "VersionDescription", @@ -179978,21 +178711,9 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.DataPathType": { - "additionalProperties": false, - "properties": { - "PivotTableDataPathType": { - "type": "string" - } - }, - "type": "object" - }, "AWS::QuickSight::Dashboard.DataPathValue": { "additionalProperties": false, "properties": { - "DataPathType": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.DataPathType" - }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -180004,6 +178725,10 @@ "type": "string" } }, + "required": [ + "FieldId", + "FieldValue" + ], "type": "object" }, "AWS::QuickSight::Dashboard.DataPointDrillUpDownOption": { @@ -181316,9 +180041,6 @@ "title": "MatchOperator", "type": "string" }, - "NullOption": { - "type": "string" - }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -183224,30 +181946,6 @@ }, "type": "object" }, - "AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" - } - }, - "type": "object" - }, - "AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" - } - }, - "type": "object" - }, "AWS::QuickSight::Dashboard.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -183265,12 +181963,6 @@ "AWS::QuickSight::Dashboard.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { - "ActualValue": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting" - }, - "ComparisonValue": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting" - }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -183368,16 +182060,10 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, - "Sparkline": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPISparklineOptions" - }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" - }, - "VisualLayoutOptions": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualLayoutOptions" } }, "type": "object" @@ -183423,27 +182109,6 @@ }, "type": "object" }, - "AWS::QuickSight::Dashboard.KPISparklineOptions": { - "additionalProperties": false, - "properties": { - "Color": { - "type": "string" - }, - "TooltipVisibility": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Visibility": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.KPIVisual": { "additionalProperties": false, "properties": { @@ -183494,27 +182159,6 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.KPIVisualLayoutOptions": { - "additionalProperties": false, - "properties": { - "StandardLayout": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualStandardLayout" - } - }, - "type": "object" - }, - "AWS::QuickSight::Dashboard.KPIVisualStandardLayout": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.LabelOptions": { "additionalProperties": false, "properties": { @@ -185809,12 +184453,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -186163,9 +184801,6 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, - "SeriesType": { - "type": "string" - }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -187813,9 +186448,6 @@ "title": "Order", "type": "array" }, - "PinnedFieldOptions": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TablePinnedFieldOptions" - }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableFieldOption" @@ -187912,18 +186544,6 @@ }, "type": "object" }, - "AWS::QuickSight::Dashboard.TablePinnedFieldOptions": { - "additionalProperties": false, - "properties": { - "PinnedLeftFields": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "AWS::QuickSight::Dashboard.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -188203,9 +186823,6 @@ "title": "ParameterName", "type": "string" }, - "RollingDate": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.RollingDateConfiguration" - }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -188527,31 +187144,6 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.TotalAggregationFunction": { - "additionalProperties": false, - "properties": { - "SimpleTotalAggregationFunction": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::QuickSight::Dashboard.TotalAggregationOption": { - "additionalProperties": false, - "properties": { - "FieldId": { - "type": "string" - }, - "TotalAggregationFunction": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationFunction" - } - }, - "required": [ - "FieldId", - "TotalAggregationFunction" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.TotalOptions": { "additionalProperties": false, "properties": { @@ -188570,12 +187162,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -188805,18 +187391,6 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.ValidationStrategy": { - "additionalProperties": false, - "properties": { - "Mode": { - "type": "string" - } - }, - "required": [ - "Mode" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -191693,9 +190267,6 @@ "title": "TemplateId", "type": "string" }, - "ValidationStrategy": { - "$ref": "#/definitions/AWS::QuickSight::Template.ValidationStrategy" - }, "VersionDescription": { "markdownDescription": "A description of the current template version being created. This API operation creates the first version of the template. Every time `UpdateTemplate` is called, a new version is created. Each version of the template maintains a description of the version in the `VersionDescription` field.", "title": "VersionDescription", @@ -194057,21 +192628,9 @@ ], "type": "object" }, - "AWS::QuickSight::Template.DataPathType": { - "additionalProperties": false, - "properties": { - "PivotTableDataPathType": { - "type": "string" - } - }, - "type": "object" - }, "AWS::QuickSight::Template.DataPathValue": { "additionalProperties": false, "properties": { - "DataPathType": { - "$ref": "#/definitions/AWS::QuickSight::Template.DataPathType" - }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -194083,6 +192642,10 @@ "type": "string" } }, + "required": [ + "FieldId", + "FieldValue" + ], "type": "object" }, "AWS::QuickSight::Template.DataSetConfiguration": { @@ -195301,9 +193864,6 @@ "title": "MatchOperator", "type": "string" }, - "NullOption": { - "type": "string" - }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -197186,30 +195746,6 @@ }, "type": "object" }, - "AWS::QuickSight::Template.KPIActualValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" - } - }, - "type": "object" - }, - "AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" - } - }, - "type": "object" - }, "AWS::QuickSight::Template.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -197227,12 +195763,6 @@ "AWS::QuickSight::Template.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { - "ActualValue": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIActualValueConditionalFormatting" - }, - "ComparisonValue": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting" - }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Template.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -197330,16 +195860,10 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, - "Sparkline": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPISparklineOptions" - }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Template.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" - }, - "VisualLayoutOptions": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualLayoutOptions" } }, "type": "object" @@ -197385,27 +195909,6 @@ }, "type": "object" }, - "AWS::QuickSight::Template.KPISparklineOptions": { - "additionalProperties": false, - "properties": { - "Color": { - "type": "string" - }, - "TooltipVisibility": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Visibility": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Template.KPIVisual": { "additionalProperties": false, "properties": { @@ -197456,27 +195959,6 @@ ], "type": "object" }, - "AWS::QuickSight::Template.KPIVisualLayoutOptions": { - "additionalProperties": false, - "properties": { - "StandardLayout": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualStandardLayout" - } - }, - "type": "object" - }, - "AWS::QuickSight::Template.KPIVisualStandardLayout": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Template.LabelOptions": { "additionalProperties": false, "properties": { @@ -199733,12 +198215,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -200087,9 +198563,6 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, - "SeriesType": { - "type": "string" - }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Template.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -201692,9 +200165,6 @@ "title": "Order", "type": "array" }, - "PinnedFieldOptions": { - "$ref": "#/definitions/AWS::QuickSight::Template.TablePinnedFieldOptions" - }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Template.TableFieldOption" @@ -201791,18 +200261,6 @@ }, "type": "object" }, - "AWS::QuickSight::Template.TablePinnedFieldOptions": { - "additionalProperties": false, - "properties": { - "PinnedLeftFields": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "AWS::QuickSight::Template.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -202281,9 +200739,6 @@ "title": "ParameterName", "type": "string" }, - "RollingDate": { - "$ref": "#/definitions/AWS::QuickSight::Template.RollingDateConfiguration" - }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -202605,31 +201060,6 @@ ], "type": "object" }, - "AWS::QuickSight::Template.TotalAggregationFunction": { - "additionalProperties": false, - "properties": { - "SimpleTotalAggregationFunction": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::QuickSight::Template.TotalAggregationOption": { - "additionalProperties": false, - "properties": { - "FieldId": { - "type": "string" - }, - "TotalAggregationFunction": { - "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationFunction" - } - }, - "required": [ - "FieldId", - "TotalAggregationFunction" - ], - "type": "object" - }, "AWS::QuickSight::Template.TotalOptions": { "additionalProperties": false, "properties": { @@ -202648,12 +201078,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -202883,18 +201307,6 @@ ], "type": "object" }, - "AWS::QuickSight::Template.ValidationStrategy": { - "additionalProperties": false, - "properties": { - "Mode": { - "type": "string" - } - }, - "required": [ - "Mode" - ], - "type": "object" - }, "AWS::QuickSight::Template.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -204505,9 +202917,6 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, - "NonAdditive": { - "type": "boolean" - }, "NotAllowedAggregations": { "items": { "type": "string" @@ -204652,9 +203061,6 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, - "NonAdditive": { - "type": "boolean" - }, "NotAllowedAggregations": { "items": { "type": "string" @@ -205950,9 +204356,6 @@ "title": "AutoMinorVersionUpgrade", "type": "boolean" }, - "AutomaticBackupReplicationRegion": { - "type": "string" - }, "AvailabilityZone": { "markdownDescription": "The Availability Zone (AZ) where the database will be created. For information on AWS Regions and Availability Zones, see [Regions and Availability Zones](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) .\n\nFor Amazon Aurora, each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.\n\nDefault: A random, system-chosen Availability Zone in the endpoint's AWS Region .\n\nConstraints:\n\n- The `AvailabilityZone` parameter can't be specified if the DB instance is a Multi-AZ deployment.\n- The specified Availability Zone must be in the same AWS Region as the current endpoint.\n\nExample: `us-east-1d`", "title": "AvailabilityZone", @@ -217633,6 +216036,7 @@ } }, "required": [ + "Status", "Value" ], "type": "object" @@ -217706,6 +216110,17 @@ ], "type": "object" }, + "AWS::S3ObjectLambda::AccessPoint.PolicyStatus": { + "additionalProperties": false, + "properties": { + "IsPublic": { + "markdownDescription": "", + "title": "IsPublic", + "type": "boolean" + } + }, + "type": "object" + }, "AWS::S3ObjectLambda::AccessPoint.PublicAccessBlockConfiguration": { "additionalProperties": false, "properties": { @@ -219966,9 +218381,6 @@ "Properties": { "additionalProperties": false, "properties": { - "ArchivePolicy": { - "type": "object" - }, "ContentBasedDeduplication": { "markdownDescription": "Enables content-based deduplication for FIFO topics.\n\n- By default, `ContentBasedDeduplication` is set to `false` . If you create a FIFO topic and this attribute is `false` , you must specify a value for the `MessageDeduplicationId` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.\n- When you set `ContentBasedDeduplication` to `true` , Amazon SNS uses a SHA-256 hash to generate the `MessageDeduplicationId` using the body of the message (but not the attributes of the message).\n\n(Optional) To override the generated value, you can specify a value for the the `MessageDeduplicationId` parameter for the `Publish` action.", "title": "ContentBasedDeduplication", @@ -224112,9 +222524,6 @@ "markdownDescription": "", "title": "DatasetFormat" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -224308,9 +222717,6 @@ "title": "EndpointName", "type": "string" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -230453,9 +228859,6 @@ "markdownDescription": "", "title": "DatasetFormat" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -230561,9 +228964,6 @@ "title": "EndpointName", "type": "string" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -230898,12 +229298,6 @@ "AWS::SageMaker::MonitoringSchedule.ScheduleConfig": { "additionalProperties": false, "properties": { - "DataAnalysisEndTime": { - "type": "string" - }, - "DataAnalysisStartTime": { - "type": "string" - }, "ScheduleExpression": { "markdownDescription": "A cron expression that describes details about the monitoring schedule.\n\nCurrently the only supported cron expressions are:\n\n- If you want to set the job to start every hour, please use the following:\n\n`Hourly: cron(0 * ? * * *)`\n- If you want to start the job daily:\n\n`cron(0 [00-23] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Daily at noon UTC: `cron(0 12 ? * * *)`\n- Daily at midnight UTC: `cron(0 0 ? * * *)`\n\nTo support running every 6, 12 hours, the following are also supported:\n\n`cron(0 [00-23]/[01-24] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Every 12 hours, starting at 5pm UTC: `cron(0 17/12 ? * * *)`\n- Every two hours starting at midnight: `cron(0 0/2 ? * * *)`\n\n> - Even though the cron expression is set to start at 5PM UTC, note that there could be a delay of 0-20 minutes from the actual requested time to run the execution.\n> - We recommend that if you would like a daily schedule, you do not provide this parameter. Amazon SageMaker will pick a time for running every day.", "title": "ScheduleExpression", @@ -246309,9 +244703,6 @@ "AWS::WAFv2::WebACL.AWSManagedRulesBotControlRuleSet": { "additionalProperties": false, "properties": { - "EnableMachineLearning": { - "type": "boolean" - }, "InspectionLevel": { "markdownDescription": "The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see [AWS WAF Bot Control rule group](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html) .", "title": "InspectionLevel", @@ -250869,20 +249260,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -253837,20 +252214,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -254152,20 +252515,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -254250,20 +252599,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -254764,8 +253099,7 @@ "type": "string" }, "PropagateTags": { - "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", - "title": "PropagateTags", + "title": "Propagatetags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -255147,8 +253481,7 @@ "title": "Policies" }, "PropagateTags": { - "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", - "title": "PropagateTags", + "title": "Propagatetags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -255277,20 +253610,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -256210,20 +254529,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -256382,20 +254687,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -256490,20 +254781,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -257051,20 +255328,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -258160,9 +256423,6 @@ { "$ref": "#/definitions/AWS::Cognito::IdentityPoolRoleAttachment" }, - { - "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration" - }, { "$ref": "#/definitions/AWS::Cognito::UserPool" }, @@ -258883,9 +257143,6 @@ { "$ref": "#/definitions/AWS::Elasticsearch::Domain" }, - { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow" - }, { "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow" }, @@ -259351,12 +257608,6 @@ { "$ref": "#/definitions/AWS::IoT::SecurityProfile" }, - { - "$ref": "#/definitions/AWS::IoT::SoftwarePackage" - }, - { - "$ref": "#/definitions/AWS::IoT::SoftwarePackageVersion" - }, { "$ref": "#/definitions/AWS::IoT::Thing" }, @@ -259726,9 +257977,6 @@ { "$ref": "#/definitions/AWS::MSK::Configuration" }, - { - "$ref": "#/definitions/AWS::MSK::Replicator" - }, { "$ref": "#/definitions/AWS::MSK::ServerlessCluster" }, diff --git a/samtranslator/sdk/resource.py b/samtranslator/sdk/resource.py index 4cb46f6c0..86f52484f 100644 --- a/samtranslator/sdk/resource.py +++ b/samtranslator/sdk/resource.py @@ -1,5 +1,5 @@ from enum import Enum -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict from samtranslator.model.exceptions import InvalidDocumentException, InvalidTemplateException from samtranslator.model.types import IS_STR @@ -27,7 +27,6 @@ def __init__(self, resource_dict: Dict[str, Any]) -> None: self.condition = resource_dict.get("Condition", None) self.deletion_policy = resource_dict.get("DeletionPolicy", None) self.update_replace_policy = resource_dict.get("UpdateReplacePolicy", None) - self.ignore_globals: Optional[Union[str, List[str]]] = resource_dict.get("IgnoreGlobals", None) # Properties is *not* required. Ex: SimpleTable resource has no required properties self.properties = resource_dict.get("Properties", {}) diff --git a/samtranslator/translator/translator.py b/samtranslator/translator/translator.py index b4a052897..78d954fce 100644 --- a/samtranslator/translator/translator.py +++ b/samtranslator/translator/translator.py @@ -37,8 +37,6 @@ from samtranslator.sdk.parameter import SamParameterValues from samtranslator.translator.arn_generator import ArnGenerator from samtranslator.translator.verify_logical_id import verify_unique_logical_id -from samtranslator.utils.actions import ResolveDependsOn -from samtranslator.utils.traverse import traverse from samtranslator.validator.value_validator import sam_expect @@ -240,8 +238,6 @@ def translate( # noqa: PLR0912, PLR0915 del template["Transform"] if len(self.document_errors) == 0: - resolveDependsOn = ResolveDependsOn(resolution_data=changed_logical_ids) # Initializes ResolveDependsOn - template = traverse(template, [resolveDependsOn]) template = intrinsics_resolver.resolve_sam_resource_id_refs(template, changed_logical_ids) return intrinsics_resolver.resolve_sam_resource_refs(template, supported_resource_refs) raise InvalidDocumentException(self.document_errors) diff --git a/samtranslator/utils/actions.py b/samtranslator/utils/actions.py deleted file mode 100644 index 921914a04..000000000 --- a/samtranslator/utils/actions.py +++ /dev/null @@ -1,60 +0,0 @@ -from abc import ABC, abstractmethod -from typing import Any, Dict - - -class Action(ABC): - """ - Base class for Resolver function actions. Each Resolver function must subclass this, - override the , and provide a execute() method - """ - - @abstractmethod - def execute(self, template: Dict[str, Any]) -> Dict[str, Any]: - pass - - -class ResolveDependsOn(Action): - DependsOn = "DependsOn" - - def __init__(self, resolution_data: Dict[str, str]): - """ - Initializes ResolveDependsOn. Where data necessary to resolve execute can be provided. - - :param resolution_data: Extra data necessary to resolve execute properly. - """ - self.resolution_data = resolution_data - - def execute(self, template: Dict[str, Any]) -> Dict[str, Any]: - """ - Resolve DependsOn when logical ids get changed when transforming (ex: AWS::Serverless::LayerVersion) - - :param input_dict: Chunk of the template that is attempting to be resolved - :param resolution_data: Dictionary of the original and changed logical ids - :return: Modified dictionary with values resolved - """ - # Checks if input dict is resolvable - if template is None or not self._can_handle_depends_on(input_dict=template): - return template - # Checks if DependsOn is valid - if not (isinstance(template[self.DependsOn], (list, str))): - return template - # Check if DependsOn matches the original value of a changed_logical_id key - for old_logical_id, changed_logical_id in self.resolution_data.items(): - # Done like this as there is no other way to know if this is a DependsOn vs some value named the - # same as the old logical id. (ex LayerName is commonly the old_logical_id) - if isinstance(template[self.DependsOn], list): - for index, value in enumerate(template[self.DependsOn]): - if value == old_logical_id: - template[self.DependsOn][index] = changed_logical_id - elif template[self.DependsOn] == old_logical_id: - template[self.DependsOn] = changed_logical_id - return template - - def _can_handle_depends_on(self, input_dict: Dict[str, Any]) -> bool: - """ - Checks if the input dictionary is of length one and contains "DependsOn" - - :param input_dict: the Dictionary that is attempting to be resolved - :return boolean value of validation attempt - """ - return isinstance(input_dict, dict) and self.DependsOn in input_dict diff --git a/samtranslator/utils/traverse.py b/samtranslator/utils/traverse.py deleted file mode 100644 index ebd34584a..000000000 --- a/samtranslator/utils/traverse.py +++ /dev/null @@ -1,67 +0,0 @@ -from typing import Any, Dict, List - -from samtranslator.utils.actions import Action - - -def traverse( - input_value: Any, - actions: List[Action], -) -> Any: - """ - Driver method that performs the actual traversal of input and calls the execute method of the provided actions. - - Traversal Algorithm: - - Imagine the input dictionary/list as a tree. We are doing a Pre-Order tree traversal here where we first - process the root node before going to its children. Dict and Lists are the only two iterable nodes. - Everything else is a leaf node. - - :param input_value: Any primitive type (dict, array, string etc) whose value might contain a changed value - :param actions: Method that will be called to actually resolve the function. - :return: Modified `input` with values resolved - """ - - for action in actions: - action.execute(input_value) - - if isinstance(input_value, dict): - return _traverse_dict(input_value, actions) - if isinstance(input_value, list): - return _traverse_list(input_value, actions) - # We can iterate only over dict or list types. Primitive types are terminals - - return input_value - - -def _traverse_dict( - input_dict: Dict[str, Any], - actions: List[Action], -) -> Any: - """ - Traverse a dictionary to resolves changed values on every value - - :param input_dict: Input dictionary to traverse - :param actions: This is just to pass it to the template partition - :return: Modified dictionary with values resolved - """ - for key, value in input_dict.items(): - input_dict[key] = traverse(value, actions) - - return input_dict - - -def _traverse_list( - input_list: List[Any], - actions: List[Action], -) -> Any: - """ - Traverse a list to resolve changed values on every element - - :param input_list: List of input - :param actions: This is just to pass it to the template partition - :return: Modified list with values functions resolved - """ - for index, value in enumerate(input_list): - input_list[index] = traverse(value, actions) - - return input_list diff --git a/schema_source/cloudformation.schema.json b/schema_source/cloudformation.schema.json index 99780da12..6d16f000f 100644 --- a/schema_source/cloudformation.schema.json +++ b/schema_source/cloudformation.schema.json @@ -2418,9 +2418,6 @@ "title": "AppId", "type": "string" }, - "Backend": { - "$ref": "#/definitions/AWS::Amplify::Branch.Backend" - }, "BasicAuthConfig": { "$ref": "#/definitions/AWS::Amplify::Branch.BasicAuthConfig", "markdownDescription": "The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .", @@ -2515,15 +2512,6 @@ ], "type": "object" }, - "AWS::Amplify::Branch.Backend": { - "additionalProperties": false, - "properties": { - "StackArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::Amplify::Branch.BasicAuthConfig": { "additionalProperties": false, "properties": { @@ -7404,13 +7392,7 @@ "title": "MutualTlsAuthentication" }, "Tags": { - "additionalProperties": true, "markdownDescription": "The collection of tags associated with a domain name.", - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, "title": "Tags", "type": "object" } @@ -8473,10 +8455,6 @@ "type": "string" } }, - "required": [ - "Key", - "Value" - ], "type": "object" }, "AWS::AppConfig::ConfigurationProfile": { @@ -8524,9 +8502,6 @@ "title": "Description", "type": "string" }, - "KmsKeyIdentifier": { - "type": "string" - }, "LocationUri": { "markdownDescription": "A URI to locate the configuration. You can specify the following:\n\n- For the AWS AppConfig hosted configuration store and for feature flags, specify `hosted` .\n- For an AWS Systems Manager Parameter Store parameter, specify either the parameter name in the format `ssm-parameter://` or the ARN.\n- For an AWS CodePipeline pipeline, specify the URI in the following format: `codepipeline` ://.\n- For an AWS Secrets Manager secret, specify the URI in the following format: `secretsmanager` ://.\n- For an Amazon S3 object, specify the URI in the following format: `s3:///` . Here is an example: `s3://my-bucket/my-app/us-east-1/my-config.json`\n- For an SSM document, specify either the document name in the format `ssm-document://` or the Amazon Resource Name (ARN).", "title": "LocationUri", @@ -12134,6 +12109,7 @@ "required": [ "KmsKey", "Name", + "ScheduleConfig", "SourceURI" ], "type": "object" @@ -22405,12 +22381,9 @@ "type": "array" }, "TopicARN": { - "items": { - "type": "string" - }, "markdownDescription": "The Amazon Resource Name (ARN) of the Amazon SNS topic.", "title": "TopicARN", - "type": "array" + "type": "string" } }, "required": [ @@ -31888,12 +31861,6 @@ "title": "Enabled", "type": "boolean" }, - "SingleHeaderPolicyConfig": { - "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig" - }, - "SingleWeightPolicyConfig": { - "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig" - }, "StagingDistributionDnsNames": { "items": { "type": "string" @@ -31906,9 +31873,6 @@ "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig", "markdownDescription": "Contains the parameters for routing production traffic from your primary to staging distributions.", "title": "TrafficConfig" - }, - "Type": { - "type": "string" } }, "required": [ @@ -31957,22 +31921,6 @@ ], "type": "object" }, - "AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig": { - "additionalProperties": false, - "properties": { - "Header": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "required": [ - "Header", - "Value" - ], - "type": "object" - }, "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightConfig": { "additionalProperties": false, "properties": { @@ -31992,21 +31940,6 @@ ], "type": "object" }, - "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig": { - "additionalProperties": false, - "properties": { - "SessionStickinessConfig": { - "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SessionStickinessConfig" - }, - "Weight": { - "type": "number" - } - }, - "required": [ - "Weight" - ], - "type": "object" - }, "AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig": { "additionalProperties": false, "properties": { @@ -40262,101 +40195,6 @@ ], "type": "object" }, - "AWS::Cognito::LogDeliveryConfiguration": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "LogConfigurations": { - "items": { - "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.LogConfiguration" - }, - "type": "array" - }, - "UserPoolId": { - "type": "string" - } - }, - "required": [ - "UserPoolId" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::Cognito::LogDeliveryConfiguration" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration": { - "additionalProperties": false, - "properties": { - "LogGroupArn": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::Cognito::LogDeliveryConfiguration.LogConfiguration": { - "additionalProperties": false, - "properties": { - "CloudWatchLogsConfiguration": { - "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration" - }, - "EventSource": { - "type": "string" - }, - "LogLevel": { - "type": "string" - } - }, - "type": "object" - }, "AWS::Cognito::UserPool": { "additionalProperties": false, "properties": { @@ -40505,13 +40343,7 @@ "type": "string" }, "UserPoolTags": { - "additionalProperties": true, "markdownDescription": "The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.", - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, "title": "UserPoolTags", "type": "object" }, @@ -45996,9 +45828,6 @@ "Properties": { "additionalProperties": false, "properties": { - "AgentAvailabilityTimer": { - "type": "string" - }, "DefaultOutboundQueueArn": { "type": "string" }, @@ -47159,12 +46988,6 @@ "markdownDescription": "The Amazon Resource Name (ARN) of the parent group.", "title": "ParentGroupArn", "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" } }, "required": [ @@ -47447,15 +47270,6 @@ ], "type": "object" }, - "AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig": { - "additionalProperties": false, - "properties": { - "DialingCapacity": { - "type": "number" - } - }, - "type": "object" - }, "AWS::ConnectCampaigns::Campaign.AnswerMachineDetectionConfig": { "additionalProperties": false, "properties": { @@ -47473,9 +47287,6 @@ "AWS::ConnectCampaigns::Campaign.DialerConfig": { "additionalProperties": false, "properties": { - "AgentlessDialerConfig": { - "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig" - }, "PredictiveDialerConfig": { "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.PredictiveDialerConfig", "markdownDescription": "The configuration of the predictive dialer.", @@ -47514,7 +47325,8 @@ } }, "required": [ - "ConnectContactFlowArn" + "ConnectContactFlowArn", + "ConnectQueueArn" ], "type": "object" }, @@ -47525,9 +47337,6 @@ "markdownDescription": "Bandwidth allocation for the predictive dialer.", "title": "BandwidthAllocation", "type": "number" - }, - "DialingCapacity": { - "type": "number" } }, "required": [ @@ -47542,9 +47351,6 @@ "markdownDescription": "Bandwidth allocation for the progressive dialer.", "title": "BandwidthAllocation", "type": "number" - }, - "DialingCapacity": { - "type": "number" } }, "required": [ @@ -47886,12 +47692,6 @@ "title": "DomainName", "type": "string" }, - "Matching": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Matching" - }, - "RuleBasedMatching": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.RuleBasedMatching" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -47927,214 +47727,6 @@ ], "type": "object" }, - "AWS::CustomerProfiles::Domain.AttributeTypesSelector": { - "additionalProperties": false, - "properties": { - "Address": { - "items": { - "type": "string" - }, - "type": "array" - }, - "AttributeMatchingModel": { - "type": "string" - }, - "EmailAddress": { - "items": { - "type": "string" - }, - "type": "array" - }, - "PhoneNumber": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "AttributeMatchingModel" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.AutoMerging": { - "additionalProperties": false, - "properties": { - "ConflictResolution": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" - }, - "Consolidation": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Consolidation" - }, - "Enabled": { - "type": "boolean" - }, - "MinAllowedConfidenceScoreForMerging": { - "type": "number" - } - }, - "required": [ - "Enabled" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.ConflictResolution": { - "additionalProperties": false, - "properties": { - "ConflictResolvingModel": { - "type": "string" - }, - "SourceName": { - "type": "string" - } - }, - "required": [ - "ConflictResolvingModel" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.Consolidation": { - "additionalProperties": false, - "properties": { - "MatchingAttributesList": { - "type": "object" - } - }, - "required": [ - "MatchingAttributesList" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.DomainStats": { - "additionalProperties": false, - "properties": { - "MeteringProfileCount": { - "type": "number" - }, - "ObjectCount": { - "type": "number" - }, - "ProfileCount": { - "type": "number" - }, - "TotalSize": { - "type": "number" - } - }, - "type": "object" - }, - "AWS::CustomerProfiles::Domain.ExportingConfig": { - "additionalProperties": false, - "properties": { - "S3Exporting": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.S3ExportingConfig" - } - }, - "type": "object" - }, - "AWS::CustomerProfiles::Domain.JobSchedule": { - "additionalProperties": false, - "properties": { - "DayOfTheWeek": { - "type": "string" - }, - "Time": { - "type": "string" - } - }, - "required": [ - "DayOfTheWeek", - "Time" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.Matching": { - "additionalProperties": false, - "properties": { - "AutoMerging": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AutoMerging" - }, - "Enabled": { - "type": "boolean" - }, - "ExportingConfig": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" - }, - "JobSchedule": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.JobSchedule" - } - }, - "required": [ - "Enabled" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.MatchingRule": { - "additionalProperties": false, - "properties": { - "Rule": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "Rule" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.RuleBasedMatching": { - "additionalProperties": false, - "properties": { - "AttributeTypesSelector": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AttributeTypesSelector" - }, - "ConflictResolution": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" - }, - "Enabled": { - "type": "boolean" - }, - "ExportingConfig": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" - }, - "MatchingRules": { - "items": { - "$ref": "#/definitions/AWS::CustomerProfiles::Domain.MatchingRule" - }, - "type": "array" - }, - "MaxAllowedRuleLevelForMatching": { - "type": "number" - }, - "MaxAllowedRuleLevelForMerging": { - "type": "number" - }, - "Status": { - "type": "string" - } - }, - "required": [ - "Enabled" - ], - "type": "object" - }, - "AWS::CustomerProfiles::Domain.S3ExportingConfig": { - "additionalProperties": false, - "properties": { - "S3BucketName": { - "type": "string" - }, - "S3KeyName": { - "type": "string" - } - }, - "required": [ - "S3BucketName" - ], - "type": "object" - }, "AWS::CustomerProfiles::EventStream": { "additionalProperties": false, "properties": { @@ -71495,9 +71087,6 @@ "title": "SecurityGroupIds", "type": "array" }, - "SseSpecification": { - "$ref": "#/definitions/AWS::EC2::VerifiedAccessEndpoint.SseSpecification" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71593,18 +71182,6 @@ }, "type": "object" }, - "AWS::EC2::VerifiedAccessEndpoint.SseSpecification": { - "additionalProperties": false, - "properties": { - "CustomerManagedKeyEnabled": { - "type": "boolean" - }, - "KmsKeyArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::EC2::VerifiedAccessGroup": { "additionalProperties": false, "properties": { @@ -71655,9 +71232,6 @@ "title": "PolicyEnabled", "type": "boolean" }, - "SseSpecification": { - "$ref": "#/definitions/AWS::EC2::VerifiedAccessGroup.SseSpecification" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71698,18 +71272,6 @@ ], "type": "object" }, - "AWS::EC2::VerifiedAccessGroup.SseSpecification": { - "additionalProperties": false, - "properties": { - "CustomerManagedKeyEnabled": { - "type": "boolean" - }, - "KmsKeyArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::EC2::VerifiedAccessInstance": { "additionalProperties": false, "properties": { @@ -71750,9 +71312,6 @@ "title": "Description", "type": "string" }, - "FipsEnabled": { - "type": "boolean" - }, "LoggingConfigurations": { "$ref": "#/definitions/AWS::EC2::VerifiedAccessInstance.VerifiedAccessLogs", "markdownDescription": "The current logging configuration for the Verified Access instances.", @@ -71985,9 +71544,6 @@ "title": "PolicyReferenceName", "type": "string" }, - "SseSpecification": { - "$ref": "#/definitions/AWS::EC2::VerifiedAccessTrustProvider.SseSpecification" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -72086,18 +71642,6 @@ }, "type": "object" }, - "AWS::EC2::VerifiedAccessTrustProvider.SseSpecification": { - "additionalProperties": false, - "properties": { - "CustomerManagedKeyEnabled": { - "type": "boolean" - }, - "KmsKeyArn": { - "type": "string" - } - }, - "type": "object" - }, "AWS::EC2::Volume": { "additionalProperties": false, "properties": { @@ -83663,181 +83207,6 @@ }, "type": "object" }, - "AWS::EntityResolution::IdMappingWorkflow": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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" - }, - "IdMappingTechniques": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques" - }, - "InputSourceConfig": { - "items": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource" - }, - "type": "array" - }, - "OutputSourceConfig": { - "items": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource" - }, - "type": "array" - }, - "RoleArn": { - "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" - }, - "WorkflowName": { - "type": "string" - } - }, - "required": [ - "IdMappingTechniques", - "InputSourceConfig", - "OutputSourceConfig", - "RoleArn", - "WorkflowName" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::EntityResolution::IdMappingWorkflow" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques": { - "additionalProperties": false, - "properties": { - "IdMappingType": { - "type": "string" - }, - "ProviderProperties": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.ProviderProperties" - } - }, - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource": { - "additionalProperties": false, - "properties": { - "InputSourceARN": { - "type": "string" - }, - "SchemaArn": { - "type": "string" - } - }, - "required": [ - "InputSourceARN", - "SchemaArn" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource": { - "additionalProperties": false, - "properties": { - "KMSArn": { - "type": "string" - }, - "OutputS3Path": { - "type": "string" - } - }, - "required": [ - "OutputS3Path" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration": { - "additionalProperties": false, - "properties": { - "IntermediateS3Path": { - "type": "string" - } - }, - "required": [ - "IntermediateS3Path" - ], - "type": "object" - }, - "AWS::EntityResolution::IdMappingWorkflow.ProviderProperties": { - "additionalProperties": false, - "properties": { - "IntermediateSourceConfiguration": { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration" - }, - "ProviderConfiguration": { - "additionalProperties": true, - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, - "type": "object" - }, - "ProviderServiceArn": { - "type": "string" - } - }, - "required": [ - "ProviderServiceArn" - ], - "type": "object" - }, "AWS::EntityResolution::MatchingWorkflow": { "additionalProperties": false, "properties": { @@ -83953,18 +83322,6 @@ ], "type": "object" }, - "AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration": { - "additionalProperties": false, - "properties": { - "IntermediateS3Path": { - "type": "string" - } - }, - "required": [ - "IntermediateS3Path" - ], - "type": "object" - }, "AWS::EntityResolution::MatchingWorkflow.OutputAttribute": { "additionalProperties": false, "properties": { @@ -84005,36 +83362,9 @@ ], "type": "object" }, - "AWS::EntityResolution::MatchingWorkflow.ProviderProperties": { - "additionalProperties": false, - "properties": { - "IntermediateSourceConfiguration": { - "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration" - }, - "ProviderConfiguration": { - "additionalProperties": true, - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, - "type": "object" - }, - "ProviderServiceArn": { - "type": "string" - } - }, - "required": [ - "ProviderServiceArn" - ], - "type": "object" - }, "AWS::EntityResolution::MatchingWorkflow.ResolutionTechniques": { "additionalProperties": false, "properties": { - "ProviderProperties": { - "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.ProviderProperties" - }, "ResolutionType": { "type": "string" }, @@ -84175,9 +83505,6 @@ "MatchKey": { "type": "string" }, - "SubType": { - "type": "string" - }, "Type": { "type": "string" } @@ -85246,12 +84573,9 @@ "title": "Name", "type": "string" }, - "Policy": { - "type": "object" - }, "Tags": { "items": { - "$ref": "#/definitions/Tag" + "$ref": "#/definitions/AWS::Events::EventBus.TagEntry" }, "markdownDescription": "Tags to associate with the event bus.", "title": "Tags", @@ -85284,6 +84608,26 @@ ], "type": "object" }, + "AWS::Events::EventBus.TagEntry": { + "additionalProperties": false, + "properties": { + "Key": { + "markdownDescription": "A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.", + "title": "Key", + "type": "string" + }, + "Value": { + "markdownDescription": "The value for the specified tag key.", + "title": "Value", + "type": "string" + } + }, + "required": [ + "Key", + "Value" + ], + "type": "object" + }, "AWS::Events::EventBusPolicy": { "additionalProperties": false, "properties": { @@ -91061,9 +90405,6 @@ "title": "InstanceRoleARN", "type": "string" }, - "InstanceRoleCredentialsProvider": { - "type": "string" - }, "Locations": { "items": { "$ref": "#/definitions/AWS::GameLift::Fleet.LocationConfiguration" @@ -107390,12 +106731,6 @@ "title": "Description", "type": "string" }, - "DestinationPackageVersions": { - "items": { - "type": "string" - }, - "type": "array" - }, "Document": { "markdownDescription": "The job document.\n\nRequired if you don't specify a value for `documentSource` .", "title": "Document", @@ -108009,12 +107344,6 @@ "markdownDescription": "The policy name.", "title": "PolicyName", "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" } }, "required": [ @@ -108815,162 +108144,6 @@ }, "type": "object" }, - "AWS::IoT::SoftwarePackage": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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" - }, - "PackageName": { - "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" - } - }, - "type": "object" - }, - "Type": { - "enum": [ - "AWS::IoT::SoftwarePackage" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, - "AWS::IoT::SoftwarePackageVersion": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "Attributes": { - "additionalProperties": true, - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "type": "string" - } - }, - "type": "object" - }, - "Description": { - "type": "string" - }, - "PackageName": { - "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" - }, - "VersionName": { - "type": "string" - } - }, - "required": [ - "PackageName" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::IoT::SoftwarePackageVersion" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, "AWS::IoT::Thing": { "additionalProperties": false, "properties": { @@ -110015,12 +109188,6 @@ "title": "DestinationArn", "type": "string" }, - "Headers": { - "items": { - "$ref": "#/definitions/AWS::IoT::TopicRule.KafkaActionHeader" - }, - "type": "array" - }, "Key": { "markdownDescription": "The Kafka message key.", "title": "Key", @@ -110044,22 +109211,6 @@ ], "type": "object" }, - "AWS::IoT::TopicRule.KafkaActionHeader": { - "additionalProperties": false, - "properties": { - "Key": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "required": [ - "Key", - "Value" - ], - "type": "object" - }, "AWS::IoT::TopicRule.KinesisAction": { "additionalProperties": false, "properties": { @@ -120371,6 +119522,9 @@ "markdownDescription": "Provides the configuration information to connect to Microsoft SharePoint as your data source.", "title": "SharePointConfiguration" }, + "TemplateConfiguration": { + "$ref": "#/definitions/AWS::Kendra::DataSource.TemplateConfiguration" + }, "WebCrawlerConfiguration": { "$ref": "#/definitions/AWS::Kendra::DataSource.WebCrawlerConfiguration", "markdownDescription": "Provides the configuration information required for Amazon Kendra Web Crawler.", @@ -121317,6 +120471,18 @@ }, "type": "object" }, + "AWS::Kendra::DataSource.TemplateConfiguration": { + "additionalProperties": false, + "properties": { + "Template": { + "type": "string" + } + }, + "required": [ + "Template" + ], + "type": "object" + }, "AWS::Kendra::DataSource.WebCrawlerAuthenticationConfiguration": { "additionalProperties": false, "properties": { @@ -128048,9 +127214,6 @@ "title": "PackageType", "type": "string" }, - "Policy": { - "type": "object" - }, "ReservedConcurrentExecutions": { "markdownDescription": "The number of simultaneous executions to reserve for the function.", "title": "ReservedConcurrentExecutions", @@ -128310,9 +127473,6 @@ "AWS::Lambda::Function.VpcConfig": { "additionalProperties": false, "properties": { - "Ipv6AllowedForDualStack": { - "type": "boolean" - }, "SecurityGroupIds": { "items": { "type": "string" @@ -128833,9 +127993,6 @@ "$ref": "#/definitions/AWS::Lambda::Version.ProvisionedConcurrencyConfiguration", "markdownDescription": "Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.", "title": "ProvisionedConcurrencyConfig" - }, - "RuntimePolicy": { - "$ref": "#/definitions/AWS::Lambda::Version.RuntimePolicy" } }, "required": [ @@ -128878,21 +128035,6 @@ ], "type": "object" }, - "AWS::Lambda::Version.RuntimePolicy": { - "additionalProperties": false, - "properties": { - "RuntimeVersionArn": { - "type": "string" - }, - "UpdateRuntimeOn": { - "type": "string" - } - }, - "required": [ - "UpdateRuntimeOn" - ], - "type": "object" - }, "AWS::Lex::Bot": { "additionalProperties": false, "properties": { @@ -137156,151 +136298,41 @@ "additionalProperties": false, "properties": { "Description": { - "markdownDescription": "The description of the configuration.", - "title": "Description", - "type": "string" - }, - "KafkaVersionsList": { - "items": { - "type": "string" - }, - "markdownDescription": "", - "title": "KafkaVersionsList", - "type": "array" - }, - "LatestRevision": { - "$ref": "#/definitions/AWS::MSK::Configuration.LatestRevision" - }, - "Name": { - "markdownDescription": "The name of the configuration. Configuration names are strings that match the regex \"^[0-9A-Za-z][0-9A-Za-z-]{0,}$\".", - "title": "Name", - "type": "string" - }, - "ServerProperties": { - "markdownDescription": "Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the CLI, the contents of server.properties can be in plaintext.", - "title": "ServerProperties", - "type": "string" - } - }, - "required": [ - "Name", - "ServerProperties" - ], - "type": "object" - }, - "Type": { - "enum": [ - "AWS::MSK::Configuration" - ], - "type": "string" - }, - "UpdateReplacePolicy": { - "enum": [ - "Delete", - "Retain", - "Snapshot" - ], - "type": "string" - } - }, - "required": [ - "Type", - "Properties" - ], - "type": "object" - }, - "AWS::MSK::Configuration.LatestRevision": { - "additionalProperties": false, - "properties": { - "CreationTime": { - "type": "string" - }, - "Description": { - "type": "string" - }, - "Revision": { - "type": "number" - } - }, - "type": "object" - }, - "AWS::MSK::Replicator": { - "additionalProperties": false, - "properties": { - "Condition": { - "type": "string" - }, - "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": { - "CurrentVersion": { - "type": "string" - }, - "Description": { + "markdownDescription": "The description of the configuration.", + "title": "Description", "type": "string" }, - "KafkaClusters": { + "KafkaVersionsList": { "items": { - "$ref": "#/definitions/AWS::MSK::Replicator.KafkaCluster" + "type": "string" }, + "markdownDescription": "", + "title": "KafkaVersionsList", "type": "array" }, - "ReplicationInfoList": { - "items": { - "$ref": "#/definitions/AWS::MSK::Replicator.ReplicationInfo" - }, - "type": "array" + "LatestRevision": { + "$ref": "#/definitions/AWS::MSK::Configuration.LatestRevision" }, - "ReplicatorName": { + "Name": { + "markdownDescription": "The name of the configuration. Configuration names are strings that match the regex \"^[0-9A-Za-z][0-9A-Za-z-]{0,}$\".", + "title": "Name", "type": "string" }, - "ServiceExecutionRoleArn": { + "ServerProperties": { + "markdownDescription": "Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the CLI, the contents of server.properties can be in plaintext.", + "title": "ServerProperties", "type": "string" - }, - "Tags": { - "items": { - "$ref": "#/definitions/Tag" - }, - "type": "array" } }, "required": [ - "KafkaClusters", - "ReplicationInfoList", - "ReplicatorName", - "ServiceExecutionRoleArn" + "Name", + "ServerProperties" ], "type": "object" }, "Type": { "enum": [ - "AWS::MSK::Replicator" + "AWS::MSK::Configuration" ], "type": "string" }, @@ -137319,138 +136351,19 @@ ], "type": "object" }, - "AWS::MSK::Replicator.AmazonMskCluster": { - "additionalProperties": false, - "properties": { - "MskClusterArn": { - "type": "string" - } - }, - "required": [ - "MskClusterArn" - ], - "type": "object" - }, - "AWS::MSK::Replicator.ConsumerGroupReplication": { - "additionalProperties": false, - "properties": { - "ConsumerGroupsToExclude": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ConsumerGroupsToReplicate": { - "items": { - "type": "string" - }, - "type": "array" - }, - "DetectAndCopyNewConsumerGroups": { - "type": "boolean" - }, - "SynchroniseConsumerGroupOffsets": { - "type": "boolean" - } - }, - "required": [ - "ConsumerGroupsToReplicate" - ], - "type": "object" - }, - "AWS::MSK::Replicator.KafkaCluster": { - "additionalProperties": false, - "properties": { - "AmazonMskCluster": { - "$ref": "#/definitions/AWS::MSK::Replicator.AmazonMskCluster" - }, - "VpcConfig": { - "$ref": "#/definitions/AWS::MSK::Replicator.KafkaClusterClientVpcConfig" - } - }, - "required": [ - "AmazonMskCluster", - "VpcConfig" - ], - "type": "object" - }, - "AWS::MSK::Replicator.KafkaClusterClientVpcConfig": { - "additionalProperties": false, - "properties": { - "SecurityGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "SubnetIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "SubnetIds" - ], - "type": "object" - }, - "AWS::MSK::Replicator.ReplicationInfo": { + "AWS::MSK::Configuration.LatestRevision": { "additionalProperties": false, "properties": { - "ConsumerGroupReplication": { - "$ref": "#/definitions/AWS::MSK::Replicator.ConsumerGroupReplication" - }, - "SourceKafkaClusterArn": { - "type": "string" - }, - "TargetCompressionType": { + "CreationTime": { "type": "string" }, - "TargetKafkaClusterArn": { + "Description": { "type": "string" }, - "TopicReplication": { - "$ref": "#/definitions/AWS::MSK::Replicator.TopicReplication" - } - }, - "required": [ - "ConsumerGroupReplication", - "SourceKafkaClusterArn", - "TargetCompressionType", - "TargetKafkaClusterArn", - "TopicReplication" - ], - "type": "object" - }, - "AWS::MSK::Replicator.TopicReplication": { - "additionalProperties": false, - "properties": { - "CopyAccessControlListsForTopics": { - "type": "boolean" - }, - "CopyTopicConfigurations": { - "type": "boolean" - }, - "DetectAndCopyNewTopics": { - "type": "boolean" - }, - "TopicsToExclude": { - "items": { - "type": "string" - }, - "type": "array" - }, - "TopicsToReplicate": { - "items": { - "type": "string" - }, - "type": "array" + "Revision": { + "type": "number" } }, - "required": [ - "TopicsToReplicate" - ], "type": "object" }, "AWS::MSK::ServerlessCluster": { @@ -148014,12 +146927,6 @@ "AWS::MediaTailor::Channel.HlsPlaylistSettings": { "additionalProperties": false, "properties": { - "AdMarkupType": { - "items": { - "type": "string" - }, - "type": "array" - }, "ManifestWindowSeconds": { "type": "number" } @@ -151363,9 +150270,6 @@ "title": "PeerAddress", "type": "string" }, - "SubnetArn": { - "type": "string" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -151883,17 +150787,11 @@ "Properties": { "additionalProperties": false, "properties": { - "CreatedAt": { - "type": "string" - }, "Description": { "markdownDescription": "A description of the global network.\n\nConstraints: Maximum length of 256 characters.", "title": "Description", "type": "string" }, - "State": { - "type": "string" - }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -165449,9 +164347,6 @@ "markdownDescription": "The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon QuickSight console, make sure that you have access to it.", "title": "ThemeArn", "type": "string" - }, - "ValidationStrategy": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ValidationStrategy" } }, "required": [ @@ -167879,21 +166774,9 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.DataPathType": { - "additionalProperties": false, - "properties": { - "PivotTableDataPathType": { - "type": "string" - } - }, - "type": "object" - }, "AWS::QuickSight::Analysis.DataPathValue": { "additionalProperties": false, "properties": { - "DataPathType": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.DataPathType" - }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -167905,6 +166788,10 @@ "type": "string" } }, + "required": [ + "FieldId", + "FieldValue" + ], "type": "object" }, "AWS::QuickSight::Analysis.DataSetIdentifierDeclaration": { @@ -169151,9 +168038,6 @@ "title": "MatchOperator", "type": "string" }, - "NullOption": { - "type": "string" - }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -171059,30 +169943,6 @@ }, "type": "object" }, - "AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" - } - }, - "type": "object" - }, - "AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" - } - }, - "type": "object" - }, "AWS::QuickSight::Analysis.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -171100,12 +169960,6 @@ "AWS::QuickSight::Analysis.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { - "ActualValue": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting" - }, - "ComparisonValue": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting" - }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -171203,16 +170057,10 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, - "Sparkline": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPISparklineOptions" - }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" - }, - "VisualLayoutOptions": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualLayoutOptions" } }, "type": "object" @@ -171258,27 +170106,6 @@ }, "type": "object" }, - "AWS::QuickSight::Analysis.KPISparklineOptions": { - "additionalProperties": false, - "properties": { - "Color": { - "type": "string" - }, - "TooltipVisibility": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Visibility": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.KPIVisual": { "additionalProperties": false, "properties": { @@ -171329,27 +170156,6 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.KPIVisualLayoutOptions": { - "additionalProperties": false, - "properties": { - "StandardLayout": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualStandardLayout" - } - }, - "type": "object" - }, - "AWS::QuickSight::Analysis.KPIVisualStandardLayout": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.LabelOptions": { "additionalProperties": false, "properties": { @@ -173644,12 +172450,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -173998,9 +172798,6 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, - "SeriesType": { - "type": "string" - }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Analysis.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -175626,9 +174423,6 @@ "title": "Order", "type": "array" }, - "PinnedFieldOptions": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TablePinnedFieldOptions" - }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableFieldOption" @@ -175725,18 +174519,6 @@ }, "type": "object" }, - "AWS::QuickSight::Analysis.TablePinnedFieldOptions": { - "additionalProperties": false, - "properties": { - "PinnedLeftFields": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "AWS::QuickSight::Analysis.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -176016,9 +174798,6 @@ "title": "ParameterName", "type": "string" }, - "RollingDate": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.RollingDateConfiguration" - }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -176340,31 +175119,6 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.TotalAggregationFunction": { - "additionalProperties": false, - "properties": { - "SimpleTotalAggregationFunction": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::QuickSight::Analysis.TotalAggregationOption": { - "additionalProperties": false, - "properties": { - "FieldId": { - "type": "string" - }, - "TotalAggregationFunction": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationFunction" - } - }, - "required": [ - "FieldId", - "TotalAggregationFunction" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.TotalOptions": { "additionalProperties": false, "properties": { @@ -176383,12 +175137,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -176618,18 +175366,6 @@ ], "type": "object" }, - "AWS::QuickSight::Analysis.ValidationStrategy": { - "additionalProperties": false, - "properties": { - "Mode": { - "type": "string" - } - }, - "required": [ - "Mode" - ], - "type": "object" - }, "AWS::QuickSight::Analysis.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -177347,9 +176083,6 @@ "title": "ThemeArn", "type": "string" }, - "ValidationStrategy": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ValidationStrategy" - }, "VersionDescription": { "markdownDescription": "A description for the first version of the dashboard being created.", "title": "VersionDescription", @@ -179929,21 +178662,9 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.DataPathType": { - "additionalProperties": false, - "properties": { - "PivotTableDataPathType": { - "type": "string" - } - }, - "type": "object" - }, "AWS::QuickSight::Dashboard.DataPathValue": { "additionalProperties": false, "properties": { - "DataPathType": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.DataPathType" - }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -179955,6 +178676,10 @@ "type": "string" } }, + "required": [ + "FieldId", + "FieldValue" + ], "type": "object" }, "AWS::QuickSight::Dashboard.DataPointDrillUpDownOption": { @@ -181267,9 +179992,6 @@ "title": "MatchOperator", "type": "string" }, - "NullOption": { - "type": "string" - }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -183175,30 +181897,6 @@ }, "type": "object" }, - "AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" - } - }, - "type": "object" - }, - "AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" - } - }, - "type": "object" - }, "AWS::QuickSight::Dashboard.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -183216,12 +181914,6 @@ "AWS::QuickSight::Dashboard.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { - "ActualValue": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting" - }, - "ComparisonValue": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting" - }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -183319,16 +182011,10 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, - "Sparkline": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPISparklineOptions" - }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" - }, - "VisualLayoutOptions": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualLayoutOptions" } }, "type": "object" @@ -183374,27 +182060,6 @@ }, "type": "object" }, - "AWS::QuickSight::Dashboard.KPISparklineOptions": { - "additionalProperties": false, - "properties": { - "Color": { - "type": "string" - }, - "TooltipVisibility": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Visibility": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.KPIVisual": { "additionalProperties": false, "properties": { @@ -183445,27 +182110,6 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.KPIVisualLayoutOptions": { - "additionalProperties": false, - "properties": { - "StandardLayout": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualStandardLayout" - } - }, - "type": "object" - }, - "AWS::QuickSight::Dashboard.KPIVisualStandardLayout": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.LabelOptions": { "additionalProperties": false, "properties": { @@ -185760,12 +184404,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -186114,9 +184752,6 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, - "SeriesType": { - "type": "string" - }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -187764,9 +186399,6 @@ "title": "Order", "type": "array" }, - "PinnedFieldOptions": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TablePinnedFieldOptions" - }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableFieldOption" @@ -187863,18 +186495,6 @@ }, "type": "object" }, - "AWS::QuickSight::Dashboard.TablePinnedFieldOptions": { - "additionalProperties": false, - "properties": { - "PinnedLeftFields": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "AWS::QuickSight::Dashboard.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -188154,9 +186774,6 @@ "title": "ParameterName", "type": "string" }, - "RollingDate": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.RollingDateConfiguration" - }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -188478,31 +187095,6 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.TotalAggregationFunction": { - "additionalProperties": false, - "properties": { - "SimpleTotalAggregationFunction": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::QuickSight::Dashboard.TotalAggregationOption": { - "additionalProperties": false, - "properties": { - "FieldId": { - "type": "string" - }, - "TotalAggregationFunction": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationFunction" - } - }, - "required": [ - "FieldId", - "TotalAggregationFunction" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.TotalOptions": { "additionalProperties": false, "properties": { @@ -188521,12 +187113,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -188756,18 +187342,6 @@ ], "type": "object" }, - "AWS::QuickSight::Dashboard.ValidationStrategy": { - "additionalProperties": false, - "properties": { - "Mode": { - "type": "string" - } - }, - "required": [ - "Mode" - ], - "type": "object" - }, "AWS::QuickSight::Dashboard.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -191644,9 +190218,6 @@ "title": "TemplateId", "type": "string" }, - "ValidationStrategy": { - "$ref": "#/definitions/AWS::QuickSight::Template.ValidationStrategy" - }, "VersionDescription": { "markdownDescription": "A description of the current template version being created. This API operation creates the first version of the template. Every time `UpdateTemplate` is called, a new version is created. Each version of the template maintains a description of the version in the `VersionDescription` field.", "title": "VersionDescription", @@ -194008,21 +192579,9 @@ ], "type": "object" }, - "AWS::QuickSight::Template.DataPathType": { - "additionalProperties": false, - "properties": { - "PivotTableDataPathType": { - "type": "string" - } - }, - "type": "object" - }, "AWS::QuickSight::Template.DataPathValue": { "additionalProperties": false, "properties": { - "DataPathType": { - "$ref": "#/definitions/AWS::QuickSight::Template.DataPathType" - }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -194034,6 +192593,10 @@ "type": "string" } }, + "required": [ + "FieldId", + "FieldValue" + ], "type": "object" }, "AWS::QuickSight::Template.DataSetConfiguration": { @@ -195252,9 +193815,6 @@ "title": "MatchOperator", "type": "string" }, - "NullOption": { - "type": "string" - }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -197137,30 +195697,6 @@ }, "type": "object" }, - "AWS::QuickSight::Template.KPIActualValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" - } - }, - "type": "object" - }, - "AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting": { - "additionalProperties": false, - "properties": { - "Icon": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" - }, - "TextColor": { - "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" - } - }, - "type": "object" - }, "AWS::QuickSight::Template.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -197178,12 +195714,6 @@ "AWS::QuickSight::Template.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { - "ActualValue": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIActualValueConditionalFormatting" - }, - "ComparisonValue": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting" - }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Template.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -197281,16 +195811,10 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, - "Sparkline": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPISparklineOptions" - }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Template.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" - }, - "VisualLayoutOptions": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualLayoutOptions" } }, "type": "object" @@ -197336,27 +195860,6 @@ }, "type": "object" }, - "AWS::QuickSight::Template.KPISparklineOptions": { - "additionalProperties": false, - "properties": { - "Color": { - "type": "string" - }, - "TooltipVisibility": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Visibility": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Template.KPIVisual": { "additionalProperties": false, "properties": { @@ -197407,27 +195910,6 @@ ], "type": "object" }, - "AWS::QuickSight::Template.KPIVisualLayoutOptions": { - "additionalProperties": false, - "properties": { - "StandardLayout": { - "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualStandardLayout" - } - }, - "type": "object" - }, - "AWS::QuickSight::Template.KPIVisualStandardLayout": { - "additionalProperties": false, - "properties": { - "Type": { - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - }, "AWS::QuickSight::Template.LabelOptions": { "additionalProperties": false, "properties": { @@ -199684,12 +198166,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -200038,9 +198514,6 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, - "SeriesType": { - "type": "string" - }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Template.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -201643,9 +200116,6 @@ "title": "Order", "type": "array" }, - "PinnedFieldOptions": { - "$ref": "#/definitions/AWS::QuickSight::Template.TablePinnedFieldOptions" - }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Template.TableFieldOption" @@ -201742,18 +200212,6 @@ }, "type": "object" }, - "AWS::QuickSight::Template.TablePinnedFieldOptions": { - "additionalProperties": false, - "properties": { - "PinnedLeftFields": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "AWS::QuickSight::Template.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -202232,9 +200690,6 @@ "title": "ParameterName", "type": "string" }, - "RollingDate": { - "$ref": "#/definitions/AWS::QuickSight::Template.RollingDateConfiguration" - }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -202556,31 +201011,6 @@ ], "type": "object" }, - "AWS::QuickSight::Template.TotalAggregationFunction": { - "additionalProperties": false, - "properties": { - "SimpleTotalAggregationFunction": { - "type": "string" - } - }, - "type": "object" - }, - "AWS::QuickSight::Template.TotalAggregationOption": { - "additionalProperties": false, - "properties": { - "FieldId": { - "type": "string" - }, - "TotalAggregationFunction": { - "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationFunction" - } - }, - "required": [ - "FieldId", - "TotalAggregationFunction" - ], - "type": "object" - }, "AWS::QuickSight::Template.TotalOptions": { "additionalProperties": false, "properties": { @@ -202599,12 +201029,6 @@ "title": "ScrollStatus", "type": "string" }, - "TotalAggregationOptions": { - "items": { - "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" - }, - "type": "array" - }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -202834,18 +201258,6 @@ ], "type": "object" }, - "AWS::QuickSight::Template.ValidationStrategy": { - "additionalProperties": false, - "properties": { - "Mode": { - "type": "string" - } - }, - "required": [ - "Mode" - ], - "type": "object" - }, "AWS::QuickSight::Template.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -204456,9 +202868,6 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, - "NonAdditive": { - "type": "boolean" - }, "NotAllowedAggregations": { "items": { "type": "string" @@ -204603,9 +203012,6 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, - "NonAdditive": { - "type": "boolean" - }, "NotAllowedAggregations": { "items": { "type": "string" @@ -205901,9 +204307,6 @@ "title": "AutoMinorVersionUpgrade", "type": "boolean" }, - "AutomaticBackupReplicationRegion": { - "type": "string" - }, "AvailabilityZone": { "markdownDescription": "The Availability Zone (AZ) where the database will be created. For information on AWS Regions and Availability Zones, see [Regions and Availability Zones](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) .\n\nFor Amazon Aurora, each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.\n\nDefault: A random, system-chosen Availability Zone in the endpoint's AWS Region .\n\nConstraints:\n\n- The `AvailabilityZone` parameter can't be specified if the DB instance is a Multi-AZ deployment.\n- The specified Availability Zone must be in the same AWS Region as the current endpoint.\n\nExample: `us-east-1d`", "title": "AvailabilityZone", @@ -217577,6 +215980,7 @@ } }, "required": [ + "Status", "Value" ], "type": "object" @@ -217650,6 +216054,17 @@ ], "type": "object" }, + "AWS::S3ObjectLambda::AccessPoint.PolicyStatus": { + "additionalProperties": false, + "properties": { + "IsPublic": { + "markdownDescription": "", + "title": "IsPublic", + "type": "boolean" + } + }, + "type": "object" + }, "AWS::S3ObjectLambda::AccessPoint.PublicAccessBlockConfiguration": { "additionalProperties": false, "properties": { @@ -219903,9 +218318,6 @@ "Properties": { "additionalProperties": false, "properties": { - "ArchivePolicy": { - "type": "object" - }, "ContentBasedDeduplication": { "markdownDescription": "Enables content-based deduplication for FIFO topics.\n\n- By default, `ContentBasedDeduplication` is set to `false` . If you create a FIFO topic and this attribute is `false` , you must specify a value for the `MessageDeduplicationId` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.\n- When you set `ContentBasedDeduplication` to `true` , Amazon SNS uses a SHA-256 hash to generate the `MessageDeduplicationId` using the body of the message (but not the attributes of the message).\n\n(Optional) To override the generated value, you can specify a value for the the `MessageDeduplicationId` parameter for the `Publish` action.", "title": "ContentBasedDeduplication", @@ -224042,9 +222454,6 @@ "markdownDescription": "", "title": "DatasetFormat" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -224238,9 +222647,6 @@ "title": "EndpointName", "type": "string" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -230383,9 +228789,6 @@ "markdownDescription": "", "title": "DatasetFormat" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -230491,9 +228894,6 @@ "title": "EndpointName", "type": "string" }, - "ExcludeFeaturesAttribute": { - "type": "string" - }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -230828,12 +229228,6 @@ "AWS::SageMaker::MonitoringSchedule.ScheduleConfig": { "additionalProperties": false, "properties": { - "DataAnalysisEndTime": { - "type": "string" - }, - "DataAnalysisStartTime": { - "type": "string" - }, "ScheduleExpression": { "markdownDescription": "A cron expression that describes details about the monitoring schedule.\n\nCurrently the only supported cron expressions are:\n\n- If you want to set the job to start every hour, please use the following:\n\n`Hourly: cron(0 * ? * * *)`\n- If you want to start the job daily:\n\n`cron(0 [00-23] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Daily at noon UTC: `cron(0 12 ? * * *)`\n- Daily at midnight UTC: `cron(0 0 ? * * *)`\n\nTo support running every 6, 12 hours, the following are also supported:\n\n`cron(0 [00-23]/[01-24] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Every 12 hours, starting at 5pm UTC: `cron(0 17/12 ? * * *)`\n- Every two hours starting at midnight: `cron(0 0/2 ? * * *)`\n\n> - Even though the cron expression is set to start at 5PM UTC, note that there could be a delay of 0-20 minutes from the actual requested time to run the execution.\n> - We recommend that if you would like a daily schedule, you do not provide this parameter. Amazon SageMaker will pick a time for running every day.", "title": "ScheduleExpression", @@ -246232,9 +244626,6 @@ "AWS::WAFv2::WebACL.AWSManagedRulesBotControlRuleSet": { "additionalProperties": false, "properties": { - "EnableMachineLearning": { - "type": "boolean" - }, "InspectionLevel": { "markdownDescription": "The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see [AWS WAF Bot Control rule group](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html) .", "title": "InspectionLevel", @@ -250553,9 +248944,6 @@ { "$ref": "#/definitions/AWS::Cognito::IdentityPoolRoleAttachment" }, - { - "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration" - }, { "$ref": "#/definitions/AWS::Cognito::UserPool" }, @@ -251276,9 +249664,6 @@ { "$ref": "#/definitions/AWS::Elasticsearch::Domain" }, - { - "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow" - }, { "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow" }, @@ -251744,12 +250129,6 @@ { "$ref": "#/definitions/AWS::IoT::SecurityProfile" }, - { - "$ref": "#/definitions/AWS::IoT::SoftwarePackage" - }, - { - "$ref": "#/definitions/AWS::IoT::SoftwarePackageVersion" - }, { "$ref": "#/definitions/AWS::IoT::Thing" }, @@ -252119,9 +250498,6 @@ { "$ref": "#/definitions/AWS::MSK::Configuration" }, - { - "$ref": "#/definitions/AWS::MSK::Replicator" - }, { "$ref": "#/definitions/AWS::MSK::ServerlessCluster" }, diff --git a/schema_source/sam.schema.json b/schema_source/sam.schema.json index 196150ed3..8e63394c0 100644 --- a/schema_source/sam.schema.json +++ b/schema_source/sam.schema.json @@ -1065,20 +1065,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -4351,20 +4337,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -4747,20 +4719,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -4845,20 +4803,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -5426,8 +5370,7 @@ "title": "PermissionsBoundary" }, "PropagateTags": { - "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", - "title": "PropagateTags", + "title": "Propagatetags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -5986,8 +5929,7 @@ "title": "Policies" }, "PropagateTags": { - "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", - "title": "PropagateTags", + "title": "Propagatetags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -6158,20 +6100,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -7091,20 +7019,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -7313,20 +7227,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -7477,20 +7377,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -8038,20 +7924,6 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, - "IgnoreGlobals": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ], - "title": "Ignoreglobals" - }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, diff --git a/tests/plugins/globals/test_globals.py b/tests/plugins/globals/test_globals.py index 917824466..bd4ff0bbc 100644 --- a/tests/plugins/globals/test_globals.py +++ b/tests/plugins/globals/test_globals.py @@ -2,7 +2,6 @@ from unittest.mock import Mock, patch from parameterized import parameterized -from samtranslator.model.exceptions import InvalidResourceAttributeTypeException from samtranslator.plugins.globals.globals import GlobalProperties, Globals, InvalidGlobalsSectionException @@ -337,29 +336,6 @@ def test_merge_must_skip_with_no_types(self, parse_mock): self.assertEqual(expected, result) - def test_get_template_globals_star_ignore_globals(self): - type = "prefix_type1" - globals = Globals(self.template) - - result = globals.get_template_globals("MyFunction", type, "*") - - self.assertEqual(result.global_properties, GlobalProperties({}).global_properties) - - def test_get_template_globals_list_ignore_globals(self): - type = "prefix_type1" - globals = Globals(self.template) - - result = globals.get_template_globals("MyFunction", type, ["prop1"]) - - self.assertEqual(result.global_properties, GlobalProperties({"prop2": "value2"}).global_properties) - - def test_get_template_globals_error(self): - type = "prefix_type1" - globals = Globals(self.template) - - with self.assertRaises(InvalidResourceAttributeTypeException): - globals.get_template_globals("MyFunction", type, ["prop3"]) - def test_merge_end_to_end_on_known_type1(self): type = "prefix_type1" properties = {"prop1": "overridden value", "a": "b", "key": [1, 2, 3]} diff --git a/tests/translator/input/connector_appsync_to_eventbus.yaml b/tests/translator/input/connector_appsync_to_eventbus.yaml deleted file mode 100644 index e24d72087..000000000 --- a/tests/translator/input/connector_appsync_to_eventbus.yaml +++ /dev/null @@ -1,66 +0,0 @@ -Resources: - EventBus: - Type: AWS::Events::EventBus - Properties: - Name: !Sub '${AWS::StackName}-EventBus' - - EventBridgeRole: - Type: AWS::IAM::Role - Properties: - RoleName: appsync-eventbridge-role - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - sts:AssumeRole - Principal: - Service: - - appsync.amazonaws.com - - AppSyncEventBusDataSource: - Type: AWS::AppSync::DataSource - Properties: - ApiId: !GetAtt AppSyncApi.ApiId - Name: MyDataSource - Type: AMAZON_EVENTBRIDGE - ServiceRoleArn: !GetAtt EventBridgeRole.Arn - EventBridgeConfig: - EventBusArn: !GetAtt 'EventBus.Arn' - - AppSyncApi: - Type: AWS::AppSync::GraphQLApi - Properties: - AuthenticationType: AWS_IAM - Name: AppSyncApi - - ApiSchema: - Type: AWS::AppSync::GraphQLSchema - Properties: - ApiId: !GetAtt AppSyncApi.ApiId - Definition: | - type Note { - NoteId: ID! - title: String - content: String - } - type Query { - getNote(NoteId: ID!): Note - } - type Mutation { - saveNote(NoteId: ID!, title: String!, content: String!): Note! - } - type Schema { - query: Query - mutation: Mutation - } - - Connector: - Type: AWS::Serverless::Connector - Properties: - Source: - Id: AppSyncEventBusDataSource - Destination: - Id: EventBus - Permissions: - - Write diff --git a/tests/translator/input/error_api_invalid_auth.yaml b/tests/translator/input/error_api_invalid_auth.yaml index a233b8163..3461ed0be 100644 --- a/tests/translator/input/error_api_invalid_auth.yaml +++ b/tests/translator/input/error_api_invalid_auth.yaml @@ -1,20 +1,4 @@ Resources: - InvalidAuthorizationScopes: - Type: AWS::Serverless::Function - Properties: - Runtime: python3 - Handler: index.handler - CodeUri: s3://bucket/key - Events: - Api: - Type: Api - Properties: - Auth: - AuthorizationScopes: - - https://foobar.acme.net/full-api - Method: POST - Path: /hello/world - NoAuthApi: Type: AWS::Serverless::Api Properties: diff --git a/tests/translator/input/error_function_with_invalid_ignore_globals.yaml b/tests/translator/input/error_function_with_invalid_ignore_globals.yaml deleted file mode 100644 index f215e8d3c..000000000 --- a/tests/translator/input/error_function_with_invalid_ignore_globals.yaml +++ /dev/null @@ -1,12 +0,0 @@ -Globals: - Function: - Runtime: python3.7 - -Resources: - Function: - IgnoreGlobals: - - PropertyA - Type: AWS::Serverless::Function - Properties: - CodeUri: s3://s3/key - Handler: hello.handler diff --git a/tests/translator/input/function_with_ignore_globals.yaml b/tests/translator/input/function_with_ignore_globals.yaml deleted file mode 100644 index e16fcb91b..000000000 --- a/tests/translator/input/function_with_ignore_globals.yaml +++ /dev/null @@ -1,33 +0,0 @@ -Globals: - Function: - Runtime: python3.8 - Handler: index.lambda_handler - MemorySize: 128 - -Resources: - ZipFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: s3://bucket/key - - ImageFunction: - Type: AWS::Serverless::Function - IgnoreGlobals: '*' - Properties: - PackageType: Image - ImageUri: s3://bucket/key - Metadata: - Dockerfile: Dockerfile - DockerContext: ./src/image - - ImageFunction2: - Type: AWS::Serverless::Function - IgnoreGlobals: - - Runtime - - Handler - Properties: - PackageType: Image - ImageUri: s3://bucket/key - Metadata: - Dockerfile: Dockerfile - DockerContext: ./src/image diff --git a/tests/translator/input/layer_version_depends_on.yaml b/tests/translator/input/layer_version_depends_on.yaml deleted file mode 100644 index debdd2579..000000000 --- a/tests/translator/input/layer_version_depends_on.yaml +++ /dev/null @@ -1,26 +0,0 @@ -Transform: AWS::Serverless-2016-10-31 -Resources: - Layer1: - Type: AWS::Serverless::LayerVersion - Properties: - ContentUri: - Bucket: test - Key: test.zip - - Layer2: - Type: AWS::Serverless::LayerVersion - DependsOn: Layer1 - Properties: - ContentUri: - Bucket: test - Key: test.zip - - Layer3: - Type: AWS::Serverless::LayerVersion - DependsOn: - - Layer1 - - Layer2 - Properties: - ContentUri: - Bucket: test - Key: test.zip diff --git a/tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml b/tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml deleted file mode 100644 index e1bc61557..000000000 --- a/tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml +++ /dev/null @@ -1,59 +0,0 @@ -AWSTemplateFormatVersion: '2010-09-09' -Transform: -- AWS::LanguageExtensions -- AWS::Serverless-2016-10-31 - -Resources: - MyFunction: - Type: AWS::Serverless::Function - UpdateReplacePolicy: Delete - Properties: - Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync - Runtime: dotnet6 - CodeUri: s3://bucket/key - Events: - None: - Type: Api - Properties: - Method: get - Path: /method - MyFunction2: - Type: AWS::Serverless::Function - UpdateReplacePolicy: Delete - Properties: - Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync - Runtime: dotnet6 - CodeUri: s3://bucket/key - Events: - Hi: - Type: Api - Properties: - Method: post - Path: /method - MyFunction3: - Type: AWS::Serverless::Function - DeletionPolicy: Delete - Properties: - Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync - Runtime: dotnet6 - CodeUri: s3://bucket/key - Events: - All: - Type: Api - Properties: - Method: get - Path: /method2 - MyFunction4: - Type: AWS::Serverless::Function - DeletionPolicy: Retain - UpdateReplacePolicy: Retain - Properties: - Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync - Runtime: dotnet6 - CodeUri: s3://bucket/key - Events: - Bye: - Type: Api - Properties: - Method: post - Path: /method2 diff --git a/tests/translator/output/aws-cn/connector_appsync_to_eventbus.json b/tests/translator/output/aws-cn/connector_appsync_to_eventbus.json deleted file mode 100644 index c48f52efb..000000000 --- a/tests/translator/output/aws-cn/connector_appsync_to_eventbus.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "Resources": { - "ApiSchema": { - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "AppSyncApi", - "ApiId" - ] - }, - "Definition": "type Note {\n NoteId: ID!\n title: String\n content: String\n}\ntype Query {\n getNote(NoteId: ID!): Note\n}\ntype Mutation {\n saveNote(NoteId: ID!, title: String!, content: String!): Note!\n}\ntype Schema {\n query: Query\n mutation: Mutation\n}\n" - }, - "Type": "AWS::AppSync::GraphQLSchema" - }, - "AppSyncApi": { - "Properties": { - "AuthenticationType": "AWS_IAM", - "Name": "AppSyncApi" - }, - "Type": "AWS::AppSync::GraphQLApi" - }, - "AppSyncEventBusDataSource": { - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "AppSyncApi", - "ApiId" - ] - }, - "EventBridgeConfig": { - "EventBusArn": { - "Fn::GetAtt": [ - "EventBus", - "Arn" - ] - } - }, - "Name": "MyDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "EventBridgeRole", - "Arn" - ] - }, - "Type": "AMAZON_EVENTBRIDGE" - }, - "Type": "AWS::AppSync::DataSource" - }, - "ConnectorPolicy": { - "Metadata": { - "aws:sam:connectors": { - "Connector": { - "Destination": { - "Type": "AWS::Events::EventBus" - }, - "Source": { - "Type": "AWS::AppSync::DataSource" - } - } - } - }, - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "events:PutEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "EventBus", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "Roles": [ - { - "Ref": "EventBridgeRole" - } - ] - }, - "Type": "AWS::IAM::ManagedPolicy" - }, - "EventBridgeRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "appsync.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": "appsync-eventbridge-role" - }, - "Type": "AWS::IAM::Role" - }, - "EventBus": { - "Properties": { - "Name": { - "Fn::Sub": "${AWS::StackName}-EventBus" - } - }, - "Type": "AWS::Events::EventBus" - } - } -} diff --git a/tests/translator/output/aws-cn/function_with_ignore_globals.json b/tests/translator/output/aws-cn/function_with_ignore_globals.json deleted file mode 100644 index 6b6e7ecea..000000000 --- a/tests/translator/output/aws-cn/function_with_ignore_globals.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "Resources": { - "ImageFunction": { - "Metadata": { - "DockerContext": "./src/image", - "Dockerfile": "Dockerfile" - }, - "Properties": { - "Code": { - "ImageUri": "s3://bucket/key" - }, - "PackageType": "Image", - "Role": { - "Fn::GetAtt": [ - "ImageFunctionRole", - "Arn" - ] - }, - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ImageFunction2": { - "Metadata": { - "DockerContext": "./src/image", - "Dockerfile": "Dockerfile" - }, - "Properties": { - "Code": { - "ImageUri": "s3://bucket/key" - }, - "MemorySize": 128, - "PackageType": "Image", - "Role": { - "Fn::GetAtt": [ - "ImageFunction2Role", - "Arn" - ] - }, - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ImageFunction2Role": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "ImageFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "ZipFunction": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "index.lambda_handler", - "MemorySize": 128, - "Role": { - "Fn::GetAtt": [ - "ZipFunctionRole", - "Arn" - ] - }, - "Runtime": "python3.8", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ZipFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - } - } -} diff --git a/tests/translator/output/aws-cn/layer_version_depends_on.json b/tests/translator/output/aws-cn/layer_version_depends_on.json deleted file mode 100644 index 3daff7d7c..000000000 --- a/tests/translator/output/aws-cn/layer_version_depends_on.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Resources": { - "Layer1d45b36fd2d": { - "DeletionPolicy": "Retain", - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer1" - }, - "Type": "AWS::Lambda::LayerVersion" - }, - "Layer25093239808": { - "DeletionPolicy": "Retain", - "DependsOn": "Layer1d45b36fd2d", - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer2" - }, - "Type": "AWS::Lambda::LayerVersion" - }, - "Layer34d7f81220c": { - "DeletionPolicy": "Retain", - "DependsOn": [ - "Layer1d45b36fd2d", - "Layer25093239808" - ], - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer3" - }, - "Type": "AWS::Lambda::LayerVersion" - } - } -} diff --git a/tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json b/tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json deleted file mode 100644 index a4c5437ad..000000000 --- a/tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json +++ /dev/null @@ -1,412 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - "Resources": { - "MyFunction": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunctionRole", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction2Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2HiPermissionProd": { - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction2" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2Role": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction3": { - "DeletionPolicy": "Delete", - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction3Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "MyFunction3AllPermissionProd": { - "DeletionPolicy": "Delete", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction3" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method2", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission" - }, - "MyFunction3Role": { - "DeletionPolicy": "Delete", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "MyFunction4": { - "DeletionPolicy": "Retain", - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction4Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Retain" - }, - "MyFunction4ByePermissionProd": { - "DeletionPolicy": "Retain", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction4" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method2", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Retain" - }, - "MyFunction4Role": { - "DeletionPolicy": "Retain", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Retain" - }, - "MyFunctionNonePermissionProd": { - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Delete" - }, - "MyFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Delete" - }, - "ServerlessRestApi": { - "DeletionPolicy": "Retain", - "Properties": { - "Body": { - "info": { - "title": { - "Ref": "AWS::StackName" - }, - "version": "1.0" - }, - "paths": { - "/method": { - "get": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction.Arn}/invocations" - } - } - }, - "post": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction2.Arn}/invocations" - } - } - } - }, - "/method2": { - "get": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction3.Arn}/invocations" - } - } - }, - "post": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction4.Arn}/invocations" - } - } - } - } - }, - "swagger": "2.0" - }, - "EndpointConfiguration": { - "Types": [ - "REGIONAL" - ] - }, - "Parameters": { - "endpointConfigurationTypes": "REGIONAL" - } - }, - "Type": "AWS::ApiGateway::RestApi", - "UpdateReplacePolicy": "Retain" - }, - "ServerlessRestApiDeploymentf177d7dd48": { - "DeletionPolicy": "Retain", - "Properties": { - "Description": "RestApi deployment id: f177d7dd480597bbebe027d565e98d1b4e36e615", - "RestApiId": { - "Ref": "ServerlessRestApi" - }, - "StageName": "Stage" - }, - "Type": "AWS::ApiGateway::Deployment", - "UpdateReplacePolicy": "Retain" - }, - "ServerlessRestApiProdStage": { - "DeletionPolicy": "Retain", - "Properties": { - "DeploymentId": { - "Ref": "ServerlessRestApiDeploymentf177d7dd48" - }, - "RestApiId": { - "Ref": "ServerlessRestApi" - }, - "StageName": "Prod" - }, - "Type": "AWS::ApiGateway::Stage", - "UpdateReplacePolicy": "Retain" - } - } -} diff --git a/tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json b/tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json deleted file mode 100644 index c48f52efb..000000000 --- a/tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "Resources": { - "ApiSchema": { - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "AppSyncApi", - "ApiId" - ] - }, - "Definition": "type Note {\n NoteId: ID!\n title: String\n content: String\n}\ntype Query {\n getNote(NoteId: ID!): Note\n}\ntype Mutation {\n saveNote(NoteId: ID!, title: String!, content: String!): Note!\n}\ntype Schema {\n query: Query\n mutation: Mutation\n}\n" - }, - "Type": "AWS::AppSync::GraphQLSchema" - }, - "AppSyncApi": { - "Properties": { - "AuthenticationType": "AWS_IAM", - "Name": "AppSyncApi" - }, - "Type": "AWS::AppSync::GraphQLApi" - }, - "AppSyncEventBusDataSource": { - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "AppSyncApi", - "ApiId" - ] - }, - "EventBridgeConfig": { - "EventBusArn": { - "Fn::GetAtt": [ - "EventBus", - "Arn" - ] - } - }, - "Name": "MyDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "EventBridgeRole", - "Arn" - ] - }, - "Type": "AMAZON_EVENTBRIDGE" - }, - "Type": "AWS::AppSync::DataSource" - }, - "ConnectorPolicy": { - "Metadata": { - "aws:sam:connectors": { - "Connector": { - "Destination": { - "Type": "AWS::Events::EventBus" - }, - "Source": { - "Type": "AWS::AppSync::DataSource" - } - } - } - }, - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "events:PutEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "EventBus", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "Roles": [ - { - "Ref": "EventBridgeRole" - } - ] - }, - "Type": "AWS::IAM::ManagedPolicy" - }, - "EventBridgeRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "appsync.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": "appsync-eventbridge-role" - }, - "Type": "AWS::IAM::Role" - }, - "EventBus": { - "Properties": { - "Name": { - "Fn::Sub": "${AWS::StackName}-EventBus" - } - }, - "Type": "AWS::Events::EventBus" - } - } -} diff --git a/tests/translator/output/aws-us-gov/function_with_ignore_globals.json b/tests/translator/output/aws-us-gov/function_with_ignore_globals.json deleted file mode 100644 index ad0011e53..000000000 --- a/tests/translator/output/aws-us-gov/function_with_ignore_globals.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "Resources": { - "ImageFunction": { - "Metadata": { - "DockerContext": "./src/image", - "Dockerfile": "Dockerfile" - }, - "Properties": { - "Code": { - "ImageUri": "s3://bucket/key" - }, - "PackageType": "Image", - "Role": { - "Fn::GetAtt": [ - "ImageFunctionRole", - "Arn" - ] - }, - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ImageFunction2": { - "Metadata": { - "DockerContext": "./src/image", - "Dockerfile": "Dockerfile" - }, - "Properties": { - "Code": { - "ImageUri": "s3://bucket/key" - }, - "MemorySize": 128, - "PackageType": "Image", - "Role": { - "Fn::GetAtt": [ - "ImageFunction2Role", - "Arn" - ] - }, - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ImageFunction2Role": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "ImageFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "ZipFunction": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "index.lambda_handler", - "MemorySize": 128, - "Role": { - "Fn::GetAtt": [ - "ZipFunctionRole", - "Arn" - ] - }, - "Runtime": "python3.8", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ZipFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - } - } -} diff --git a/tests/translator/output/aws-us-gov/layer_version_depends_on.json b/tests/translator/output/aws-us-gov/layer_version_depends_on.json deleted file mode 100644 index 3daff7d7c..000000000 --- a/tests/translator/output/aws-us-gov/layer_version_depends_on.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Resources": { - "Layer1d45b36fd2d": { - "DeletionPolicy": "Retain", - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer1" - }, - "Type": "AWS::Lambda::LayerVersion" - }, - "Layer25093239808": { - "DeletionPolicy": "Retain", - "DependsOn": "Layer1d45b36fd2d", - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer2" - }, - "Type": "AWS::Lambda::LayerVersion" - }, - "Layer34d7f81220c": { - "DeletionPolicy": "Retain", - "DependsOn": [ - "Layer1d45b36fd2d", - "Layer25093239808" - ], - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer3" - }, - "Type": "AWS::Lambda::LayerVersion" - } - } -} diff --git a/tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json b/tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json deleted file mode 100644 index 24be6084e..000000000 --- a/tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json +++ /dev/null @@ -1,412 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - "Resources": { - "MyFunction": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunctionRole", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction2Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2HiPermissionProd": { - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction2" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2Role": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction3": { - "DeletionPolicy": "Delete", - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction3Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "MyFunction3AllPermissionProd": { - "DeletionPolicy": "Delete", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction3" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method2", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission" - }, - "MyFunction3Role": { - "DeletionPolicy": "Delete", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "MyFunction4": { - "DeletionPolicy": "Retain", - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction4Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Retain" - }, - "MyFunction4ByePermissionProd": { - "DeletionPolicy": "Retain", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction4" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method2", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Retain" - }, - "MyFunction4Role": { - "DeletionPolicy": "Retain", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Retain" - }, - "MyFunctionNonePermissionProd": { - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Delete" - }, - "MyFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Delete" - }, - "ServerlessRestApi": { - "DeletionPolicy": "Retain", - "Properties": { - "Body": { - "info": { - "title": { - "Ref": "AWS::StackName" - }, - "version": "1.0" - }, - "paths": { - "/method": { - "get": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction.Arn}/invocations" - } - } - }, - "post": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction2.Arn}/invocations" - } - } - } - }, - "/method2": { - "get": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction3.Arn}/invocations" - } - } - }, - "post": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction4.Arn}/invocations" - } - } - } - } - }, - "swagger": "2.0" - }, - "EndpointConfiguration": { - "Types": [ - "REGIONAL" - ] - }, - "Parameters": { - "endpointConfigurationTypes": "REGIONAL" - } - }, - "Type": "AWS::ApiGateway::RestApi", - "UpdateReplacePolicy": "Retain" - }, - "ServerlessRestApiDeployment7b2714845e": { - "DeletionPolicy": "Retain", - "Properties": { - "Description": "RestApi deployment id: 7b2714845ec91c841eec02f421ced97a4bebe350", - "RestApiId": { - "Ref": "ServerlessRestApi" - }, - "StageName": "Stage" - }, - "Type": "AWS::ApiGateway::Deployment", - "UpdateReplacePolicy": "Retain" - }, - "ServerlessRestApiProdStage": { - "DeletionPolicy": "Retain", - "Properties": { - "DeploymentId": { - "Ref": "ServerlessRestApiDeployment7b2714845e" - }, - "RestApiId": { - "Ref": "ServerlessRestApi" - }, - "StageName": "Prod" - }, - "Type": "AWS::ApiGateway::Stage", - "UpdateReplacePolicy": "Retain" - } - } -} diff --git a/tests/translator/output/connector_appsync_to_eventbus.json b/tests/translator/output/connector_appsync_to_eventbus.json deleted file mode 100644 index c48f52efb..000000000 --- a/tests/translator/output/connector_appsync_to_eventbus.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "Resources": { - "ApiSchema": { - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "AppSyncApi", - "ApiId" - ] - }, - "Definition": "type Note {\n NoteId: ID!\n title: String\n content: String\n}\ntype Query {\n getNote(NoteId: ID!): Note\n}\ntype Mutation {\n saveNote(NoteId: ID!, title: String!, content: String!): Note!\n}\ntype Schema {\n query: Query\n mutation: Mutation\n}\n" - }, - "Type": "AWS::AppSync::GraphQLSchema" - }, - "AppSyncApi": { - "Properties": { - "AuthenticationType": "AWS_IAM", - "Name": "AppSyncApi" - }, - "Type": "AWS::AppSync::GraphQLApi" - }, - "AppSyncEventBusDataSource": { - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "AppSyncApi", - "ApiId" - ] - }, - "EventBridgeConfig": { - "EventBusArn": { - "Fn::GetAtt": [ - "EventBus", - "Arn" - ] - } - }, - "Name": "MyDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "EventBridgeRole", - "Arn" - ] - }, - "Type": "AMAZON_EVENTBRIDGE" - }, - "Type": "AWS::AppSync::DataSource" - }, - "ConnectorPolicy": { - "Metadata": { - "aws:sam:connectors": { - "Connector": { - "Destination": { - "Type": "AWS::Events::EventBus" - }, - "Source": { - "Type": "AWS::AppSync::DataSource" - } - } - } - }, - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "events:PutEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "EventBus", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "Roles": [ - { - "Ref": "EventBridgeRole" - } - ] - }, - "Type": "AWS::IAM::ManagedPolicy" - }, - "EventBridgeRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "appsync.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": "appsync-eventbridge-role" - }, - "Type": "AWS::IAM::Role" - }, - "EventBus": { - "Properties": { - "Name": { - "Fn::Sub": "${AWS::StackName}-EventBus" - } - }, - "Type": "AWS::Events::EventBus" - } - } -} diff --git a/tests/translator/output/error_api_invalid_auth.json b/tests/translator/output/error_api_invalid_auth.json index 5675bc3f5..cfd616021 100644 --- a/tests/translator/output/error_api_invalid_auth.json +++ b/tests/translator/output/error_api_invalid_auth.json @@ -1,7 +1,7 @@ { "_autoGeneratedBreakdownErrorMessage": [ "Invalid Serverless Application Specification document. ", - "Number of errors found: 22. ", + "Number of errors found: 21. ", "Resource with id [AuthNotDictApi] is invalid. ", "Property 'Auth' should be a map. ", "Resource with id [AuthWithAdditionalPropertyApi] is invalid. ", @@ -19,9 +19,7 @@ "Property 'Auth.Authorizers' should be a map. ", "Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. ", "Property 'Auth.DefaultAuthorizer' should be a string. ", - "Resource with id [InvalidAuthorizationScopes] is invalid. ", - "Event with id [Api] is invalid. ", - "AuthorizationScopes works only when Authorizer is set Resource with id [InvalidFunctionPayloadTypeApi] is invalid. ", + "Resource with id [InvalidFunctionPayloadTypeApi] is invalid. ", "MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. ", "Resource with id [MissingAuthorizerFn] is invalid. ", "Event with id [GetRoot] is invalid. ", @@ -51,5 +49,5 @@ "Resource with id [NonStringDefaultAuthorizerApi] is invalid. ", "Property 'Auth.DefaultAuthorizer' should be a string." ], - "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 22. Resource with id [AuthNotDictApi] is invalid. Property 'Auth' should be a map. Resource with id [AuthWithAdditionalPropertyApi] is invalid. Invalid value for 'Auth' property Resource with id [AuthWithDefinitionUriApi] is invalid. Auth works only with inline Swagger specified in 'DefinitionBody' property. Resource with id [AuthWithInvalidDefinitionBodyApi] is invalid. Unable to add Auth configuration because 'DefinitionBody' does not contain a valid Swagger definition. Resource with id [AuthWithMissingDefaultAuthorizerApi] is invalid. Unable to set DefaultAuthorizer because 'NotThere' was not defined in 'Authorizers'. Resource with id [AuthorizerNotDict] is invalid. Property 'Auth.Authorizers.MyCognitoAuthorizer' should be a map. Resource with id [AuthorizerWithBadDisableFunctionDefaultPermissionsType] is invalid. Property 'Authorizers.MyAuth.DisableFunctionDefaultPermissions' should be a boolean. Resource with id [AuthorizersNotDictApi] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string. Resource with id [InvalidAuthorizationScopes] is invalid. Event with id [Api] is invalid. AuthorizationScopes works only when Authorizer is set Resource with id [InvalidFunctionPayloadTypeApi] is invalid. MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. Resource with id [MissingAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [UnspecifiedAuthorizer] on API method [get] for path [/] because it wasn't defined in the API's Authorizers. Resource with id [NoApiAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthorizersFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoDefaultAuthorizerWithNoneFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer on API method [get] for path [/] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. Resource with id [NoIdentityOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NoIdentitySourceOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NonDictAuthorizerApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictAuthorizerRestApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictExternalApiAuthorizer] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [NonStringDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string." + "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 21. Resource with id [AuthNotDictApi] is invalid. Property 'Auth' should be a map. Resource with id [AuthWithAdditionalPropertyApi] is invalid. Invalid value for 'Auth' property Resource with id [AuthWithDefinitionUriApi] is invalid. Auth works only with inline Swagger specified in 'DefinitionBody' property. Resource with id [AuthWithInvalidDefinitionBodyApi] is invalid. Unable to add Auth configuration because 'DefinitionBody' does not contain a valid Swagger definition. Resource with id [AuthWithMissingDefaultAuthorizerApi] is invalid. Unable to set DefaultAuthorizer because 'NotThere' was not defined in 'Authorizers'. Resource with id [AuthorizerNotDict] is invalid. Property 'Auth.Authorizers.MyCognitoAuthorizer' should be a map. Resource with id [AuthorizerWithBadDisableFunctionDefaultPermissionsType] is invalid. Property 'Authorizers.MyAuth.DisableFunctionDefaultPermissions' should be a boolean. Resource with id [AuthorizersNotDictApi] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string. Resource with id [InvalidFunctionPayloadTypeApi] is invalid. MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. Resource with id [MissingAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [UnspecifiedAuthorizer] on API method [get] for path [/] because it wasn't defined in the API's Authorizers. Resource with id [NoApiAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthorizersFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoDefaultAuthorizerWithNoneFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer on API method [get] for path [/] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. Resource with id [NoIdentityOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NoIdentitySourceOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NonDictAuthorizerApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictAuthorizerRestApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictExternalApiAuthorizer] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [NonStringDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string." } diff --git a/tests/translator/output/error_function_with_invalid_ignore_globals.json b/tests/translator/output/error_function_with_invalid_ignore_globals.json deleted file mode 100644 index 293e90eb1..000000000 --- a/tests/translator/output/error_function_with_invalid_ignore_globals.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_autoGeneratedBreakdownErrorMessage": [ - "Invalid Serverless Application Specification document. ", - "Number of errors found: 1. ", - "Resource with id [Function] is invalid. ", - "Resource Function has invalid resource attribute 'IgnoreGlobals' on item 'PropertyA'." - ], - "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Resource Function has invalid resource attribute 'IgnoreGlobals' on item 'PropertyA'.", - "errors": [ - { - "errorMessage": "Resource with id [Function] is invalid. Resource Function has invalid resource attribute 'IgnoreGlobals' on value 'PropertyA'." - } - ] -} diff --git a/tests/translator/output/function_with_ignore_globals.json b/tests/translator/output/function_with_ignore_globals.json deleted file mode 100644 index 8c3add664..000000000 --- a/tests/translator/output/function_with_ignore_globals.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "Resources": { - "ImageFunction": { - "Metadata": { - "DockerContext": "./src/image", - "Dockerfile": "Dockerfile" - }, - "Properties": { - "Code": { - "ImageUri": "s3://bucket/key" - }, - "PackageType": "Image", - "Role": { - "Fn::GetAtt": [ - "ImageFunctionRole", - "Arn" - ] - }, - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ImageFunction2": { - "Metadata": { - "DockerContext": "./src/image", - "Dockerfile": "Dockerfile" - }, - "Properties": { - "Code": { - "ImageUri": "s3://bucket/key" - }, - "MemorySize": 128, - "PackageType": "Image", - "Role": { - "Fn::GetAtt": [ - "ImageFunction2Role", - "Arn" - ] - }, - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ImageFunction2Role": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "ImageFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "ZipFunction": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "index.lambda_handler", - "MemorySize": 128, - "Role": { - "Fn::GetAtt": [ - "ZipFunctionRole", - "Arn" - ] - }, - "Runtime": "python3.8", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "ZipFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - } - } -} diff --git a/tests/translator/output/layer_version_depends_on.json b/tests/translator/output/layer_version_depends_on.json deleted file mode 100644 index 3daff7d7c..000000000 --- a/tests/translator/output/layer_version_depends_on.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Resources": { - "Layer1d45b36fd2d": { - "DeletionPolicy": "Retain", - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer1" - }, - "Type": "AWS::Lambda::LayerVersion" - }, - "Layer25093239808": { - "DeletionPolicy": "Retain", - "DependsOn": "Layer1d45b36fd2d", - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer2" - }, - "Type": "AWS::Lambda::LayerVersion" - }, - "Layer34d7f81220c": { - "DeletionPolicy": "Retain", - "DependsOn": [ - "Layer1d45b36fd2d", - "Layer25093239808" - ], - "Properties": { - "Content": { - "S3Bucket": "test", - "S3Key": "test.zip" - }, - "LayerName": "Layer3" - }, - "Type": "AWS::Lambda::LayerVersion" - } - } -} diff --git a/tests/translator/output/valid_update_replace_policy_and_deletion_policy.json b/tests/translator/output/valid_update_replace_policy_and_deletion_policy.json deleted file mode 100644 index 7b33aa94c..000000000 --- a/tests/translator/output/valid_update_replace_policy_and_deletion_policy.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - "Resources": { - "MyFunction": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunctionRole", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2": { - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction2Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2HiPermissionProd": { - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction2" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction2Role": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Delete" - }, - "MyFunction3": { - "DeletionPolicy": "Delete", - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction3Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function" - }, - "MyFunction3AllPermissionProd": { - "DeletionPolicy": "Delete", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction3" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method2", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission" - }, - "MyFunction3Role": { - "DeletionPolicy": "Delete", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role" - }, - "MyFunction4": { - "DeletionPolicy": "Retain", - "Properties": { - "Code": { - "S3Bucket": "bucket", - "S3Key": "key" - }, - "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", - "Role": { - "Fn::GetAtt": [ - "MyFunction4Role", - "Arn" - ] - }, - "Runtime": "dotnet6", - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::Lambda::Function", - "UpdateReplacePolicy": "Retain" - }, - "MyFunction4ByePermissionProd": { - "DeletionPolicy": "Retain", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction4" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method2", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Retain" - }, - "MyFunction4Role": { - "DeletionPolicy": "Retain", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Retain" - }, - "MyFunctionNonePermissionProd": { - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "MyFunction" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Sub": [ - "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method", - { - "__ApiId__": { - "Ref": "ServerlessRestApi" - }, - "__Stage__": "*" - } - ] - } - }, - "Type": "AWS::Lambda::Permission", - "UpdateReplacePolicy": "Delete" - }, - "MyFunctionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole" - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ], - "Tags": [ - { - "Key": "lambda:createdBy", - "Value": "SAM" - } - ] - }, - "Type": "AWS::IAM::Role", - "UpdateReplacePolicy": "Delete" - }, - "ServerlessRestApi": { - "DeletionPolicy": "Retain", - "Properties": { - "Body": { - "info": { - "title": { - "Ref": "AWS::StackName" - }, - "version": "1.0" - }, - "paths": { - "/method": { - "get": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction.Arn}/invocations" - } - } - }, - "post": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction2.Arn}/invocations" - } - } - } - }, - "/method2": { - "get": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction3.Arn}/invocations" - } - } - }, - "post": { - "responses": {}, - "x-amazon-apigateway-integration": { - "httpMethod": "POST", - "type": "aws_proxy", - "uri": { - "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction4.Arn}/invocations" - } - } - } - } - }, - "swagger": "2.0" - } - }, - "Type": "AWS::ApiGateway::RestApi", - "UpdateReplacePolicy": "Retain" - }, - "ServerlessRestApiDeploymented02210310": { - "DeletionPolicy": "Retain", - "Properties": { - "Description": "RestApi deployment id: ed022103104b41126f13a40759da23020fe2dd72", - "RestApiId": { - "Ref": "ServerlessRestApi" - }, - "StageName": "Stage" - }, - "Type": "AWS::ApiGateway::Deployment", - "UpdateReplacePolicy": "Retain" - }, - "ServerlessRestApiProdStage": { - "DeletionPolicy": "Retain", - "Properties": { - "DeploymentId": { - "Ref": "ServerlessRestApiDeploymented02210310" - }, - "RestApiId": { - "Ref": "ServerlessRestApi" - }, - "StageName": "Prod" - }, - "Type": "AWS::ApiGateway::Stage", - "UpdateReplacePolicy": "Retain" - } - } -} From 256df61d97a38cf6161b59768709ea688b03e23f Mon Sep 17 00:00:00 2001 From: GZ Date: Wed, 22 Nov 2023 16:22:45 -0800 Subject: [PATCH 6/8] Revert "Revert "Release 1.81.0 (to main)"" (#3437) --- integration/combination/test_connectors.py | 1 + .../connector_appsync_to_eventbus.json | 38 + .../connector_appsync_to_eventbus.yaml | 192 ++ .../single/test_basic_state_machine.py | 4 + pytest.ini | 2 + samtranslator/__init__.py | 2 +- .../schema_source/aws_serverless_function.py | 4 +- .../internal/schema_source/common.py | 1 + .../model/connector_profiles/profiles.json | 17 + samtranslator/model/eventsources/push.py | 3 + samtranslator/open_api/open_api.py | 4 + .../plugins/api/implicit_api_plugin.py | 8 +- samtranslator/plugins/globals/globals.py | 62 +- .../plugins/globals/globals_plugin.py | 14 +- samtranslator/schema/schema.json | 1884 ++++++++++++++++- samtranslator/sdk/resource.py | 3 +- samtranslator/translator/translator.py | 4 + samtranslator/utils/actions.py | 60 + samtranslator/utils/traverse.py | 67 + schema_source/cloudformation.schema.json | 1796 +++++++++++++++- schema_source/sam.schema.json | 132 +- tests/plugins/globals/test_globals.py | 24 + .../input/connector_appsync_to_eventbus.yaml | 66 + .../input/error_api_invalid_auth.yaml | 16 + ..._function_with_invalid_ignore_globals.yaml | 12 + .../input/function_with_ignore_globals.yaml | 33 + .../input/layer_version_depends_on.yaml | 26 + ...te_replace_policy_and_deletion_policy.yaml | 59 + .../aws-cn/connector_appsync_to_eventbus.json | 121 ++ .../aws-cn/function_with_ignore_globals.json | 169 ++ .../aws-cn/layer_version_depends_on.json | 42 + ...te_replace_policy_and_deletion_policy.json | 412 ++++ .../connector_appsync_to_eventbus.json | 121 ++ .../function_with_ignore_globals.json | 169 ++ .../aws-us-gov/layer_version_depends_on.json | 42 + ...te_replace_policy_and_deletion_policy.json | 412 ++++ .../output/connector_appsync_to_eventbus.json | 121 ++ .../output/error_api_invalid_auth.json | 8 +- ..._function_with_invalid_ignore_globals.json | 14 + .../output/function_with_ignore_globals.json | 169 ++ .../output/layer_version_depends_on.json | 42 + ...te_replace_policy_and_deletion_policy.json | 404 ++++ 42 files changed, 6604 insertions(+), 176 deletions(-) create mode 100644 integration/resources/expected/combination/connector_appsync_to_eventbus.json create mode 100644 integration/resources/templates/combination/connector_appsync_to_eventbus.yaml create mode 100644 samtranslator/utils/actions.py create mode 100644 samtranslator/utils/traverse.py create mode 100644 tests/translator/input/connector_appsync_to_eventbus.yaml create mode 100644 tests/translator/input/error_function_with_invalid_ignore_globals.yaml create mode 100644 tests/translator/input/function_with_ignore_globals.yaml create mode 100644 tests/translator/input/layer_version_depends_on.yaml create mode 100644 tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml create mode 100644 tests/translator/output/aws-cn/connector_appsync_to_eventbus.json create mode 100644 tests/translator/output/aws-cn/function_with_ignore_globals.json create mode 100644 tests/translator/output/aws-cn/layer_version_depends_on.json create mode 100644 tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json create mode 100644 tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json create mode 100644 tests/translator/output/aws-us-gov/function_with_ignore_globals.json create mode 100644 tests/translator/output/aws-us-gov/layer_version_depends_on.json create mode 100644 tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json create mode 100644 tests/translator/output/connector_appsync_to_eventbus.json create mode 100644 tests/translator/output/error_function_with_invalid_ignore_globals.json create mode 100644 tests/translator/output/function_with_ignore_globals.json create mode 100644 tests/translator/output/layer_version_depends_on.json create mode 100644 tests/translator/output/valid_update_replace_policy_and_deletion_policy.json diff --git a/integration/combination/test_connectors.py b/integration/combination/test_connectors.py index e9a2553a7..63b156038 100644 --- a/integration/combination/test_connectors.py +++ b/integration/combination/test_connectors.py @@ -62,6 +62,7 @@ def tearDown(self): ("combination/connector_appsync_api_to_lambda",), ("combination/connector_appsync_to_lambda",), ("combination/connector_appsync_to_table",), + ("combination/connector_appsync_to_eventbus",), ("combination/connector_function_to_function",), ("combination/connector_restapi_to_function",), ("combination/connector_httpapi_to_function",), diff --git a/integration/resources/expected/combination/connector_appsync_to_eventbus.json b/integration/resources/expected/combination/connector_appsync_to_eventbus.json new file mode 100644 index 000000000..c4da4cb98 --- /dev/null +++ b/integration/resources/expected/combination/connector_appsync_to_eventbus.json @@ -0,0 +1,38 @@ +[ + { + "LogicalResourceId": "ApiKey", + "ResourceType": "AWS::AppSync::ApiKey" + }, + { + "LogicalResourceId": "ApiSchema", + "ResourceType": "AWS::AppSync::GraphQLSchema" + }, + { + "LogicalResourceId": "AppSyncApi", + "ResourceType": "AWS::AppSync::GraphQLApi" + }, + { + "LogicalResourceId": "AppSyncEventBusDataSource", + "ResourceType": "AWS::AppSync::DataSource" + }, + { + "LogicalResourceId": "AppSyncSayHelloResolver", + "ResourceType": "AWS::AppSync::Resolver" + }, + { + "LogicalResourceId": "ConnectorPolicy", + "ResourceType": "AWS::IAM::ManagedPolicy" + }, + { + "LogicalResourceId": "EventBridgeRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "EventBus", + "ResourceType": "AWS::Events::EventBus" + }, + { + "LogicalResourceId": "TriggerFunction", + "ResourceType": "AWS::Lambda::Function" + } +] diff --git a/integration/resources/templates/combination/connector_appsync_to_eventbus.yaml b/integration/resources/templates/combination/connector_appsync_to_eventbus.yaml new file mode 100644 index 000000000..bc3ca12f0 --- /dev/null +++ b/integration/resources/templates/combination/connector_appsync_to_eventbus.yaml @@ -0,0 +1,192 @@ +Resources: + EventBus: + Type: AWS::Events::EventBus + Properties: + Name: !Sub "${AWS::StackName}-EventBus" + + EventBridgeRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Action: + - sts:AssumeRole + Principal: + Service: + - appsync.amazonaws.com + - lambda.amazonaws.com + + AppSyncApi: + Type: AWS::AppSync::GraphQLApi + Properties: + Name: AppSyncApi + AuthenticationType: API_KEY + + ApiSchema: + Type: AWS::AppSync::GraphQLSchema + Properties: + ApiId: !GetAtt AppSyncApi.ApiId + Definition: | + type EntryDetails { + ErrorCode: String + ErrorMessage: String + EventId: String! + } + + type PutEventsResult { + Entries: [EntryDetails!]! + FailedEntry: Int + } + + type Query { + sayHello: PutEventsResult! + } + + schema { + query: Query + } + + AppSyncEventBusDataSource: + Type: AWS::AppSync::DataSource + Properties: + ApiId: !GetAtt AppSyncApi.ApiId + Name: AppSyncEventBusDataSource + Type: AMAZON_EVENTBRIDGE + ServiceRoleArn: !GetAtt EventBridgeRole.Arn + EventBridgeConfig: + EventBusArn: !GetAtt 'EventBus.Arn' + + AppSyncSayHelloResolver: + DependsOn: ApiSchema + Type: AWS::AppSync::Resolver + Properties: + ApiId: !GetAtt AppSyncApi.ApiId + TypeName: Query + FieldName: sayHello + DataSourceName: !GetAtt AppSyncEventBusDataSource.Name + Runtime: + Name: APPSYNC_JS + RuntimeVersion: 1.0.0 + Code: | + import { util } from '@aws-appsync/utils'; + export function request(ctx) { + return { + "operation" : "PutEvents", + "events" : [{ + "source": "com.mycompany.myapp", + "detail": { + "key1" : "value1", + "key2" : "value2" + }, + "resources": ["Resource1", "Resource2"], + "detailType": "myDetailType" + }] + } + } + + export function response(ctx) { + if(ctx.error) + util.error(ctx.error.message, ctx.error.type, ctx.result) + else + return ctx.result + } + + Connector: + Type: AWS::Serverless::Connector + Properties: + Source: + Id: AppSyncEventBusDataSource + Destination: + Id: EventBus + Permissions: + - Write + + ApiKey: + Type: AWS::AppSync::ApiKey + Properties: + ApiId: !GetAtt AppSyncApi.ApiId + + TriggerFunction: + Type: AWS::Serverless::Function + Properties: + Role: !GetAtt EventBridgeRole.Arn + Environment: + Variables: + API_KEY: !GetAtt ApiKey.ApiKey + GRAPHQL_URL: !GetAtt AppSyncApi.GraphQLUrl + EventBusName: !Ref EventBus + Runtime: nodejs16.x + Handler: index.handler + InlineCode: | + const https = require("https"); + + exports.handler = async () => { + const queries = { + sayHello: /* GraphQL */ ` + query { + sayHello { + Entries { + ErrorCode + EventId + ErrorMessage + } + FailedEntry + } + } + `, + }; + + const fetch = async (url, options) => + new Promise((resolve, reject) => { + const req = https.request(url, options, (res) => { + const body = []; + res.on("data", (chunk) => body.push(chunk)); + res.on("end", () => { + const resString = Buffer.concat(body).toString(); + resolve(resString); + }); + }); + req.on("error", (err) => { + reject(err); + }); + req.on("timeout", () => { + req.destroy(); + reject(new Error("Request time out")); + }); + req.write(options.body); + req.end(); + }); + + const makeRequest = async (queryName) => { + const options = { + method: "POST", + headers: { + "x-api-key": process.env.API_KEY, + }, + body: JSON.stringify({ query: queries[queryName] }), + timeout: 600000, // ms + }; + + const response = await fetch(process.env.GRAPHQL_URL, options); + let body = JSON.parse(response); + const data = body.data?.[queryName]; + + if (body.errors !== undefined) { + throw JSON.stringify(body.errors); + } + + if (data.FailedEntry != null || data.ErrorCode != null ) { + throw new Error( + `${queryName} error: failed to send event to eventbus ${process.env.EventBusName}`); + } + + return body.data; + }; + + await makeRequest("sayHello"); + }; + +Metadata: + SamTransformTest: true diff --git a/integration/single/test_basic_state_machine.py b/integration/single/test_basic_state_machine.py index 5f58abe55..ddcca881d 100644 --- a/integration/single/test_basic_state_machine.py +++ b/integration/single/test_basic_state_machine.py @@ -34,6 +34,10 @@ def test_basic_state_machine_with_tags(self): self._verify_tag_presence(tags, "TagOne", "ValueOne") self._verify_tag_presence(tags, "TagTwo", "ValueTwo") + @skipIf( + current_region_does_not_support([STATE_MACHINE_INLINE_DEFINITION]), + "StateMachine with inline definition is not supported in this testing region", + ) def test_state_machine_with_role_path(self): """ Creates a State machine with a Role Path diff --git a/pytest.ini b/pytest.ini index 3fc1047ed..c130f7c2a 100644 --- a/pytest.ini +++ b/pytest.ini @@ -20,3 +20,5 @@ filterwarnings = ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning # Pytest warnings ignore::pytest.PytestUnraisableExceptionWarning + # https://github.com/urllib3/urllib3/blob/main/src/urllib3/poolmanager.py#L313 + ignore::DeprecationWarning:urllib3.*: diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index bd41b85a3..10fa444db 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = "1.80.0" +__version__ = "1.81.0" diff --git a/samtranslator/internal/schema_source/aws_serverless_function.py b/samtranslator/internal/schema_source/aws_serverless_function.py index 81cf160c5..af97a1cbf 100644 --- a/samtranslator/internal/schema_source/aws_serverless_function.py +++ b/samtranslator/internal/schema_source/aws_serverless_function.py @@ -628,7 +628,7 @@ class Properties(BaseModel): SnapStart: Optional[SnapStart] = prop("SnapStart") RuntimeManagementConfig: Optional[RuntimeManagementConfig] = prop("RuntimeManagementConfig") Tags: Optional[Tags] = prop("Tags") - PropagateTags: Optional[bool] # TODO: add docs + PropagateTags: Optional[bool] = prop("PropagateTags") Timeout: Optional[Timeout] = prop("Timeout") Tracing: Optional[Tracing] = prop("Tracing") VersionDescription: Optional[PassThroughProp] = prop("VersionDescription") @@ -659,7 +659,7 @@ class Globals(BaseModel): ["AWS::Lambda::Function", "Properties", "Environment"], ) Tags: Optional[Tags] = prop("Tags") - PropagateTags: Optional[bool] # TODO: add docs + PropagateTags: Optional[bool] = prop("PropagateTags") Tracing: Optional[Tracing] = prop("Tracing") KmsKeyArn: Optional[KmsKeyArn] = prop("KmsKeyArn") Layers: Optional[Layers] = prop("Layers") diff --git a/samtranslator/internal/schema_source/common.py b/samtranslator/internal/schema_source/common.py index 6ab0e41f5..b74e3877c 100644 --- a/samtranslator/internal/schema_source/common.py +++ b/samtranslator/internal/schema_source/common.py @@ -99,3 +99,4 @@ class ResourceAttributes(BaseModel): Metadata: Optional[PassThroughProp] UpdateReplacePolicy: Optional[PassThroughProp] Condition: Optional[PassThroughProp] + IgnoreGlobals: Optional[Union[str, List[str]]] diff --git a/samtranslator/model/connector_profiles/profiles.json b/samtranslator/model/connector_profiles/profiles.json index c1fb1e3d6..31769e16c 100644 --- a/samtranslator/model/connector_profiles/profiles.json +++ b/samtranslator/model/connector_profiles/profiles.json @@ -790,6 +790,23 @@ } } } + }, + "AWS::Events::EventBus": { + "Type": "AWS_IAM_ROLE_MANAGED_POLICY", + "Properties": { + "SourcePolicy": true, + "AccessCategories": { + "Write": { + "Statement": [ + { + "Effect": "Allow", + "Action": ["events:PutEvents"], + "Resource": ["%{Destination.Arn}"] + } + ] + } + } + } } }, "AWS::AppSync::GraphQLApi": { diff --git a/samtranslator/model/eventsources/push.py b/samtranslator/model/eventsources/push.py index a296edbc6..07552cd8c 100644 --- a/samtranslator/model/eventsources/push.py +++ b/samtranslator/model/eventsources/push.py @@ -1116,8 +1116,11 @@ def add_auth_to_swagger( # noqa: PLR0912, PLR0913 ) auth_scopes = event_auth.get("AuthorizationScopes") + if auth_scopes: sam_expect(auth_scopes, event_id, "Auth.AuthorizationScopes", is_sam_event=True).to_be_a_list() + if not method_authorizer: + raise InvalidEventException(event_id, "AuthorizationScopes works only when Authorizer is set") apikey_required_setting = event_auth.get("ApiKeyRequired") apikey_required_setting_is_false = apikey_required_setting is not None and not apikey_required_setting diff --git a/samtranslator/open_api/open_api.py b/samtranslator/open_api/open_api.py index 0eb18bae3..1ccfa438b 100644 --- a/samtranslator/open_api/open_api.py +++ b/samtranslator/open_api/open_api.py @@ -518,6 +518,10 @@ def openapi(self) -> Dict[str, Any]: if self.security_schemes: self._doc.setdefault("components", Py27Dict()) + if not self._doc["components"]: + # explicitly set to dict to account for scenario where + # 'components' is explicitly set to None + self._doc["components"] = Py27Dict() self._doc["components"]["securitySchemes"] = self.security_schemes if self.info: diff --git a/samtranslator/plugins/api/implicit_api_plugin.py b/samtranslator/plugins/api/implicit_api_plugin.py index 9de8ab270..454f40142 100644 --- a/samtranslator/plugins/api/implicit_api_plugin.py +++ b/samtranslator/plugins/api/implicit_api_plugin.py @@ -496,8 +496,8 @@ def _update_resource_attributes_from_api_event( # noqa: PLR0913 method_conditions = api_dict_condition.setdefault(path, {}) method_conditions[method] = condition - api_dict_deletion = self.api_deletion_policies.setdefault(api_id, set()) - api_dict_deletion.add(deletion_policy) + api_dict_deletion = self.api_deletion_policies.setdefault(api_id, []) + api_dict_deletion.append(deletion_policy) - api_dict_update_replace = self.api_update_replace_policies.setdefault(api_id, set()) - api_dict_update_replace.add(update_replace_policy) + api_dict_update_replace = self.api_update_replace_policies.setdefault(api_id, []) + api_dict_update_replace.append(update_replace_policy) diff --git a/samtranslator/plugins/globals/globals.py b/samtranslator/plugins/globals/globals.py index 2bea29ba6..65adb6ac8 100644 --- a/samtranslator/plugins/globals/globals.py +++ b/samtranslator/plugins/globals/globals.py @@ -1,6 +1,7 @@ -from typing import Any, Dict, List +import copy +from typing import Any, Dict, List, Optional, Union -from samtranslator.model.exceptions import ExceptionWithMessage +from samtranslator.model.exceptions import ExceptionWithMessage, InvalidResourceAttributeTypeException from samtranslator.public.intrinsics import is_intrinsics from samtranslator.public.sdk.resource import SamResourceType from samtranslator.swagger.swagger import SwaggerEditor @@ -100,7 +101,7 @@ class Globals: SamResourceType.Function.value: ["RuntimeManagementConfig"], } - def __init__(self, template) -> None: # type: ignore[no-untyped-def] + def __init__(self, template: Dict[str, Any]) -> None: """ Constructs an instance of this object @@ -112,12 +113,57 @@ def __init__(self, template) -> None: # type: ignore[no-untyped-def] # Sort the names for stability in list ordering self.supported_resource_section_names.sort() - self.template_globals = {} + self.template_globals: Dict[str, GlobalProperties] = {} if self._KEYWORD in template: self.template_globals = self._parse(template[self._KEYWORD]) # type: ignore[no-untyped-call] - def merge(self, resource_type, resource_properties): # type: ignore[no-untyped-def] + def get_template_globals( + self, logical_id: str, resource_type: str, ignore_globals: Optional[Union[str, List[str]]] + ) -> "GlobalProperties": + """ + Get template globals but remove globals based on IgnoreGlobals attribute. + + :param string logical_id: LogicalId of the resource + :param string resource_type: Type of the resource (Ex: AWS::Serverless::Function) + :param dict ignore_globals: IgnoreGlobals resource attribute. It can be either 1) "*" string value + or list of string value, each value should be a valid property in Globals section + :return dict: processed template globals + """ + if not ignore_globals: + return self.template_globals[resource_type] + + if isinstance(ignore_globals, str) and ignore_globals == "*": + return GlobalProperties({}) + + if isinstance(ignore_globals, list): + global_props: GlobalProperties = copy.deepcopy(self.template_globals[resource_type]) + for key in ignore_globals: + if key not in global_props.global_properties: + raise InvalidResourceAttributeTypeException( + logical_id, + "IgnoreGlobals", + None, + f"Resource {logical_id} has invalid resource attribute 'IgnoreGlobals' on item '{key}'.", + ) + del global_props.global_properties[key] + return global_props + + # We raise exception for any non "*" or non-list input + raise InvalidResourceAttributeTypeException( + logical_id, + "IgnoreGlobals", + None, + f"Resource {logical_id} has invalid resource attribute 'IgnoreGlobals'.", + ) + + def merge( + self, + resource_type: str, + resource_properties: Dict[str, Any], + logical_id: str = "", + ignore_globals: Optional[Union[str, List[str]]] = None, + ) -> Any: """ Adds global properties to the resource, if necessary. This method is a no-op if there are no global properties for this resource type @@ -131,12 +177,12 @@ def merge(self, resource_type, resource_properties): # type: ignore[no-untyped- # Nothing to do. Return the template unmodified return resource_properties - global_props = self.template_globals[resource_type] + global_props = self.get_template_globals(logical_id, str(resource_type), ignore_globals) - return global_props.merge(resource_properties) + return global_props.merge(resource_properties) # type: ignore[no-untyped-call] @classmethod - def del_section(cls, template): # type: ignore[no-untyped-def] + def del_section(cls, template: Dict[str, Any]) -> None: """ Helper method to delete the Globals section altogether from the template diff --git a/samtranslator/plugins/globals/globals_plugin.py b/samtranslator/plugins/globals/globals_plugin.py index 6dd7b089c..bb1c1028e 100644 --- a/samtranslator/plugins/globals/globals_plugin.py +++ b/samtranslator/plugins/globals/globals_plugin.py @@ -1,4 +1,7 @@ +from typing import Any, Dict + from samtranslator.metrics.method_decorator import cw_timer +from samtranslator.model.exceptions import InvalidResourceAttributeTypeException from samtranslator.plugins.globals.globals import Globals, InvalidGlobalsSectionException from samtranslator.public.exceptions import InvalidDocumentException from samtranslator.public.plugins import BasePlugin @@ -13,7 +16,7 @@ class GlobalsPlugin(BasePlugin): """ @cw_timer(prefix="Plugin-Globals") - def on_before_transform_template(self, template_dict): # type: ignore[no-untyped-def] + def on_before_transform_template(self, template_dict: Dict[str, Any]) -> None: """ Hook method that runs before a template gets transformed. In this method, we parse and process Globals section from the template (if present). @@ -28,11 +31,16 @@ def on_before_transform_template(self, template_dict): # type: ignore[no-untype # For each resource in template, try and merge with Globals if necessary template = SamTemplate(template_dict) for logicalId, resource in template.iterate(): - resource.properties = global_section.merge(resource.type, resource.properties) # type: ignore[no-untyped-call] + try: + resource.properties = global_section.merge( + str(resource.type), resource.properties, logicalId, resource.ignore_globals + ) + except InvalidResourceAttributeTypeException as ex: + raise InvalidDocumentException([ex]) from ex template.set(logicalId, resource) # Remove the Globals section from template if necessary - Globals.del_section(template_dict) # type: ignore[no-untyped-call] + Globals.del_section(template_dict) # If there was a global openApiVersion flag, check and convert swagger # to the right version diff --git a/samtranslator/schema/schema.json b/samtranslator/schema/schema.json index 47549e27e..b8f6eaa33 100644 --- a/samtranslator/schema/schema.json +++ b/samtranslator/schema/schema.json @@ -2418,6 +2418,9 @@ "title": "AppId", "type": "string" }, + "Backend": { + "$ref": "#/definitions/AWS::Amplify::Branch.Backend" + }, "BasicAuthConfig": { "$ref": "#/definitions/AWS::Amplify::Branch.BasicAuthConfig", "markdownDescription": "The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .", @@ -2512,6 +2515,15 @@ ], "type": "object" }, + "AWS::Amplify::Branch.Backend": { + "additionalProperties": false, + "properties": { + "StackArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Amplify::Branch.BasicAuthConfig": { "additionalProperties": false, "properties": { @@ -7406,7 +7418,13 @@ "title": "MutualTlsAuthentication" }, "Tags": { + "additionalProperties": true, "markdownDescription": "The collection of tags associated with a domain name.", + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, "title": "Tags", "type": "object" } @@ -8469,6 +8487,10 @@ "type": "string" } }, + "required": [ + "Key", + "Value" + ], "type": "object" }, "AWS::AppConfig::ConfigurationProfile": { @@ -8516,6 +8538,9 @@ "title": "Description", "type": "string" }, + "KmsKeyIdentifier": { + "type": "string" + }, "LocationUri": { "markdownDescription": "A URI to locate the configuration. You can specify the following:\n\n- For the AWS AppConfig hosted configuration store and for feature flags, specify `hosted` .\n- For an AWS Systems Manager Parameter Store parameter, specify either the parameter name in the format `ssm-parameter://` or the ARN.\n- For an AWS CodePipeline pipeline, specify the URI in the following format: `codepipeline` ://.\n- For an AWS Secrets Manager secret, specify the URI in the following format: `secretsmanager` ://.\n- For an Amazon S3 object, specify the URI in the following format: `s3:///` . Here is an example: `s3://my-bucket/my-app/us-east-1/my-config.json`\n- For an SSM document, specify either the document name in the format `ssm-document://` or the Amazon Resource Name (ARN).", "title": "LocationUri", @@ -12123,7 +12148,6 @@ "required": [ "KmsKey", "Name", - "ScheduleConfig", "SourceURI" ], "type": "object" @@ -22409,9 +22433,12 @@ "type": "array" }, "TopicARN": { + "items": { + "type": "string" + }, "markdownDescription": "The Amazon Resource Name (ARN) of the Amazon SNS topic.", "title": "TopicARN", - "type": "string" + "type": "array" } }, "required": [ @@ -31889,6 +31916,12 @@ "title": "Enabled", "type": "boolean" }, + "SingleHeaderPolicyConfig": { + "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig" + }, + "SingleWeightPolicyConfig": { + "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig" + }, "StagingDistributionDnsNames": { "items": { "type": "string" @@ -31901,6 +31934,9 @@ "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig", "markdownDescription": "Contains the parameters for routing production traffic from your primary to staging distributions.", "title": "TrafficConfig" + }, + "Type": { + "type": "string" } }, "required": [ @@ -31949,6 +31985,22 @@ ], "type": "object" }, + "AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig": { + "additionalProperties": false, + "properties": { + "Header": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "required": [ + "Header", + "Value" + ], + "type": "object" + }, "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightConfig": { "additionalProperties": false, "properties": { @@ -31968,6 +32020,21 @@ ], "type": "object" }, + "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig": { + "additionalProperties": false, + "properties": { + "SessionStickinessConfig": { + "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SessionStickinessConfig" + }, + "Weight": { + "type": "number" + } + }, + "required": [ + "Weight" + ], + "type": "object" + }, "AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig": { "additionalProperties": false, "properties": { @@ -40223,6 +40290,101 @@ ], "type": "object" }, + "AWS::Cognito::LogDeliveryConfiguration": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "LogConfigurations": { + "items": { + "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.LogConfiguration" + }, + "type": "array" + }, + "UserPoolId": { + "type": "string" + } + }, + "required": [ + "UserPoolId" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::Cognito::LogDeliveryConfiguration" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration": { + "additionalProperties": false, + "properties": { + "LogGroupArn": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::Cognito::LogDeliveryConfiguration.LogConfiguration": { + "additionalProperties": false, + "properties": { + "CloudWatchLogsConfiguration": { + "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration" + }, + "EventSource": { + "type": "string" + }, + "LogLevel": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Cognito::UserPool": { "additionalProperties": false, "properties": { @@ -40371,7 +40533,13 @@ "type": "string" }, "UserPoolTags": { + "additionalProperties": true, "markdownDescription": "The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.", + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, "title": "UserPoolTags", "type": "object" }, @@ -45856,6 +46024,9 @@ "Properties": { "additionalProperties": false, "properties": { + "AgentAvailabilityTimer": { + "type": "string" + }, "DefaultOutboundQueueArn": { "type": "string" }, @@ -47016,6 +47187,12 @@ "markdownDescription": "The Amazon Resource Name (ARN) of the parent group.", "title": "ParentGroupArn", "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -47298,6 +47475,15 @@ ], "type": "object" }, + "AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig": { + "additionalProperties": false, + "properties": { + "DialingCapacity": { + "type": "number" + } + }, + "type": "object" + }, "AWS::ConnectCampaigns::Campaign.AnswerMachineDetectionConfig": { "additionalProperties": false, "properties": { @@ -47315,6 +47501,9 @@ "AWS::ConnectCampaigns::Campaign.DialerConfig": { "additionalProperties": false, "properties": { + "AgentlessDialerConfig": { + "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig" + }, "PredictiveDialerConfig": { "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.PredictiveDialerConfig", "markdownDescription": "The configuration of the predictive dialer.", @@ -47353,8 +47542,7 @@ } }, "required": [ - "ConnectContactFlowArn", - "ConnectQueueArn" + "ConnectContactFlowArn" ], "type": "object" }, @@ -47365,6 +47553,9 @@ "markdownDescription": "Bandwidth allocation for the predictive dialer.", "title": "BandwidthAllocation", "type": "number" + }, + "DialingCapacity": { + "type": "number" } }, "required": [ @@ -47379,6 +47570,9 @@ "markdownDescription": "Bandwidth allocation for the progressive dialer.", "title": "BandwidthAllocation", "type": "number" + }, + "DialingCapacity": { + "type": "number" } }, "required": [ @@ -47720,6 +47914,12 @@ "title": "DomainName", "type": "string" }, + "Matching": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Matching" + }, + "RuleBasedMatching": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.RuleBasedMatching" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -47755,6 +47955,214 @@ ], "type": "object" }, + "AWS::CustomerProfiles::Domain.AttributeTypesSelector": { + "additionalProperties": false, + "properties": { + "Address": { + "items": { + "type": "string" + }, + "type": "array" + }, + "AttributeMatchingModel": { + "type": "string" + }, + "EmailAddress": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PhoneNumber": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "AttributeMatchingModel" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.AutoMerging": { + "additionalProperties": false, + "properties": { + "ConflictResolution": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" + }, + "Consolidation": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Consolidation" + }, + "Enabled": { + "type": "boolean" + }, + "MinAllowedConfidenceScoreForMerging": { + "type": "number" + } + }, + "required": [ + "Enabled" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.ConflictResolution": { + "additionalProperties": false, + "properties": { + "ConflictResolvingModel": { + "type": "string" + }, + "SourceName": { + "type": "string" + } + }, + "required": [ + "ConflictResolvingModel" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.Consolidation": { + "additionalProperties": false, + "properties": { + "MatchingAttributesList": { + "type": "object" + } + }, + "required": [ + "MatchingAttributesList" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.DomainStats": { + "additionalProperties": false, + "properties": { + "MeteringProfileCount": { + "type": "number" + }, + "ObjectCount": { + "type": "number" + }, + "ProfileCount": { + "type": "number" + }, + "TotalSize": { + "type": "number" + } + }, + "type": "object" + }, + "AWS::CustomerProfiles::Domain.ExportingConfig": { + "additionalProperties": false, + "properties": { + "S3Exporting": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.S3ExportingConfig" + } + }, + "type": "object" + }, + "AWS::CustomerProfiles::Domain.JobSchedule": { + "additionalProperties": false, + "properties": { + "DayOfTheWeek": { + "type": "string" + }, + "Time": { + "type": "string" + } + }, + "required": [ + "DayOfTheWeek", + "Time" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.Matching": { + "additionalProperties": false, + "properties": { + "AutoMerging": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AutoMerging" + }, + "Enabled": { + "type": "boolean" + }, + "ExportingConfig": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" + }, + "JobSchedule": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.JobSchedule" + } + }, + "required": [ + "Enabled" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.MatchingRule": { + "additionalProperties": false, + "properties": { + "Rule": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "Rule" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.RuleBasedMatching": { + "additionalProperties": false, + "properties": { + "AttributeTypesSelector": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AttributeTypesSelector" + }, + "ConflictResolution": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" + }, + "Enabled": { + "type": "boolean" + }, + "ExportingConfig": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" + }, + "MatchingRules": { + "items": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.MatchingRule" + }, + "type": "array" + }, + "MaxAllowedRuleLevelForMatching": { + "type": "number" + }, + "MaxAllowedRuleLevelForMerging": { + "type": "number" + }, + "Status": { + "type": "string" + } + }, + "required": [ + "Enabled" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.S3ExportingConfig": { + "additionalProperties": false, + "properties": { + "S3BucketName": { + "type": "string" + }, + "S3KeyName": { + "type": "string" + } + }, + "required": [ + "S3BucketName" + ], + "type": "object" + }, "AWS::CustomerProfiles::EventStream": { "additionalProperties": false, "properties": { @@ -71122,6 +71530,9 @@ "title": "SecurityGroupIds", "type": "array" }, + "SseSpecification": { + "$ref": "#/definitions/AWS::EC2::VerifiedAccessEndpoint.SseSpecification" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71217,6 +71628,18 @@ }, "type": "object" }, + "AWS::EC2::VerifiedAccessEndpoint.SseSpecification": { + "additionalProperties": false, + "properties": { + "CustomerManagedKeyEnabled": { + "type": "boolean" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::EC2::VerifiedAccessGroup": { "additionalProperties": false, "properties": { @@ -71267,6 +71690,9 @@ "title": "PolicyEnabled", "type": "boolean" }, + "SseSpecification": { + "$ref": "#/definitions/AWS::EC2::VerifiedAccessGroup.SseSpecification" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71307,6 +71733,18 @@ ], "type": "object" }, + "AWS::EC2::VerifiedAccessGroup.SseSpecification": { + "additionalProperties": false, + "properties": { + "CustomerManagedKeyEnabled": { + "type": "boolean" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::EC2::VerifiedAccessInstance": { "additionalProperties": false, "properties": { @@ -71347,6 +71785,9 @@ "title": "Description", "type": "string" }, + "FipsEnabled": { + "type": "boolean" + }, "LoggingConfigurations": { "$ref": "#/definitions/AWS::EC2::VerifiedAccessInstance.VerifiedAccessLogs", "markdownDescription": "The current logging configuration for the Verified Access instances.", @@ -71579,6 +72020,9 @@ "title": "PolicyReferenceName", "type": "string" }, + "SseSpecification": { + "$ref": "#/definitions/AWS::EC2::VerifiedAccessTrustProvider.SseSpecification" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71677,6 +72121,18 @@ }, "type": "object" }, + "AWS::EC2::VerifiedAccessTrustProvider.SseSpecification": { + "additionalProperties": false, + "properties": { + "CustomerManagedKeyEnabled": { + "type": "boolean" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::EC2::Volume": { "additionalProperties": false, "properties": { @@ -83242,6 +83698,181 @@ }, "type": "object" }, + "AWS::EntityResolution::IdMappingWorkflow": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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" + }, + "IdMappingTechniques": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques" + }, + "InputSourceConfig": { + "items": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource" + }, + "type": "array" + }, + "OutputSourceConfig": { + "items": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource" + }, + "type": "array" + }, + "RoleArn": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "WorkflowName": { + "type": "string" + } + }, + "required": [ + "IdMappingTechniques", + "InputSourceConfig", + "OutputSourceConfig", + "RoleArn", + "WorkflowName" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::EntityResolution::IdMappingWorkflow" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques": { + "additionalProperties": false, + "properties": { + "IdMappingType": { + "type": "string" + }, + "ProviderProperties": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.ProviderProperties" + } + }, + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource": { + "additionalProperties": false, + "properties": { + "InputSourceARN": { + "type": "string" + }, + "SchemaArn": { + "type": "string" + } + }, + "required": [ + "InputSourceARN", + "SchemaArn" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource": { + "additionalProperties": false, + "properties": { + "KMSArn": { + "type": "string" + }, + "OutputS3Path": { + "type": "string" + } + }, + "required": [ + "OutputS3Path" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration": { + "additionalProperties": false, + "properties": { + "IntermediateS3Path": { + "type": "string" + } + }, + "required": [ + "IntermediateS3Path" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.ProviderProperties": { + "additionalProperties": false, + "properties": { + "IntermediateSourceConfiguration": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration" + }, + "ProviderConfiguration": { + "additionalProperties": true, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, + "type": "object" + }, + "ProviderServiceArn": { + "type": "string" + } + }, + "required": [ + "ProviderServiceArn" + ], + "type": "object" + }, "AWS::EntityResolution::MatchingWorkflow": { "additionalProperties": false, "properties": { @@ -83357,6 +83988,18 @@ ], "type": "object" }, + "AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration": { + "additionalProperties": false, + "properties": { + "IntermediateS3Path": { + "type": "string" + } + }, + "required": [ + "IntermediateS3Path" + ], + "type": "object" + }, "AWS::EntityResolution::MatchingWorkflow.OutputAttribute": { "additionalProperties": false, "properties": { @@ -83397,9 +84040,36 @@ ], "type": "object" }, + "AWS::EntityResolution::MatchingWorkflow.ProviderProperties": { + "additionalProperties": false, + "properties": { + "IntermediateSourceConfiguration": { + "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration" + }, + "ProviderConfiguration": { + "additionalProperties": true, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, + "type": "object" + }, + "ProviderServiceArn": { + "type": "string" + } + }, + "required": [ + "ProviderServiceArn" + ], + "type": "object" + }, "AWS::EntityResolution::MatchingWorkflow.ResolutionTechniques": { "additionalProperties": false, "properties": { + "ProviderProperties": { + "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.ProviderProperties" + }, "ResolutionType": { "type": "string" }, @@ -83540,6 +84210,9 @@ "MatchKey": { "type": "string" }, + "SubType": { + "type": "string" + }, "Type": { "type": "string" } @@ -84608,9 +85281,12 @@ "title": "Name", "type": "string" }, + "Policy": { + "type": "object" + }, "Tags": { "items": { - "$ref": "#/definitions/AWS::Events::EventBus.TagEntry" + "$ref": "#/definitions/Tag" }, "markdownDescription": "Tags to associate with the event bus.", "title": "Tags", @@ -84643,26 +85319,6 @@ ], "type": "object" }, - "AWS::Events::EventBus.TagEntry": { - "additionalProperties": false, - "properties": { - "Key": { - "markdownDescription": "A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.", - "title": "Key", - "type": "string" - }, - "Value": { - "markdownDescription": "The value for the specified tag key.", - "title": "Value", - "type": "string" - } - }, - "required": [ - "Key", - "Value" - ], - "type": "object" - }, "AWS::Events::EventBusPolicy": { "additionalProperties": false, "properties": { @@ -90447,6 +91103,9 @@ "title": "InstanceRoleARN", "type": "string" }, + "InstanceRoleCredentialsProvider": { + "type": "string" + }, "Locations": { "items": { "$ref": "#/definitions/AWS::GameLift::Fleet.LocationConfiguration" @@ -106773,6 +107432,12 @@ "title": "Description", "type": "string" }, + "DestinationPackageVersions": { + "items": { + "type": "string" + }, + "type": "array" + }, "Document": { "markdownDescription": "The job document.\n\nRequired if you don't specify a value for `documentSource` .", "title": "Document", @@ -107386,6 +108051,12 @@ "markdownDescription": "The policy name.", "title": "PolicyName", "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -108186,6 +108857,162 @@ }, "type": "object" }, + "AWS::IoT::SoftwarePackage": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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" + }, + "PackageName": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::SoftwarePackage" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "AWS::IoT::SoftwarePackageVersion": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "Attributes": { + "additionalProperties": true, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, + "type": "object" + }, + "Description": { + "type": "string" + }, + "PackageName": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "VersionName": { + "type": "string" + } + }, + "required": [ + "PackageName" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::SoftwarePackageVersion" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::IoT::Thing": { "additionalProperties": false, "properties": { @@ -109230,6 +110057,12 @@ "title": "DestinationArn", "type": "string" }, + "Headers": { + "items": { + "$ref": "#/definitions/AWS::IoT::TopicRule.KafkaActionHeader" + }, + "type": "array" + }, "Key": { "markdownDescription": "The Kafka message key.", "title": "Key", @@ -109253,6 +110086,22 @@ ], "type": "object" }, + "AWS::IoT::TopicRule.KafkaActionHeader": { + "additionalProperties": false, + "properties": { + "Key": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "required": [ + "Key", + "Value" + ], + "type": "object" + }, "AWS::IoT::TopicRule.KinesisAction": { "additionalProperties": false, "properties": { @@ -119564,9 +120413,6 @@ "markdownDescription": "Provides the configuration information to connect to Microsoft SharePoint as your data source.", "title": "SharePointConfiguration" }, - "TemplateConfiguration": { - "$ref": "#/definitions/AWS::Kendra::DataSource.TemplateConfiguration" - }, "WebCrawlerConfiguration": { "$ref": "#/definitions/AWS::Kendra::DataSource.WebCrawlerConfiguration", "markdownDescription": "Provides the configuration information required for Amazon Kendra Web Crawler.", @@ -120513,18 +121359,6 @@ }, "type": "object" }, - "AWS::Kendra::DataSource.TemplateConfiguration": { - "additionalProperties": false, - "properties": { - "Template": { - "type": "string" - } - }, - "required": [ - "Template" - ], - "type": "object" - }, "AWS::Kendra::DataSource.WebCrawlerAuthenticationConfiguration": { "additionalProperties": false, "properties": { @@ -127263,6 +128097,9 @@ "title": "PackageType", "type": "string" }, + "Policy": { + "type": "object" + }, "ReservedConcurrentExecutions": { "markdownDescription": "The number of simultaneous executions to reserve for the function.", "title": "ReservedConcurrentExecutions", @@ -127522,6 +128359,9 @@ "AWS::Lambda::Function.VpcConfig": { "additionalProperties": false, "properties": { + "Ipv6AllowedForDualStack": { + "type": "boolean" + }, "SecurityGroupIds": { "items": { "type": "string" @@ -128042,6 +128882,9 @@ "$ref": "#/definitions/AWS::Lambda::Version.ProvisionedConcurrencyConfiguration", "markdownDescription": "Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.", "title": "ProvisionedConcurrencyConfig" + }, + "RuntimePolicy": { + "$ref": "#/definitions/AWS::Lambda::Version.RuntimePolicy" } }, "required": [ @@ -128084,6 +128927,21 @@ ], "type": "object" }, + "AWS::Lambda::Version.RuntimePolicy": { + "additionalProperties": false, + "properties": { + "RuntimeVersionArn": { + "type": "string" + }, + "UpdateRuntimeOn": { + "type": "string" + } + }, + "required": [ + "UpdateRuntimeOn" + ], + "type": "object" + }, "AWS::Lex::Bot": { "additionalProperties": false, "properties": { @@ -136415,6 +137273,235 @@ }, "type": "object" }, + "AWS::MSK::Replicator": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "CurrentVersion": { + "type": "string" + }, + "Description": { + "type": "string" + }, + "KafkaClusters": { + "items": { + "$ref": "#/definitions/AWS::MSK::Replicator.KafkaCluster" + }, + "type": "array" + }, + "ReplicationInfoList": { + "items": { + "$ref": "#/definitions/AWS::MSK::Replicator.ReplicationInfo" + }, + "type": "array" + }, + "ReplicatorName": { + "type": "string" + }, + "ServiceExecutionRoleArn": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "required": [ + "KafkaClusters", + "ReplicationInfoList", + "ReplicatorName", + "ServiceExecutionRoleArn" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::MSK::Replicator" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::MSK::Replicator.AmazonMskCluster": { + "additionalProperties": false, + "properties": { + "MskClusterArn": { + "type": "string" + } + }, + "required": [ + "MskClusterArn" + ], + "type": "object" + }, + "AWS::MSK::Replicator.ConsumerGroupReplication": { + "additionalProperties": false, + "properties": { + "ConsumerGroupsToExclude": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ConsumerGroupsToReplicate": { + "items": { + "type": "string" + }, + "type": "array" + }, + "DetectAndCopyNewConsumerGroups": { + "type": "boolean" + }, + "SynchroniseConsumerGroupOffsets": { + "type": "boolean" + } + }, + "required": [ + "ConsumerGroupsToReplicate" + ], + "type": "object" + }, + "AWS::MSK::Replicator.KafkaCluster": { + "additionalProperties": false, + "properties": { + "AmazonMskCluster": { + "$ref": "#/definitions/AWS::MSK::Replicator.AmazonMskCluster" + }, + "VpcConfig": { + "$ref": "#/definitions/AWS::MSK::Replicator.KafkaClusterClientVpcConfig" + } + }, + "required": [ + "AmazonMskCluster", + "VpcConfig" + ], + "type": "object" + }, + "AWS::MSK::Replicator.KafkaClusterClientVpcConfig": { + "additionalProperties": false, + "properties": { + "SecurityGroupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "SubnetIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "SubnetIds" + ], + "type": "object" + }, + "AWS::MSK::Replicator.ReplicationInfo": { + "additionalProperties": false, + "properties": { + "ConsumerGroupReplication": { + "$ref": "#/definitions/AWS::MSK::Replicator.ConsumerGroupReplication" + }, + "SourceKafkaClusterArn": { + "type": "string" + }, + "TargetCompressionType": { + "type": "string" + }, + "TargetKafkaClusterArn": { + "type": "string" + }, + "TopicReplication": { + "$ref": "#/definitions/AWS::MSK::Replicator.TopicReplication" + } + }, + "required": [ + "ConsumerGroupReplication", + "SourceKafkaClusterArn", + "TargetCompressionType", + "TargetKafkaClusterArn", + "TopicReplication" + ], + "type": "object" + }, + "AWS::MSK::Replicator.TopicReplication": { + "additionalProperties": false, + "properties": { + "CopyAccessControlListsForTopics": { + "type": "boolean" + }, + "CopyTopicConfigurations": { + "type": "boolean" + }, + "DetectAndCopyNewTopics": { + "type": "boolean" + }, + "TopicsToExclude": { + "items": { + "type": "string" + }, + "type": "array" + }, + "TopicsToReplicate": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "TopicsToReplicate" + ], + "type": "object" + }, "AWS::MSK::ServerlessCluster": { "additionalProperties": false, "properties": { @@ -146976,6 +148063,12 @@ "AWS::MediaTailor::Channel.HlsPlaylistSettings": { "additionalProperties": false, "properties": { + "AdMarkupType": { + "items": { + "type": "string" + }, + "type": "array" + }, "ManifestWindowSeconds": { "type": "number" } @@ -150319,6 +151412,9 @@ "title": "PeerAddress", "type": "string" }, + "SubnetArn": { + "type": "string" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -150836,11 +151932,17 @@ "Properties": { "additionalProperties": false, "properties": { + "CreatedAt": { + "type": "string" + }, "Description": { "markdownDescription": "A description of the global network.\n\nConstraints: Maximum length of 256 characters.", "title": "Description", "type": "string" }, + "State": { + "type": "string" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -164396,6 +165498,9 @@ "markdownDescription": "The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon QuickSight console, make sure that you have access to it.", "title": "ThemeArn", "type": "string" + }, + "ValidationStrategy": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ValidationStrategy" } }, "required": [ @@ -166823,9 +167928,21 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.DataPathType": { + "additionalProperties": false, + "properties": { + "PivotTableDataPathType": { + "type": "string" + } + }, + "type": "object" + }, "AWS::QuickSight::Analysis.DataPathValue": { "additionalProperties": false, "properties": { + "DataPathType": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.DataPathType" + }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -166837,10 +167954,6 @@ "type": "string" } }, - "required": [ - "FieldId", - "FieldValue" - ], "type": "object" }, "AWS::QuickSight::Analysis.DataSetIdentifierDeclaration": { @@ -168087,6 +169200,9 @@ "title": "MatchOperator", "type": "string" }, + "NullOption": { + "type": "string" + }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -169992,6 +171108,30 @@ }, "type": "object" }, + "AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" + } + }, + "type": "object" + }, + "AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" + } + }, + "type": "object" + }, "AWS::QuickSight::Analysis.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -170009,6 +171149,12 @@ "AWS::QuickSight::Analysis.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { + "ActualValue": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting" + }, + "ComparisonValue": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting" + }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -170106,10 +171252,16 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, + "Sparkline": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPISparklineOptions" + }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" + }, + "VisualLayoutOptions": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualLayoutOptions" } }, "type": "object" @@ -170155,6 +171307,27 @@ }, "type": "object" }, + "AWS::QuickSight::Analysis.KPISparklineOptions": { + "additionalProperties": false, + "properties": { + "Color": { + "type": "string" + }, + "TooltipVisibility": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Visibility": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.KPIVisual": { "additionalProperties": false, "properties": { @@ -170205,6 +171378,27 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.KPIVisualLayoutOptions": { + "additionalProperties": false, + "properties": { + "StandardLayout": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualStandardLayout" + } + }, + "type": "object" + }, + "AWS::QuickSight::Analysis.KPIVisualStandardLayout": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.LabelOptions": { "additionalProperties": false, "properties": { @@ -172499,6 +173693,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -172847,6 +174047,9 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, + "SeriesType": { + "type": "string" + }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Analysis.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -174472,6 +175675,9 @@ "title": "Order", "type": "array" }, + "PinnedFieldOptions": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TablePinnedFieldOptions" + }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableFieldOption" @@ -174568,6 +175774,18 @@ }, "type": "object" }, + "AWS::QuickSight::Analysis.TablePinnedFieldOptions": { + "additionalProperties": false, + "properties": { + "PinnedLeftFields": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::QuickSight::Analysis.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -174847,6 +176065,9 @@ "title": "ParameterName", "type": "string" }, + "RollingDate": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.RollingDateConfiguration" + }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -175168,6 +176389,31 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.TotalAggregationFunction": { + "additionalProperties": false, + "properties": { + "SimpleTotalAggregationFunction": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::QuickSight::Analysis.TotalAggregationOption": { + "additionalProperties": false, + "properties": { + "FieldId": { + "type": "string" + }, + "TotalAggregationFunction": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationFunction" + } + }, + "required": [ + "FieldId", + "TotalAggregationFunction" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.TotalOptions": { "additionalProperties": false, "properties": { @@ -175186,6 +176432,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -175415,6 +176667,18 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.ValidationStrategy": { + "additionalProperties": false, + "properties": { + "Mode": { + "type": "string" + } + }, + "required": [ + "Mode" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -176132,6 +177396,9 @@ "title": "ThemeArn", "type": "string" }, + "ValidationStrategy": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ValidationStrategy" + }, "VersionDescription": { "markdownDescription": "A description for the first version of the dashboard being created.", "title": "VersionDescription", @@ -178711,9 +179978,21 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.DataPathType": { + "additionalProperties": false, + "properties": { + "PivotTableDataPathType": { + "type": "string" + } + }, + "type": "object" + }, "AWS::QuickSight::Dashboard.DataPathValue": { "additionalProperties": false, "properties": { + "DataPathType": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.DataPathType" + }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -178725,10 +180004,6 @@ "type": "string" } }, - "required": [ - "FieldId", - "FieldValue" - ], "type": "object" }, "AWS::QuickSight::Dashboard.DataPointDrillUpDownOption": { @@ -180041,6 +181316,9 @@ "title": "MatchOperator", "type": "string" }, + "NullOption": { + "type": "string" + }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -181946,6 +183224,30 @@ }, "type": "object" }, + "AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" + } + }, + "type": "object" + }, + "AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" + } + }, + "type": "object" + }, "AWS::QuickSight::Dashboard.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -181963,6 +183265,12 @@ "AWS::QuickSight::Dashboard.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { + "ActualValue": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting" + }, + "ComparisonValue": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting" + }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -182060,10 +183368,16 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, + "Sparkline": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPISparklineOptions" + }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" + }, + "VisualLayoutOptions": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualLayoutOptions" } }, "type": "object" @@ -182109,6 +183423,27 @@ }, "type": "object" }, + "AWS::QuickSight::Dashboard.KPISparklineOptions": { + "additionalProperties": false, + "properties": { + "Color": { + "type": "string" + }, + "TooltipVisibility": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Visibility": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.KPIVisual": { "additionalProperties": false, "properties": { @@ -182159,6 +183494,27 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.KPIVisualLayoutOptions": { + "additionalProperties": false, + "properties": { + "StandardLayout": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualStandardLayout" + } + }, + "type": "object" + }, + "AWS::QuickSight::Dashboard.KPIVisualStandardLayout": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.LabelOptions": { "additionalProperties": false, "properties": { @@ -184453,6 +185809,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -184801,6 +186163,9 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, + "SeriesType": { + "type": "string" + }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -186448,6 +187813,9 @@ "title": "Order", "type": "array" }, + "PinnedFieldOptions": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TablePinnedFieldOptions" + }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableFieldOption" @@ -186544,6 +187912,18 @@ }, "type": "object" }, + "AWS::QuickSight::Dashboard.TablePinnedFieldOptions": { + "additionalProperties": false, + "properties": { + "PinnedLeftFields": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::QuickSight::Dashboard.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -186823,6 +188203,9 @@ "title": "ParameterName", "type": "string" }, + "RollingDate": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.RollingDateConfiguration" + }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -187144,6 +188527,31 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.TotalAggregationFunction": { + "additionalProperties": false, + "properties": { + "SimpleTotalAggregationFunction": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::QuickSight::Dashboard.TotalAggregationOption": { + "additionalProperties": false, + "properties": { + "FieldId": { + "type": "string" + }, + "TotalAggregationFunction": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationFunction" + } + }, + "required": [ + "FieldId", + "TotalAggregationFunction" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.TotalOptions": { "additionalProperties": false, "properties": { @@ -187162,6 +188570,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -187391,6 +188805,18 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.ValidationStrategy": { + "additionalProperties": false, + "properties": { + "Mode": { + "type": "string" + } + }, + "required": [ + "Mode" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -190267,6 +191693,9 @@ "title": "TemplateId", "type": "string" }, + "ValidationStrategy": { + "$ref": "#/definitions/AWS::QuickSight::Template.ValidationStrategy" + }, "VersionDescription": { "markdownDescription": "A description of the current template version being created. This API operation creates the first version of the template. Every time `UpdateTemplate` is called, a new version is created. Each version of the template maintains a description of the version in the `VersionDescription` field.", "title": "VersionDescription", @@ -192628,9 +194057,21 @@ ], "type": "object" }, + "AWS::QuickSight::Template.DataPathType": { + "additionalProperties": false, + "properties": { + "PivotTableDataPathType": { + "type": "string" + } + }, + "type": "object" + }, "AWS::QuickSight::Template.DataPathValue": { "additionalProperties": false, "properties": { + "DataPathType": { + "$ref": "#/definitions/AWS::QuickSight::Template.DataPathType" + }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -192642,10 +194083,6 @@ "type": "string" } }, - "required": [ - "FieldId", - "FieldValue" - ], "type": "object" }, "AWS::QuickSight::Template.DataSetConfiguration": { @@ -193864,6 +195301,9 @@ "title": "MatchOperator", "type": "string" }, + "NullOption": { + "type": "string" + }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -195746,6 +197186,30 @@ }, "type": "object" }, + "AWS::QuickSight::Template.KPIActualValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" + } + }, + "type": "object" + }, + "AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" + } + }, + "type": "object" + }, "AWS::QuickSight::Template.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -195763,6 +197227,12 @@ "AWS::QuickSight::Template.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { + "ActualValue": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIActualValueConditionalFormatting" + }, + "ComparisonValue": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting" + }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Template.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -195860,10 +197330,16 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, + "Sparkline": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPISparklineOptions" + }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Template.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" + }, + "VisualLayoutOptions": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualLayoutOptions" } }, "type": "object" @@ -195909,6 +197385,27 @@ }, "type": "object" }, + "AWS::QuickSight::Template.KPISparklineOptions": { + "additionalProperties": false, + "properties": { + "Color": { + "type": "string" + }, + "TooltipVisibility": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Visibility": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Template.KPIVisual": { "additionalProperties": false, "properties": { @@ -195959,6 +197456,27 @@ ], "type": "object" }, + "AWS::QuickSight::Template.KPIVisualLayoutOptions": { + "additionalProperties": false, + "properties": { + "StandardLayout": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualStandardLayout" + } + }, + "type": "object" + }, + "AWS::QuickSight::Template.KPIVisualStandardLayout": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Template.LabelOptions": { "additionalProperties": false, "properties": { @@ -198215,6 +199733,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -198563,6 +200087,9 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, + "SeriesType": { + "type": "string" + }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Template.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -200165,6 +201692,9 @@ "title": "Order", "type": "array" }, + "PinnedFieldOptions": { + "$ref": "#/definitions/AWS::QuickSight::Template.TablePinnedFieldOptions" + }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Template.TableFieldOption" @@ -200261,6 +201791,18 @@ }, "type": "object" }, + "AWS::QuickSight::Template.TablePinnedFieldOptions": { + "additionalProperties": false, + "properties": { + "PinnedLeftFields": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::QuickSight::Template.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -200739,6 +202281,9 @@ "title": "ParameterName", "type": "string" }, + "RollingDate": { + "$ref": "#/definitions/AWS::QuickSight::Template.RollingDateConfiguration" + }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -201060,6 +202605,31 @@ ], "type": "object" }, + "AWS::QuickSight::Template.TotalAggregationFunction": { + "additionalProperties": false, + "properties": { + "SimpleTotalAggregationFunction": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::QuickSight::Template.TotalAggregationOption": { + "additionalProperties": false, + "properties": { + "FieldId": { + "type": "string" + }, + "TotalAggregationFunction": { + "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationFunction" + } + }, + "required": [ + "FieldId", + "TotalAggregationFunction" + ], + "type": "object" + }, "AWS::QuickSight::Template.TotalOptions": { "additionalProperties": false, "properties": { @@ -201078,6 +202648,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -201307,6 +202883,18 @@ ], "type": "object" }, + "AWS::QuickSight::Template.ValidationStrategy": { + "additionalProperties": false, + "properties": { + "Mode": { + "type": "string" + } + }, + "required": [ + "Mode" + ], + "type": "object" + }, "AWS::QuickSight::Template.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -202917,6 +204505,9 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, + "NonAdditive": { + "type": "boolean" + }, "NotAllowedAggregations": { "items": { "type": "string" @@ -203061,6 +204652,9 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, + "NonAdditive": { + "type": "boolean" + }, "NotAllowedAggregations": { "items": { "type": "string" @@ -204356,6 +205950,9 @@ "title": "AutoMinorVersionUpgrade", "type": "boolean" }, + "AutomaticBackupReplicationRegion": { + "type": "string" + }, "AvailabilityZone": { "markdownDescription": "The Availability Zone (AZ) where the database will be created. For information on AWS Regions and Availability Zones, see [Regions and Availability Zones](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) .\n\nFor Amazon Aurora, each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.\n\nDefault: A random, system-chosen Availability Zone in the endpoint's AWS Region .\n\nConstraints:\n\n- The `AvailabilityZone` parameter can't be specified if the DB instance is a Multi-AZ deployment.\n- The specified Availability Zone must be in the same AWS Region as the current endpoint.\n\nExample: `us-east-1d`", "title": "AvailabilityZone", @@ -216036,7 +217633,6 @@ } }, "required": [ - "Status", "Value" ], "type": "object" @@ -216110,17 +217706,6 @@ ], "type": "object" }, - "AWS::S3ObjectLambda::AccessPoint.PolicyStatus": { - "additionalProperties": false, - "properties": { - "IsPublic": { - "markdownDescription": "", - "title": "IsPublic", - "type": "boolean" - } - }, - "type": "object" - }, "AWS::S3ObjectLambda::AccessPoint.PublicAccessBlockConfiguration": { "additionalProperties": false, "properties": { @@ -218381,6 +219966,9 @@ "Properties": { "additionalProperties": false, "properties": { + "ArchivePolicy": { + "type": "object" + }, "ContentBasedDeduplication": { "markdownDescription": "Enables content-based deduplication for FIFO topics.\n\n- By default, `ContentBasedDeduplication` is set to `false` . If you create a FIFO topic and this attribute is `false` , you must specify a value for the `MessageDeduplicationId` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.\n- When you set `ContentBasedDeduplication` to `true` , Amazon SNS uses a SHA-256 hash to generate the `MessageDeduplicationId` using the body of the message (but not the attributes of the message).\n\n(Optional) To override the generated value, you can specify a value for the the `MessageDeduplicationId` parameter for the `Publish` action.", "title": "ContentBasedDeduplication", @@ -222524,6 +224112,9 @@ "markdownDescription": "", "title": "DatasetFormat" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -222717,6 +224308,9 @@ "title": "EndpointName", "type": "string" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -228859,6 +230453,9 @@ "markdownDescription": "", "title": "DatasetFormat" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -228964,6 +230561,9 @@ "title": "EndpointName", "type": "string" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -229298,6 +230898,12 @@ "AWS::SageMaker::MonitoringSchedule.ScheduleConfig": { "additionalProperties": false, "properties": { + "DataAnalysisEndTime": { + "type": "string" + }, + "DataAnalysisStartTime": { + "type": "string" + }, "ScheduleExpression": { "markdownDescription": "A cron expression that describes details about the monitoring schedule.\n\nCurrently the only supported cron expressions are:\n\n- If you want to set the job to start every hour, please use the following:\n\n`Hourly: cron(0 * ? * * *)`\n- If you want to start the job daily:\n\n`cron(0 [00-23] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Daily at noon UTC: `cron(0 12 ? * * *)`\n- Daily at midnight UTC: `cron(0 0 ? * * *)`\n\nTo support running every 6, 12 hours, the following are also supported:\n\n`cron(0 [00-23]/[01-24] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Every 12 hours, starting at 5pm UTC: `cron(0 17/12 ? * * *)`\n- Every two hours starting at midnight: `cron(0 0/2 ? * * *)`\n\n> - Even though the cron expression is set to start at 5PM UTC, note that there could be a delay of 0-20 minutes from the actual requested time to run the execution.\n> - We recommend that if you would like a daily schedule, you do not provide this parameter. Amazon SageMaker will pick a time for running every day.", "title": "ScheduleExpression", @@ -244703,6 +246309,9 @@ "AWS::WAFv2::WebACL.AWSManagedRulesBotControlRuleSet": { "additionalProperties": false, "properties": { + "EnableMachineLearning": { + "type": "boolean" + }, "InspectionLevel": { "markdownDescription": "The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see [AWS WAF Bot Control rule group](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html) .", "title": "InspectionLevel", @@ -249260,6 +250869,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -252214,6 +253837,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -252515,6 +254152,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -252599,6 +254250,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -253099,7 +254764,8 @@ "type": "string" }, "PropagateTags": { - "title": "Propagatetags", + "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", + "title": "PropagateTags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -253481,7 +255147,8 @@ "title": "Policies" }, "PropagateTags": { - "title": "Propagatetags", + "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", + "title": "PropagateTags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -253610,6 +255277,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -254529,6 +256210,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -254687,6 +256382,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -254781,6 +256490,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -255328,6 +257051,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -256423,6 +258160,9 @@ { "$ref": "#/definitions/AWS::Cognito::IdentityPoolRoleAttachment" }, + { + "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration" + }, { "$ref": "#/definitions/AWS::Cognito::UserPool" }, @@ -257143,6 +258883,9 @@ { "$ref": "#/definitions/AWS::Elasticsearch::Domain" }, + { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow" + }, { "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow" }, @@ -257608,6 +259351,12 @@ { "$ref": "#/definitions/AWS::IoT::SecurityProfile" }, + { + "$ref": "#/definitions/AWS::IoT::SoftwarePackage" + }, + { + "$ref": "#/definitions/AWS::IoT::SoftwarePackageVersion" + }, { "$ref": "#/definitions/AWS::IoT::Thing" }, @@ -257977,6 +259726,9 @@ { "$ref": "#/definitions/AWS::MSK::Configuration" }, + { + "$ref": "#/definitions/AWS::MSK::Replicator" + }, { "$ref": "#/definitions/AWS::MSK::ServerlessCluster" }, diff --git a/samtranslator/sdk/resource.py b/samtranslator/sdk/resource.py index 86f52484f..4cb46f6c0 100644 --- a/samtranslator/sdk/resource.py +++ b/samtranslator/sdk/resource.py @@ -1,5 +1,5 @@ from enum import Enum -from typing import Any, Dict +from typing import Any, Dict, List, Optional, Union from samtranslator.model.exceptions import InvalidDocumentException, InvalidTemplateException from samtranslator.model.types import IS_STR @@ -27,6 +27,7 @@ def __init__(self, resource_dict: Dict[str, Any]) -> None: self.condition = resource_dict.get("Condition", None) self.deletion_policy = resource_dict.get("DeletionPolicy", None) self.update_replace_policy = resource_dict.get("UpdateReplacePolicy", None) + self.ignore_globals: Optional[Union[str, List[str]]] = resource_dict.get("IgnoreGlobals", None) # Properties is *not* required. Ex: SimpleTable resource has no required properties self.properties = resource_dict.get("Properties", {}) diff --git a/samtranslator/translator/translator.py b/samtranslator/translator/translator.py index 78d954fce..b4a052897 100644 --- a/samtranslator/translator/translator.py +++ b/samtranslator/translator/translator.py @@ -37,6 +37,8 @@ from samtranslator.sdk.parameter import SamParameterValues from samtranslator.translator.arn_generator import ArnGenerator from samtranslator.translator.verify_logical_id import verify_unique_logical_id +from samtranslator.utils.actions import ResolveDependsOn +from samtranslator.utils.traverse import traverse from samtranslator.validator.value_validator import sam_expect @@ -238,6 +240,8 @@ def translate( # noqa: PLR0912, PLR0915 del template["Transform"] if len(self.document_errors) == 0: + resolveDependsOn = ResolveDependsOn(resolution_data=changed_logical_ids) # Initializes ResolveDependsOn + template = traverse(template, [resolveDependsOn]) template = intrinsics_resolver.resolve_sam_resource_id_refs(template, changed_logical_ids) return intrinsics_resolver.resolve_sam_resource_refs(template, supported_resource_refs) raise InvalidDocumentException(self.document_errors) diff --git a/samtranslator/utils/actions.py b/samtranslator/utils/actions.py new file mode 100644 index 000000000..921914a04 --- /dev/null +++ b/samtranslator/utils/actions.py @@ -0,0 +1,60 @@ +from abc import ABC, abstractmethod +from typing import Any, Dict + + +class Action(ABC): + """ + Base class for Resolver function actions. Each Resolver function must subclass this, + override the , and provide a execute() method + """ + + @abstractmethod + def execute(self, template: Dict[str, Any]) -> Dict[str, Any]: + pass + + +class ResolveDependsOn(Action): + DependsOn = "DependsOn" + + def __init__(self, resolution_data: Dict[str, str]): + """ + Initializes ResolveDependsOn. Where data necessary to resolve execute can be provided. + + :param resolution_data: Extra data necessary to resolve execute properly. + """ + self.resolution_data = resolution_data + + def execute(self, template: Dict[str, Any]) -> Dict[str, Any]: + """ + Resolve DependsOn when logical ids get changed when transforming (ex: AWS::Serverless::LayerVersion) + + :param input_dict: Chunk of the template that is attempting to be resolved + :param resolution_data: Dictionary of the original and changed logical ids + :return: Modified dictionary with values resolved + """ + # Checks if input dict is resolvable + if template is None or not self._can_handle_depends_on(input_dict=template): + return template + # Checks if DependsOn is valid + if not (isinstance(template[self.DependsOn], (list, str))): + return template + # Check if DependsOn matches the original value of a changed_logical_id key + for old_logical_id, changed_logical_id in self.resolution_data.items(): + # Done like this as there is no other way to know if this is a DependsOn vs some value named the + # same as the old logical id. (ex LayerName is commonly the old_logical_id) + if isinstance(template[self.DependsOn], list): + for index, value in enumerate(template[self.DependsOn]): + if value == old_logical_id: + template[self.DependsOn][index] = changed_logical_id + elif template[self.DependsOn] == old_logical_id: + template[self.DependsOn] = changed_logical_id + return template + + def _can_handle_depends_on(self, input_dict: Dict[str, Any]) -> bool: + """ + Checks if the input dictionary is of length one and contains "DependsOn" + + :param input_dict: the Dictionary that is attempting to be resolved + :return boolean value of validation attempt + """ + return isinstance(input_dict, dict) and self.DependsOn in input_dict diff --git a/samtranslator/utils/traverse.py b/samtranslator/utils/traverse.py new file mode 100644 index 000000000..ebd34584a --- /dev/null +++ b/samtranslator/utils/traverse.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List + +from samtranslator.utils.actions import Action + + +def traverse( + input_value: Any, + actions: List[Action], +) -> Any: + """ + Driver method that performs the actual traversal of input and calls the execute method of the provided actions. + + Traversal Algorithm: + + Imagine the input dictionary/list as a tree. We are doing a Pre-Order tree traversal here where we first + process the root node before going to its children. Dict and Lists are the only two iterable nodes. + Everything else is a leaf node. + + :param input_value: Any primitive type (dict, array, string etc) whose value might contain a changed value + :param actions: Method that will be called to actually resolve the function. + :return: Modified `input` with values resolved + """ + + for action in actions: + action.execute(input_value) + + if isinstance(input_value, dict): + return _traverse_dict(input_value, actions) + if isinstance(input_value, list): + return _traverse_list(input_value, actions) + # We can iterate only over dict or list types. Primitive types are terminals + + return input_value + + +def _traverse_dict( + input_dict: Dict[str, Any], + actions: List[Action], +) -> Any: + """ + Traverse a dictionary to resolves changed values on every value + + :param input_dict: Input dictionary to traverse + :param actions: This is just to pass it to the template partition + :return: Modified dictionary with values resolved + """ + for key, value in input_dict.items(): + input_dict[key] = traverse(value, actions) + + return input_dict + + +def _traverse_list( + input_list: List[Any], + actions: List[Action], +) -> Any: + """ + Traverse a list to resolve changed values on every element + + :param input_list: List of input + :param actions: This is just to pass it to the template partition + :return: Modified list with values functions resolved + """ + for index, value in enumerate(input_list): + input_list[index] = traverse(value, actions) + + return input_list diff --git a/schema_source/cloudformation.schema.json b/schema_source/cloudformation.schema.json index 6d16f000f..99780da12 100644 --- a/schema_source/cloudformation.schema.json +++ b/schema_source/cloudformation.schema.json @@ -2418,6 +2418,9 @@ "title": "AppId", "type": "string" }, + "Backend": { + "$ref": "#/definitions/AWS::Amplify::Branch.Backend" + }, "BasicAuthConfig": { "$ref": "#/definitions/AWS::Amplify::Branch.BasicAuthConfig", "markdownDescription": "The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .", @@ -2512,6 +2515,15 @@ ], "type": "object" }, + "AWS::Amplify::Branch.Backend": { + "additionalProperties": false, + "properties": { + "StackArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Amplify::Branch.BasicAuthConfig": { "additionalProperties": false, "properties": { @@ -7392,7 +7404,13 @@ "title": "MutualTlsAuthentication" }, "Tags": { + "additionalProperties": true, "markdownDescription": "The collection of tags associated with a domain name.", + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, "title": "Tags", "type": "object" } @@ -8455,6 +8473,10 @@ "type": "string" } }, + "required": [ + "Key", + "Value" + ], "type": "object" }, "AWS::AppConfig::ConfigurationProfile": { @@ -8502,6 +8524,9 @@ "title": "Description", "type": "string" }, + "KmsKeyIdentifier": { + "type": "string" + }, "LocationUri": { "markdownDescription": "A URI to locate the configuration. You can specify the following:\n\n- For the AWS AppConfig hosted configuration store and for feature flags, specify `hosted` .\n- For an AWS Systems Manager Parameter Store parameter, specify either the parameter name in the format `ssm-parameter://` or the ARN.\n- For an AWS CodePipeline pipeline, specify the URI in the following format: `codepipeline` ://.\n- For an AWS Secrets Manager secret, specify the URI in the following format: `secretsmanager` ://.\n- For an Amazon S3 object, specify the URI in the following format: `s3:///` . Here is an example: `s3://my-bucket/my-app/us-east-1/my-config.json`\n- For an SSM document, specify either the document name in the format `ssm-document://` or the Amazon Resource Name (ARN).", "title": "LocationUri", @@ -12109,7 +12134,6 @@ "required": [ "KmsKey", "Name", - "ScheduleConfig", "SourceURI" ], "type": "object" @@ -22381,9 +22405,12 @@ "type": "array" }, "TopicARN": { + "items": { + "type": "string" + }, "markdownDescription": "The Amazon Resource Name (ARN) of the Amazon SNS topic.", "title": "TopicARN", - "type": "string" + "type": "array" } }, "required": [ @@ -31861,6 +31888,12 @@ "title": "Enabled", "type": "boolean" }, + "SingleHeaderPolicyConfig": { + "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig" + }, + "SingleWeightPolicyConfig": { + "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig" + }, "StagingDistributionDnsNames": { "items": { "type": "string" @@ -31873,6 +31906,9 @@ "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig", "markdownDescription": "Contains the parameters for routing production traffic from your primary to staging distributions.", "title": "TrafficConfig" + }, + "Type": { + "type": "string" } }, "required": [ @@ -31921,6 +31957,22 @@ ], "type": "object" }, + "AWS::CloudFront::ContinuousDeploymentPolicy.SingleHeaderPolicyConfig": { + "additionalProperties": false, + "properties": { + "Header": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "required": [ + "Header", + "Value" + ], + "type": "object" + }, "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightConfig": { "additionalProperties": false, "properties": { @@ -31940,6 +31992,21 @@ ], "type": "object" }, + "AWS::CloudFront::ContinuousDeploymentPolicy.SingleWeightPolicyConfig": { + "additionalProperties": false, + "properties": { + "SessionStickinessConfig": { + "$ref": "#/definitions/AWS::CloudFront::ContinuousDeploymentPolicy.SessionStickinessConfig" + }, + "Weight": { + "type": "number" + } + }, + "required": [ + "Weight" + ], + "type": "object" + }, "AWS::CloudFront::ContinuousDeploymentPolicy.TrafficConfig": { "additionalProperties": false, "properties": { @@ -40195,6 +40262,101 @@ ], "type": "object" }, + "AWS::Cognito::LogDeliveryConfiguration": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "LogConfigurations": { + "items": { + "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.LogConfiguration" + }, + "type": "array" + }, + "UserPoolId": { + "type": "string" + } + }, + "required": [ + "UserPoolId" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::Cognito::LogDeliveryConfiguration" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration": { + "additionalProperties": false, + "properties": { + "LogGroupArn": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::Cognito::LogDeliveryConfiguration.LogConfiguration": { + "additionalProperties": false, + "properties": { + "CloudWatchLogsConfiguration": { + "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration.CloudWatchLogsConfiguration" + }, + "EventSource": { + "type": "string" + }, + "LogLevel": { + "type": "string" + } + }, + "type": "object" + }, "AWS::Cognito::UserPool": { "additionalProperties": false, "properties": { @@ -40343,7 +40505,13 @@ "type": "string" }, "UserPoolTags": { + "additionalProperties": true, "markdownDescription": "The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.", + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, "title": "UserPoolTags", "type": "object" }, @@ -45828,6 +45996,9 @@ "Properties": { "additionalProperties": false, "properties": { + "AgentAvailabilityTimer": { + "type": "string" + }, "DefaultOutboundQueueArn": { "type": "string" }, @@ -46988,6 +47159,12 @@ "markdownDescription": "The Amazon Resource Name (ARN) of the parent group.", "title": "ParentGroupArn", "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -47270,6 +47447,15 @@ ], "type": "object" }, + "AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig": { + "additionalProperties": false, + "properties": { + "DialingCapacity": { + "type": "number" + } + }, + "type": "object" + }, "AWS::ConnectCampaigns::Campaign.AnswerMachineDetectionConfig": { "additionalProperties": false, "properties": { @@ -47287,6 +47473,9 @@ "AWS::ConnectCampaigns::Campaign.DialerConfig": { "additionalProperties": false, "properties": { + "AgentlessDialerConfig": { + "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.AgentlessDialerConfig" + }, "PredictiveDialerConfig": { "$ref": "#/definitions/AWS::ConnectCampaigns::Campaign.PredictiveDialerConfig", "markdownDescription": "The configuration of the predictive dialer.", @@ -47325,8 +47514,7 @@ } }, "required": [ - "ConnectContactFlowArn", - "ConnectQueueArn" + "ConnectContactFlowArn" ], "type": "object" }, @@ -47337,6 +47525,9 @@ "markdownDescription": "Bandwidth allocation for the predictive dialer.", "title": "BandwidthAllocation", "type": "number" + }, + "DialingCapacity": { + "type": "number" } }, "required": [ @@ -47351,6 +47542,9 @@ "markdownDescription": "Bandwidth allocation for the progressive dialer.", "title": "BandwidthAllocation", "type": "number" + }, + "DialingCapacity": { + "type": "number" } }, "required": [ @@ -47692,6 +47886,12 @@ "title": "DomainName", "type": "string" }, + "Matching": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Matching" + }, + "RuleBasedMatching": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.RuleBasedMatching" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -47727,6 +47927,214 @@ ], "type": "object" }, + "AWS::CustomerProfiles::Domain.AttributeTypesSelector": { + "additionalProperties": false, + "properties": { + "Address": { + "items": { + "type": "string" + }, + "type": "array" + }, + "AttributeMatchingModel": { + "type": "string" + }, + "EmailAddress": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PhoneNumber": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "AttributeMatchingModel" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.AutoMerging": { + "additionalProperties": false, + "properties": { + "ConflictResolution": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" + }, + "Consolidation": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.Consolidation" + }, + "Enabled": { + "type": "boolean" + }, + "MinAllowedConfidenceScoreForMerging": { + "type": "number" + } + }, + "required": [ + "Enabled" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.ConflictResolution": { + "additionalProperties": false, + "properties": { + "ConflictResolvingModel": { + "type": "string" + }, + "SourceName": { + "type": "string" + } + }, + "required": [ + "ConflictResolvingModel" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.Consolidation": { + "additionalProperties": false, + "properties": { + "MatchingAttributesList": { + "type": "object" + } + }, + "required": [ + "MatchingAttributesList" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.DomainStats": { + "additionalProperties": false, + "properties": { + "MeteringProfileCount": { + "type": "number" + }, + "ObjectCount": { + "type": "number" + }, + "ProfileCount": { + "type": "number" + }, + "TotalSize": { + "type": "number" + } + }, + "type": "object" + }, + "AWS::CustomerProfiles::Domain.ExportingConfig": { + "additionalProperties": false, + "properties": { + "S3Exporting": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.S3ExportingConfig" + } + }, + "type": "object" + }, + "AWS::CustomerProfiles::Domain.JobSchedule": { + "additionalProperties": false, + "properties": { + "DayOfTheWeek": { + "type": "string" + }, + "Time": { + "type": "string" + } + }, + "required": [ + "DayOfTheWeek", + "Time" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.Matching": { + "additionalProperties": false, + "properties": { + "AutoMerging": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AutoMerging" + }, + "Enabled": { + "type": "boolean" + }, + "ExportingConfig": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" + }, + "JobSchedule": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.JobSchedule" + } + }, + "required": [ + "Enabled" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.MatchingRule": { + "additionalProperties": false, + "properties": { + "Rule": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "Rule" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.RuleBasedMatching": { + "additionalProperties": false, + "properties": { + "AttributeTypesSelector": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.AttributeTypesSelector" + }, + "ConflictResolution": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ConflictResolution" + }, + "Enabled": { + "type": "boolean" + }, + "ExportingConfig": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.ExportingConfig" + }, + "MatchingRules": { + "items": { + "$ref": "#/definitions/AWS::CustomerProfiles::Domain.MatchingRule" + }, + "type": "array" + }, + "MaxAllowedRuleLevelForMatching": { + "type": "number" + }, + "MaxAllowedRuleLevelForMerging": { + "type": "number" + }, + "Status": { + "type": "string" + } + }, + "required": [ + "Enabled" + ], + "type": "object" + }, + "AWS::CustomerProfiles::Domain.S3ExportingConfig": { + "additionalProperties": false, + "properties": { + "S3BucketName": { + "type": "string" + }, + "S3KeyName": { + "type": "string" + } + }, + "required": [ + "S3BucketName" + ], + "type": "object" + }, "AWS::CustomerProfiles::EventStream": { "additionalProperties": false, "properties": { @@ -71087,6 +71495,9 @@ "title": "SecurityGroupIds", "type": "array" }, + "SseSpecification": { + "$ref": "#/definitions/AWS::EC2::VerifiedAccessEndpoint.SseSpecification" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71182,6 +71593,18 @@ }, "type": "object" }, + "AWS::EC2::VerifiedAccessEndpoint.SseSpecification": { + "additionalProperties": false, + "properties": { + "CustomerManagedKeyEnabled": { + "type": "boolean" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::EC2::VerifiedAccessGroup": { "additionalProperties": false, "properties": { @@ -71232,6 +71655,9 @@ "title": "PolicyEnabled", "type": "boolean" }, + "SseSpecification": { + "$ref": "#/definitions/AWS::EC2::VerifiedAccessGroup.SseSpecification" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71272,6 +71698,18 @@ ], "type": "object" }, + "AWS::EC2::VerifiedAccessGroup.SseSpecification": { + "additionalProperties": false, + "properties": { + "CustomerManagedKeyEnabled": { + "type": "boolean" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::EC2::VerifiedAccessInstance": { "additionalProperties": false, "properties": { @@ -71312,6 +71750,9 @@ "title": "Description", "type": "string" }, + "FipsEnabled": { + "type": "boolean" + }, "LoggingConfigurations": { "$ref": "#/definitions/AWS::EC2::VerifiedAccessInstance.VerifiedAccessLogs", "markdownDescription": "The current logging configuration for the Verified Access instances.", @@ -71544,6 +71985,9 @@ "title": "PolicyReferenceName", "type": "string" }, + "SseSpecification": { + "$ref": "#/definitions/AWS::EC2::VerifiedAccessTrustProvider.SseSpecification" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -71642,6 +72086,18 @@ }, "type": "object" }, + "AWS::EC2::VerifiedAccessTrustProvider.SseSpecification": { + "additionalProperties": false, + "properties": { + "CustomerManagedKeyEnabled": { + "type": "boolean" + }, + "KmsKeyArn": { + "type": "string" + } + }, + "type": "object" + }, "AWS::EC2::Volume": { "additionalProperties": false, "properties": { @@ -83207,6 +83663,181 @@ }, "type": "object" }, + "AWS::EntityResolution::IdMappingWorkflow": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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" + }, + "IdMappingTechniques": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques" + }, + "InputSourceConfig": { + "items": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource" + }, + "type": "array" + }, + "OutputSourceConfig": { + "items": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource" + }, + "type": "array" + }, + "RoleArn": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "WorkflowName": { + "type": "string" + } + }, + "required": [ + "IdMappingTechniques", + "InputSourceConfig", + "OutputSourceConfig", + "RoleArn", + "WorkflowName" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::EntityResolution::IdMappingWorkflow" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IdMappingTechniques": { + "additionalProperties": false, + "properties": { + "IdMappingType": { + "type": "string" + }, + "ProviderProperties": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.ProviderProperties" + } + }, + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowInputSource": { + "additionalProperties": false, + "properties": { + "InputSourceARN": { + "type": "string" + }, + "SchemaArn": { + "type": "string" + } + }, + "required": [ + "InputSourceARN", + "SchemaArn" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IdMappingWorkflowOutputSource": { + "additionalProperties": false, + "properties": { + "KMSArn": { + "type": "string" + }, + "OutputS3Path": { + "type": "string" + } + }, + "required": [ + "OutputS3Path" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration": { + "additionalProperties": false, + "properties": { + "IntermediateS3Path": { + "type": "string" + } + }, + "required": [ + "IntermediateS3Path" + ], + "type": "object" + }, + "AWS::EntityResolution::IdMappingWorkflow.ProviderProperties": { + "additionalProperties": false, + "properties": { + "IntermediateSourceConfiguration": { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow.IntermediateSourceConfiguration" + }, + "ProviderConfiguration": { + "additionalProperties": true, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, + "type": "object" + }, + "ProviderServiceArn": { + "type": "string" + } + }, + "required": [ + "ProviderServiceArn" + ], + "type": "object" + }, "AWS::EntityResolution::MatchingWorkflow": { "additionalProperties": false, "properties": { @@ -83322,6 +83953,18 @@ ], "type": "object" }, + "AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration": { + "additionalProperties": false, + "properties": { + "IntermediateS3Path": { + "type": "string" + } + }, + "required": [ + "IntermediateS3Path" + ], + "type": "object" + }, "AWS::EntityResolution::MatchingWorkflow.OutputAttribute": { "additionalProperties": false, "properties": { @@ -83362,9 +84005,36 @@ ], "type": "object" }, + "AWS::EntityResolution::MatchingWorkflow.ProviderProperties": { + "additionalProperties": false, + "properties": { + "IntermediateSourceConfiguration": { + "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.IntermediateSourceConfiguration" + }, + "ProviderConfiguration": { + "additionalProperties": true, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, + "type": "object" + }, + "ProviderServiceArn": { + "type": "string" + } + }, + "required": [ + "ProviderServiceArn" + ], + "type": "object" + }, "AWS::EntityResolution::MatchingWorkflow.ResolutionTechniques": { "additionalProperties": false, "properties": { + "ProviderProperties": { + "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow.ProviderProperties" + }, "ResolutionType": { "type": "string" }, @@ -83505,6 +84175,9 @@ "MatchKey": { "type": "string" }, + "SubType": { + "type": "string" + }, "Type": { "type": "string" } @@ -84573,9 +85246,12 @@ "title": "Name", "type": "string" }, + "Policy": { + "type": "object" + }, "Tags": { "items": { - "$ref": "#/definitions/AWS::Events::EventBus.TagEntry" + "$ref": "#/definitions/Tag" }, "markdownDescription": "Tags to associate with the event bus.", "title": "Tags", @@ -84608,26 +85284,6 @@ ], "type": "object" }, - "AWS::Events::EventBus.TagEntry": { - "additionalProperties": false, - "properties": { - "Key": { - "markdownDescription": "A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.", - "title": "Key", - "type": "string" - }, - "Value": { - "markdownDescription": "The value for the specified tag key.", - "title": "Value", - "type": "string" - } - }, - "required": [ - "Key", - "Value" - ], - "type": "object" - }, "AWS::Events::EventBusPolicy": { "additionalProperties": false, "properties": { @@ -90405,6 +91061,9 @@ "title": "InstanceRoleARN", "type": "string" }, + "InstanceRoleCredentialsProvider": { + "type": "string" + }, "Locations": { "items": { "$ref": "#/definitions/AWS::GameLift::Fleet.LocationConfiguration" @@ -106731,6 +107390,12 @@ "title": "Description", "type": "string" }, + "DestinationPackageVersions": { + "items": { + "type": "string" + }, + "type": "array" + }, "Document": { "markdownDescription": "The job document.\n\nRequired if you don't specify a value for `documentSource` .", "title": "Document", @@ -107344,6 +108009,12 @@ "markdownDescription": "The policy name.", "title": "PolicyName", "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ @@ -108144,6 +108815,162 @@ }, "type": "object" }, + "AWS::IoT::SoftwarePackage": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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" + }, + "PackageName": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::SoftwarePackage" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, + "AWS::IoT::SoftwarePackageVersion": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "Attributes": { + "additionalProperties": true, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "string" + } + }, + "type": "object" + }, + "Description": { + "type": "string" + }, + "PackageName": { + "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + }, + "VersionName": { + "type": "string" + } + }, + "required": [ + "PackageName" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::IoT::SoftwarePackageVersion" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, "AWS::IoT::Thing": { "additionalProperties": false, "properties": { @@ -109188,6 +110015,12 @@ "title": "DestinationArn", "type": "string" }, + "Headers": { + "items": { + "$ref": "#/definitions/AWS::IoT::TopicRule.KafkaActionHeader" + }, + "type": "array" + }, "Key": { "markdownDescription": "The Kafka message key.", "title": "Key", @@ -109211,6 +110044,22 @@ ], "type": "object" }, + "AWS::IoT::TopicRule.KafkaActionHeader": { + "additionalProperties": false, + "properties": { + "Key": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "required": [ + "Key", + "Value" + ], + "type": "object" + }, "AWS::IoT::TopicRule.KinesisAction": { "additionalProperties": false, "properties": { @@ -119522,9 +120371,6 @@ "markdownDescription": "Provides the configuration information to connect to Microsoft SharePoint as your data source.", "title": "SharePointConfiguration" }, - "TemplateConfiguration": { - "$ref": "#/definitions/AWS::Kendra::DataSource.TemplateConfiguration" - }, "WebCrawlerConfiguration": { "$ref": "#/definitions/AWS::Kendra::DataSource.WebCrawlerConfiguration", "markdownDescription": "Provides the configuration information required for Amazon Kendra Web Crawler.", @@ -120471,18 +121317,6 @@ }, "type": "object" }, - "AWS::Kendra::DataSource.TemplateConfiguration": { - "additionalProperties": false, - "properties": { - "Template": { - "type": "string" - } - }, - "required": [ - "Template" - ], - "type": "object" - }, "AWS::Kendra::DataSource.WebCrawlerAuthenticationConfiguration": { "additionalProperties": false, "properties": { @@ -127214,6 +128048,9 @@ "title": "PackageType", "type": "string" }, + "Policy": { + "type": "object" + }, "ReservedConcurrentExecutions": { "markdownDescription": "The number of simultaneous executions to reserve for the function.", "title": "ReservedConcurrentExecutions", @@ -127473,6 +128310,9 @@ "AWS::Lambda::Function.VpcConfig": { "additionalProperties": false, "properties": { + "Ipv6AllowedForDualStack": { + "type": "boolean" + }, "SecurityGroupIds": { "items": { "type": "string" @@ -127993,6 +128833,9 @@ "$ref": "#/definitions/AWS::Lambda::Version.ProvisionedConcurrencyConfiguration", "markdownDescription": "Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.", "title": "ProvisionedConcurrencyConfig" + }, + "RuntimePolicy": { + "$ref": "#/definitions/AWS::Lambda::Version.RuntimePolicy" } }, "required": [ @@ -128035,6 +128878,21 @@ ], "type": "object" }, + "AWS::Lambda::Version.RuntimePolicy": { + "additionalProperties": false, + "properties": { + "RuntimeVersionArn": { + "type": "string" + }, + "UpdateRuntimeOn": { + "type": "string" + } + }, + "required": [ + "UpdateRuntimeOn" + ], + "type": "object" + }, "AWS::Lex::Bot": { "additionalProperties": false, "properties": { @@ -136298,41 +137156,151 @@ "additionalProperties": false, "properties": { "Description": { - "markdownDescription": "The description of the configuration.", - "title": "Description", + "markdownDescription": "The description of the configuration.", + "title": "Description", + "type": "string" + }, + "KafkaVersionsList": { + "items": { + "type": "string" + }, + "markdownDescription": "", + "title": "KafkaVersionsList", + "type": "array" + }, + "LatestRevision": { + "$ref": "#/definitions/AWS::MSK::Configuration.LatestRevision" + }, + "Name": { + "markdownDescription": "The name of the configuration. Configuration names are strings that match the regex \"^[0-9A-Za-z][0-9A-Za-z-]{0,}$\".", + "title": "Name", + "type": "string" + }, + "ServerProperties": { + "markdownDescription": "Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the CLI, the contents of server.properties can be in plaintext.", + "title": "ServerProperties", + "type": "string" + } + }, + "required": [ + "Name", + "ServerProperties" + ], + "type": "object" + }, + "Type": { + "enum": [ + "AWS::MSK::Configuration" + ], + "type": "string" + }, + "UpdateReplacePolicy": { + "enum": [ + "Delete", + "Retain", + "Snapshot" + ], + "type": "string" + } + }, + "required": [ + "Type", + "Properties" + ], + "type": "object" + }, + "AWS::MSK::Configuration.LatestRevision": { + "additionalProperties": false, + "properties": { + "CreationTime": { + "type": "string" + }, + "Description": { + "type": "string" + }, + "Revision": { + "type": "number" + } + }, + "type": "object" + }, + "AWS::MSK::Replicator": { + "additionalProperties": false, + "properties": { + "Condition": { + "type": "string" + }, + "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": { + "CurrentVersion": { + "type": "string" + }, + "Description": { "type": "string" }, - "KafkaVersionsList": { + "KafkaClusters": { "items": { - "type": "string" + "$ref": "#/definitions/AWS::MSK::Replicator.KafkaCluster" }, - "markdownDescription": "", - "title": "KafkaVersionsList", "type": "array" }, - "LatestRevision": { - "$ref": "#/definitions/AWS::MSK::Configuration.LatestRevision" + "ReplicationInfoList": { + "items": { + "$ref": "#/definitions/AWS::MSK::Replicator.ReplicationInfo" + }, + "type": "array" }, - "Name": { - "markdownDescription": "The name of the configuration. Configuration names are strings that match the regex \"^[0-9A-Za-z][0-9A-Za-z-]{0,}$\".", - "title": "Name", + "ReplicatorName": { "type": "string" }, - "ServerProperties": { - "markdownDescription": "Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the CLI, the contents of server.properties can be in plaintext.", - "title": "ServerProperties", + "ServiceExecutionRoleArn": { "type": "string" + }, + "Tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" } }, "required": [ - "Name", - "ServerProperties" + "KafkaClusters", + "ReplicationInfoList", + "ReplicatorName", + "ServiceExecutionRoleArn" ], "type": "object" }, "Type": { "enum": [ - "AWS::MSK::Configuration" + "AWS::MSK::Replicator" ], "type": "string" }, @@ -136351,19 +137319,138 @@ ], "type": "object" }, - "AWS::MSK::Configuration.LatestRevision": { + "AWS::MSK::Replicator.AmazonMskCluster": { "additionalProperties": false, "properties": { - "CreationTime": { + "MskClusterArn": { "type": "string" + } + }, + "required": [ + "MskClusterArn" + ], + "type": "object" + }, + "AWS::MSK::Replicator.ConsumerGroupReplication": { + "additionalProperties": false, + "properties": { + "ConsumerGroupsToExclude": { + "items": { + "type": "string" + }, + "type": "array" }, - "Description": { + "ConsumerGroupsToReplicate": { + "items": { + "type": "string" + }, + "type": "array" + }, + "DetectAndCopyNewConsumerGroups": { + "type": "boolean" + }, + "SynchroniseConsumerGroupOffsets": { + "type": "boolean" + } + }, + "required": [ + "ConsumerGroupsToReplicate" + ], + "type": "object" + }, + "AWS::MSK::Replicator.KafkaCluster": { + "additionalProperties": false, + "properties": { + "AmazonMskCluster": { + "$ref": "#/definitions/AWS::MSK::Replicator.AmazonMskCluster" + }, + "VpcConfig": { + "$ref": "#/definitions/AWS::MSK::Replicator.KafkaClusterClientVpcConfig" + } + }, + "required": [ + "AmazonMskCluster", + "VpcConfig" + ], + "type": "object" + }, + "AWS::MSK::Replicator.KafkaClusterClientVpcConfig": { + "additionalProperties": false, + "properties": { + "SecurityGroupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "SubnetIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "SubnetIds" + ], + "type": "object" + }, + "AWS::MSK::Replicator.ReplicationInfo": { + "additionalProperties": false, + "properties": { + "ConsumerGroupReplication": { + "$ref": "#/definitions/AWS::MSK::Replicator.ConsumerGroupReplication" + }, + "SourceKafkaClusterArn": { "type": "string" }, - "Revision": { - "type": "number" + "TargetCompressionType": { + "type": "string" + }, + "TargetKafkaClusterArn": { + "type": "string" + }, + "TopicReplication": { + "$ref": "#/definitions/AWS::MSK::Replicator.TopicReplication" } }, + "required": [ + "ConsumerGroupReplication", + "SourceKafkaClusterArn", + "TargetCompressionType", + "TargetKafkaClusterArn", + "TopicReplication" + ], + "type": "object" + }, + "AWS::MSK::Replicator.TopicReplication": { + "additionalProperties": false, + "properties": { + "CopyAccessControlListsForTopics": { + "type": "boolean" + }, + "CopyTopicConfigurations": { + "type": "boolean" + }, + "DetectAndCopyNewTopics": { + "type": "boolean" + }, + "TopicsToExclude": { + "items": { + "type": "string" + }, + "type": "array" + }, + "TopicsToReplicate": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "TopicsToReplicate" + ], "type": "object" }, "AWS::MSK::ServerlessCluster": { @@ -146927,6 +148014,12 @@ "AWS::MediaTailor::Channel.HlsPlaylistSettings": { "additionalProperties": false, "properties": { + "AdMarkupType": { + "items": { + "type": "string" + }, + "type": "array" + }, "ManifestWindowSeconds": { "type": "number" } @@ -150270,6 +151363,9 @@ "title": "PeerAddress", "type": "string" }, + "SubnetArn": { + "type": "string" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -150787,11 +151883,17 @@ "Properties": { "additionalProperties": false, "properties": { + "CreatedAt": { + "type": "string" + }, "Description": { "markdownDescription": "A description of the global network.\n\nConstraints: Maximum length of 256 characters.", "title": "Description", "type": "string" }, + "State": { + "type": "string" + }, "Tags": { "items": { "$ref": "#/definitions/Tag" @@ -164347,6 +165449,9 @@ "markdownDescription": "The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon QuickSight console, make sure that you have access to it.", "title": "ThemeArn", "type": "string" + }, + "ValidationStrategy": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ValidationStrategy" } }, "required": [ @@ -166774,9 +167879,21 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.DataPathType": { + "additionalProperties": false, + "properties": { + "PivotTableDataPathType": { + "type": "string" + } + }, + "type": "object" + }, "AWS::QuickSight::Analysis.DataPathValue": { "additionalProperties": false, "properties": { + "DataPathType": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.DataPathType" + }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -166788,10 +167905,6 @@ "type": "string" } }, - "required": [ - "FieldId", - "FieldValue" - ], "type": "object" }, "AWS::QuickSight::Analysis.DataSetIdentifierDeclaration": { @@ -168038,6 +169151,9 @@ "title": "MatchOperator", "type": "string" }, + "NullOption": { + "type": "string" + }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -169943,6 +171059,30 @@ }, "type": "object" }, + "AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" + } + }, + "type": "object" + }, + "AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.ConditionalFormattingColor" + } + }, + "type": "object" + }, "AWS::QuickSight::Analysis.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -169960,6 +171100,12 @@ "AWS::QuickSight::Analysis.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { + "ActualValue": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIActualValueConditionalFormatting" + }, + "ComparisonValue": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIComparisonValueConditionalFormatting" + }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -170057,10 +171203,16 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, + "Sparkline": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPISparklineOptions" + }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" + }, + "VisualLayoutOptions": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualLayoutOptions" } }, "type": "object" @@ -170106,6 +171258,27 @@ }, "type": "object" }, + "AWS::QuickSight::Analysis.KPISparklineOptions": { + "additionalProperties": false, + "properties": { + "Color": { + "type": "string" + }, + "TooltipVisibility": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Visibility": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.KPIVisual": { "additionalProperties": false, "properties": { @@ -170156,6 +171329,27 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.KPIVisualLayoutOptions": { + "additionalProperties": false, + "properties": { + "StandardLayout": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.KPIVisualStandardLayout" + } + }, + "type": "object" + }, + "AWS::QuickSight::Analysis.KPIVisualStandardLayout": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.LabelOptions": { "additionalProperties": false, "properties": { @@ -172450,6 +173644,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -172798,6 +173998,9 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, + "SeriesType": { + "type": "string" + }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Analysis.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -174423,6 +175626,9 @@ "title": "Order", "type": "array" }, + "PinnedFieldOptions": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TablePinnedFieldOptions" + }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableFieldOption" @@ -174519,6 +175725,18 @@ }, "type": "object" }, + "AWS::QuickSight::Analysis.TablePinnedFieldOptions": { + "additionalProperties": false, + "properties": { + "PinnedLeftFields": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::QuickSight::Analysis.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -174798,6 +176016,9 @@ "title": "ParameterName", "type": "string" }, + "RollingDate": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.RollingDateConfiguration" + }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -175119,6 +176340,31 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.TotalAggregationFunction": { + "additionalProperties": false, + "properties": { + "SimpleTotalAggregationFunction": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::QuickSight::Analysis.TotalAggregationOption": { + "additionalProperties": false, + "properties": { + "FieldId": { + "type": "string" + }, + "TotalAggregationFunction": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationFunction" + } + }, + "required": [ + "FieldId", + "TotalAggregationFunction" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.TotalOptions": { "additionalProperties": false, "properties": { @@ -175137,6 +176383,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Analysis.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Analysis.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -175366,6 +176618,18 @@ ], "type": "object" }, + "AWS::QuickSight::Analysis.ValidationStrategy": { + "additionalProperties": false, + "properties": { + "Mode": { + "type": "string" + } + }, + "required": [ + "Mode" + ], + "type": "object" + }, "AWS::QuickSight::Analysis.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -176083,6 +177347,9 @@ "title": "ThemeArn", "type": "string" }, + "ValidationStrategy": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ValidationStrategy" + }, "VersionDescription": { "markdownDescription": "A description for the first version of the dashboard being created.", "title": "VersionDescription", @@ -178662,9 +179929,21 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.DataPathType": { + "additionalProperties": false, + "properties": { + "PivotTableDataPathType": { + "type": "string" + } + }, + "type": "object" + }, "AWS::QuickSight::Dashboard.DataPathValue": { "additionalProperties": false, "properties": { + "DataPathType": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.DataPathType" + }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -178676,10 +179955,6 @@ "type": "string" } }, - "required": [ - "FieldId", - "FieldValue" - ], "type": "object" }, "AWS::QuickSight::Dashboard.DataPointDrillUpDownOption": { @@ -179992,6 +181267,9 @@ "title": "MatchOperator", "type": "string" }, + "NullOption": { + "type": "string" + }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -181897,6 +183175,30 @@ }, "type": "object" }, + "AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" + } + }, + "type": "object" + }, + "AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.ConditionalFormattingColor" + } + }, + "type": "object" + }, "AWS::QuickSight::Dashboard.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -181914,6 +183216,12 @@ "AWS::QuickSight::Dashboard.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { + "ActualValue": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIActualValueConditionalFormatting" + }, + "ComparisonValue": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIComparisonValueConditionalFormatting" + }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -182011,10 +183319,16 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, + "Sparkline": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPISparklineOptions" + }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" + }, + "VisualLayoutOptions": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualLayoutOptions" } }, "type": "object" @@ -182060,6 +183374,27 @@ }, "type": "object" }, + "AWS::QuickSight::Dashboard.KPISparklineOptions": { + "additionalProperties": false, + "properties": { + "Color": { + "type": "string" + }, + "TooltipVisibility": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Visibility": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.KPIVisual": { "additionalProperties": false, "properties": { @@ -182110,6 +183445,27 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.KPIVisualLayoutOptions": { + "additionalProperties": false, + "properties": { + "StandardLayout": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.KPIVisualStandardLayout" + } + }, + "type": "object" + }, + "AWS::QuickSight::Dashboard.KPIVisualStandardLayout": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.LabelOptions": { "additionalProperties": false, "properties": { @@ -184404,6 +185760,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -184752,6 +186114,9 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, + "SeriesType": { + "type": "string" + }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -186399,6 +187764,9 @@ "title": "Order", "type": "array" }, + "PinnedFieldOptions": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TablePinnedFieldOptions" + }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableFieldOption" @@ -186495,6 +187863,18 @@ }, "type": "object" }, + "AWS::QuickSight::Dashboard.TablePinnedFieldOptions": { + "additionalProperties": false, + "properties": { + "PinnedLeftFields": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::QuickSight::Dashboard.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -186774,6 +188154,9 @@ "title": "ParameterName", "type": "string" }, + "RollingDate": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.RollingDateConfiguration" + }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -187095,6 +188478,31 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.TotalAggregationFunction": { + "additionalProperties": false, + "properties": { + "SimpleTotalAggregationFunction": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::QuickSight::Dashboard.TotalAggregationOption": { + "additionalProperties": false, + "properties": { + "FieldId": { + "type": "string" + }, + "TotalAggregationFunction": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationFunction" + } + }, + "required": [ + "FieldId", + "TotalAggregationFunction" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.TotalOptions": { "additionalProperties": false, "properties": { @@ -187113,6 +188521,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Dashboard.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Dashboard.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -187342,6 +188756,18 @@ ], "type": "object" }, + "AWS::QuickSight::Dashboard.ValidationStrategy": { + "additionalProperties": false, + "properties": { + "Mode": { + "type": "string" + } + }, + "required": [ + "Mode" + ], + "type": "object" + }, "AWS::QuickSight::Dashboard.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -190218,6 +191644,9 @@ "title": "TemplateId", "type": "string" }, + "ValidationStrategy": { + "$ref": "#/definitions/AWS::QuickSight::Template.ValidationStrategy" + }, "VersionDescription": { "markdownDescription": "A description of the current template version being created. This API operation creates the first version of the template. Every time `UpdateTemplate` is called, a new version is created. Each version of the template maintains a description of the version in the `VersionDescription` field.", "title": "VersionDescription", @@ -192579,9 +194008,21 @@ ], "type": "object" }, + "AWS::QuickSight::Template.DataPathType": { + "additionalProperties": false, + "properties": { + "PivotTableDataPathType": { + "type": "string" + } + }, + "type": "object" + }, "AWS::QuickSight::Template.DataPathValue": { "additionalProperties": false, "properties": { + "DataPathType": { + "$ref": "#/definitions/AWS::QuickSight::Template.DataPathType" + }, "FieldId": { "markdownDescription": "The field ID of the field that needs to be sorted.", "title": "FieldId", @@ -192593,10 +194034,6 @@ "type": "string" } }, - "required": [ - "FieldId", - "FieldValue" - ], "type": "object" }, "AWS::QuickSight::Template.DataSetConfiguration": { @@ -193815,6 +195252,9 @@ "title": "MatchOperator", "type": "string" }, + "NullOption": { + "type": "string" + }, "SelectAllOptions": { "markdownDescription": "Select all of the values. Null is not the assigned value of select all.\n\n- `FILTER_ALL_VALUES`", "title": "SelectAllOptions", @@ -195697,6 +197137,30 @@ }, "type": "object" }, + "AWS::QuickSight::Template.KPIActualValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" + } + }, + "type": "object" + }, + "AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting": { + "additionalProperties": false, + "properties": { + "Icon": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingIcon" + }, + "TextColor": { + "$ref": "#/definitions/AWS::QuickSight::Template.ConditionalFormattingColor" + } + }, + "type": "object" + }, "AWS::QuickSight::Template.KPIConditionalFormatting": { "additionalProperties": false, "properties": { @@ -195714,6 +197178,12 @@ "AWS::QuickSight::Template.KPIConditionalFormattingOption": { "additionalProperties": false, "properties": { + "ActualValue": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIActualValueConditionalFormatting" + }, + "ComparisonValue": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIComparisonValueConditionalFormatting" + }, "PrimaryValue": { "$ref": "#/definitions/AWS::QuickSight::Template.KPIPrimaryValueConditionalFormatting", "markdownDescription": "The conditional formatting for the primary value of a KPI visual.", @@ -195811,10 +197281,16 @@ "markdownDescription": "The options that determine the secondary value font configuration.", "title": "SecondaryValueFontConfiguration" }, + "Sparkline": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPISparklineOptions" + }, "TrendArrows": { "$ref": "#/definitions/AWS::QuickSight::Template.TrendArrowOptions", "markdownDescription": "The options that determine the presentation of trend arrows in a KPI visual.", "title": "TrendArrows" + }, + "VisualLayoutOptions": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualLayoutOptions" } }, "type": "object" @@ -195860,6 +197336,27 @@ }, "type": "object" }, + "AWS::QuickSight::Template.KPISparklineOptions": { + "additionalProperties": false, + "properties": { + "Color": { + "type": "string" + }, + "TooltipVisibility": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Visibility": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Template.KPIVisual": { "additionalProperties": false, "properties": { @@ -195910,6 +197407,27 @@ ], "type": "object" }, + "AWS::QuickSight::Template.KPIVisualLayoutOptions": { + "additionalProperties": false, + "properties": { + "StandardLayout": { + "$ref": "#/definitions/AWS::QuickSight::Template.KPIVisualStandardLayout" + } + }, + "type": "object" + }, + "AWS::QuickSight::Template.KPIVisualStandardLayout": { + "additionalProperties": false, + "properties": { + "Type": { + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + }, "AWS::QuickSight::Template.LabelOptions": { "additionalProperties": false, "properties": { @@ -198166,6 +199684,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "The cell styling options for the total cells.", @@ -198514,6 +200038,9 @@ "markdownDescription": "The dynamic configuration of the reference line data configuration.", "title": "DynamicConfiguration" }, + "SeriesType": { + "type": "string" + }, "StaticConfiguration": { "$ref": "#/definitions/AWS::QuickSight::Template.ReferenceLineStaticDataConfiguration", "markdownDescription": "The static data configuration of the reference line data configuration.", @@ -200116,6 +201643,9 @@ "title": "Order", "type": "array" }, + "PinnedFieldOptions": { + "$ref": "#/definitions/AWS::QuickSight::Template.TablePinnedFieldOptions" + }, "SelectedFieldOptions": { "items": { "$ref": "#/definitions/AWS::QuickSight::Template.TableFieldOption" @@ -200212,6 +201742,18 @@ }, "type": "object" }, + "AWS::QuickSight::Template.TablePinnedFieldOptions": { + "additionalProperties": false, + "properties": { + "PinnedLeftFields": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AWS::QuickSight::Template.TableRowConditionalFormatting": { "additionalProperties": false, "properties": { @@ -200690,6 +202232,9 @@ "title": "ParameterName", "type": "string" }, + "RollingDate": { + "$ref": "#/definitions/AWS::QuickSight::Template.RollingDateConfiguration" + }, "TimeGranularity": { "markdownDescription": "The level of time precision that is used to aggregate `DateTime` values.", "title": "TimeGranularity", @@ -201011,6 +202556,31 @@ ], "type": "object" }, + "AWS::QuickSight::Template.TotalAggregationFunction": { + "additionalProperties": false, + "properties": { + "SimpleTotalAggregationFunction": { + "type": "string" + } + }, + "type": "object" + }, + "AWS::QuickSight::Template.TotalAggregationOption": { + "additionalProperties": false, + "properties": { + "FieldId": { + "type": "string" + }, + "TotalAggregationFunction": { + "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationFunction" + } + }, + "required": [ + "FieldId", + "TotalAggregationFunction" + ], + "type": "object" + }, "AWS::QuickSight::Template.TotalOptions": { "additionalProperties": false, "properties": { @@ -201029,6 +202599,12 @@ "title": "ScrollStatus", "type": "string" }, + "TotalAggregationOptions": { + "items": { + "$ref": "#/definitions/AWS::QuickSight::Template.TotalAggregationOption" + }, + "type": "array" + }, "TotalCellStyle": { "$ref": "#/definitions/AWS::QuickSight::Template.TableCellStyle", "markdownDescription": "Cell styling options for the total cells.", @@ -201258,6 +202834,18 @@ ], "type": "object" }, + "AWS::QuickSight::Template.ValidationStrategy": { + "additionalProperties": false, + "properties": { + "Mode": { + "type": "string" + } + }, + "required": [ + "Mode" + ], + "type": "object" + }, "AWS::QuickSight::Template.VisibleRangeOptions": { "additionalProperties": false, "properties": { @@ -202868,6 +204456,9 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, + "NonAdditive": { + "type": "boolean" + }, "NotAllowedAggregations": { "items": { "type": "string" @@ -203012,6 +204603,9 @@ "title": "NeverAggregateInFilter", "type": "boolean" }, + "NonAdditive": { + "type": "boolean" + }, "NotAllowedAggregations": { "items": { "type": "string" @@ -204307,6 +205901,9 @@ "title": "AutoMinorVersionUpgrade", "type": "boolean" }, + "AutomaticBackupReplicationRegion": { + "type": "string" + }, "AvailabilityZone": { "markdownDescription": "The Availability Zone (AZ) where the database will be created. For information on AWS Regions and Availability Zones, see [Regions and Availability Zones](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) .\n\nFor Amazon Aurora, each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.\n\nDefault: A random, system-chosen Availability Zone in the endpoint's AWS Region .\n\nConstraints:\n\n- The `AvailabilityZone` parameter can't be specified if the DB instance is a Multi-AZ deployment.\n- The specified Availability Zone must be in the same AWS Region as the current endpoint.\n\nExample: `us-east-1d`", "title": "AvailabilityZone", @@ -215980,7 +217577,6 @@ } }, "required": [ - "Status", "Value" ], "type": "object" @@ -216054,17 +217650,6 @@ ], "type": "object" }, - "AWS::S3ObjectLambda::AccessPoint.PolicyStatus": { - "additionalProperties": false, - "properties": { - "IsPublic": { - "markdownDescription": "", - "title": "IsPublic", - "type": "boolean" - } - }, - "type": "object" - }, "AWS::S3ObjectLambda::AccessPoint.PublicAccessBlockConfiguration": { "additionalProperties": false, "properties": { @@ -218318,6 +219903,9 @@ "Properties": { "additionalProperties": false, "properties": { + "ArchivePolicy": { + "type": "object" + }, "ContentBasedDeduplication": { "markdownDescription": "Enables content-based deduplication for FIFO topics.\n\n- By default, `ContentBasedDeduplication` is set to `false` . If you create a FIFO topic and this attribute is `false` , you must specify a value for the `MessageDeduplicationId` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.\n- When you set `ContentBasedDeduplication` to `true` , Amazon SNS uses a SHA-256 hash to generate the `MessageDeduplicationId` using the body of the message (but not the attributes of the message).\n\n(Optional) To override the generated value, you can specify a value for the the `MessageDeduplicationId` parameter for the `Publish` action.", "title": "ContentBasedDeduplication", @@ -222454,6 +224042,9 @@ "markdownDescription": "", "title": "DatasetFormat" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -222647,6 +224238,9 @@ "title": "EndpointName", "type": "string" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -228789,6 +230383,9 @@ "markdownDescription": "", "title": "DatasetFormat" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "", "title": "LocalPath", @@ -228894,6 +230491,9 @@ "title": "EndpointName", "type": "string" }, + "ExcludeFeaturesAttribute": { + "type": "string" + }, "LocalPath": { "markdownDescription": "Path to the filesystem where the endpoint data is available to the container.", "title": "LocalPath", @@ -229228,6 +230828,12 @@ "AWS::SageMaker::MonitoringSchedule.ScheduleConfig": { "additionalProperties": false, "properties": { + "DataAnalysisEndTime": { + "type": "string" + }, + "DataAnalysisStartTime": { + "type": "string" + }, "ScheduleExpression": { "markdownDescription": "A cron expression that describes details about the monitoring schedule.\n\nCurrently the only supported cron expressions are:\n\n- If you want to set the job to start every hour, please use the following:\n\n`Hourly: cron(0 * ? * * *)`\n- If you want to start the job daily:\n\n`cron(0 [00-23] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Daily at noon UTC: `cron(0 12 ? * * *)`\n- Daily at midnight UTC: `cron(0 0 ? * * *)`\n\nTo support running every 6, 12 hours, the following are also supported:\n\n`cron(0 [00-23]/[01-24] ? * * *)`\n\nFor example, the following are valid cron expressions:\n\n- Every 12 hours, starting at 5pm UTC: `cron(0 17/12 ? * * *)`\n- Every two hours starting at midnight: `cron(0 0/2 ? * * *)`\n\n> - Even though the cron expression is set to start at 5PM UTC, note that there could be a delay of 0-20 minutes from the actual requested time to run the execution.\n> - We recommend that if you would like a daily schedule, you do not provide this parameter. Amazon SageMaker will pick a time for running every day.", "title": "ScheduleExpression", @@ -244626,6 +246232,9 @@ "AWS::WAFv2::WebACL.AWSManagedRulesBotControlRuleSet": { "additionalProperties": false, "properties": { + "EnableMachineLearning": { + "type": "boolean" + }, "InspectionLevel": { "markdownDescription": "The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see [AWS WAF Bot Control rule group](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html) .", "title": "InspectionLevel", @@ -248944,6 +250553,9 @@ { "$ref": "#/definitions/AWS::Cognito::IdentityPoolRoleAttachment" }, + { + "$ref": "#/definitions/AWS::Cognito::LogDeliveryConfiguration" + }, { "$ref": "#/definitions/AWS::Cognito::UserPool" }, @@ -249664,6 +251276,9 @@ { "$ref": "#/definitions/AWS::Elasticsearch::Domain" }, + { + "$ref": "#/definitions/AWS::EntityResolution::IdMappingWorkflow" + }, { "$ref": "#/definitions/AWS::EntityResolution::MatchingWorkflow" }, @@ -250129,6 +251744,12 @@ { "$ref": "#/definitions/AWS::IoT::SecurityProfile" }, + { + "$ref": "#/definitions/AWS::IoT::SoftwarePackage" + }, + { + "$ref": "#/definitions/AWS::IoT::SoftwarePackageVersion" + }, { "$ref": "#/definitions/AWS::IoT::Thing" }, @@ -250498,6 +252119,9 @@ { "$ref": "#/definitions/AWS::MSK::Configuration" }, + { + "$ref": "#/definitions/AWS::MSK::Replicator" + }, { "$ref": "#/definitions/AWS::MSK::ServerlessCluster" }, diff --git a/schema_source/sam.schema.json b/schema_source/sam.schema.json index 8e63394c0..196150ed3 100644 --- a/schema_source/sam.schema.json +++ b/schema_source/sam.schema.json @@ -1065,6 +1065,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -4337,6 +4351,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -4719,6 +4747,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -4803,6 +4845,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -5370,7 +5426,8 @@ "title": "PermissionsBoundary" }, "PropagateTags": { - "title": "Propagatetags", + "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", + "title": "PropagateTags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -5929,7 +5986,8 @@ "title": "Policies" }, "PropagateTags": { - "title": "Propagatetags", + "markdownDescription": "Indicate whether or not to pass tags from the `Tags` property to your [AWS::Serverless::Function](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-function.html) generated resources\\. Specify `True` to propagate tags in your generated resources\\. \n*Type*: Boolean \n*Required*: No \n*Default*: `False` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.", + "title": "PropagateTags", "type": "boolean" }, "ProvisionedConcurrencyConfig": { @@ -6100,6 +6158,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -7019,6 +7091,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -7227,6 +7313,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -7377,6 +7477,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, @@ -7924,6 +8038,20 @@ "DependsOn": { "$ref": "#/definitions/PassThroughProp" }, + "IgnoreGlobals": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Ignoreglobals" + }, "Metadata": { "$ref": "#/definitions/PassThroughProp" }, diff --git a/tests/plugins/globals/test_globals.py b/tests/plugins/globals/test_globals.py index bd4ff0bbc..917824466 100644 --- a/tests/plugins/globals/test_globals.py +++ b/tests/plugins/globals/test_globals.py @@ -2,6 +2,7 @@ from unittest.mock import Mock, patch from parameterized import parameterized +from samtranslator.model.exceptions import InvalidResourceAttributeTypeException from samtranslator.plugins.globals.globals import GlobalProperties, Globals, InvalidGlobalsSectionException @@ -336,6 +337,29 @@ def test_merge_must_skip_with_no_types(self, parse_mock): self.assertEqual(expected, result) + def test_get_template_globals_star_ignore_globals(self): + type = "prefix_type1" + globals = Globals(self.template) + + result = globals.get_template_globals("MyFunction", type, "*") + + self.assertEqual(result.global_properties, GlobalProperties({}).global_properties) + + def test_get_template_globals_list_ignore_globals(self): + type = "prefix_type1" + globals = Globals(self.template) + + result = globals.get_template_globals("MyFunction", type, ["prop1"]) + + self.assertEqual(result.global_properties, GlobalProperties({"prop2": "value2"}).global_properties) + + def test_get_template_globals_error(self): + type = "prefix_type1" + globals = Globals(self.template) + + with self.assertRaises(InvalidResourceAttributeTypeException): + globals.get_template_globals("MyFunction", type, ["prop3"]) + def test_merge_end_to_end_on_known_type1(self): type = "prefix_type1" properties = {"prop1": "overridden value", "a": "b", "key": [1, 2, 3]} diff --git a/tests/translator/input/connector_appsync_to_eventbus.yaml b/tests/translator/input/connector_appsync_to_eventbus.yaml new file mode 100644 index 000000000..e24d72087 --- /dev/null +++ b/tests/translator/input/connector_appsync_to_eventbus.yaml @@ -0,0 +1,66 @@ +Resources: + EventBus: + Type: AWS::Events::EventBus + Properties: + Name: !Sub '${AWS::StackName}-EventBus' + + EventBridgeRole: + Type: AWS::IAM::Role + Properties: + RoleName: appsync-eventbridge-role + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Action: + - sts:AssumeRole + Principal: + Service: + - appsync.amazonaws.com + + AppSyncEventBusDataSource: + Type: AWS::AppSync::DataSource + Properties: + ApiId: !GetAtt AppSyncApi.ApiId + Name: MyDataSource + Type: AMAZON_EVENTBRIDGE + ServiceRoleArn: !GetAtt EventBridgeRole.Arn + EventBridgeConfig: + EventBusArn: !GetAtt 'EventBus.Arn' + + AppSyncApi: + Type: AWS::AppSync::GraphQLApi + Properties: + AuthenticationType: AWS_IAM + Name: AppSyncApi + + ApiSchema: + Type: AWS::AppSync::GraphQLSchema + Properties: + ApiId: !GetAtt AppSyncApi.ApiId + Definition: | + type Note { + NoteId: ID! + title: String + content: String + } + type Query { + getNote(NoteId: ID!): Note + } + type Mutation { + saveNote(NoteId: ID!, title: String!, content: String!): Note! + } + type Schema { + query: Query + mutation: Mutation + } + + Connector: + Type: AWS::Serverless::Connector + Properties: + Source: + Id: AppSyncEventBusDataSource + Destination: + Id: EventBus + Permissions: + - Write diff --git a/tests/translator/input/error_api_invalid_auth.yaml b/tests/translator/input/error_api_invalid_auth.yaml index 3461ed0be..a233b8163 100644 --- a/tests/translator/input/error_api_invalid_auth.yaml +++ b/tests/translator/input/error_api_invalid_auth.yaml @@ -1,4 +1,20 @@ Resources: + InvalidAuthorizationScopes: + Type: AWS::Serverless::Function + Properties: + Runtime: python3 + Handler: index.handler + CodeUri: s3://bucket/key + Events: + Api: + Type: Api + Properties: + Auth: + AuthorizationScopes: + - https://foobar.acme.net/full-api + Method: POST + Path: /hello/world + NoAuthApi: Type: AWS::Serverless::Api Properties: diff --git a/tests/translator/input/error_function_with_invalid_ignore_globals.yaml b/tests/translator/input/error_function_with_invalid_ignore_globals.yaml new file mode 100644 index 000000000..f215e8d3c --- /dev/null +++ b/tests/translator/input/error_function_with_invalid_ignore_globals.yaml @@ -0,0 +1,12 @@ +Globals: + Function: + Runtime: python3.7 + +Resources: + Function: + IgnoreGlobals: + - PropertyA + Type: AWS::Serverless::Function + Properties: + CodeUri: s3://s3/key + Handler: hello.handler diff --git a/tests/translator/input/function_with_ignore_globals.yaml b/tests/translator/input/function_with_ignore_globals.yaml new file mode 100644 index 000000000..e16fcb91b --- /dev/null +++ b/tests/translator/input/function_with_ignore_globals.yaml @@ -0,0 +1,33 @@ +Globals: + Function: + Runtime: python3.8 + Handler: index.lambda_handler + MemorySize: 128 + +Resources: + ZipFunction: + Type: AWS::Serverless::Function + Properties: + CodeUri: s3://bucket/key + + ImageFunction: + Type: AWS::Serverless::Function + IgnoreGlobals: '*' + Properties: + PackageType: Image + ImageUri: s3://bucket/key + Metadata: + Dockerfile: Dockerfile + DockerContext: ./src/image + + ImageFunction2: + Type: AWS::Serverless::Function + IgnoreGlobals: + - Runtime + - Handler + Properties: + PackageType: Image + ImageUri: s3://bucket/key + Metadata: + Dockerfile: Dockerfile + DockerContext: ./src/image diff --git a/tests/translator/input/layer_version_depends_on.yaml b/tests/translator/input/layer_version_depends_on.yaml new file mode 100644 index 000000000..debdd2579 --- /dev/null +++ b/tests/translator/input/layer_version_depends_on.yaml @@ -0,0 +1,26 @@ +Transform: AWS::Serverless-2016-10-31 +Resources: + Layer1: + Type: AWS::Serverless::LayerVersion + Properties: + ContentUri: + Bucket: test + Key: test.zip + + Layer2: + Type: AWS::Serverless::LayerVersion + DependsOn: Layer1 + Properties: + ContentUri: + Bucket: test + Key: test.zip + + Layer3: + Type: AWS::Serverless::LayerVersion + DependsOn: + - Layer1 + - Layer2 + Properties: + ContentUri: + Bucket: test + Key: test.zip diff --git a/tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml b/tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml new file mode 100644 index 000000000..e1bc61557 --- /dev/null +++ b/tests/translator/input/valid_update_replace_policy_and_deletion_policy.yaml @@ -0,0 +1,59 @@ +AWSTemplateFormatVersion: '2010-09-09' +Transform: +- AWS::LanguageExtensions +- AWS::Serverless-2016-10-31 + +Resources: + MyFunction: + Type: AWS::Serverless::Function + UpdateReplacePolicy: Delete + Properties: + Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync + Runtime: dotnet6 + CodeUri: s3://bucket/key + Events: + None: + Type: Api + Properties: + Method: get + Path: /method + MyFunction2: + Type: AWS::Serverless::Function + UpdateReplacePolicy: Delete + Properties: + Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync + Runtime: dotnet6 + CodeUri: s3://bucket/key + Events: + Hi: + Type: Api + Properties: + Method: post + Path: /method + MyFunction3: + Type: AWS::Serverless::Function + DeletionPolicy: Delete + Properties: + Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync + Runtime: dotnet6 + CodeUri: s3://bucket/key + Events: + All: + Type: Api + Properties: + Method: get + Path: /method2 + MyFunction4: + Type: AWS::Serverless::Function + DeletionPolicy: Retain + UpdateReplacePolicy: Retain + Properties: + Handler: LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync + Runtime: dotnet6 + CodeUri: s3://bucket/key + Events: + Bye: + Type: Api + Properties: + Method: post + Path: /method2 diff --git a/tests/translator/output/aws-cn/connector_appsync_to_eventbus.json b/tests/translator/output/aws-cn/connector_appsync_to_eventbus.json new file mode 100644 index 000000000..c48f52efb --- /dev/null +++ b/tests/translator/output/aws-cn/connector_appsync_to_eventbus.json @@ -0,0 +1,121 @@ +{ + "Resources": { + "ApiSchema": { + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "AppSyncApi", + "ApiId" + ] + }, + "Definition": "type Note {\n NoteId: ID!\n title: String\n content: String\n}\ntype Query {\n getNote(NoteId: ID!): Note\n}\ntype Mutation {\n saveNote(NoteId: ID!, title: String!, content: String!): Note!\n}\ntype Schema {\n query: Query\n mutation: Mutation\n}\n" + }, + "Type": "AWS::AppSync::GraphQLSchema" + }, + "AppSyncApi": { + "Properties": { + "AuthenticationType": "AWS_IAM", + "Name": "AppSyncApi" + }, + "Type": "AWS::AppSync::GraphQLApi" + }, + "AppSyncEventBusDataSource": { + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "AppSyncApi", + "ApiId" + ] + }, + "EventBridgeConfig": { + "EventBusArn": { + "Fn::GetAtt": [ + "EventBus", + "Arn" + ] + } + }, + "Name": "MyDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "EventBridgeRole", + "Arn" + ] + }, + "Type": "AMAZON_EVENTBRIDGE" + }, + "Type": "AWS::AppSync::DataSource" + }, + "ConnectorPolicy": { + "Metadata": { + "aws:sam:connectors": { + "Connector": { + "Destination": { + "Type": "AWS::Events::EventBus" + }, + "Source": { + "Type": "AWS::AppSync::DataSource" + } + } + } + }, + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "events:PutEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "EventBus", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "Roles": [ + { + "Ref": "EventBridgeRole" + } + ] + }, + "Type": "AWS::IAM::ManagedPolicy" + }, + "EventBridgeRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "appsync.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": "appsync-eventbridge-role" + }, + "Type": "AWS::IAM::Role" + }, + "EventBus": { + "Properties": { + "Name": { + "Fn::Sub": "${AWS::StackName}-EventBus" + } + }, + "Type": "AWS::Events::EventBus" + } + } +} diff --git a/tests/translator/output/aws-cn/function_with_ignore_globals.json b/tests/translator/output/aws-cn/function_with_ignore_globals.json new file mode 100644 index 000000000..6b6e7ecea --- /dev/null +++ b/tests/translator/output/aws-cn/function_with_ignore_globals.json @@ -0,0 +1,169 @@ +{ + "Resources": { + "ImageFunction": { + "Metadata": { + "DockerContext": "./src/image", + "Dockerfile": "Dockerfile" + }, + "Properties": { + "Code": { + "ImageUri": "s3://bucket/key" + }, + "PackageType": "Image", + "Role": { + "Fn::GetAtt": [ + "ImageFunctionRole", + "Arn" + ] + }, + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ImageFunction2": { + "Metadata": { + "DockerContext": "./src/image", + "Dockerfile": "Dockerfile" + }, + "Properties": { + "Code": { + "ImageUri": "s3://bucket/key" + }, + "MemorySize": 128, + "PackageType": "Image", + "Role": { + "Fn::GetAtt": [ + "ImageFunction2Role", + "Arn" + ] + }, + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ImageFunction2Role": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ImageFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ZipFunction": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "index.lambda_handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "ZipFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.8", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ZipFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + } + } +} diff --git a/tests/translator/output/aws-cn/layer_version_depends_on.json b/tests/translator/output/aws-cn/layer_version_depends_on.json new file mode 100644 index 000000000..3daff7d7c --- /dev/null +++ b/tests/translator/output/aws-cn/layer_version_depends_on.json @@ -0,0 +1,42 @@ +{ + "Resources": { + "Layer1d45b36fd2d": { + "DeletionPolicy": "Retain", + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer1" + }, + "Type": "AWS::Lambda::LayerVersion" + }, + "Layer25093239808": { + "DeletionPolicy": "Retain", + "DependsOn": "Layer1d45b36fd2d", + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer2" + }, + "Type": "AWS::Lambda::LayerVersion" + }, + "Layer34d7f81220c": { + "DeletionPolicy": "Retain", + "DependsOn": [ + "Layer1d45b36fd2d", + "Layer25093239808" + ], + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer3" + }, + "Type": "AWS::Lambda::LayerVersion" + } + } +} diff --git a/tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json b/tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json new file mode 100644 index 000000000..a4c5437ad --- /dev/null +++ b/tests/translator/output/aws-cn/valid_update_replace_policy_and_deletion_policy.json @@ -0,0 +1,412 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Resources": { + "MyFunction": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunctionRole", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction2Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2HiPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction2" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2Role": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction3": { + "DeletionPolicy": "Delete", + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction3Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "MyFunction3AllPermissionProd": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction3" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method2", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "MyFunction3Role": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "MyFunction4": { + "DeletionPolicy": "Retain", + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction4Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Retain" + }, + "MyFunction4ByePermissionProd": { + "DeletionPolicy": "Retain", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction4" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method2", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Retain" + }, + "MyFunction4Role": { + "DeletionPolicy": "Retain", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Retain" + }, + "MyFunctionNonePermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete" + }, + "MyFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete" + }, + "ServerlessRestApi": { + "DeletionPolicy": "Retain", + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/method": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction.Arn}/invocations" + } + } + }, + "post": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction2.Arn}/invocations" + } + } + } + }, + "/method2": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction3.Arn}/invocations" + } + } + }, + "post": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction4.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + }, + "EndpointConfiguration": { + "Types": [ + "REGIONAL" + ] + }, + "Parameters": { + "endpointConfigurationTypes": "REGIONAL" + } + }, + "Type": "AWS::ApiGateway::RestApi", + "UpdateReplacePolicy": "Retain" + }, + "ServerlessRestApiDeploymentf177d7dd48": { + "DeletionPolicy": "Retain", + "Properties": { + "Description": "RestApi deployment id: f177d7dd480597bbebe027d565e98d1b4e36e615", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment", + "UpdateReplacePolicy": "Retain" + }, + "ServerlessRestApiProdStage": { + "DeletionPolicy": "Retain", + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeploymentf177d7dd48" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod" + }, + "Type": "AWS::ApiGateway::Stage", + "UpdateReplacePolicy": "Retain" + } + } +} diff --git a/tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json b/tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json new file mode 100644 index 000000000..c48f52efb --- /dev/null +++ b/tests/translator/output/aws-us-gov/connector_appsync_to_eventbus.json @@ -0,0 +1,121 @@ +{ + "Resources": { + "ApiSchema": { + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "AppSyncApi", + "ApiId" + ] + }, + "Definition": "type Note {\n NoteId: ID!\n title: String\n content: String\n}\ntype Query {\n getNote(NoteId: ID!): Note\n}\ntype Mutation {\n saveNote(NoteId: ID!, title: String!, content: String!): Note!\n}\ntype Schema {\n query: Query\n mutation: Mutation\n}\n" + }, + "Type": "AWS::AppSync::GraphQLSchema" + }, + "AppSyncApi": { + "Properties": { + "AuthenticationType": "AWS_IAM", + "Name": "AppSyncApi" + }, + "Type": "AWS::AppSync::GraphQLApi" + }, + "AppSyncEventBusDataSource": { + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "AppSyncApi", + "ApiId" + ] + }, + "EventBridgeConfig": { + "EventBusArn": { + "Fn::GetAtt": [ + "EventBus", + "Arn" + ] + } + }, + "Name": "MyDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "EventBridgeRole", + "Arn" + ] + }, + "Type": "AMAZON_EVENTBRIDGE" + }, + "Type": "AWS::AppSync::DataSource" + }, + "ConnectorPolicy": { + "Metadata": { + "aws:sam:connectors": { + "Connector": { + "Destination": { + "Type": "AWS::Events::EventBus" + }, + "Source": { + "Type": "AWS::AppSync::DataSource" + } + } + } + }, + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "events:PutEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "EventBus", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "Roles": [ + { + "Ref": "EventBridgeRole" + } + ] + }, + "Type": "AWS::IAM::ManagedPolicy" + }, + "EventBridgeRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "appsync.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": "appsync-eventbridge-role" + }, + "Type": "AWS::IAM::Role" + }, + "EventBus": { + "Properties": { + "Name": { + "Fn::Sub": "${AWS::StackName}-EventBus" + } + }, + "Type": "AWS::Events::EventBus" + } + } +} diff --git a/tests/translator/output/aws-us-gov/function_with_ignore_globals.json b/tests/translator/output/aws-us-gov/function_with_ignore_globals.json new file mode 100644 index 000000000..ad0011e53 --- /dev/null +++ b/tests/translator/output/aws-us-gov/function_with_ignore_globals.json @@ -0,0 +1,169 @@ +{ + "Resources": { + "ImageFunction": { + "Metadata": { + "DockerContext": "./src/image", + "Dockerfile": "Dockerfile" + }, + "Properties": { + "Code": { + "ImageUri": "s3://bucket/key" + }, + "PackageType": "Image", + "Role": { + "Fn::GetAtt": [ + "ImageFunctionRole", + "Arn" + ] + }, + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ImageFunction2": { + "Metadata": { + "DockerContext": "./src/image", + "Dockerfile": "Dockerfile" + }, + "Properties": { + "Code": { + "ImageUri": "s3://bucket/key" + }, + "MemorySize": 128, + "PackageType": "Image", + "Role": { + "Fn::GetAtt": [ + "ImageFunction2Role", + "Arn" + ] + }, + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ImageFunction2Role": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ImageFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ZipFunction": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "index.lambda_handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "ZipFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.8", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ZipFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + } + } +} diff --git a/tests/translator/output/aws-us-gov/layer_version_depends_on.json b/tests/translator/output/aws-us-gov/layer_version_depends_on.json new file mode 100644 index 000000000..3daff7d7c --- /dev/null +++ b/tests/translator/output/aws-us-gov/layer_version_depends_on.json @@ -0,0 +1,42 @@ +{ + "Resources": { + "Layer1d45b36fd2d": { + "DeletionPolicy": "Retain", + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer1" + }, + "Type": "AWS::Lambda::LayerVersion" + }, + "Layer25093239808": { + "DeletionPolicy": "Retain", + "DependsOn": "Layer1d45b36fd2d", + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer2" + }, + "Type": "AWS::Lambda::LayerVersion" + }, + "Layer34d7f81220c": { + "DeletionPolicy": "Retain", + "DependsOn": [ + "Layer1d45b36fd2d", + "Layer25093239808" + ], + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer3" + }, + "Type": "AWS::Lambda::LayerVersion" + } + } +} diff --git a/tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json b/tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json new file mode 100644 index 000000000..24be6084e --- /dev/null +++ b/tests/translator/output/aws-us-gov/valid_update_replace_policy_and_deletion_policy.json @@ -0,0 +1,412 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Resources": { + "MyFunction": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunctionRole", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction2Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2HiPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction2" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2Role": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction3": { + "DeletionPolicy": "Delete", + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction3Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "MyFunction3AllPermissionProd": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction3" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method2", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "MyFunction3Role": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "MyFunction4": { + "DeletionPolicy": "Retain", + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction4Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Retain" + }, + "MyFunction4ByePermissionProd": { + "DeletionPolicy": "Retain", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction4" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method2", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Retain" + }, + "MyFunction4Role": { + "DeletionPolicy": "Retain", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Retain" + }, + "MyFunctionNonePermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete" + }, + "MyFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete" + }, + "ServerlessRestApi": { + "DeletionPolicy": "Retain", + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/method": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction.Arn}/invocations" + } + } + }, + "post": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction2.Arn}/invocations" + } + } + } + }, + "/method2": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction3.Arn}/invocations" + } + } + }, + "post": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction4.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + }, + "EndpointConfiguration": { + "Types": [ + "REGIONAL" + ] + }, + "Parameters": { + "endpointConfigurationTypes": "REGIONAL" + } + }, + "Type": "AWS::ApiGateway::RestApi", + "UpdateReplacePolicy": "Retain" + }, + "ServerlessRestApiDeployment7b2714845e": { + "DeletionPolicy": "Retain", + "Properties": { + "Description": "RestApi deployment id: 7b2714845ec91c841eec02f421ced97a4bebe350", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment", + "UpdateReplacePolicy": "Retain" + }, + "ServerlessRestApiProdStage": { + "DeletionPolicy": "Retain", + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeployment7b2714845e" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod" + }, + "Type": "AWS::ApiGateway::Stage", + "UpdateReplacePolicy": "Retain" + } + } +} diff --git a/tests/translator/output/connector_appsync_to_eventbus.json b/tests/translator/output/connector_appsync_to_eventbus.json new file mode 100644 index 000000000..c48f52efb --- /dev/null +++ b/tests/translator/output/connector_appsync_to_eventbus.json @@ -0,0 +1,121 @@ +{ + "Resources": { + "ApiSchema": { + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "AppSyncApi", + "ApiId" + ] + }, + "Definition": "type Note {\n NoteId: ID!\n title: String\n content: String\n}\ntype Query {\n getNote(NoteId: ID!): Note\n}\ntype Mutation {\n saveNote(NoteId: ID!, title: String!, content: String!): Note!\n}\ntype Schema {\n query: Query\n mutation: Mutation\n}\n" + }, + "Type": "AWS::AppSync::GraphQLSchema" + }, + "AppSyncApi": { + "Properties": { + "AuthenticationType": "AWS_IAM", + "Name": "AppSyncApi" + }, + "Type": "AWS::AppSync::GraphQLApi" + }, + "AppSyncEventBusDataSource": { + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "AppSyncApi", + "ApiId" + ] + }, + "EventBridgeConfig": { + "EventBusArn": { + "Fn::GetAtt": [ + "EventBus", + "Arn" + ] + } + }, + "Name": "MyDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "EventBridgeRole", + "Arn" + ] + }, + "Type": "AMAZON_EVENTBRIDGE" + }, + "Type": "AWS::AppSync::DataSource" + }, + "ConnectorPolicy": { + "Metadata": { + "aws:sam:connectors": { + "Connector": { + "Destination": { + "Type": "AWS::Events::EventBus" + }, + "Source": { + "Type": "AWS::AppSync::DataSource" + } + } + } + }, + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "events:PutEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "EventBus", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "Roles": [ + { + "Ref": "EventBridgeRole" + } + ] + }, + "Type": "AWS::IAM::ManagedPolicy" + }, + "EventBridgeRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "appsync.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": "appsync-eventbridge-role" + }, + "Type": "AWS::IAM::Role" + }, + "EventBus": { + "Properties": { + "Name": { + "Fn::Sub": "${AWS::StackName}-EventBus" + } + }, + "Type": "AWS::Events::EventBus" + } + } +} diff --git a/tests/translator/output/error_api_invalid_auth.json b/tests/translator/output/error_api_invalid_auth.json index cfd616021..5675bc3f5 100644 --- a/tests/translator/output/error_api_invalid_auth.json +++ b/tests/translator/output/error_api_invalid_auth.json @@ -1,7 +1,7 @@ { "_autoGeneratedBreakdownErrorMessage": [ "Invalid Serverless Application Specification document. ", - "Number of errors found: 21. ", + "Number of errors found: 22. ", "Resource with id [AuthNotDictApi] is invalid. ", "Property 'Auth' should be a map. ", "Resource with id [AuthWithAdditionalPropertyApi] is invalid. ", @@ -19,7 +19,9 @@ "Property 'Auth.Authorizers' should be a map. ", "Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. ", "Property 'Auth.DefaultAuthorizer' should be a string. ", - "Resource with id [InvalidFunctionPayloadTypeApi] is invalid. ", + "Resource with id [InvalidAuthorizationScopes] is invalid. ", + "Event with id [Api] is invalid. ", + "AuthorizationScopes works only when Authorizer is set Resource with id [InvalidFunctionPayloadTypeApi] is invalid. ", "MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. ", "Resource with id [MissingAuthorizerFn] is invalid. ", "Event with id [GetRoot] is invalid. ", @@ -49,5 +51,5 @@ "Resource with id [NonStringDefaultAuthorizerApi] is invalid. ", "Property 'Auth.DefaultAuthorizer' should be a string." ], - "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 21. Resource with id [AuthNotDictApi] is invalid. Property 'Auth' should be a map. Resource with id [AuthWithAdditionalPropertyApi] is invalid. Invalid value for 'Auth' property Resource with id [AuthWithDefinitionUriApi] is invalid. Auth works only with inline Swagger specified in 'DefinitionBody' property. Resource with id [AuthWithInvalidDefinitionBodyApi] is invalid. Unable to add Auth configuration because 'DefinitionBody' does not contain a valid Swagger definition. Resource with id [AuthWithMissingDefaultAuthorizerApi] is invalid. Unable to set DefaultAuthorizer because 'NotThere' was not defined in 'Authorizers'. Resource with id [AuthorizerNotDict] is invalid. Property 'Auth.Authorizers.MyCognitoAuthorizer' should be a map. Resource with id [AuthorizerWithBadDisableFunctionDefaultPermissionsType] is invalid. Property 'Authorizers.MyAuth.DisableFunctionDefaultPermissions' should be a boolean. Resource with id [AuthorizersNotDictApi] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string. Resource with id [InvalidFunctionPayloadTypeApi] is invalid. MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. Resource with id [MissingAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [UnspecifiedAuthorizer] on API method [get] for path [/] because it wasn't defined in the API's Authorizers. Resource with id [NoApiAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthorizersFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoDefaultAuthorizerWithNoneFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer on API method [get] for path [/] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. Resource with id [NoIdentityOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NoIdentitySourceOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NonDictAuthorizerApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictAuthorizerRestApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictExternalApiAuthorizer] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [NonStringDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string." + "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 22. Resource with id [AuthNotDictApi] is invalid. Property 'Auth' should be a map. Resource with id [AuthWithAdditionalPropertyApi] is invalid. Invalid value for 'Auth' property Resource with id [AuthWithDefinitionUriApi] is invalid. Auth works only with inline Swagger specified in 'DefinitionBody' property. Resource with id [AuthWithInvalidDefinitionBodyApi] is invalid. Unable to add Auth configuration because 'DefinitionBody' does not contain a valid Swagger definition. Resource with id [AuthWithMissingDefaultAuthorizerApi] is invalid. Unable to set DefaultAuthorizer because 'NotThere' was not defined in 'Authorizers'. Resource with id [AuthorizerNotDict] is invalid. Property 'Auth.Authorizers.MyCognitoAuthorizer' should be a map. Resource with id [AuthorizerWithBadDisableFunctionDefaultPermissionsType] is invalid. Property 'Authorizers.MyAuth.DisableFunctionDefaultPermissions' should be a boolean. Resource with id [AuthorizersNotDictApi] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string. Resource with id [InvalidAuthorizationScopes] is invalid. Event with id [Api] is invalid. AuthorizationScopes works only when Authorizer is set Resource with id [InvalidFunctionPayloadTypeApi] is invalid. MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. Resource with id [MissingAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [UnspecifiedAuthorizer] on API method [get] for path [/] because it wasn't defined in the API's Authorizers. Resource with id [NoApiAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthorizersFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoDefaultAuthorizerWithNoneFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer on API method [get] for path [/] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. Resource with id [NoIdentityOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NoIdentitySourceOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NonDictAuthorizerApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictAuthorizerRestApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictExternalApiAuthorizer] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [NonStringDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string." } diff --git a/tests/translator/output/error_function_with_invalid_ignore_globals.json b/tests/translator/output/error_function_with_invalid_ignore_globals.json new file mode 100644 index 000000000..293e90eb1 --- /dev/null +++ b/tests/translator/output/error_function_with_invalid_ignore_globals.json @@ -0,0 +1,14 @@ +{ + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Resource Function has invalid resource attribute 'IgnoreGlobals' on item 'PropertyA'." + ], + "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Resource Function has invalid resource attribute 'IgnoreGlobals' on item 'PropertyA'.", + "errors": [ + { + "errorMessage": "Resource with id [Function] is invalid. Resource Function has invalid resource attribute 'IgnoreGlobals' on value 'PropertyA'." + } + ] +} diff --git a/tests/translator/output/function_with_ignore_globals.json b/tests/translator/output/function_with_ignore_globals.json new file mode 100644 index 000000000..8c3add664 --- /dev/null +++ b/tests/translator/output/function_with_ignore_globals.json @@ -0,0 +1,169 @@ +{ + "Resources": { + "ImageFunction": { + "Metadata": { + "DockerContext": "./src/image", + "Dockerfile": "Dockerfile" + }, + "Properties": { + "Code": { + "ImageUri": "s3://bucket/key" + }, + "PackageType": "Image", + "Role": { + "Fn::GetAtt": [ + "ImageFunctionRole", + "Arn" + ] + }, + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ImageFunction2": { + "Metadata": { + "DockerContext": "./src/image", + "Dockerfile": "Dockerfile" + }, + "Properties": { + "Code": { + "ImageUri": "s3://bucket/key" + }, + "MemorySize": 128, + "PackageType": "Image", + "Role": { + "Fn::GetAtt": [ + "ImageFunction2Role", + "Arn" + ] + }, + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ImageFunction2Role": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ImageFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ZipFunction": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "index.lambda_handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "ZipFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.8", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ZipFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + } + } +} diff --git a/tests/translator/output/layer_version_depends_on.json b/tests/translator/output/layer_version_depends_on.json new file mode 100644 index 000000000..3daff7d7c --- /dev/null +++ b/tests/translator/output/layer_version_depends_on.json @@ -0,0 +1,42 @@ +{ + "Resources": { + "Layer1d45b36fd2d": { + "DeletionPolicy": "Retain", + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer1" + }, + "Type": "AWS::Lambda::LayerVersion" + }, + "Layer25093239808": { + "DeletionPolicy": "Retain", + "DependsOn": "Layer1d45b36fd2d", + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer2" + }, + "Type": "AWS::Lambda::LayerVersion" + }, + "Layer34d7f81220c": { + "DeletionPolicy": "Retain", + "DependsOn": [ + "Layer1d45b36fd2d", + "Layer25093239808" + ], + "Properties": { + "Content": { + "S3Bucket": "test", + "S3Key": "test.zip" + }, + "LayerName": "Layer3" + }, + "Type": "AWS::Lambda::LayerVersion" + } + } +} diff --git a/tests/translator/output/valid_update_replace_policy_and_deletion_policy.json b/tests/translator/output/valid_update_replace_policy_and_deletion_policy.json new file mode 100644 index 000000000..7b33aa94c --- /dev/null +++ b/tests/translator/output/valid_update_replace_policy_and_deletion_policy.json @@ -0,0 +1,404 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Resources": { + "MyFunction": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunctionRole", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2": { + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction2Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2HiPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction2" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction2Role": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete" + }, + "MyFunction3": { + "DeletionPolicy": "Delete", + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction3Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "MyFunction3AllPermissionProd": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction3" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method2", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "MyFunction3Role": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "MyFunction4": { + "DeletionPolicy": "Retain", + "Properties": { + "Code": { + "S3Bucket": "bucket", + "S3Key": "key" + }, + "Handler": "LambdaASP.NETCoreWebAPI2::LambdaASP.NETCoreWebAPI2.LambdaEntryPoint::FunctionHandlerAsync", + "Role": { + "Fn::GetAtt": [ + "MyFunction4Role", + "Arn" + ] + }, + "Runtime": "dotnet6", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Retain" + }, + "MyFunction4ByePermissionProd": { + "DeletionPolicy": "Retain", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction4" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/POST/method2", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Retain" + }, + "MyFunction4Role": { + "DeletionPolicy": "Retain", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Retain" + }, + "MyFunctionNonePermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "MyFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/method", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete" + }, + "MyFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + } + ] + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete" + }, + "ServerlessRestApi": { + "DeletionPolicy": "Retain", + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/method": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction.Arn}/invocations" + } + } + }, + "post": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction2.Arn}/invocations" + } + } + } + }, + "/method2": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction3.Arn}/invocations" + } + } + }, + "post": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyFunction4.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + } + }, + "Type": "AWS::ApiGateway::RestApi", + "UpdateReplacePolicy": "Retain" + }, + "ServerlessRestApiDeploymented02210310": { + "DeletionPolicy": "Retain", + "Properties": { + "Description": "RestApi deployment id: ed022103104b41126f13a40759da23020fe2dd72", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment", + "UpdateReplacePolicy": "Retain" + }, + "ServerlessRestApiProdStage": { + "DeletionPolicy": "Retain", + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeploymented02210310" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod" + }, + "Type": "AWS::ApiGateway::Stage", + "UpdateReplacePolicy": "Retain" + } + } +} From f2f8625c1bb6c63312c7867b65546bf389bebd0d Mon Sep 17 00:00:00 2001 From: GZ Date: Wed, 22 Nov 2023 16:32:38 -0800 Subject: [PATCH 7/8] fix: Revert the version back to 1.80 (#3438) --- samtranslator/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index 10fa444db..bd41b85a3 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = "1.81.0" +__version__ = "1.80.0" From b16466700a58a90be99c7bbbfe2595c6152b37ea Mon Sep 17 00:00:00 2001 From: GZ Date: Wed, 22 Nov 2023 16:40:58 -0800 Subject: [PATCH 8/8] Release 1.81.0 (to main) (#3439) Co-authored-by: aws-sam-cli-bot <46753707+aws-sam-cli-bot@users.noreply.github.com> --- samtranslator/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index bd41b85a3..10fa444db 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = "1.80.0" +__version__ = "1.81.0"