{
  "typeName" : "AWS::QuickSight::Dashboard",
  "description" : "Definition of the AWS::QuickSight::Dashboard Resource Type.",
  "definitions" : {
    "AdHocFilteringOption" : {
      "type" : "object",
      "description" : "<p>Ad hoc (one-time) filtering option.</p>",
      "properties" : {
        "AvailabilityStatus" : {
          "$ref" : "#/definitions/DashboardBehavior"
        }
      },
      "additionalProperties" : false
    },
    "DashboardBehavior" : {
      "type" : "string",
      "enum" : [ "ENABLED", "DISABLED" ]
    },
    "DashboardError" : {
      "type" : "object",
      "description" : "<p>Dashboard error.</p>",
      "properties" : {
        "Type" : {
          "$ref" : "#/definitions/DashboardErrorType"
        },
        "Message" : {
          "type" : "string",
          "pattern" : ".*\\S.*",
          "description" : "<p>Message.</p>"
        }
      },
      "additionalProperties" : false
    },
    "DashboardErrorType" : {
      "type" : "string",
      "enum" : [ "ACCESS_DENIED", "SOURCE_NOT_FOUND", "DATA_SET_NOT_FOUND", "INTERNAL_FAILURE", "PARAMETER_VALUE_INCOMPATIBLE", "PARAMETER_TYPE_INVALID", "PARAMETER_NOT_FOUND", "COLUMN_TYPE_MISMATCH", "COLUMN_GEOGRAPHIC_ROLE_MISMATCH", "COLUMN_REPLACEMENT_MISSING" ]
    },
    "DashboardPublishOptions" : {
      "type" : "object",
      "description" : "<p>Dashboard publish options.</p>",
      "properties" : {
        "SheetControlsOption" : {
          "$ref" : "#/definitions/SheetControlsOption"
        },
        "ExportToCSVOption" : {
          "$ref" : "#/definitions/ExportToCSVOption"
        },
        "AdHocFilteringOption" : {
          "$ref" : "#/definitions/AdHocFilteringOption"
        }
      },
      "additionalProperties" : false
    },
    "DashboardSourceEntity" : {
      "type" : "object",
      "description" : "<p>Dashboard source entity.</p>",
      "properties" : {
        "SourceTemplate" : {
          "$ref" : "#/definitions/DashboardSourceTemplate"
        }
      },
      "additionalProperties" : false
    },
    "DashboardSourceTemplate" : {
      "type" : "object",
      "description" : "<p>Dashboard source template.</p>",
      "properties" : {
        "DataSetReferences" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/DataSetReference"
          },
          "minItems" : 1,
          "description" : "<p>Dataset references.</p>"
        },
        "Arn" : {
          "type" : "string",
          "description" : "<p>The Amazon Resource Name (ARN) of the resource.</p>"
        }
      },
      "required" : [ "Arn", "DataSetReferences" ],
      "additionalProperties" : false
    },
    "DashboardUIState" : {
      "type" : "string",
      "enum" : [ "EXPANDED", "COLLAPSED" ]
    },
    "DashboardVersion" : {
      "type" : "object",
      "description" : "<p>Dashboard version.</p>",
      "properties" : {
        "Status" : {
          "$ref" : "#/definitions/ResourceStatus"
        },
        "Errors" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/DashboardError"
          },
          "minItems" : 1,
          "description" : "<p>Errors associated with this dashboard version.</p>"
        },
        "CreatedTime" : {
          "type" : "string",
          "description" : "<p>The time that this dashboard version was created.</p>",
          "format" : "string"
        },
        "Description" : {
          "type" : "string",
          "maxLength" : 512,
          "minLength" : 1,
          "description" : "<p>Description.</p>"
        },
        "DataSetArns" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          },
          "maxItems" : 100,
          "minItems" : 0,
          "description" : "<p>The Amazon Resource Numbers (ARNs) for the datasets that are associated with this\n            version of the dashboard.</p>"
        },
        "ThemeArn" : {
          "type" : "string",
          "description" : "<p>The ARN of the theme associated with a version of the dashboard.</p>"
        },
        "Arn" : {
          "type" : "string",
          "description" : "<p>The Amazon Resource Name (ARN) of the resource.</p>"
        },
        "SourceEntityArn" : {
          "type" : "string",
          "description" : "<p>Source entity ARN.</p>"
        },
        "VersionNumber" : {
          "type" : "number",
          "minimum" : 1,
          "description" : "<p>Version number for this version of the dashboard.</p>"
        },
        "Sheets" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Sheet"
          },
          "maxItems" : 20,
          "minItems" : 0,
          "description" : "<p>A list of the associated sheets with the unique identifier and name of each sheet.</p>"
        }
      },
      "additionalProperties" : false
    },
    "DataSetReference" : {
      "type" : "object",
      "description" : "<p>Dataset reference.</p>",
      "properties" : {
        "DataSetArn" : {
          "type" : "string",
          "description" : "<p>Dataset Amazon Resource Name (ARN).</p>"
        },
        "DataSetPlaceholder" : {
          "type" : "string",
          "pattern" : ".*\\S.*",
          "description" : "<p>Dataset placeholder.</p>"
        }
      },
      "required" : [ "DataSetArn", "DataSetPlaceholder" ],
      "additionalProperties" : false
    },
    "DateTimeParameter" : {
      "type" : "object",
      "description" : "<p>A date-time parameter.</p>",
      "properties" : {
        "Values" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          },
          "description" : "<p>The values for the date-time parameter.</p>"
        },
        "Name" : {
          "type" : "string",
          "pattern" : ".*\\S.*",
          "description" : "<p>A display name for the date-time parameter.</p>"
        }
      },
      "required" : [ "Name", "Values" ],
      "additionalProperties" : false
    },
    "DecimalParameter" : {
      "type" : "object",
      "description" : "<p>A decimal parameter.</p>",
      "properties" : {
        "Values" : {
          "type" : "array",
          "items" : {
            "type" : "number"
          },
          "description" : "<p>The values for the decimal parameter.</p>"
        },
        "Name" : {
          "type" : "string",
          "pattern" : ".*\\S.*",
          "description" : "<p>A display name for the decimal parameter.</p>"
        }
      },
      "required" : [ "Name", "Values" ],
      "additionalProperties" : false
    },
    "ExportToCSVOption" : {
      "type" : "object",
      "description" : "<p>Export to .csv option.</p>",
      "properties" : {
        "AvailabilityStatus" : {
          "$ref" : "#/definitions/DashboardBehavior"
        }
      },
      "additionalProperties" : false
    },
    "IntegerParameter" : {
      "type" : "object",
      "description" : "<p>An integer parameter.</p>",
      "properties" : {
        "Values" : {
          "type" : "array",
          "items" : {
            "type" : "number"
          },
          "description" : "<p>The values for the integer parameter.</p>"
        },
        "Name" : {
          "type" : "string",
          "pattern" : ".*\\S.*",
          "description" : "<p>The name of the integer parameter.</p>"
        }
      },
      "required" : [ "Name", "Values" ],
      "additionalProperties" : false
    },
    "Parameters" : {
      "type" : "object",
      "description" : "<p>A list of QuickSight parameters and the list's override values.</p>",
      "properties" : {
        "StringParameters" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/StringParameter"
          },
          "maxItems" : 100,
          "minItems" : 0,
          "description" : "<p>String parameters.</p>"
        },
        "DecimalParameters" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/DecimalParameter"
          },
          "maxItems" : 100,
          "minItems" : 0,
          "description" : "<p>Decimal parameters.</p>"
        },
        "IntegerParameters" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/IntegerParameter"
          },
          "maxItems" : 100,
          "minItems" : 0,
          "description" : "<p>Integer parameters.</p>"
        },
        "DateTimeParameters" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/DateTimeParameter"
          },
          "maxItems" : 100,
          "minItems" : 0,
          "description" : "<p>Date-time parameters.</p>"
        }
      },
      "additionalProperties" : false
    },
    "ResourcePermission" : {
      "type" : "object",
      "description" : "<p>Permission for the resource.</p>",
      "properties" : {
        "Actions" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          },
          "maxItems" : 16,
          "minItems" : 1,
          "description" : "<p>The IAM action to grant or revoke permissions on.</p>"
        },
        "Principal" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 1,
          "description" : "<p>The Amazon Resource Name (ARN) of the principal. This can be one of the\n            following:</p>\n        <ul>\n            <li>\n                <p>The ARN of an Amazon QuickSight user or group associated with a data source or dataset. (This is common.)</p>\n            </li>\n            <li>\n                <p>The ARN of an Amazon QuickSight user, group, or namespace associated with an analysis, dashboard, template, or theme. (This is common.)</p>\n            </li>\n            <li>\n                <p>The ARN of an AWS account root: This is an IAM ARN rather than a QuickSight\n                    ARN. Use this option only to share resources (templates) across AWS accounts.\n                    (This is less common.) </p>\n            </li>\n         </ul>"
        }
      },
      "required" : [ "Actions", "Principal" ],
      "additionalProperties" : false
    },
    "ResourceStatus" : {
      "type" : "string",
      "enum" : [ "CREATION_IN_PROGRESS", "CREATION_SUCCESSFUL", "CREATION_FAILED", "UPDATE_IN_PROGRESS", "UPDATE_SUCCESSFUL", "UPDATE_FAILED", "DELETED" ]
    },
    "Sheet" : {
      "type" : "object",
      "description" : "<p>A <i>sheet</i>, which is an object that contains a set of visuals that\n            are viewed together on one page in the Amazon QuickSight console. Every analysis and dashboard\n            contains at least one sheet. Each sheet contains at least one visualization widget, for\n            example a chart, pivot table, or narrative insight. Sheets can be associated with other\n            components, such as controls, filters, and so on.</p>",
      "properties" : {
        "SheetId" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 1,
          "pattern" : "[\\w\\-]+",
          "description" : "<p>The unique identifier associated with a sheet.</p>"
        },
        "Name" : {
          "type" : "string",
          "pattern" : ".*\\S.*",
          "description" : "<p>The name of a sheet. This name is displayed on the sheet's tab in the QuickSight\n            console.</p>"
        }
      },
      "additionalProperties" : false
    },
    "SheetControlsOption" : {
      "type" : "object",
      "description" : "<p>Sheet controls option.</p>",
      "properties" : {
        "VisibilityState" : {
          "$ref" : "#/definitions/DashboardUIState"
        }
      },
      "additionalProperties" : false
    },
    "StringParameter" : {
      "type" : "object",
      "description" : "<p>A string parameter.</p>",
      "properties" : {
        "Values" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          },
          "description" : "<p>The values of a string parameter.</p>"
        },
        "Name" : {
          "type" : "string",
          "pattern" : ".*\\S.*",
          "description" : "<p>A display name for a string parameter.</p>"
        }
      },
      "required" : [ "Name", "Values" ],
      "additionalProperties" : false
    },
    "Tag" : {
      "type" : "object",
      "description" : "<p>The key or keys of the key-value pairs for the resource tag or tags assigned to the\n            resource.</p>",
      "properties" : {
        "Value" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 1,
          "description" : "<p>Tag value.</p>"
        },
        "Key" : {
          "type" : "string",
          "maxLength" : 128,
          "minLength" : 1,
          "description" : "<p>Tag key.</p>"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Arn" : {
      "type" : "string",
      "description" : "<p>The Amazon Resource Name (ARN) of the resource.</p>"
    },
    "AwsAccountId" : {
      "type" : "string",
      "maxLength" : 12,
      "minLength" : 12,
      "pattern" : "^[0-9]{12}$"
    },
    "CreatedTime" : {
      "type" : "string",
      "description" : "<p>The time that this dataset was created.</p>",
      "format" : "date-time"
    },
    "DashboardId" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 1,
      "pattern" : "[\\w\\-]+"
    },
    "DashboardPublishOptions" : {
      "$ref" : "#/definitions/DashboardPublishOptions"
    },
    "LastPublishedTime" : {
      "type" : "string",
      "description" : "<p>The last time that this dataset was published.</p>",
      "format" : "string"
    },
    "LastUpdatedTime" : {
      "type" : "string",
      "description" : "<p>The last time that this dataset was updated.</p>",
      "format" : "string"
    },
    "Name" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 1,
      "pattern" : "[\\u0020-\\u00FF]+",
      "description" : "<p>The display name of the dashboard.</p>"
    },
    "Parameters" : {
      "$ref" : "#/definitions/Parameters"
    },
    "Permissions" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/ResourcePermission"
      },
      "maxItems" : 64,
      "minItems" : 1,
      "description" : "<p>A structure that contains the permissions of the dashboard. You can use this structure\n            for granting permissions by providing a list of IAM action information for each\n            principal ARN. </p>\n\n        <p>To specify no permissions, omit the permissions list.</p>"
    },
    "SourceEntity" : {
      "$ref" : "#/definitions/DashboardSourceEntity"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 200,
      "minItems" : 1,
      "description" : "<p>Contains a map of the key-value pairs for the resource tag or tags assigned to the\n            dashboard.</p>"
    },
    "ThemeArn" : {
      "type" : "string",
      "description" : "<p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If\n            you add a value for this field, it overrides the value that is used in the source\n            entity. The theme ARN must exist in the same AWS account where you create the\n            dashboard.</p>"
    },
    "Version" : {
      "$ref" : "#/definitions/DashboardVersion"
    },
    "VersionDescription" : {
      "type" : "string",
      "maxLength" : 512,
      "minLength" : 1,
      "description" : "<p>A description for the first version of the dashboard being created.</p>"
    }
  },
  "required" : [ "AwsAccountId", "DashboardId", "SourceEntity" ],
  "additionalProperties" : false,
  "readOnlyProperties" : [ "/properties/DashboardError", "/properties/Arn", "/properties/CreatedTime", "/properties/LastPublishedTime", "/properties/LastUpdatedTime", "/properties/Version" ],
  "writeOnlyProperties" : [ "/properties/DashboardPublishOptions", "/properties/Parameters", "/properties/SourceEntity", "/properties/ThemeArn", "/properties/VersionDescription", "/properties/Version", "/properties/CreatedTime", "/properties/LastUpdatedTime" ],
  "createOnlyProperties" : [ "/properties/AwsAccountId", "/properties/DashboardId" ],
  "primaryIdentifier" : [ "/properties/AwsAccountId", "/properties/DashboardId" ],
  "handlers" : {
    "read" : {
      "permissions" : [ "quicksight:DescribeDashboard" ]
    },
    "create" : {
      "permissions" : [ "quicksight:DescribeDashboard", "quicksight:DescribeDashboardPermissions", "quicksight:CreateDashboard", "quicksight:DescribeTemplate", "quicksight:DescribeTheme", "quicksight:PassDataSet", "quicksight:ListTagsForResource" ]
    },
    "list" : {
      "permissions" : [ "quicksight:ListDashboards" ]
    },
    "update" : {
      "permissions" : [ "quicksight:DescribeDashboard", "quicksight:DescribeDashboardPermissions", "quicksight:UpdateDashboard", "quicksight:UpdateDashboardPermissions", "quicksight:UpdateDashboardPublishedVersion", "quicksight:DescribeTheme", "quicksight:TagResource", "quicksight:UntagResource", "quicksight:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "quicksight:DescribeDashboard", "quicksight:DeleteDashboard" ]
    }
  }
}