{
  "typeName" : "AWS::EC2::IPAM",
  "description" : "Resource Schema of AWS::EC2::IPAM Type",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ipam.git",
  "definitions" : {
    "IpamOperatingRegion" : {
      "description" : "The regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring",
      "type" : "object",
      "properties" : {
        "RegionName" : {
          "type" : "string",
          "description" : "The name of the region."
        }
      },
      "required" : [ "RegionName" ],
      "additionalProperties" : false
    },
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "IpamOrganizationalUnitExclusion" : {
      "description" : "If your IPAM is integrated with AWS Organizations and you add an organizational unit (OU) exclusion, IPAM will not manage the IP addresses in accounts in that OU exclusion.",
      "type" : "object",
      "properties" : {
        "OrganizationsEntityPath" : {
          "type" : "string",
          "description" : "An AWS Organizations entity path. Build the path for the OU(s) using AWS Organizations IDs separated by a '/'. Include all child OUs by ending the path with '/*'.",
          "minLength" : 1
        }
      },
      "required" : [ "OrganizationsEntityPath" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "IpamId" : {
      "description" : "Id of the IPAM.",
      "type" : "string"
    },
    "Arn" : {
      "description" : "The Amazon Resource Name (ARN) of the IPAM.",
      "type" : "string"
    },
    "DefaultResourceDiscoveryId" : {
      "description" : "The Id of the default resource discovery, created with this IPAM.",
      "type" : "string"
    },
    "DefaultResourceDiscoveryAssociationId" : {
      "description" : "The Id of the default association to the default resource discovery, created with this IPAM.",
      "type" : "string"
    },
    "ResourceDiscoveryAssociationCount" : {
      "description" : "The count of resource discoveries associated with this IPAM.",
      "type" : "integer"
    },
    "Description" : {
      "type" : "string"
    },
    "PublicDefaultScopeId" : {
      "description" : "The Id of the default scope for publicly routable IP space, created with this IPAM.",
      "type" : "string",
      "maxLength" : 255
    },
    "PrivateDefaultScopeId" : {
      "description" : "The Id of the default scope for publicly routable IP space, created with this IPAM.",
      "type" : "string"
    },
    "ScopeCount" : {
      "description" : "The number of scopes that currently exist in this IPAM.",
      "type" : "integer"
    },
    "OperatingRegions" : {
      "description" : "The regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/IpamOperatingRegion"
      }
    },
    "Tier" : {
      "description" : "The tier of the IPAM.",
      "type" : "string",
      "enum" : [ "free", "advanced" ]
    },
    "EnablePrivateGua" : {
      "description" : "Enable provisioning of GUA space in private pools.",
      "type" : "boolean"
    },
    "MeteredAccount" : {
      "description" : "A metered account is an account that is charged for active IP addresses managed in IPAM",
      "type" : "string",
      "enum" : [ "ipam-owner", "resource-owner" ]
    },
    "DefaultResourceDiscoveryOrganizationalUnitExclusions" : {
      "description" : "A set of organizational unit (OU) exclusions for the default resource discovery, created with this IPAM.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/IpamOrganizationalUnitExclusion"
      }
    },
    "Tags" : {
      "description" : "An array of key-value pairs to apply to this resource.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "additionalProperties" : false,
  "required" : [ ],
  "primaryIdentifier" : [ "/properties/IpamId" ],
  "readOnlyProperties" : [ "/properties/IpamId", "/properties/Arn", "/properties/PublicDefaultScopeId", "/properties/PrivateDefaultScopeId", "/properties/ScopeCount", "/properties/ResourceDiscoveryAssociationCount", "/properties/DefaultResourceDiscoveryId", "/properties/DefaultResourceDiscoveryAssociationId" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "ec2:CreateIpam", "iam:CreateServiceLinkedRole", "ec2:CreateTags", "ec2:DescribeIpams", "ec2:DescribeIpamResourceDiscoveries", "ec2:ModifyIpamResourceDiscovery" ]
    },
    "read" : {
      "permissions" : [ "ec2:DescribeIpams", "ec2:DescribeIpamResourceDiscoveries" ]
    },
    "update" : {
      "permissions" : [ "ec2:ModifyIpam", "ec2:CreateTags", "ec2:DeleteTags", "ec2:DescribeIpams", "ec2:DescribeIpamResourceDiscoveries", "ec2:ModifyIpamResourceDiscovery" ]
    },
    "delete" : {
      "permissions" : [ "ec2:DeleteIpam", "ec2:DeleteTags", "ec2:DescribeIpams" ]
    },
    "list" : {
      "permissions" : [ "ec2:DescribeIpams" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "ec2:DeleteTags", "ec2:CreateTags" ]
  }
}