Definitions for @turbot/aws-vpc-security

flowLog

{
"type": "object",
"properties": {
"CreationTime": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"DeliverLogsErrorMessage": {
"type": "string"
},
"DeliverLogsPermissionArn": {
"type": "string"
},
"DeliverLogsStatus": {
"type": "string"
},
"FlowLogId": {
"$ref": "#/definitions/flowLogId"
},
"FlowLogStatus": {
"$ref": "#/definitions/flowLogStatus"
},
"LogGroupName": {
"type": "string"
},
"LogDestinationType": {
"type": "string"
},
"LogDestination": {
"type": "string"
},
"TrafficType": {
"$ref": "#/definitions/trafficType"
},
"VpcId": {
"$ref": "aws-vpc-core#/definitions/vpcId"
},
"LogFormat": {
"type": "string"
},
"ResourceId": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/flowLogAka"
}
},
"title": {
"$ref": "#/definitions/flowLogId"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties",
"input": {
"FlowLogId": "fl-1234567890abcdef0",
"FlowLogStatus": "ACTIVE",
"VpcId": "vpc-27eb185d",
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:123456789012:flow-log/fl-1234567890abcdef0"
],
"title": "fl-1234567890abcdef0",
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "Invalid - missing FlowLogId",
"input": {
"FlowLogStatus": "ACTIVE",
"VpcId": "vpc-27eb185d",
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:123456789012:flow-log/fl-1234567890abcdef0"
],
"title": "fl-1234567890abcdef0",
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "Invalid - missing turbot data",
"input": {
"FlowLogId": "fl-1234567890abcdef0",
"FlowLogStatus": "ACTIVE",
"VpcId": "vpc-27eb185d"
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/flowLog",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

flowLogAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:ec2:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:flow-log/fl-[0-9a-f]{8}(?:[0-9a-f]{9})?$",
"tests": [
{
"description": "Valid - Base case",
"input": "arn:aws:ec2:us-east-1:123456789012:flow-log/fl-1234567890abcdef0"
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/flowLogAka",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

flowLogId

{
"type": "string",
"pattern": "^fl-[0-9a-f]{8}(?:[0-9a-f]{9})?$",
"tests": [
{
"description": "base case",
"input": "fl-1234567890abcdef0"
},
{
"description": "invalid - incorrect type",
"input": [],
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/flowLogId",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

flowLogStatus

{
"type": "string",
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/flowLogStatus",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

ipPermissions

{
"type": "object",
"properties": {
"FromPort": {
"$ref": "aws-vpc-core#/definitions/fromPort"
},
"UserIdGroupPairs": {
"type": "array",
"items": {
"$ref": "#/definitions/userIdGroupPair"
}
},
"IpProtocol": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"IpRanges": {
"type": "array",
"items": {
"$ref": "#/definitions/ipRanges"
}
},
"Ipv6Ranges": {
"type": "array",
"items": {
"$ref": "#/definitions/ipv6Ranges"
}
},
"PrefixListIds": {
"type": "array",
"items": {
"$ref": "#/definitions/prefixListIds"
}
},
"ToPort": {
"$ref": "aws-vpc-core#/definitions/toPort"
}
},
"tests": [
{
"description": "base case",
"input": {
"FromPort": 1433,
"UserIdGroupPairs": [
{
"GroupId": "sg-cc7a7387",
"UserId": 144683916086
}
],
"IpProtocol": "TCP",
"IpRanges": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Hello123"
}
],
"Ipv6Ranges": [
{
"CidrIpv6": "::/0",
"Description": "Hello123"
}
],
"PrefixListIds": [
{
"Description": "Hello123",
"PrefixListId": "pl-63a5400a"
}
],
"ToPort": 1521
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/ipPermissions",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

ipRanges

{
"type": "object",
"properties": {
"CidrIp": {
"oneOf": [
{
"$ref": "aws#/definitions/cidrBlock"
},
{
"$ref": "aws-vpc-core#/definitions/securityGroupId"
}
]
},
"Description": {
"$ref": "#/definitions/userIdGroupPairsDescription"
}
},
"tests": [
{
"description": "provided IP Cidrblock in CidrIp",
"input": {
"CidrIp": "0.0.0.0/0",
"Description": "Hello123"
}
},
{
"description": "provided securityGroupId in CidrIp",
"input": {
"CidrIp": "sg-0b143ca14d7ae4255",
"Description": "Hello123"
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/ipRanges",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

ipv6Ranges

{
"type": "object",
"properties": {
"CidrIpv6": {
"oneOf": [
{
"$ref": "aws#/definitions/ipv6CidrBlock"
},
{
"$ref": "aws-vpc-core#/definitions/securityGroupId"
}
]
},
"Description": {
"$ref": "#/definitions/userIdGroupPairsDescription"
}
},
"tests": [
{
"description": "provided securitygroup in CidrIpv6",
"input": {
"CidrIpv6": "sg-094881c6fa6cea7dc",
"Description": "Hello123"
}
},
{
"description": "provided IPv6 Cidrblock in CidrIpv6",
"input": {
"CidrIpv6": "::/0",
"Description": "Hello123"
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/ipv6Ranges",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

networkAcl

{
"type": "object",
"properties": {
"Associations": {
"type": "array",
"items": {
"$ref": "#/definitions/networkAclAssociation"
}
},
"IsDefault": {
"$ref": "aws-vpc-core#/definitions/genericBoolean"
},
"Entries": {
"type": "array",
"items": {
"$ref": "#/definitions/networkAclEntry"
}
},
"NetworkAclId": {
"$ref": "#/definitions/networkAclId"
},
"Tags": {
"$ref": "aws#/definitions/tagList"
},
"VpcId": {
"$ref": "aws-vpc-core#/definitions/vpcId"
},
"OwnerId": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/networkAclAka"
}
},
"title": {
"$ref": "#/definitions/networkAclId"
},
"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": {
"NetworkAclId": "acl-a12bad4c",
"Associations": [
{
"NetworkAclAssociationId": "aclassoc-acf253e0",
"NetworkAclId": "acl-e07f269a",
"SubnetId": "subnet-add22093"
},
{
"NetworkAclAssociationId": "aclassoc-91f253dd",
"NetworkAclId": "acl-e07f269a",
"SubnetId": "subnet-0a58f46d"
}
],
"IsDefault": true,
"Entries": [
{
"CidrBlock": "0.0.0.0/0",
"Egress": true,
"Protocol": -1,
"RuleAction": "allow",
"RuleNumber": 100
}
],
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "Facebook"
}
],
"VpcId": "vpc-27eb185d",
"turbot": {
"title": "acl-a12bad4c",
"akas": [
"arn:aws:ec2:us-east-1:111122223333:network-acl/acl-adf253e1"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "invalid - Missing NetworkAclId",
"input": {
"Associations": [
{
"NetworkAclAssociationId": "aclassoc-acf253e0",
"NetworkAclId": "acl-e07f269a",
"SubnetId": "subnet-add22093"
},
{
"NetworkAclAssociationId": "aclassoc-91f253dd",
"NetworkAclId": "acl-e07f269a",
"SubnetId": "subnet-0a58f46d"
}
],
"IsDefault": true,
"Entries": [
{
"CidrBlock": "0.0.0.0/0",
"Egress": true,
"Protocol": -1,
"RuleAction": "allow",
"RuleNumber": 100
}
],
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "Facebook"
}
],
"VpcId": "vpc-27eb185d",
"turbot": {
"title": "acl-a12bad4c",
"akas": [
"arn:aws:ec2:us-east-1:111122223333:network-acl/acl-adf253e1"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "invalid - Missing turbot data",
"input": {
"NetworkAclId": "acl-a12bad4c",
"Associations": [
{
"NetworkAclAssociationId": "aclassoc-acf253e0",
"NetworkAclId": "acl-e07f269a",
"SubnetId": "subnet-add22093"
},
{
"NetworkAclAssociationId": "aclassoc-91f253dd",
"NetworkAclId": "acl-e07f269a",
"SubnetId": "subnet-0a58f46d"
}
],
"IsDefault": true,
"Entries": [
{
"CidrBlock": "0.0.0.0/0",
"Egress": true,
"Protocol": -1,
"RuleAction": "allow",
"RuleNumber": 100
}
],
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "Facebook"
}
],
"VpcId": "vpc-27eb185d"
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/networkAcl",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

networkAclAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:ec2:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:network-acl/acl-[0-9a-f]{8}(?:[0-9a-f]{9})?$",
"tests": [
{
"description": "Valid - Base case",
"input": "arn:aws:ec2:us-gov-east-1:111122223333:network-acl/acl-adf253e1"
},
{
"description": "Invalid - Malformed resource collection",
"input": "arn:aws:ec2:us-east-1:111122223333:network-acls/acl-adf253e1",
"expected": false
},
{
"description": "Invalid - Malformed region name",
"input": "arn:aws:ec2:use-east-1:111122223333:network-acls/acl-adf253e1",
"expected": false
},
{
"description": "Invalid - Malformed account ID",
"input": "arn:aws:ec2:us-east-1:111122223333hhfh:network-acls/acl-adf253e1",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/networkAclAka",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

networkAclAssociation

{
"type": "object",
"properties": {
"NetworkAclAssociationId": {
"$ref": "#/definitions/networkAclAssociationId"
},
"NetworkAclId": {
"$ref": "#/definitions/networkAclId"
},
"SubnetId": {
"$ref": "aws-vpc-core#/definitions/subnetId"
}
},
"tests": [
{
"description": "base case",
"input": {
"NetworkAclAssociationId": "aclassoc-aef253e2",
"NetworkAclId": "acl-e07f269a",
"SubnetId": "subnet-6ffa5241"
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/networkAclAssociation",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

networkAclAssociationId

{
"type": "string",
"pattern": "^aclassoc-[0-9a-f]{8}(?:[0-9a-f]{9})?$",
"tests": [
{
"input": "aclassoc-adf253e1"
},
{
"input": "aclassoc-91f253dd"
},
{
"description": "invalid - should always start with aclassoc",
"input": "id-b61106d4",
"expected": false
},
{
"description": "invalid - too short",
"input": "aclassoc-63a540",
"expected": false
},
{
"description": "invalid - too long",
"input": "aclassoc-63a5400a63a5400a63a5400a",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/networkAclAssociationId",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

networkAclEntry

{
"type": "object",
"properties": {
"CidrBlock": {
"$ref": "aws#/definitions/cidrBlock"
},
"Egress": {
"$ref": "aws-vpc-core#/definitions/genericBoolean"
},
"Ipv6CidrBlock": {
"$ref": "aws#/definitions/ipv6CidrBlock"
},
"PortRange": {
"$ref": "#/definitions/portRange"
},
"Protocol": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"RuleAction": {
"$ref": "#/definitions/ruleAction"
},
"RuleNumber": {
"$ref": "#/definitions/ruleNumber"
}
},
"tests": [
{
"description": "base case",
"input": {
"CidrBlock": "0.0.0.0/0",
"Egress": true,
"Ipv6CidrBlock": "::/0",
"PortRange": {
"From": 0,
"To": 65535
},
"RuleAction": "deny",
"RuleNumber": 32766
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/networkAclEntry",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

networkAclId

{
"type": "string",
"pattern": "^acl-[0-9a-f]{8}(?:[0-9a-f]{9})?$",
"tests": [
{
"input": "acl-adf253e1"
},
{
"input": "acl-91f253dd"
},
{
"description": "invalid - should always start with acl",
"input": "id-b61106d4",
"expected": false
},
{
"description": "invalid - too short",
"input": "acl-63a540",
"expected": false
},
{
"description": "invalid - too long",
"input": "acl-63a5400a63a5400a63a5400a",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/networkAclId",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

networkAclServiceNow

{
"defaultColumns": {
"account_id": {
"column": "enabled",
"path": "metadata.aws.accountId",
"label": "Account ID"
},
"arn": {
"column": "enabled",
"path": "metadata.aws.accountId",
"label": "ARN"
},
"associations": {
"column": "enabled",
"label": "Associations",
"type": "string",
"size": 1000
},
"entries": {
"column": "enabled",
"label": "Entries",
"type": "string",
"size": 1000
},
"is_default": {
"column": "enabled",
"label": "Is Default",
"type": "boolean"
},
"network_acl_id": {
"column": "enabled",
"label": "Network ACL ID"
},
"owner_id": {
"column": "enabled",
"label": "Owner ID"
},
"region": {
"column": "enabled",
"path": "metadata.aws.regionName",
"label": "Region"
},
"tags": {
"column": "enabled",
"label": "Tags",
"type": "string",
"size": 1000
},
"title": {
"column": "enabled",
"path": "turbot.title",
"label": "Title"
},
"vpc_id": {
"column": "enabled",
"label": "VPC ID"
}
},
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/networkAclServiceNow",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

portRange

{
"type": "object",
"properties": {
"From": {
"$ref": "aws-vpc-core#/definitions/fromPort"
},
"To": {
"$ref": "aws-vpc-core#/definitions/toPort"
}
},
"tests": [
{
"description": "base case",
"input": {
"From": 0,
"To": 65535
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/portRange",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

prefixListId

{
"type": "string",
"pattern": "^pl-[0-9a-f]{8}(?:[0-9a-f]{9})?$",
"tests": [
{
"input": "pl-63a5400a"
},
{
"input": "pl-63a5400a6fa6cea7d"
},
{
"description": "invalid - should always start with pl",
"input": "id-b61106d4",
"expected": false
},
{
"description": "invalid - too short",
"input": "pl-63a540",
"expected": false
},
{
"description": "invalid - too long",
"input": "pl-63a5400a63a5400a63a5400a",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/prefixListId",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

prefixListIds

{
"type": "object",
"properties": {
"Description": {
"$ref": "#/definitions/userIdGroupPairsDescription"
},
"PrefixListId": {
"$ref": "#/definitions/prefixListId"
}
},
"tests": [
{
"description": "base case",
"input": {
"Description": "Hello123",
"PrefixListId": "pl-63a5400a"
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/prefixListIds",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

ruleAction

{
"type": "string",
"enum": [
"allow",
"deny"
],
"tests": [
{
"input": "allow"
},
{
"input": "deny"
},
{
"description": "invalid - not in the list",
"input": "hello123",
"expected": false
},
{
"description": "invalid - upper case",
"input": "DENY",
"expected": false
},
{
"description": "invalid - array type provided",
"input": [
"allow",
"deny"
],
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/ruleAction",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

ruleNumber

{
"type": "integer",
"minimum": 1,
"maximum": 32767,
"tests": [
{
"input": 100
},
{
"description": "minimum value",
"input": 1
},
{
"description": "maximum value",
"input": 32766
},
{
"description": "invalid - higher than the maximum",
"input": 32768,
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/ruleNumber",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

securityGroup

{
"type": "object",
"properties": {
"Description": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"GroupId": {
"$ref": "aws-vpc-core#/definitions/securityGroupId"
},
"GroupName": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"IpPermissions": {
"type": "array",
"items": {
"$ref": "#/definitions/ipPermissions"
}
},
"IpPermissionsEgress": {
"type": "array",
"items": {
"$ref": "#/definitions/ipPermissions"
}
},
"OwnerId": {
"$ref": "aws#/definitions/accountId"
},
"Tags": {
"$ref": "aws#/definitions/tagList"
},
"VpcId": {
"$ref": "aws-vpc-core#/definitions/vpcId"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/securityGroupAka"
}
},
"title": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"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 given",
"input": {
"GroupId": "sg-0b143ca14d7ae4255",
"Description": "launch-wizard-2 created 2018-08-06T11:56:06.427+05:30",
"GroupName": "launch-wizard-2",
"IpPermissions": [
{
"FromPort": 22,
"IpProtocol": "tcp",
"IpRanges": [
{
"CidrIp": "0.0.0.0/0"
}
],
"Ipv6Ranges": [],
"PrefixListIds": [],
"ToPort": 22,
"UserIdGroupPairs": []
}
],
"OwnerId": 144683916086,
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "turbot"
}
],
"VpcId": "vpc-27eb185d",
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "Invalid - turbot property missing",
"input": {
"GroupId": "sg-0b143ca14d7ae4255",
"Description": "launch-wizard-2 created 2018-08-06T11:56:06.427+05:30",
"GroupName": "launch-wizard-2",
"IpPermissions": [
{
"FromPort": 22,
"IpProtocol": "tcp",
"IpRanges": [
{
"CidrIp": "0.0.0.0/0"
}
],
"Ipv6Ranges": [],
"PrefixListIds": [],
"ToPort": 22,
"UserIdGroupPairs": []
}
],
"OwnerId": 144683916086,
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "turbot"
}
],
"VpcId": "vpc-27eb185d"
}
},
{
"description": "Invalid - groupname property missing",
"input": {
"GroupId": "sg-0b143ca14d7ae4255",
"Description": "launch-wizard-2 created 2018-08-06T11:56:06.427+05:30",
"IpPermissions": [
{
"FromPort": 22,
"IpProtocol": "tcp",
"IpRanges": [
{
"CidrIp": "0.0.0.0/0"
}
],
"Ipv6Ranges": [],
"PrefixListIds": [],
"ToPort": 22,
"UserIdGroupPairs": []
}
],
"OwnerId": 144683916086,
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "turbot"
}
],
"VpcId": "vpc-27eb185d",
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "Invalid - groupId property missing",
"input": {
"Description": "launch-wizard-2 created 2018-08-06T11:56:06.427+05:30",
"GroupName": "launch-wizard-2",
"IpPermissions": [
{
"FromPort": 22,
"IpProtocol": "tcp",
"IpRanges": [
{
"CidrIp": "0.0.0.0/0"
}
],
"Ipv6Ranges": [],
"PrefixListIds": [],
"ToPort": 22,
"UserIdGroupPairs": []
}
],
"OwnerId": 144683916086,
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "turbot"
}
],
"VpcId": "vpc-27eb185d",
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
},
{
"description": "Invalid - vpcid property missing",
"input": {
"GroupId": "sg-0b143ca14d7ae4255",
"Description": "launch-wizard-2 created 2018-08-06T11:56:06.427+05:30",
"GroupName": "launch-wizard-2",
"IpPermissions": [
{
"FromPort": 22,
"IpProtocol": "tcp",
"IpRanges": [
{
"CidrIp": "0.0.0.0/0"
}
],
"Ipv6Ranges": [],
"PrefixListIds": [],
"ToPort": 22,
"UserIdGroupPairs": []
}
],
"OwnerId": 144683916086,
"Tags": [
{
"Key": "Env",
"Value": "Test"
},
{
"Key": "App",
"Value": "turbot"
}
],
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255"
],
"tags": {
"Env": "Test",
"App": "Facebook"
},
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/securityGroup",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

securityGroupAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:ec2:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:security-group/sg-[0-9a-f]{8}(?:[0-9a-f]{9})?$",
"tests": [
{
"description": "Valid - Base case",
"input": "arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255"
},
{
"description": "Invalid - Malformed resource collection",
"input": "arn:aws:ec2:us-east-1:111122223333:securityGroup/sg-cc7a7387",
"expected": false
},
{
"description": "Invalid - Malformed region name",
"input": "arn:aws:ec2:usa-east-1:111122223333:security-group/sg-cc7a7387",
"expected": false
},
{
"description": "Invalid - Malformed account ID",
"input": "arn:aws:ec2:us-east-1:111122223333hhfh:security-group/sg-cc7a7387",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/securityGroupAka",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

securityGroupRule

{
"type": "object",
"properties": {
"SecurityGroupRuleId": {
"$ref": "#/definitions/securityGroupRuleId"
},
"GroupId": {
"$ref": "aws-vpc-core#/definitions/securityGroupId"
},
"GroupName": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"FromPort": {
"$ref": "aws-vpc-core#/definitions/fromPort"
},
"ToPort": {
"$ref": "aws-vpc-core#/definitions/toPort"
},
"IpProtocol": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"CidrBlock": {
"oneOf": [
{
"$ref": "aws#/definitions/cidrBlock"
},
{
"type": "null"
}
]
},
"Ipv6CidrBlock": {
"oneOf": [
{
"$ref": "aws#/definitions/ipv6CidrBlock"
},
{
"type": "null"
}
]
},
"UserIdGroupPair": {
"oneOf": [
{
"$ref": "aws-vpc-core#/definitions/securityGroupId"
},
{
"type": "null"
}
]
},
"PrefixListIds": {
"type": "array",
"items": {
"$ref": "#/definitions/prefixListIds"
}
},
"Tags": {
"$ref": "aws#/definitions/tagList"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/securityGroupRuleAka"
}
},
"title": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"tags": {
"$ref": "aws#/definitions/tagsMap"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties given",
"input": {
"GroupId": "sg-0b143ca14d7ae4255",
"GroupName": "launch-wizard-2",
"Type": "ingress",
"FromPort": 22,
"IpProtocol": "tcp",
"IpRanges": [
{
"CidrIp": "0.0.0.0/0"
}
],
"Ipv6Ranges": [],
"PrefixListIds": [],
"ToPort": 22,
"UserIdGroupPairs": [],
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255:abcd1234"
],
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1",
"partition": "aws"
}
}
}
}
},
{
"description": "Invalid - groupname property missing",
"input": {
"GroupId": "sg-0b143ca14d7ae4255",
"FromPort": 22,
"IpProtocol": "tcp",
"IpRange": "0.0.0.0/0",
"Ipv6Range": [],
"PrefixListId": [],
"ToPort": 22,
"turbot": {
"akas": [
"arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255"
],
"custom": {
"aws": {
"accountId": 123456789012,
"regionName": "us-east-1",
"partition": "aws"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/securityGroupRule",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

securityGroupRuleAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:ec2:[a-z]{2}(-gov)?-[a-z]+-[0-9]:[0-9]{12}:security-group/sg-[0-9a-f]{8}(?:[0-9a-f]{9})?:[a-zA-Z0-9.,+@=_{}!$*;[\\]()\\/:\\s-]*$",
"tests": [
{
"description": "Valid - Base case",
"input": "arn:aws:ec2:us-east-1:111122223333:security-group/sg-0b143ca14d7ae4255:a123f433"
},
{
"description": "Invalid - Malformed resource collection",
"input": "arn:aws:ec2:us-east-1:111122223333:securityGroup/sg-cc7a7387",
"expected": false
},
{
"description": "Invalid - Malformed region name",
"input": "arn:aws:ec2:usa-east-1:111122223333:security-group/sg-cc7a7387",
"expected": false
},
{
"description": "Invalid - Malformed account ID",
"input": "arn:aws:ec2:us-east-1:111122223333hhfh:security-group/sg-cc7a7387",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/securityGroupRuleAka",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

securityGroupRuleId

{
"type": "string",
"pattern": "^sgr-([0-9a-z]{17})$",
"tests": [
{
"description": "Valid - Base Case",
"input": "sgr-03bac7dceddb24326"
},
{
"description": "Invalid",
"input": "sg-03bac7dceddb24326",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/securityGroupRuleId",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

securityGroupServiceNow

{
"defaultColumns": {
"account_id": {
"column": "enabled",
"path": "metadata.aws.accountId",
"label": "Account ID"
},
"arn": {
"column": "enabled",
"path": "turbot.akas[0]",
"label": "ARN"
},
"description": {
"column": "enabled",
"label": "Description"
},
"group_id": {
"column": "enabled",
"label": "Group ID"
},
"group_name": {
"column": "enabled",
"label": "Group Name"
},
"ip_permissions": {
"column": "enabled",
"label": "IP Permissions",
"type": "string",
"size": 1000
},
"ip_permissions_egress": {
"column": "enabled",
"label": "IP Permissions Egress",
"type": "string",
"size": 1000
},
"owner_id": {
"column": "enabled",
"label": "Owner ID"
},
"region": {
"column": "enabled",
"path": "metadata.aws.regionName",
"label": "Region"
},
"tags": {
"column": "enabled",
"label": "Tags",
"type": "string",
"size": 1000
},
"title": {
"column": "enabled",
"path": "turbot.title",
"label": "Title"
},
"vpc_id": {
"column": "enabled",
"label": "VPC ID"
}
},
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/securityGroupServiceNow",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

trafficType

{
"type": "string",
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/trafficType",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

userIdGroupPair

{
"type": "object",
"properties": {
"Description": {
"$ref": "#/definitions/userIdGroupPairsDescription"
},
"GroupId": {
"$ref": "aws-vpc-core#/definitions/securityGroupId"
},
"GroupName": {
"$ref": "aws-vpc-core#/definitions/baseString"
},
"UserId": {
"$ref": "aws#/definitions/accountId"
},
"VpcId": {
"$ref": "aws-vpc-core#/definitions/vpcId"
},
"VpcPeeringConnectionId": {
"$ref": "aws-vpc-core#/definitions/vpcPeeringConnectionId"
}
},
"tests": [
{
"description": "base case",
"input": {
"GroupId": "sg-cc7a7387",
"UserId": 144683916086
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/userIdGroupPair",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}

userIdGroupPairsDescription

{
"type": "string",
"maxLength": 255,
"pattern": "^[a-zA-Z0-9.,+@=_{}!$*;[\\]()\\/:\\s-]*$",
"tests": [
{
"input": "launch-wizard-1 created 2018-08-03T19:49:29.327+05:30"
},
{
"input": "launch-wizard-2 created 2018-08-06T11:56:06.427+05:30"
}
],
".turbot": {
"uri": "tmod:@turbot/aws-vpc-security#/definitions/userIdGroupPairsDescription",
"modUri": "tmod:@turbot/aws-vpc-security"
}
}