{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-organizations-policy.json",
  "title": "AWSOrganizationsPolicyProperties",
  "description": "Policies in AWS Organizations enable you to manage different features of the AWS accounts in your organization.  You can use policies when all features are enabled in your organization.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-organizations>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-organizations-policy.json",
    "sourceSha256": "ffac644a508e554ffbd0c80659dcfb2adbd46da5027f19e7ecdb5dd18fe49fc5"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "[\\s\\S]*",
          "minLength": 1,
          "maxLength": 128
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the Policy"
    },
    "Type": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "SERVICE_CONTROL_POLICY",
            "AISERVICES_OPT_OUT_POLICY",
            "BACKUP_POLICY",
            "TAG_POLICY"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY"
    },
    "Content": {
      "description": "The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it.",
      "type": [
        "object",
        "string"
      ],
      "pattern": "[\\s\\S]*",
      "minLength": 1,
      "maxLength": 1000000
    },
    "Description": {
      "oneOf": [
        {
          "pattern": "[\\s\\S]*",
          "type": "string",
          "maxLength": 512
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Human readable description of the policy"
    },
    "TargetIds": {
      "description": "List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to",
      "type": "array",
      "insertionOrder": false,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^(r-[0-9a-z]{4,32})|(\\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$"
      }
    },
    "Tags": {
      "description": "A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::Organizations::Policy",
  "$defs": {
    "Tag": {
      "description": "A custom key-value pair associated with a resource within your organization.",
      "type": "object",
      "title": "AWSOrganizationsPolicyTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "[\\s\\S]*",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key identifier, or name, of the tag."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "[\\s\\S]*",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null."
        }
      },
      "required": [
        "Value",
        "Key"
      ],
      "additionalProperties": false
    }
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-organizations",
  "createOnlyProperties": [
    "/properties/Type"
  ],
  "additionalProperties": false,
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": false,
    "tagProperty": "/properties/Tags"
  },
  "required": [
    "Name",
    "Type",
    "Content"
  ],
  "primaryIdentifier": [
    "/properties/Id"
  ],
  "readOnlyProperties": [
    "/properties/Id",
    "/properties/Arn",
    "/properties/AwsManaged"
  ]
}
