{
  "typeName" : "AWS::IoTCoreDeviceAdvisor::SuiteDefinition",
  "description" : "An example resource schema demonstrating some basic constructs and validation rules.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-device-advisor.git",
  "definitions" : {
    "DeviceUnderTest" : {
      "type" : "object",
      "properties" : {
        "CertificateArn" : {
          "type" : "string",
          "minLength" : 20,
          "maxLength" : 2048
        },
        "ThingArn" : {
          "type" : "string",
          "minLength" : 20,
          "maxLength" : 2048
        }
      },
      "additionalProperties" : false
    },
    "SuiteDefinitionName" : {
      "type" : "string",
      "description" : "The Name of the suite definition.",
      "minLength" : 1,
      "maxLength" : 256
    },
    "RootGroup" : {
      "type" : "string",
      "description" : "The root group of the test suite.",
      "minLength" : 1,
      "maxLength" : 2048
    },
    "Devices" : {
      "type" : "array",
      "description" : "The devices being tested in the test suite",
      "minItems" : 0,
      "maxItems" : 2,
      "items" : {
        "$ref" : "#/definitions/DeviceUnderTest"
      }
    },
    "DevicePermissionRoleArn" : {
      "type" : "string",
      "description" : "The device permission role arn of the test suite.",
      "minLength" : 20,
      "maxLength" : 2048
    },
    "IntendedForQualification" : {
      "description" : "Whether the tests are intended for qualification in a suite.",
      "type" : "boolean"
    },
    "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
    }
  },
  "properties" : {
    "SuiteDefinitionConfiguration" : {
      "type" : "object",
      "properties" : {
        "DevicePermissionRoleArn" : {
          "$ref" : "#/definitions/DevicePermissionRoleArn"
        },
        "Devices" : {
          "$ref" : "#/definitions/Devices"
        },
        "IntendedForQualification" : {
          "$ref" : "#/definitions/IntendedForQualification"
        },
        "RootGroup" : {
          "$ref" : "#/definitions/RootGroup"
        },
        "SuiteDefinitionName" : {
          "$ref" : "#/definitions/SuiteDefinitionName"
        }
      },
      "required" : [ "DevicePermissionRoleArn", "RootGroup" ],
      "additionalProperties" : false
    },
    "SuiteDefinitionId" : {
      "type" : "string",
      "maxLength" : 36,
      "minLength" : 12,
      "description" : "The unique identifier for the suite definition."
    },
    "SuiteDefinitionArn" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 20,
      "description" : "The Amazon Resource name for the suite definition."
    },
    "SuiteDefinitionVersion" : {
      "type" : "string",
      "maxLength" : 255,
      "minLength" : 2,
      "description" : "The suite definition version of a test suite."
    },
    "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,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "iotdeviceadvisor:TagResource", "iotdeviceadvisor:UntagResource", "iot:ListTagsForResource" ]
  },
  "required" : [ "SuiteDefinitionConfiguration" ],
  "readOnlyProperties" : [ "/properties/SuiteDefinitionId", "/properties/SuiteDefinitionArn", "/properties/SuiteDefinitionVersion" ],
  "primaryIdentifier" : [ "/properties/SuiteDefinitionId" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "iot:DescribeCertificate", "iot:DescribeThing", "iot:GetPolicy", "iot:ListAttachedPolicies", "iot:ListCertificates", "iot:ListPrincipalPolicies", "iot:ListThingPrincipals", "iot:ListThings", "iotdeviceadvisor:CreateSuiteDefinition", "iotdeviceadvisor:TagResource", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "iotdeviceadvisor:GetSuiteDefinition", "iot:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "iot:DescribeCertificate", "iot:DescribeThing", "iot:GetPolicy", "iot:ListAttachedPolicies", "iot:ListCertificates", "iot:ListPrincipalPolicies", "iot:ListThingPrincipals", "iot:ListThings", "iotdeviceadvisor:UpdateSuiteDefinition", "iotdeviceadvisor:GetSuiteDefinition", "iotdeviceadvisor:UntagResource", "iotdeviceadvisor:TagResource", "iam:PassRole" ]
    },
    "delete" : {
      "permissions" : [ "iotdeviceadvisor:GetSuiteDefinition", "iotdeviceadvisor:DeleteSuiteDefinition" ]
    },
    "list" : {
      "permissions" : [ "iotdeviceadvisor:ListSuiteDefinitions" ]
    }
  }
}