Definitions for @turbot/aws-athena
- athena
- athenaAka
- namedQuery
- namedQueryAka
- namedQueryId
- namedQueryName
- workgroup
- workgroupAka
- workgroupName
- workgroupStatus
athena
Schema
{ "allOf": [ { "$ref": "turbot#/definitions/service" }, { "type": "object", "properties": { "name": { "const": "Athena" }, "turbot": { "type": "object", "properties": { "akas": { "type": "array", "items": { "$ref": "#/definitions/athenaAka" } }, "title": { "const": "Athena" }, "custom": { "type": "object", "properties": { "aws": { "$ref": "aws#/definitions/awsMetadata" } } } } } }, "additionalProperties": true, "tests": [ { "description": "Valid - All properties", "input": { "name": "Athena", "turbot": { "akas": [ "arn:aws:athena:us-east-1:123456789012" ], "title": "Athena", "custom": { "aws": { "accountId": 123456789012, "regionName": "us-east-1" } } } } } ] } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/athena", "modUri": "tmod:@turbot/aws-athena" }}
athenaAka
Schema
{ "type": "string", "pattern": "^arn:aws(-us-gov|-cn)?:athena:[a-z]{2}(-gov)?-[a-z]+-[0-9]{1}:[0-9]{12}$", "tests": [ { "description": "Valid AWS Partition Non-Gov", "input": "arn:aws:athena:us-east-1:123456789012" }, { "description": "Valid AWS Partition US Gov", "input": "arn:aws-us-gov:athena:us-gov-east-1:123456789012" }, { "description": "Valid AWS Partition CHINA Gov", "input": "arn:aws-cn:athena:cn-east-1:123456789012" }, { "description": "Invalid Service Name in the AKA", "input": "arn:aws:ds11:us-east-1:123456789012", "expected": false }, { "description": "Invalid Region Name in the AKA", "input": "arn:aws:athena:us-easted-441:123456789012", "expected": false }, { "description": "Invalid Account Id in the AKA", "input": "arn:aws:athena:us-east-1:12345678905512", "expected": false }, { "description": "Invalid AKA pattern", "input": "athenaV2|us-east-1:123456789012", "expected": false }, { "description": "Invalid AWS partition name", "input": "arn:aws-eu:athena:us-east-1:123456789012", "expected": false }, { "description": "Invalid AWS partition name", "input": "arn:gcp-eu:athena:us-east-1:123456789012", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/athenaAka", "modUri": "tmod:@turbot/aws-athena" }}
namedQuery
Schema
{ "type": "object", "properties": { "Name": { "$ref": "#/definitions/namedQueryName" }, "NamedQueryId": { "$ref": "#/definitions/namedQueryId" }, "WorkGroup": { "$ref": "#/definitions/workgroupName" }, "Description": { "type": "string" }, "Database": { "type": "string" }, "QueryString": { "type": "string" }, "Tags": { "$ref": "aws#/definitions/tagList" }, "turbot": { "type": "object", "properties": { "akas": { "type": "array", "items": { "$ref": "#/definitions/namedQueryAka" } }, "tags": { "$ref": "aws#/definitions/tagsMap" }, "title": { "$ref": "#/definitions/namedQueryName" }, "custom": { "type": "object", "properties": { "aws": { "$ref": "aws#/definitions/awsMetadata" }, "createTimestamp": { "$ref": "turbot#/definitions/isoTimestamp" } } } } } }, "additionalProperties": true, "tests": [ { "description": "Valid - All properties", "input": { "Name": "newNamedQuery", "NamedQueryId": "9fa538c3-2a8c-481c-bb1d-11b4e4f67697", "WorkGroup": "primary", "Description": "access denied test case", "Database": "sampledb", "QueryString": "SELECT elb_name,\n count(1)\nFROM elb_logs\nWHERE elb_response_code = '200'\nGROUP BY elb_name\nORDER BY 2 DESC limit 10;", "Tags": [ { "Key": "key1", "Value": "val1" } ], "turbot": { "akas": [ "arn:aws:athena:us-west-2:560741234067:workgroup/primary/9fa538c3-2a8c-481c-bb1d-11b4e4f67697" ], "tags": { "key1": "val1" }, "title": "newNamedQuery", "custom": { "aws": { "accountId": 560741234067, "regionName": "us-west-2", "partition": "aws" } } } } } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/namedQuery", "modUri": "tmod:@turbot/aws-athena" }}
namedQueryAka
Schema
{ "type": "string", "pattern": "^arn:aws(-us-gov|-cn)?:athena:[a-z]{2}(-gov)?-[a-z]+-[0-9]{1}:[0-9]{12}:workgroup/[a-zA-Z0-9-_.]{1,128}/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$", "tests": [ { "description": "Valid - Base case", "input": "arn:aws:athena:us-west-2:560741234067:workgroup/primary/9fa538c3-2a8c-481c-bb1d-11b4e4f67697" }, { "description": "Invalid - Malformed region name", "input": "arn:aws:athena:usa-west-222:560741234067:workgroup/primary/9fa538c3-2a8c-481c-bb1d-11b4e4f67697", "expected": false }, { "description": "Invalid - Malformed account ID", "input": "arn:aws:athena:us-west-2:560741234067343535:workgroup/primary/9fa538c3-2a8c-481c-bb1d-11b4e4f67697", "expected": false }, { "description": "Invalid - AWS Partition Name", "input": "arn:aws-ap:athena:us-west-2:560741234067:workgroup/primary/9fa538c3-2a8c-481c-bb1d-11b4e4f67697", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/namedQueryAka", "modUri": "tmod:@turbot/aws-athena" }}
namedQueryId
Schema
{ "type": "string", "pattern": "^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$", "tests": [ { "description": "Valid - Base case", "input": "9fa538c3-2a8c-481c-bb1d-11b4e4f67697" }, { "description": "Invalid - Pattern not followed", "input": "9fa538gfgfc3-2afhfh8c-481c-bb1d11b4e4f67697", "expected": false }, { "description": "Invalid - Upper Case Used", "input": "9fA538c3-2a8c-481c-bb1d-11B4e4f67697", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/namedQueryId", "modUri": "tmod:@turbot/aws-athena" }}
namedQueryName
Schema
{ "type": "string", "pattern": "^.{1,128}$", "tests": [ { "input": "testQuery" }, { "description": "Invalid - empty string passed", "input": "", "expected": false }, { "description": "Invalid - max length exceeded \"Use 1 - 128 characters\"", "input": "testQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuerytestQuery", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/namedQueryName", "modUri": "tmod:@turbot/aws-athena" }}
workgroup
Schema
{ "type": "object", "properties": { "Name": { "$ref": "#/definitions/workgroupName" }, "State": { "$ref": "#/definitions/workgroupStatus" }, "Configuration": { "type": "object" }, "Description": { "type": "string" }, "Tags": { "$ref": "aws#/definitions/tagList" }, "turbot": { "type": "object", "properties": { "akas": { "type": "array", "items": { "$ref": "#/definitions/workgroupAka" } }, "title": { "$ref": "#/definitions/workgroupName" }, "tags": { "$ref": "aws#/definitions/tagsMap" }, "custom": { "type": "object", "properties": { "aws": { "$ref": "aws#/definitions/awsMetadata" }, "createTimestamp": { "$ref": "turbot#/definitions/isoTimestamp" } } } } } }, "additionalProperties": true, "tests": [ { "description": "Valid - All properties", "input": { "Name": ".test_WG-01", "Configuration": { "ResultConfiguration": {}, "EnforceWorkGroupConfiguration": false, "PublishCloudWatchMetricsEnabled": false }, "State": "ENABLED", "Tags": [ { "Key": "delete", "Value": "hdhdhdh" }, { "Key": "update", "Value": "updjdjdjdjdateBar" } ], "arn": "arn:aws:athena:us-east-1:560741234067:workgroup/.test_WG-01", "turbot": { "akas": [ "arn:aws:athena:us-east-1:560741234067:workgroup/.test_WG-01" ], "title": ".test_WG-01", "tags": { "delete": "hdhdhdh", "update": "updjdjdjdjdateBar" }, "custom": { "aws": { "accountId": 560741234067, "regionName": "us-east-2" } } } } }, { "description": "Invalid - Missing workgroup name", "input": { "arn": "arn:aws:athena:us-east-1:560741234067:workgroup/.test_WG-01", "turbot": { "akas": [ "arn:aws:athena:us-east-1:560741234067:workgroup/.test_WG-01" ], "title": ".test_WG-01", "custom": { "aws": { "accountId": 560741234067, "regionName": "us-east-2" } } } } }, { "description": "Invalid - Missing turbot data", "input": { "Name": ".test_WG-01", "arn": "arn:aws:athena:us-east-1:560741234067:workgroup/.test_WG-01" } } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/workgroup", "modUri": "tmod:@turbot/aws-athena" }}
workgroupAka
Schema
{ "type": "string", "pattern": "^arn:aws(-us-gov|-cn)?:athena:[a-z]{2}(-gov)?-[a-z]+-[0-9]{1}:[0-9]{12}:workgroup/[a-zA-Z0-9-_.]{1,128}$", "tests": [ { "description": "Valid - Base case", "input": "arn:aws:athena:us-east-1:560741234067:workgroup/.test_WG-01" }, { "description": "Invalid - Malformed region name", "input": "arn:aws:athena:use-east-14:560741234067:workgroup/.test_WG-01", "expected": false }, { "description": "Invalid - Malformed account ID", "input": "arn:aws:athena:us-east-1:12345:workgroup/.test_WG-01", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/workgroupAka", "modUri": "tmod:@turbot/aws-athena" }}
workgroupName
Schema
{ "type": "string", "pattern": "^[a-zA-Z0-9-_.]{1,128}$", "tests": [ { "input": ".test_WG-01" }, { "description": "invalid - Use 1 - 128 characters. (A-Z,a-z,0-9,_,-,.)", "input": "test$#*&^%", "expected": false }, { "description": "invalid - empty string passed", "input": "", "expected": false }, { "description": "invalid - max length exceeded \"Use 1 - 128 characters. (A-Z,a-z,0-9,_,-,.)\"", "input": ".test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01.test_WG-01", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/workgroupName", "modUri": "tmod:@turbot/aws-athena" }}
workgroupStatus
Schema
{ "type": "string", "enum": [ "ENABLED", "DISABLED" ], "tests": [ { "input": "ENABLED" }, { "description": "Invalid - wrong value passed", "input": "testing", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/aws-athena#/definitions/workgroupStatus", "modUri": "tmod:@turbot/aws-athena" }}