Definitions for @turbot/aws-msk

cluster

{
"type": "object",
"properties": {
"ClusterArn": {
"$ref": "#/definitions/clusterArn"
},
"ActiveOperationArn": {
"type": "string"
},
"ClusterType": {
"$ref": "#/definitions/clusterType"
},
"CreationTime": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"CurrentVersion": {
"type": "string"
},
"EncryptionInfo": {
"type": "object"
},
"EnhancedMonitoring": {
"$ref": "#/definitions/enhancedMonitoring"
},
"LoggingInfo": {
"type": "object"
},
"ZookeeperConnectString": {
"type": "string"
},
"ZookeeperConnectStringTls": {
"type": "string"
},
"StorageMode": {
"$ref": "#/definitions/storageMode"
},
"Serverless": {
"type": "object"
},
"Provisioned": {
"type": "object"
},
"BrokerNodeGroupInfo": {
"type": "object"
},
"ClientAuthentication": {
"type": "object"
},
"CurrentBrokerSoftwareInfo": {
"type": "object"
},
"OpenMonitoring": {
"type": "object"
},
"NumberOfBrokerNodes": {
"type": "number"
},
"ClusterName": {
"$ref": "#/definitions/clusterName"
},
"State": {
"$ref": "#/definitions/clusterStatus"
},
"Tags": {
"$ref": "aws#/definitions/tagsMap"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/clusterAka"
}
},
"tags": {
"$ref": "aws#/definitions/tagsMap"
},
"title": {
"$ref": "#/definitions/clusterName"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Base - all properties provided",
"input": {
"ClusterArn": "arn:aws:kafka:us-west-2:560741234067:cluster/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4",
"ClusterName": "cluster1",
"BrokerNodeGroupInfo": {
"BrokerAZDistribution": "DEFAULT",
"ClientSubnets": [
"subnet-09982332375681a9b",
"subnet-0741a93b379e4058d"
],
"InstanceType": "kafka.m5.large",
"SecurityGroups": [
"sg-0708aa9e0130c97f4"
],
"StorageInfo": {
"EbsStorageInfo": {
"VolumeSize": 1
}
},
"CreationTime": "2019-11-06T10:17:25.136Z",
"CurrentBrokerSoftwareInfo": {
"KafkaVersion": "1.1.1"
},
"CurrentVersion": "K3UN6WX5RRO2AG",
"EncryptionInfo": {
"EncryptionAtRest": {
"DataVolumeKMSKeyId": "arn:aws:kms:us-west-2:560741234067:key/340dc487-2ff1-43a3-929d-65a2ca275f2c"
},
"EncryptionInTransit": {
"ClientBroker": "TLS",
"InCluster": false
}
},
"EnhancedMonitoring": "DEFAULT",
"NumberOfBrokerNodes": 2,
"State": "CREATING",
"Tags": {
"title": "cluster1"
}
},
"turbot": {
"title": "cluster1",
"custom": {
"aws": {
"accountId": 560741234067,
"regionName": "us-west-2"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/cluster",
"modUri": "tmod:@turbot/aws-msk"
}
}

clusterAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:kafka:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:cluster/.{1,64}/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}-[0-9]+$",
"tests": [
{
"description": "Valid - Base case",
"input": "arn:aws:kafka:us-west-2:560741234067:cluster/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4"
},
{
"description": "Invalid - Malformed resource collection",
"input": "arn:aws:kafka:us-west-2:560741234067:clustering/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4",
"expected": false
},
{
"description": "Invalid - Malformed region name",
"input": "arn:aws:kafka:us-wested-222:560741234067:cluster/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4",
"expected": false
},
{
"description": "Invalid - Malformed account ID",
"input": "arn:aws:kafka:us-west-2:56074123401267:cluster/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/clusterAka",
"modUri": "tmod:@turbot/aws-msk"
}
}

clusterArn

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:kafka:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:cluster/.{1,64}/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}-[0-9]+$",
"tests": [
{
"input": "arn:aws:kafka:us-west-2:560741234067:cluster/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4"
},
{
"description": "invalid - should start with arn",
"input": "aws:aws:kafka:us-west-2:560741234067:cluster/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4",
"expected": false
},
{
"description": "invalid - aws account id is wrong",
"input": "arn:aws:kafka:us-west-2:56074123407:cluster/cluster1/c12f6e74-1cb2-4337-8da7-1440cb8aadcb-4",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/clusterArn",
"modUri": "tmod:@turbot/aws-msk"
}
}

clusterName

{
"type": "string",
"pattern": "^.{1,64}$",
"minLength": 1,
"maxLength": 64,
"tests": [
{
"input": "cluster"
},
{
"input": "test02"
},
{
"description": "invalid - should not be empty",
"input": "",
"expected": false
},
{
"description": "invalid - max length exceeded",
"input": "cluster123cluster123cluster123cluster123cluster123cluster123cluster123cluster123cluster123cluster123",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/clusterName",
"modUri": "tmod:@turbot/aws-msk"
}
}

clusterStatus

{
"type": "string",
"enum": [
"ACTIVE",
"CREATING",
"DELETING",
"FAILED",
"HEALING",
"MAINTENANCE",
"REBOOTING_BROKER",
"UPDATING"
],
"tests": [
{
"input": "ACTIVE"
},
{
"input": "DELETING"
},
{
"description": "invalid - not listed in options",
"input": "Reactive",
"expected": false
},
{
"description": "invalid - null value",
"input": null,
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/clusterStatus",
"modUri": "tmod:@turbot/aws-msk"
}
}

clusterType

{
"type": "string",
"enum": [
"PROVISIONED",
"SERVERLESS"
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/clusterType",
"modUri": "tmod:@turbot/aws-msk"
}
}

enhancedMonitoring

{
"type": "string",
"enum": [
"DEFAULT",
"PER_BROKER",
"PER_TOPIC_PER_BROKER",
"PER_TOPIC_PER_PARTITION"
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/enhancedMonitoring",
"modUri": "tmod:@turbot/aws-msk"
}
}

msk

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "MSK"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/mskAka"
}
},
"title": {
"const": "MSK"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Base - All Valid properties",
"input": {
"name": "MSK",
"turbot": {
"akas": [
"arn:aws:msk:us-east-1:560741234067"
],
"title": "MSK",
"custom": {
"aws": {
"accountId": 560741234067,
"regionName": "us-east-1"
}
}
}
}
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/msk",
"modUri": "tmod:@turbot/aws-msk"
}
}

mskAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:msk:[a-z]{2}(-gov)?-[a-z]+-[0-9]{1}:[0-9]{12}$",
"tests": [
{
"description": "Base",
"input": "arn:aws:msk:us-east-1:560741234067"
},
{
"description": "Invalid service name",
"input": "arn:aws:xyz:us-east-1:560741234067",
"expected": false
},
{
"description": "Invalid account id",
"input": "arn:aws:msk:us-east-1:123382743123123123",
"expected": false
},
{
"description": "Invalid region name",
"input": "arn:aws:msk:us-eastdk-74381:560741234067",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/mskAka",
"modUri": "tmod:@turbot/aws-msk"
}
}

mskRegionNames

{
"type": "string",
"enum": [
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ca-central-1",
"eu-central-1",
"eu-north-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"sa-east-1",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2"
],
"tests": [
{
"input": "us-east-1"
},
{
"description": "Invalid - non-existent region",
"input": "does-not-exist",
"expected": false
},
{
"description": "Invalid - incorrect data type",
"input": true,
"expected": false
},
{
"description": "Invalid - unsupported region",
"input": "me-south-1",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/mskRegionNames",
"modUri": "tmod:@turbot/aws-msk"
}
}

mskSupportedRegions

{
"type": "array",
"items": {
"$ref": "#/definitions/mskRegionNames"
},
"minItems": 1,
"example": [
[
"us-east-1"
]
],
"default": [
"us-east-1"
],
"tests": [
{
"description": "All supported regions",
"input": [
"us-east-1"
]
},
{
"description": "Invalid - no regions",
"input": [],
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/mskSupportedRegions",
"modUri": "tmod:@turbot/aws-msk"
}
}

storageMode

{
"type": "string",
"enum": [
"LOCAL",
"TIERED"
],
".turbot": {
"uri": "tmod:@turbot/aws-msk#/definitions/storageMode",
"modUri": "tmod:@turbot/aws-msk"
}
}