Definitions for @turbot/aws-organizations

availablePolicyTypes

{
"type": "array",
"items": {
"$ref": "#/definitions/policyTypeSummary"
},
"tests": [
{
"description": "valid - Base case",
"input": [
{
"status": "ENABLED",
"type": "SERVICE_CONTROL_POLICY"
},
{
"status": "PENDING_ENABLE",
"type": "SERVICE_CONTROL_POLICY"
}
]
},
{
"description": "invalid - Invalid item",
"input": [
{
"status": "ENABLED",
"type": "SERVICE_CONTROL_POLICY"
},
"hello"
],
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/availablePolicyTypes",
"modUri": "tmod:@turbot/aws-organizations"
}
}

featureSet

{
"type": "string",
"enum": [
"ALL",
"CONSOLIDATED_BILLING"
],
"tests": [
{
"description": "valid - base case",
"input": "ALL"
},
{
"description": "invalid - invalid value",
"input": "FOO",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/featureSet",
"modUri": "tmod:@turbot/aws-organizations"
}
}

masterAccountArn

{
"type": "string",
"pattern": "^arn:aws(-us-gov)?:organizations::\\d{12}:account\\/o-[a-z0-9]{10,32}\\/\\d{12}$",
"tests": [
{
"description": "base case",
"input": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111"
},
{
"description": "invalid - should start with arn:aws:organizations",
"input": "o-exampleorgid/111111111111",
"expected": false
},
{
"description": "invalid - incorrect type entered",
"input": [
"127323te"
],
"expected": false
},
{
"description": "invalid - boolean value inserted",
"input": true,
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/masterAccountArn",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organization

{
"type": "object",
"properties": {
"Arn": {
"$ref": "#/definitions/organizationArn"
},
"Id": {
"$ref": "#/definitions/organizationId"
},
"AvailablePolicyType": {
"$ref": "#/definitions/availablePolicyTypes"
},
"FeatureSet": {
"$ref": "#/definitions/featureSet"
},
"MasterAccountArn": {
"$ref": "#/definitions/masterAccountArn"
},
"MasterAccountEmail": {
"$ref": "turbot#/definitions/email"
},
"MasterAccountId": {
"$ref": "aws#/definitions/accountId"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/organizationArn"
}
},
"title": {
"$ref": "#/definitions/organizationId"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "base case",
"input": {
"Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
"Id": "o-abcde12345",
"turbot": {
"akas": [
"arn:aws:organizations::111111111111:organization/o-exampleorgid"
],
"title": "o-abcde12345",
"custom": {
"aws": {
"organizationId": "o-abcde12345"
}
}
}
}
},
{
"description": "base case - additional fields added",
"input": {
"Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
"Id": "o-abcde12345",
"MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
"MasterAccountEmail": "test@test.com",
"MasterAccountId": 123456789876,
"FeatureSet": "ALL",
"turbot": {
"title": "o-abcde12345",
"custom": {
"aws": {
"organizationId": "o-abcde12345"
}
}
}
}
},
{
"description": "invalid - no turbot data provided",
"input": {
"Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
"Id": "o-abcde12345",
"MasterAccountEmail": "test@test.com",
"MasterAccountId": 123456789876,
"FeatureSet": "CONSOLIDATED_BILLING"
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organization",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationAccountJoinedMethod

{
"type": "string",
"enum": [
"INVITED",
"CREATED"
],
"tests": [
{
"description": "base case",
"input": "CREATED"
},
{
"description": "base case",
"input": "INVITED"
},
{
"description": "invalid value",
"input": "INVITE",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationAccountJoinedMethod",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationAccountStatus

{
"type": "string",
"enum": [
"ACTIVE",
"SUSPENDED"
],
"tests": [
{
"description": "base case",
"input": "ACTIVE"
},
{
"description": "base case",
"input": "SUSPENDED"
},
{
"description": "invalid value",
"input": "SUSPEND",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationAccountStatus",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalAccount

{
"type": "object",
"properties": {
"Id": {
"$ref": "#/definitions/organizationalAccountId"
},
"Arn": {
"$ref": "#/definitions/organizationalAccountArn"
},
"Email": {
"type": "string"
},
"Name": {
"$ref": "#/definitions/organizationalAccountName"
},
"Status": {
"$ref": "#/definitions/organizationAccountStatus"
},
"JoinedMethod": {
"$ref": "#/definitions/organizationAccountJoinedMethod"
},
"JoinedTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"Tags": {
"$ref": "aws#/definitions/tagList"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/organizationalAccountArn"
}
},
"tags": {
"$ref": "aws#/definitions/tagsMap"
},
"title": {
"$ref": "#/definitions/organizationalAccountName"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "valid - all properties given",
"input": {
"Id": "056968806376",
"Arn": "arn:aws:organizations::123456789012:account/o-cjlaeocf2p/056968806376",
"Email": "aws+cody+acf@turbot.com",
"Name": "acf @ cody",
"Status": "ACTIVE",
"JoinedMethod": "CREATED",
"JoinedTimestamp": "2020-10-13T11:00:20.000Z",
"turbot": {
"title": "acf @ cody",
"custom": {
"aws": {
"accountId": "123456789012",
"partition": "aws"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalAccount",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalAccountArn

{
"type": "string",
"pattern": "^arn:aws(-us-gov)?:organizations::[0-9]{12}:account/o-[a-z0-9]{10,32}/[0-9]{12}$",
"tests": [
{
"input": "arn:aws:organizations::123456789012:account/o-cjlaeocf2p/056968806376"
},
{
"description": "invalid - account id",
"input": "arn:aws:organizations::123456789:account/o-cjlaeocf2p/056968806376",
"expected": false
},
{
"description": "invalid - organization id",
"input": "arn:aws:organizations::123457891012:account/cjlaeocf2p/056968806376",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalAccountArn",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalAccountId

{
"type": "string",
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalAccountId",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalAccountName

{
"type": "string",
"minLength": 1,
"maxLength": 128,
"tests": [
{
"description": "valid min length",
"input": "a"
},
{
"description": "valid max length",
"input": "abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678"
},
{
"description": "invalid - too short",
"input": "",
"expected": false
},
{
"description": "invalid - too long",
"input": "abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678a",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalAccountName",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalUnit

{
"type": "object",
"properties": {
"Arn": {
"$ref": "#/definitions/organizationalUnitArn"
},
"Id": {
"$ref": "#/definitions/organizationalUnitId"
},
"Name": {
"$ref": "#/definitions/organizationalUnitName"
},
"Tags": {
"$ref": "aws#/definitions/tagList"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/organizationalUnitArn"
}
},
"tags": {
"$ref": "aws#/definitions/tagsMap"
},
"title": {
"$ref": "#/definitions/organizationalUnitName"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "valid - all properties given",
"input": {
"Arn": "arn:aws:organizations::123457891012:ou/o-cjlaeocf2p/ou-lnmn-w3rpbmd5",
"Id": "ou-abcd-123456789",
"Name": "MyOrganization",
"turbot": {
"title": "MyOrganization",
"custom": {
"aws": {
"organizationId": "o-abcde12345"
}
}
}
}
},
{
"description": "invalid - no ARN",
"input": {
"Name": "MyOrganization",
"Id": "ou-abcd-123456789",
"turbot": {
"title": "MyOrganization",
"custom": {
"aws": {
"organizationId": "o-abcde12345"
}
}
}
},
"expected": false
},
{
"description": "invalid - No ID",
"input": {
"Arn": "arn:aws:organizations::123457891012:ou/o-cjlaeocf2p/ou-lnmn-w3rpbmd5",
"Name": "MyOrganization",
"turbot": {
"title": "MyOrganization",
"custom": {
"aws": {
"organizationId": "o-abcde12345"
}
}
}
},
"expected": false
},
{
"description": "invalid - no name",
"input": {
"Arn": "arn:aws:organizations::123457891012:ou/o-cjlaeocfy2p/ou-lnmn-w3rpbmd5",
"Id": "ou-123456789",
"turbot": {
"title": "MyOrganization",
"custom": {
"aws": {
"organizationId": "o-abcde12345"
}
}
}
},
"expected": false
},
{
"description": "invalid - No turbot data",
"input": {
"Arn": "arn:aws:organizations::123457891012:ou/o-cjlaeocf2p/ou-lnmn-w3rpbmd5",
"Id": "ou-123456789",
"Name": "MyOrganization"
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalUnit",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalUnitArn

{
"type": "string",
"pattern": "^arn:aws(-us-gov)?:organizations::[0-9]{12}:ou/o-[a-z0-9]{10,32}/ou-[0-9a-z]{4,32}-[0-9a-z]{8,32}$",
"tests": [
{
"input": "arn:aws:organizations::123457891012:ou/o-cjlaeocf2p/ou-lnmn-w3rpbmd5"
},
{
"description": "invalid - account id",
"input": "arn:aws:organizations::1234578910:ou/o-cjlaeocf2p/ou-lnmn-w3rpbmd5",
"expected": false
},
{
"description": "invalid - organization id",
"input": "arn:aws:organizations::123457891012:ou/cjlaeocf2p/lnmn-w3rpbmd5",
"expected": false
},
{
"description": "invalid - organizational unit id",
"input": "arn:aws:organizations::123457891012:ou/o-cjlaeocf2p/lnmn-w3rpbmd5",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalUnitArn",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalUnitId

{
"type": "string",
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalUnitId",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationalUnitName

{
"type": "string",
"minLength": 1,
"maxLength": 128,
"tests": [
{
"description": "valid min length",
"input": "a"
},
{
"description": "valid max length",
"input": "abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678"
},
{
"description": "invalid - too short",
"input": "",
"expected": false
},
{
"description": "invalid - too long",
"input": "abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678a",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationalUnitName",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationArn

{
"type": "string",
"pattern": "^arn:aws:organizations::\\d{12}:organization\\/o-[a-z0-9]{10,32}",
"tests": [
{
"description": "Valid ARN",
"input": "arn:aws:organizations::111111111111:organization/o-exampleorgid"
},
{
"description": "invalid - Incorrect ARN pattern",
"input": "o-abcde12345",
"expected": false
},
{
"description": "invalid - Incorrect ARN pattern",
"input": "o-abcde12345",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationArn",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationId

{
"type": "string",
"pattern": "^o-[a-z0-9]{10,32}$",
"tests": [
{
"description": "valid string - o-abcde12345",
"input": "o-abcde12345"
},
{
"description": "valid string - o-12345abcdefgh",
"input": "o-12345abcdefgh"
},
{
"description": "valid - max length",
"input": "o-abc4567890abc4567890abc4567890ab"
},
{
"description": "invalid - does not start with o-",
"input": "abc123",
"expected": false
},
{
"description": "invalid - too short",
"input": "o-123456789",
"expected": false
},
{
"description": "invalid - too long",
"input": "o-abc4567890abc4567890abc4567890abc",
"expected": false
},
{
"description": "invalid - contains symbols",
"input": "o-abc123!",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationId",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationRoot

{
"type": "object",
"properties": {
"Arn": {
"$ref": "#/definitions/rootArn"
},
"Id": {
"$ref": "#/definitions/rootId"
},
"Name": {
"$ref": "#/definitions/rootName"
},
"PolicyTypes": {
"$ref": "#/definitions/availablePolicyTypes"
},
"Tags": {
"$ref": "aws#/definitions/tagList"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/rootArn"
}
},
"tags": {
"$ref": "aws#/definitions/tagsMap"
},
"title": {
"$ref": "#/definitions/rootId"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "valid - all properties given",
"input": {
"Arn": "arn:aws:organizations::123457891012:root/o-cjlaeocf2p/r-lnmn",
"Id": "r-12ab",
"Name": "RootFriendlyName",
"PolicyTypes": [
{
"status": "ENABLED",
"type": "SERVICE_CONTROL_POLICY"
},
{
"status": "PENDING_DISABLE",
"type": "SERVICE_CONTROL_POLICY"
}
],
"turbot": {
"akas": [
"arn:aws:organizations::123457891012:root/o-cjlaeocf2p/r-lnmn"
],
"title": "r-12ab",
"custom": {
"aws": {
"organizationId": "o-cjlaeocf2p"
}
}
}
}
},
{
"description": "invalid - no ARN",
"input": {
"Id": "r-12ab",
"Name": "RootFriendlyName",
"turbot": {
"title": "r-12ab",
"custom": {
"aws": {
"organizationId": "o-cjlaeocf2p"
}
}
}
},
"expected": false
},
{
"description": "invalid - no ID",
"input": {
"Arn": "arn:aws:organizations::123457891012:root/o-cjlaeocf2p/r-lnmn",
"Name": "RootFriendlyName",
"turbot": {
"title": null,
"custom": {
"aws": {
"organizationId": "o-cjlaeocf2p"
}
}
}
},
"expected": false
},
{
"description": "invalid - no name",
"input": {
"Arn": "arn:aws:organizations::123457891012:root/o-cjlaeocf2p/r-lnmn",
"Id": "r-12ab",
"turbot": {
"title": "r-12ab",
"custom": {
"aws": {
"organizationId": "o-cjlaeocf2p"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationRoot",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizations

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "Organizations"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/organizationsAka"
}
},
"title": {
"const": "Organizations"
},
"custom": {
"type": "object",
"properties": {
"aws": {
"$ref": "aws#/definitions/awsMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties",
"input": {
"name": "Organizations",
"turbot": {
"akas": [
"arn:aws:organizations::123456789012"
],
"title": "Organizations",
"custom": {
"aws": {
"accountId": 123456789012,
"partition": "aws"
}
}
}
}
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizations",
"modUri": "tmod:@turbot/aws-organizations"
}
}

organizationsAka

{
"type": "string",
"pattern": "^arn:aws(-us-gov|-cn)?:organizations::[0-9]{12}$",
"tests": [
{
"description": "Base",
"input": "arn:aws:organizations::123456789012"
},
{
"description": "Valid - gov partition",
"input": "arn:aws-us-gov:organizations::123456786354"
},
{
"description": "Valid - china partition",
"input": "arn:aws-cn:organizations::123456786354"
},
{
"description": "Invalid us gov partition",
"input": "arn:aws-cn-gov:organizations::123456786354",
"expected": false
},
{
"description": "Invalid china partition",
"input": "arn:aws-us-cn:organizations::123456786354",
"expected": false
},
{
"description": "Invalid service name",
"input": "arn:aws:amplifye::123456789012",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/organizationsAka",
"modUri": "tmod:@turbot/aws-organizations"
}
}

policyStatus

{
"type": "string",
"enum": [
"ENABLED",
"PENDING_ENABLE",
"PENDING_DISABLE"
],
"tests": [
{
"input": "ENABLED"
},
{
"description": "Valid Value - PENDING_ENABLE",
"input": "PENDING_ENABLE"
},
{
"description": "invald - Incorrect value",
"input": "TEST111",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/policyStatus",
"modUri": "tmod:@turbot/aws-organizations"
}
}

policyType

{
"type": "string",
"enum": [
"SERVICE_CONTROL_POLICY"
],
"tests": [
{
"description": "Valid input - SERVICE_CONTROL_POLICY",
"input": "SERVICE_CONTROL_POLICY"
},
{
"description": "invalid - Incorrect value",
"input": "testtest",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/policyType",
"modUri": "tmod:@turbot/aws-organizations"
}
}

policyTypeSummary

{
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/policyStatus"
},
"type": {
"$ref": "#/definitions/policyType"
}
},
"required": [
"status",
"type"
],
"tests": [
{
"description": "valid - Base case",
"input": {
"status": "PENDING_DISABLE",
"type": "SERVICE_CONTROL_POLICY"
}
},
{
"description": "invalid - missing status",
"input": {
"type": "SERVICE_CONTROL_POLICY"
},
"expected": false
},
{
"description": "invalid - missing type",
"input": {
"status": "PENDING_DISABLE"
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/policyTypeSummary",
"modUri": "tmod:@turbot/aws-organizations"
}
}

rootArn

{
"type": "string",
"pattern": "^arn:aws(-us-gov)?:organizations::[0-9]{12}:root\\/o-[a-z0-9]{10,32}\\/r-[0-9a-z]{4,32}",
"tests": [
{
"input": "arn:aws:organizations::123457891012:root/o-cjlaeocf2p/r-lnmn"
},
{
"description": "invalid - account id",
"input": "arn:aws:organizations::12345789101:root/o-cjlaeocf2p/r-lnmn",
"expected": false
},
{
"description": "invalid - organization id",
"input": "arn:aws:organizations::123457891012:root/cjlaeocf2p/r-lnmn",
"expected": false
},
{
"description": "invalid - root id",
"input": "arn:aws:organizations::123457891012:root/cjlaeocf2p/lnmn",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/rootArn",
"modUri": "tmod:@turbot/aws-organizations"
}
}

rootId

{
"type": "string",
"pattern": "^r-[0-9a-z]{4,32}$",
"tests": [
{
"description": "valid - min length",
"input": "r-3jd8"
},
{
"description": "valid - max length",
"input": "r-1234abcd1234abcd1234abcd1234abcd"
},
{
"description": "invalid - does not start with r-",
"input": "abc123",
"expected": false
},
{
"description": "invalid - too short",
"input": "r-123",
"expected": false
},
{
"description": "invalid - too long",
"input": "o-1234abcd1234abcd1234abcd1234abcd1",
"expected": false
},
{
"description": "invalid - contains symbols",
"input": "r-abcd!",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/rootId",
"modUri": "tmod:@turbot/aws-organizations"
}
}

rootName

{
"type": "string",
"minLength": 1,
"maxLength": 128,
"tests": [
{
"description": "valid min length",
"input": "a"
},
{
"description": "valid max length",
"input": "abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678"
},
{
"description": "invalid - too short",
"input": "",
"expected": false
},
{
"description": "invalid - too long",
"input": "abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678abcd!@#.12345678a",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/aws-organizations#/definitions/rootName",
"modUri": "tmod:@turbot/aws-organizations"
}
}