{
  "typeName" : "AWS::AppStream::ImageBuilder",
  "description" : "Resource Type definition for AWS::AppStream::ImageBuilder",
  "additionalProperties" : false,
  "properties" : {
    "Description" : {
      "type" : "string"
    },
    "VpcConfig" : {
      "$ref" : "#/definitions/VpcConfig"
    },
    "EnableDefaultInternetAccess" : {
      "type" : "boolean"
    },
    "DomainJoinInfo" : {
      "$ref" : "#/definitions/DomainJoinInfo"
    },
    "AppstreamAgentVersion" : {
      "type" : "string"
    },
    "Name" : {
      "type" : "string"
    },
    "ImageName" : {
      "type" : "string"
    },
    "DisplayName" : {
      "type" : "string"
    },
    "IamRoleArn" : {
      "type" : "string"
    },
    "InstanceType" : {
      "type" : "string"
    },
    "Tags" : {
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "StreamingUrl" : {
      "type" : "string"
    },
    "ImageArn" : {
      "type" : "string"
    },
    "AccessEndpoints" : {
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/AccessEndpoint"
      }
    },
    "SoftwaresToInstall" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "SoftwaresToUninstall" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "RootVolumeConfig" : {
      "$ref" : "#/definitions/VolumeConfig"
    }
  },
  "definitions" : {
    "VpcConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SecurityGroupIds" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        },
        "SubnetIds" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        }
      }
    },
    "DomainJoinInfo" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "OrganizationalUnitDistinguishedName" : {
          "type" : "string"
        },
        "DirectoryName" : {
          "type" : "string"
        }
      }
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Value" : {
          "type" : "string"
        },
        "Key" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    },
    "AccessEndpoint" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "EndpointType" : {
          "type" : "string"
        },
        "VpceId" : {
          "type" : "string"
        }
      },
      "required" : [ "EndpointType", "VpceId" ]
    },
    "VolumeConfig" : {
      "type" : "object",
      "properties" : {
        "VolumeSizeInGb" : {
          "type" : "integer"
        }
      },
      "additionalProperties" : false
    }
  },
  "required" : [ "InstanceType", "Name" ],
  "primaryIdentifier" : [ "/properties/Name" ],
  "readOnlyProperties" : [ "/properties/StreamingUrl" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "writeOnlyProperties" : [ "/properties/SoftwaresToInstall", "/properties/SoftwaresToUninstall", "/properties/ImageName" ],
  "oneOf" : [ {
    "required" : [ "ImageName" ]
  }, {
    "required" : [ "ImageArn" ]
  } ],
  "tagging" : {
    "taggable" : false,
    "tagOnCreate" : true,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "appstream:ListTagsForResource", "appstream:TagResource", "appstream:UntagResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "appstream:CreateImageBuilder", "appstream:CreateImageBuilderStreamingURL", "appstream:CreateStreamingURL", "appstream:DeleteImageBuilder", "appstream:DescribeImageBuilders", "appstream:StartImageBuilder", "appstream:StopImageBuilder", "appstream:TagResource", "iam:CreateServiceLinkedRole", "iam:DeleteServiceLinkedRole", "iam:GetServiceLinkedRoleDeletionStatus", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "appstream:CreateImageBuilderStreamingURL", "appstream:DescribeImageBuilders", "appstream:ListTagsForResource", "iam:CreateServiceLinkedRole", "iam:DeleteServiceLinkedRole", "iam:GetServiceLinkedRoleDeletionStatus" ]
    },
    "delete" : {
      "permissions" : [ "appstream:DeleteImageBuilder", "appstream:DescribeImageBuilders", "appstream:ListTagsForResource", "appstream:StartImageBuilder", "appstream:StopImageBuilder", "iam:CreateServiceLinkedRole", "iam:DeleteServiceLinkedRole", "iam:GetServiceLinkedRoleDeletionStatus" ]
    },
    "list" : {
      "permissions" : [ "appstream:DescribeImageBuilders", "appstream:ListTagsForResource", "iam:CreateServiceLinkedRole", "iam:DeleteServiceLinkedRole", "iam:GetServiceLinkedRoleDeletionStatus" ]
    }
  }
}