{
  "typeName" : "AWS::AppStream::AppBlock",
  "description" : "Resource Type definition for AWS::AppStream::AppBlock",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-appstream.git",
  "definitions" : {
    "S3Location" : {
      "type" : "object",
      "properties" : {
        "S3Bucket" : {
          "type" : "string"
        },
        "S3Key" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false,
      "required" : [ "S3Bucket" ]
    },
    "ScriptDetails" : {
      "type" : "object",
      "properties" : {
        "ScriptS3Location" : {
          "$ref" : "#/definitions/S3Location"
        },
        "ExecutablePath" : {
          "type" : "string"
        },
        "ExecutableParameters" : {
          "type" : "string"
        },
        "TimeoutInSeconds" : {
          "type" : "integer"
        }
      },
      "additionalProperties" : false,
      "required" : [ "ScriptS3Location", "ExecutablePath", "TimeoutInSeconds" ]
    },
    "Arn" : {
      "type" : "string"
    },
    "Tag" : {
      "oneOf" : [ {
        "type" : "object",
        "properties" : {
          "Key" : {
            "type" : "string"
          },
          "Value" : {
            "type" : "string"
          }
        },
        "required" : [ "Key", "Value" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "properties" : {
          "TagKey" : {
            "type" : "string"
          },
          "TagValue" : {
            "type" : "string"
          }
        },
        "required" : [ "TagKey", "TagValue" ],
        "additionalProperties" : false
      } ]
    },
    "PackagingType" : {
      "type" : "string"
    }
  },
  "properties" : {
    "Name" : {
      "type" : "string"
    },
    "Arn" : {
      "$ref" : "#/definitions/Arn"
    },
    "Description" : {
      "type" : "string"
    },
    "DisplayName" : {
      "type" : "string"
    },
    "SourceS3Location" : {
      "$ref" : "#/definitions/S3Location"
    },
    "SetupScriptDetails" : {
      "$ref" : "#/definitions/ScriptDetails"
    },
    "Tags" : {
      "type" : "array",
      "insertionOrder" : false,
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "CreatedTime" : {
      "type" : "string"
    },
    "PackagingType" : {
      "$ref" : "#/definitions/PackagingType"
    },
    "PostSetupScriptDetails" : {
      "$ref" : "#/definitions/ScriptDetails"
    }
  },
  "required" : [ "Name", "SourceS3Location" ],
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "appstream:TagResource", "appstream:ListTagsForResource", "appstream:UntagResource" ]
  },
  "primaryIdentifier" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Name", "/properties/DisplayName", "/properties/Description", "/properties/SourceS3Location", "/properties/SetupScriptDetails", "/properties/PackagingType", "/properties/PostSetupScriptDetails" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/CreatedTime" ],
  "deprecatedProperties" : [ "/properties/Tags/TagKey", "/properties/Tags/TagValue" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "appstream:CreateAppBlock", "appstream:TagResource", "s3:GetObject", "s3:ListBucket", "s3:GetBucketOwnershipControls" ]
    },
    "read" : {
      "permissions" : [ "appstream:DescribeAppBlocks", "appstream:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "appstream:DeleteAppBlock", "appstream:DescribeAppBlocks" ]
    },
    "update" : {
      "permissions" : [ "appstream:DescribeAppBlocks", "appstream:TagResource", "appstream:UntagResource" ]
    }
  }
}