Definitions for @turbot/aws-sqs

queue

{
"type": "object",
"properties": {
"QueueArn": {
"$ref": "#/definitions/queueAka"
},
"QueueUrl": {
"$ref": "#/definitions/queueUrl"
},
"Tags": {
"$ref": "aws#/definitions/tagList"
},
"KmsMasterKeyId": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/queueAka"
}
},
"tags": {
"$ref": "aws#/definitions/tagsMap"
},
"title": {
"$ref": "#/definitions/queueName"
},
"metadata": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
},
"queueName": {
"$ref": "#/definitions/queueName"
},
"lastUsedTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties",
"input": {
"QueueUrl": "https://us-west-2.queue.amazonaws.com/492552618977/testing",
"turbot": {
"akas": [
"arn:aws:sqs:us-east-1:560741234067:testing"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"title": "testing",
"metadata": {
"aws": {
"accountId": 560741234067,
"regionName": "us-east-1",
"partition": "aws"
}
}
}
}
},
{
"description": "invalid - missing queue name",
"input": {
"turbot": {
"akas": [
"arn:aws:sqs:us-east-1:560741234067:testing"
],
"tags": {},
"title": "testing",
"metadata": {
"aws": {
"accountId": 560741234067,
"regionName": "us-east-1",
"partition": "aws"
}
}
}
}
},
{
"description": "Invalid - Missing turbot data",
"input": {
"QueueUrl": "https://us-west-2.queue.amazonaws.com/492552618977/testing"
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-sqs#/definitions/queue",
"modUri": "tmod:@turbot/aws-sqs"
}
}

queueAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:sqs:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:[a-zA-Z0-9-_]{3,80}$",
"tests": [
{
"description": "Valid - Base case",
"input": "arn:aws:sqs:us-east-1:560741234067:queue1"
},
{
"description": "Invalid - Malformed resource collection",
"input": "arn:aws:sqs:us-east-1:560741234067:instances/i-a2345678",
"expected": false
},
{
"description": "Invalid - Malformed region name",
"input": "arn:aws:sqs:use-east-1:560741234067:instances/i-a2345678",
"expected": false
},
{
"description": "Invalid - Malformed account ID",
"input": "arn:aws:sqs:us-east-1:5607412340673:instances/i-a2345678",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-sqs#/definitions/queueAka",
"modUri": "tmod:@turbot/aws-sqs"
}
}

queueName

{
"type": "string",
"pattern": "^[a-zA-Z0-9-_]{3,80}$",
"tests": [
{
"description": "valid queuename",
"input": "test"
},
{
"description": "Hyphens in queue name",
"input": "foo-bar-baz"
},
{
"description": "Numeric queue name",
"input": 111111111
},
{
"description": "Underscores in queue name",
"input": "foo_bar_baz"
},
{
"description": "Queue name is valid if 3 chars",
"input": 123
},
{
"description": "Queue name is valid if 80 chars",
"input": "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_"
},
{
"description": "Kitchen sink name",
"input": "Test_The-Kitchen_Sink"
},
{
"description": "invalid - Queue name is invalid if 81 or more chars",
"input": 1.234567891234568e+72,
"expected": false
},
{
"description": "invalid - empty string",
"input": "",
"expected": false
},
{
"description": "invalid - rulenames beyond the regex",
"input": "Hello@123",
"expected": false
},
{
"description": "invalid - $ in queue name",
"input": "Hello$123",
"expected": false
},
{
"description": "invalid - queue name is invalid if 2 or less chars",
"input": 12,
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-sqs#/definitions/queueName",
"modUri": "tmod:@turbot/aws-sqs"
}
}

queueUrl

{
"type": "string",
"format": "uri",
"pattern": "^https://*",
"tests": [
{
"input": "https://us-west-2.queue.amazonaws.com/492552618977/testing"
},
{
"input": "https://us-west-2.queue.amazonaws.com/492552618977/myfistqueue"
},
{
"description": "invalid - wrong url",
"input": "http://us-west-2.queue.amazonaws.com/492552618977/myfistqueue",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-sqs#/definitions/queueUrl",
"modUri": "tmod:@turbot/aws-sqs"
}
}

sqs

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "SQS"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/sqsAka"
}
},
"title": {
"const": "SQS"
},
"metadata": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"additionalProperties": true,
"tests": [
{
"description": "SQS",
"input": {
"name": "SQS",
"turbot": {
"akas": [
"arn:aws:sqs:us-east-1:560741234067"
],
"title": "SQS",
"metadata": {
"aws": {
"accountId": 560741234067,
"regionName": "us-east-1",
"partition": "aws"
}
}
}
}
},
{
"description": "invalid - service provider name prefixed",
"input": {
"name": "AWS SQS",
"turbot": {
"akas": [
"arn:aws:sqs:us-east-1:560741234067"
],
"title": "SQS",
"metadata": {
"aws": {
"accountId": 560741234067,
"regionName": "us-east-1",
"partition": "aws"
}
}
}
},
"expected": false
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/aws-sqs#/definitions/sqs",
"modUri": "tmod:@turbot/aws-sqs"
}
}

sqsAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:sqs:[a-z]{2}(-gov)?-[a-z]+-[0-9]{1}:[0-9]{12}$",
"tests": [
{
"description": "Valid AWS Partition Non-Gov",
"input": "arn:aws:sqs:us-east-1:560741234067"
},
{
"description": "Valid AWS Partition US Gov",
"input": "arn:aws-us-gov:sqs:us-gov-east-1:560741234067"
},
{
"description": "Valid AWS Partition CHINA Gov",
"input": "arn:aws-cn:sqs:cn-north-1:560741234067"
},
{
"description": "Invalid Service Name in the AKA",
"input": "arn:aws:ds11:us-east-1:560741234067",
"expected": false
},
{
"description": "Invalid Region Name in the AKA",
"input": "arn:aws:sqs:us-easted-441:560741234067",
"expected": false
},
{
"description": "Invalid Account Id in the AKA",
"input": "arn:aws:sqs:us-east-1:12345678905512",
"expected": false
},
{
"description": "Invalid AKA pattern",
"input": "sqsV2|us-east-1:560741234067",
"expected": false
},
{
"description": "Invalid AWS partition name",
"input": "arn:aws-eu:sqs:us-east-1:560741234067",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-sqs#/definitions/sqsAka",
"modUri": "tmod:@turbot/aws-sqs"
}
}