{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Creates an SQS queue with AWS CloudWatch alarms on queue depth ",
"Parameters": {
"FailureNotificationEmail": {
"Description": "Email address where it is configured to send failure notification",
"Type": "String",
"AllowedPattern": "([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)",
"ConstraintDescription": "The email address must be a valid one"
}
},
"Resources": {
"ImageTransformationServiceQueue": {
"Type": "AWS::SQS::Queue",
"Properties": {}
},
"FailureNotificationTopic": {
"Type": "AWS::SNS::Topic",
"Properties": {
"Subscription": [
{
"Endpoint": {
"Ref": "FailureNotificationEmail"
},
"Protocol": "email"
}
]
}
},
"QueueDepthAlarm": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"AlarmDescription": "Alarms if queue depth grows beyond 25000 messages",
"Namespace": "AWS/SQS",
"MetricName": "ApproximateNumberOfMessagesVisible",
"Dimensions": [
{
"Name": "QueueName",
"Value": {
"Fn::GetAtt": [
"ImageTransformationServiceQueue",
"QueueName"
]
}
}
],
"Statistic": "Sum",
"Period": "300",
"EvaluationPeriods": "1",
"Threshold": "25000",
"ComparisonOperator": "GreaterThanThreshold",
"AlarmActions": [
{
"Ref": "FailureNotificationTopic"
}
],
"InsufficientDataActions": [
{
"Ref": "FailureNotificationTopic"
}
]
}
}
},
"Outputs": {
"QueueURL": {
"Description": "URL of the ImageTransformationServiceQueue",
"Value": {
"Ref": "ImageTransformationServiceQueue"
}
},
"QueueARN": {
"Description": "ARN of the ImageTransformationServiceQueue",
"Value": {
"Fn::GetAtt": [
"ImageTransformationServiceQueue",
"Arn"
]
}
},
"QueueName": {
"Description": "Name of the ImageTransformationServiceQueue",
"Value": {
"Fn::GetAtt": [
"ImageTransformationServiceQueue",
"QueueName"
]
}
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"AWSTemplateFormatVersion": {
"type": "string"
},
"Description": {
"type": "string"
},
"Parameters": {
"type": "object",
"properties": {
"FailureNotificationEmail": {
"type": "object",
"properties": {
"Type": {
"type": "string"
},
"Description": {
"type": "string"
},
"AllowedPattern": {
"type": "string"
},
"ConstraintDescription": {
"type": "string"
}
}
}
}
},
"Outputs": {
"type": "object",
"properties": {
"QueueARN": {
"type": "object",
"properties": {
"Description": {
"type": "string"
},
"Value": {
"type": "object",
"properties": {
"Fn::GetAtt": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"QueueName": {
"type": "object",
"properties": {
"Description": {
"type": "string"
},
"Value": {
"type": "object",
"properties": {
"Fn::GetAtt": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"QueueURL": {
"type": "object",
"properties": {
"Description": {
"type": "string"
},
"Value": {
"type": "object",
"properties": {
"Ref": {
"type": "string"
}
}
}
}
}
}
},
"Resources": {
"type": "object",
"properties": {
"QueueDepthAlarm": {
"type": "object",
"properties": {
"Type": {
"type": "string"
},
"Properties": {
"type": "object",
"properties": {
"AlarmActions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Ref": {
"type": "string"
}
}
}
},
"MetricName": {
"type": "string"
},
"ComparisonOperator": {
"type": "string"
},
"AlarmDescription": {
"type": "string"
},
"Statistic": {
"type": "string"
},
"Dimensions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Value": {
"type": "object",
"properties": {
"Fn::GetAtt": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"Name": {
"type": "string"
}
}
}
},
"Period": {
"type": "string"
},
"EvaluationPeriods": {
"type": "string"
},
"InsufficientDataActions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Ref": {
"type": "string"
}
}
}
},
"Namespace": {
"type": "string"
},
"Threshold": {
"type": "string"
}
}
}
}
},
"FailureNotificationTopic": {
"type": "object",
"properties": {
"Type": {
"type": "string"
},
"Properties": {
"type": "object",
"properties": {
"Subscription": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Endpoint": {
"type": "object",
"properties": {
"Ref": {
"type": "string"
}
}
},
"Protocol": {
"type": "string"
}
}
}
}
}
}
}
},
"ImageTransformationServiceQueue": {
"type": "object",
"properties": {
"Type": {
"type": "string"
},
"Properties": {
"type": "object"
}
}
}
}
}
}
}
{
"clientName": "xyz",
"resource": "retailproducts",
"version": "v1",
"dataTypeField": "category",
"dataLanguageField": "language",
"elasticIndexSettingsMetadataList": [
{
"language": "en",
"numberOfShrads": 1,
"numberOfReplicas": 1
},
{
"language": "fr",
"numberOfShrads": 2,
"numberOfReplicas": 2
}
]
}
{
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"properties": {
"elasticIndexSettingsMetadataList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"numberOfReplicas": {
"type": "integer",
"examples": [
1,
2
]
},
"numberOfShrads": {
"type": "integer",
"examples": [
1,
2
]
},
"language": {
"type": "string",
"examples": [
"en",
"fr"
]
}
}
}
},
"dataTypeField": {
"type": "string",
"examples": [
"category"
]
},
"dataLanguageField": {
"type": "string",
"examples": [
"language"
]
},
"clientName": {
"type": "string",
"examples": [
"xyz"
]
},
"resource": {
"type": "string",
"examples": [
"retailproducts"
]
},
"version": {
"type": "string",
"examples": [
"v1"
]
}
}
}
{
"id": "14301743",
"name": "Logitech Corded Mouse M100",
"price": 4.44,
"distance": null,
"stock": "Available",
"vendor": "Walmart",
"smallImage": "https://i5.walmartimages.com/asr/ec3bdeff-1be3-4437-825a-23815fd56e64_1.aceba0532d5880fac01e82d56c859cc2.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
"mediumImage": "https://i5.walmartimages.com/asr/ec3bdeff-1be3-4437-825a-23815fd56e64_1.aceba0532d5880fac01e82d56c859cc2.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
"largeImage": "https://i5.walmartimages.com/asr/ec3bdeff-1be3-4437-825a-23815fd56e64_1.aceba0532d5880fac01e82d56c859cc2.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
"description": "Logitech Corded Mouse M100: Ambidextrous designThis USB corded mouse provides high-definition optical trackingSide-to-side scrolling plus zoomThis Logitech wired optical mouse relies on USB connectivity",
"productLink": "http://c.affil.walmart.com/t/api02?l=https%3A%2F%2Fwww.walmart.com%2Fip%2FLogitech-Corded-Mouse-M100%2F14301743%3Faffp1%3D7YrPBWsV5yICh9T58Sz1d8GeAfV9rNiSEqQsqFW7XZ8%26affilsrc%3Dapi%26veh%3Daff%26wmlspartner%3Dreadonlyapi",
"addToCartLink": "http://c.affil.walmart.com/t/api02?l=http%3A%2F%2Faffil.walmart.com%2Fcart%2FaddToCart%3Fitems%3D14301743%7C1%26affp1%3D7YrPBWsV5yICh9T58Sz1d8GeAfV9rNiSEqQsqFW7XZ8%26affilsrc%3Dapi%26veh%3Daff%26wmlspartner%3Dreadonlyapi",
"offerType": "ONLINE_AND_STORE",
"categoryPath": "Electronics/Computers/Computer Accessories/Computer Keyboards & Mice/Computer Mouse & Mouse Pads/Wireless Mouse",
"msrp": 9.97,
"brandName": "Logitech",
"standardShipRate": 5.99,
"category": "product",
"subCategory": "searchresult",
"language": "en"
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"largeImage": {
"type": "string",
"examples": [
"https://i5.walmartimages.com/asr/ec3bdeff-1be3-4437-825a-23815fd56e64_1.aceba0532d5880fac01e82d56c859cc2.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF"
]
},
"brandName": {
"type": "string",
"examples": [
"Logitech"
]
},
"subCategory": {
"type": "string",
"examples": [
"searchresult"
]
},
"smallImage": {
"type": "string",
"examples": [
"https://i5.walmartimages.com/asr/ec3bdeff-1be3-4437-825a-23815fd56e64_1.aceba0532d5880fac01e82d56c859cc2.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF"
]
},
"distance": {
"type": "null",
"examples": [
null
]
},
"categoryPath": {
"type": "string",
"examples": [
"Electronics/Computers/Computer Accessories/Computer Keyboards & Mice/Computer Mouse & Mouse Pads/Wireless Mouse"
]
},
"mediumImage": {
"type": "string",
"examples": [
"https://i5.walmartimages.com/asr/ec3bdeff-1be3-4437-825a-23815fd56e64_1.aceba0532d5880fac01e82d56c859cc2.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF"
]
},
"description": {
"type": "string",
"examples": [
"Logitech Corded Mouse M100: Ambidextrous designThis USB corded mouse provides high-definition optical trackingSide-to-side scrolling plus zoomThis Logitech wired optical mouse relies on USB connectivity"
]
},
"addToCartLink": {
"type": "string",
"examples": [
"http://c.affil.walmart.com/t/api02?l=http%3A%2F%2Faffil.walmart.com%2Fcart%2FaddToCart%3Fitems%3D14301743%7C1%26affp1%3D7YrPBWsV5yICh9T58Sz1d8GeAfV9rNiSEqQsqFW7XZ8%26affilsrc%3Dapi%26veh%3Daff%26wmlspartner%3Dreadonlyapi"
]
},
"language": {
"type": "string",
"examples": [
"en"
]
},
"offerType": {
"type": "string",
"examples": [
"ONLINE_AND_STORE"
]
},
"standardShipRate": {
"type": "number",
"examples": [
5.99
]
},
"price": {
"type": "number",
"examples": [
4.44
]
},
"vendor": {
"type": "string",
"examples": [
"Walmart"
]
},
"msrp": {
"type": "number",
"examples": [
9.97
]
},
"name": {
"type": "string",
"examples": [
"Logitech Corded Mouse M100"
]
},
"productLink": {
"type": "string",
"examples": [
"http://c.affil.walmart.com/t/api02?l=https%3A%2F%2Fwww.walmart.com%2Fip%2FLogitech-Corded-Mouse-M100%2F14301743%3Faffp1%3D7YrPBWsV5yICh9T58Sz1d8GeAfV9rNiSEqQsqFW7XZ8%26affilsrc%3Dapi%26veh%3Daff%26wmlspartner%3Dreadonlyapi"
]
},
"id": {
"type": "string",
"examples": [
"14301743"
]
},
"stock": {
"type": "string",
"examples": [
"Available"
]
},
"category": {
"type": "string",
"examples": [
"product"
]
}
}
}
Copyright © Karigar's Input/Output Tools 2024.