{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-organizations/json-schema/amazon-organizations-create-policy-request-schema.json",
  "title": "CreatePolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-organizations-policy-api-openapi.yml#/components/schemas/CreatePolicyRequest",
  "type": "object",
  "properties": {
    "Content": {
      "type": "string",
      "description": "The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy type you specify in the Type parameter. The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide."
    },
    "Description": {
      "type": "string",
      "description": "An optional description to assign to the policy."
    },
    "Name": {
      "type": "string",
      "description": "The friendly name to assign to the policy. The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range."
    },
    "Type": {
      "type": "string",
      "enum": [
        "SERVICE_CONTROL_POLICY",
        "RESOURCE_CONTROL_POLICY",
        "TAG_POLICY",
        "BACKUP_POLICY",
        "AISERVICES_OPT_OUT_POLICY",
        "CHATBOT_POLICY",
        "DECLARATIVE_POLICY_EC2",
        "SECURITYHUB_POLICY",
        "INSPECTOR_POLICY",
        "UPGRADE_ROLLOUT_POLICY",
        "BEDROCK_POLICY",
        "S3_POLICY",
        "NETWORK_SECURITY_DIRECTOR_POLICY",
        "GUARDDUTY_POLICY"
      ],
      "description": "The type of policy to create. You can specify one of the following values: SERVICE_CONTROL_POLICY RESOURCE_CONTROL_POLICY DECLARATIVE_POLICY_EC2 BACKUP_POLICY TAG_POLICY CHATBOT_POLICY AISERVICES_OPT_OUT_POLICY SECURITYHUB_POLICY UPGRADE_ROLLOUT_POLICY INSPECTOR_POLICY BEDROCK_POLICY S3_POLICY NETWORK_SECURITY_DIRECTOR_POLICY GUARDDUTY_POLICY"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "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. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide. If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created."
    }
  },
  "required": [
    "Content",
    "Description",
    "Name",
    "Type"
  ],
  "$defs": {
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key identifier, or name, of the tag."
        },
        "Value": {
          "type": "string",
          "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": [
        "Key",
        "Value"
      ]
    }
  }
}