Definitions for @turbot/aws-kms

aliasKey

{
"type": "object",
"properties": {
"AliasName": {
"type": "string"
},
"KeyId": {
"$ref": "#/definitions/KeyId"
}
},
"required": [
"AliasName"
],
"additionalProperties": true,
".turbot": {
"uri": "tmod:@turbot/aws-kms#/definitions/aliasKey",
"modUri": "tmod:@turbot/aws-kms"
}
}

key

{
"type": "object",
"properties": {
"KeyId": {
"$ref": "#/definitions/KeyId"
},
"Arn": {
"$ref": "#/definitions/keyAka"
},
"AliasArn": {
"type": "string",
"pattern": "^.{20,2048}$"
},
"AliasName": {
"type": "string",
"pattern": "^.{1,256}$"
},
"Tags": {
"type": "array"
},
"AWSAccountId": {
"type": "string",
"pattern": "^[a-z0-9-]{12}$"
},
"CreationDate": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"DeletionDate": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"Description": {
"type": "string",
"maxLen": "8192"
},
"Enabled": {
"type": "boolean"
},
"ExpirationModel": {
"type": "string",
"pattern": "^(KEY_MATERIAL_EXPIRES|KEY_MATERIAL_DOES_NOT_EXPIRE)$"
},
"KeyManager": {
"type": "string",
"pattern": "^(AWS|CUSTOMER)$"
},
"KeyState": {
"$ref": "#/definitions/keyState"
},
"KeyUsage": {
"type": "string",
"pattern": "^ENCRYPT_DECRYPT$"
},
"Origin": {
"type": "string",
"pattern": "^(AWS_KMS|EXTERNAL)$"
},
"ValidTo": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"Policy": {
"type": "object"
},
"KeyRotationStatus": {
"type": "boolean"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/keyAka"
}
},
"tags": {
"$ref": "aws#/definitions/tagsMap"
},
"title": {
"$ref": "#/definitions/KeyId"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid key",
"input": {
"KeyId": "39dcbfab-70e6-4368-b592-6f547c2afe7f",
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "Facebook"
}
],
"turbot": {
"akas": [
"arn:aws:kms:us-west-2:492552618977:key/39dcbfab-70e6-4368-b592-6f547c2afe7f"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"title": "39dcbfab-70e6-4368-b592-6f547c2afe7f",
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-kms#/definitions/key",
"modUri": "tmod:@turbot/aws-kms"
}
}

keyAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:kms:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:key/[0-9a-f-]+(?:[0-9a-f]{1,255})?$",
"tests": [
{
"description": "Valid - Base case",
"input": "arn:aws:kms:us-west-2:492552618977:key/39dcbfab-70e6-4368-b592-6f547c2afe7f"
},
{
"description": "Invalid - Malformed aka",
"input": "arn:aws:kms:usa-west-2:49255261897322237:keys/39dcbfab-70e6-4368-b592-6f547c2afe7f",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-kms#/definitions/keyAka",
"modUri": "tmod:@turbot/aws-kms"
}
}

KeyId

{
"type": "string",
"pattern": "^[-a-z0-9-]{1,255}$",
"tests": [
{
"description": "base",
"input": "my-key12345"
},
{
"input": "alias/testing-cmdb-responses"
}
],
".turbot": {
"uri": "tmod:@turbot/aws-kms#/definitions/KeyId",
"modUri": "tmod:@turbot/aws-kms"
}
}

keyServiceNow

{
"defaultColumns": {
"account_id": {
"column": "enabled",
"path": "metadata.aws.accountId",
"label": "Account ID"
},
"arn": {
"column": "enabled",
"path": "turbot.akas[0]",
"label": "ARN"
},
"creation_date": {
"column": "enabled",
"label": "Creation Date"
},
"customer_master_key_spec": {
"column": "enabled",
"path": "data.CustomerMasterKeySpec"
},
"enabled": {
"column": "enabled",
"label": "Enabled",
"type": "boolean"
},
"key_rotation_enabled": {
"column": "enabled",
"label": "Key Rotation Enabled",
"path": "data.KeyRotationStatus",
"type": "boolean"
},
"key_state": {
"column": "enabled",
"label": "Key State"
},
"region": {
"column": "enabled",
"label": "Region",
"path": "metadata.aws.regionName"
},
"tags": {
"column": "enabled",
"label": "Tags",
"type": "string",
"size": 1000
}
},
".turbot": {
"uri": "tmod:@turbot/aws-kms#/definitions/keyServiceNow",
"modUri": "tmod:@turbot/aws-kms"
}
}

keyState

{
"type": "string",
"enum": [
"Enabled",
"Disabled",
"PendingDeletion",
"PendingImport",
"Unavailable"
],
"tests": [
{
"input": "Enabled"
},
{
"description": "invalid",
"input": "Creating",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-kms#/definitions/keyState",
"modUri": "tmod:@turbot/aws-kms"
}
}

kms

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "KMS"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/kmsAka"
}
},
"title": {
"const": "KMS"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Base - All Valid properties",
"input": {
"name": "KMS",
"turbot": {
"akas": [
"arn:aws:kms:us-east-1:123456789012"
],
"title": "KMS",
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "Invalid - incorrect name",
"input": {
"name": "elasticcomputecloud",
"turbot": null,
"akas": [
"arn:aws:kms:us-east-1:123456789012"
],
"title": "KMS",
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
},
"expected": false
},
{
"description": "Invalid - Service name missing",
"input": {
"turbot": {
"akas": [
"arn:aws:kms:us-east-1:123456789012"
],
"title": "KMS",
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
},
"expected": false
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/aws-kms#/definitions/kms",
"modUri": "tmod:@turbot/aws-kms"
}
}

kmsAka

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