Definitions for @turbot/aws-shield

protection

{
"type": "object",
"properties": {
"Id": {
"$ref": "#/definitions/protectionId"
},
"Name": {
"$ref": "#/definitions/protectionName"
},
"ResourceArn": {
"type": "string"
},
"HealthCheckIds": {
"type": "array"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/protectionAka"
}
},
"title": {
"$ref": "#/definitions/protectionName"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties",
"input": {
"Id": "ved-test",
"Name": "ved-test-01",
"turbot": {
"akas": [
"arn:aws:shield::123456789012:protection/ved-test"
],
"title": "ved-test-01",
"custom": {
"aws": {
"accountId": 123456789012
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-shield#/definitions/protection",
"modUri": "tmod:@turbot/aws-shield"
}
}

protectionAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:shield::[0-9]{12}:protection/[a-zA-Z0-9\\-]{1,36}$",
"tests": [
{
"description": "valid arn",
"input": "arn:aws:shield::123456789012:protection/ved-test"
},
{
"description": "invalid - should start with arn",
"input": "hi hi",
"expected": false
},
{
"description": "invalid - AWS account id is wrong",
"input": "arn:aws:ecr:us-west-2:4925:protection/ved-test",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-shield#/definitions/protectionAka",
"modUri": "tmod:@turbot/aws-shield"
}
}

protectionId

{
"type": "string",
"minLength": 1,
"maxLength": 36,
"pattern": "^[a-zA-Z0-9\\-]{1,36}$",
"tests": [
{
"input": "ved"
},
{
"description": "invalid - dollar, at symbol not allowed",
"input": "namespace$parent@repo01-child_01",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-shield#/definitions/protectionId",
"modUri": "tmod:@turbot/aws-shield"
}
}

protectionName

{
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9_\\.\\-]{1,128}$",
"tests": [
{
"input": "ved"
},
{
"description": "invalid - dollar, at symbol not allowed",
"input": "namespace$parent@repo01-child_01",
"expected": false
},
{
"description": "invalid - empty string",
"input": "",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-shield#/definitions/protectionName",
"modUri": "tmod:@turbot/aws-shield"
}
}

shield

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "Shield"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/shieldAka"
}
},
"title": {
"const": "Shield"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "All valid properties",
"input": {
"name": "Shield",
"turbot": {
"akas": [
"arn:aws:shield::123456789012"
],
"title": "Shield",
"custom": {
"aws": {
"accountId": 123456789012
}
}
}
}
},
{
"description": "invalid - name is missing",
"input": {
"turbot": {
"akas": [
"arn:aws:shield::123456789012"
],
"title": "Shield",
"custom": {
"aws": {
"accountId": 123456789012
}
}
}
},
"expected": false
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/aws-shield#/definitions/shield",
"modUri": "tmod:@turbot/aws-shield"
}
}

shieldAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:shield::[0-9]{12}",
"tests": [
{
"description": "base",
"input": "arn:aws:shield::123123123123"
},
{
"description": "invalid aka",
"input": "arn:aws:shield111::123123123123",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-shield#/definitions/shieldAka",
"modUri": "tmod:@turbot/aws-shield"
}
}