{
  "typeName" : "AWS::Panorama::ApplicationInstance",
  "description" : "Schema for ApplicationInstance CloudFormation Resource",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "Name" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^[a-zA-Z0-9\\-\\_]+$"
    },
    "Description" : {
      "type" : "string",
      "minLength" : 0,
      "maxLength" : 255,
      "pattern" : "^.*$"
    },
    "ManifestPayloadData" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 51200,
      "pattern" : "^.+$"
    },
    "ManifestPayload" : {
      "type" : "object",
      "properties" : {
        "PayloadData" : {
          "$ref" : "#/definitions/ManifestPayloadData"
        }
      },
      "additionalProperties" : false
    },
    "ManifestOverridesPayloadData" : {
      "type" : "string",
      "minLength" : 0,
      "maxLength" : 51200,
      "pattern" : "^.+$"
    },
    "ManifestOverridesPayload" : {
      "type" : "object",
      "properties" : {
        "PayloadData" : {
          "$ref" : "#/definitions/ManifestOverridesPayloadData"
        }
      },
      "additionalProperties" : false
    },
    "RuntimeRoleArn" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^arn:[a-z0-9][-.a-z0-9]{0,62}:iam::[0-9]{12}:role/.+$"
    },
    "DefaultRuntimeContextDevice" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^[a-zA-Z0-9\\-\\_]+$"
    },
    "DeviceName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^[a-zA-Z0-9\\-\\_]+$"
    },
    "ApplicationInstanceId" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^[a-zA-Z0-9\\-\\_]+$"
    },
    "ApplicationInstanceArn" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255
    },
    "ApplicationInstanceStatusDescription" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255
    },
    "Timestamp" : {
      "type" : "integer"
    },
    "DeviceId" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^[a-zA-Z0-9\\-\\_]+$"
    },
    "ApplicationInstanceStatus" : {
      "type" : "string",
      "enum" : [ "DEPLOYMENT_PENDING", "DEPLOYMENT_REQUESTED", "DEPLOYMENT_IN_PROGRESS", "DEPLOYMENT_ERROR", "DEPLOYMENT_SUCCEEDED", "REMOVAL_PENDING", "REMOVAL_REQUESTED", "REMOVAL_IN_PROGRESS", "REMOVAL_FAILED", "REMOVAL_SUCCEEDED" ]
    },
    "ApplicationInstanceHealthStatus" : {
      "type" : "string",
      "enum" : [ "RUNNING", "ERROR", "NOT_AVAILABLE" ]
    },
    "StatusFilter" : {
      "type" : "string",
      "enum" : [ "DEPLOYMENT_SUCCEEDED", "DEPLOYMENT_ERROR", "REMOVAL_SUCCEEDED", "REMOVAL_FAILED", "PROCESSING_DEPLOYMENT", "PROCESSING_REMOVAL" ]
    },
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "description" : "A string used to identify this tag",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128,
          "pattern" : "^.+$"
        },
        "Value" : {
          "description" : "A string containing the value for the tag",
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256,
          "pattern" : "^.+$"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "TagList" : {
      "description" : "List of tags",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "properties" : {
    "Name" : {
      "$ref" : "#/definitions/Name"
    },
    "Description" : {
      "$ref" : "#/definitions/Description"
    },
    "ManifestPayload" : {
      "$ref" : "#/definitions/ManifestPayload"
    },
    "ManifestOverridesPayload" : {
      "$ref" : "#/definitions/ManifestOverridesPayload"
    },
    "RuntimeRoleArn" : {
      "$ref" : "#/definitions/RuntimeRoleArn"
    },
    "DefaultRuntimeContextDevice" : {
      "$ref" : "#/definitions/DefaultRuntimeContextDevice"
    },
    "DefaultRuntimeContextDeviceName" : {
      "$ref" : "#/definitions/DeviceName"
    },
    "ApplicationInstanceId" : {
      "$ref" : "#/definitions/ApplicationInstanceId"
    },
    "ApplicationInstanceIdToReplace" : {
      "$ref" : "#/definitions/ApplicationInstanceId"
    },
    "DeviceId" : {
      "$ref" : "#/definitions/DeviceId"
    },
    "StatusFilter" : {
      "$ref" : "#/definitions/StatusFilter"
    },
    "Status" : {
      "$ref" : "#/definitions/ApplicationInstanceStatus"
    },
    "HealthStatus" : {
      "$ref" : "#/definitions/ApplicationInstanceHealthStatus"
    },
    "StatusDescription" : {
      "$ref" : "#/definitions/ApplicationInstanceStatusDescription"
    },
    "CreatedTime" : {
      "$ref" : "#/definitions/Timestamp"
    },
    "LastUpdatedTime" : {
      "$ref" : "#/definitions/Timestamp"
    },
    "Arn" : {
      "$ref" : "#/definitions/ApplicationInstanceArn"
    },
    "Tags" : {
      "$ref" : "#/definitions/TagList"
    }
  },
  "additionalProperties" : false,
  "taggable" : true,
  "required" : [ "ManifestPayload", "DefaultRuntimeContextDevice" ],
  "readOnlyProperties" : [ "/properties/ApplicationInstanceId", "/properties/Arn", "/properties/Status", "/properties/HealthStatus", "/properties/StatusDescription", "/properties/DefaultRuntimeContextDeviceName", "/properties/CreatedTime", "/properties/LastUpdatedTime" ],
  "createOnlyProperties" : [ "/properties/Name", "/properties/Description", "/properties/ManifestPayload", "/properties/ManifestOverridesPayload", "/properties/RuntimeRoleArn", "/properties/DefaultRuntimeContextDevice", "/properties/ApplicationInstanceIdToReplace" ],
  "primaryIdentifier" : [ "/properties/ApplicationInstanceId" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "panorama:CreateApplicationInstance", "panorama:ListTagsForResource", "panorama:TagResource" ]
    },
    "read" : {
      "permissions" : [ "panorama:DescribeApplicationInstance", "panorama:DescribeApplicationInstanceDetails", "panorama:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "panorama:ListTagsForResource", "panorama:TagResource", "panorama:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "panorama:RemoveApplicationInstance" ]
    },
    "list" : {
      "permissions" : [ "panorama:ListApplicationInstances" ]
    }
  }
}