{
  "typeName" : "AWS::IoTSiteWise::Asset",
  "description" : "Resource schema for AWS::IoTSiteWise::Asset",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-IoTSiteWise.git",
  "definitions" : {
    "AssetProperty" : {
      "description" : "The asset property's definition, alias, unit, and notification state.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Id" : {
          "description" : "Customer provided actual UUID for property",
          "type" : "string",
          "minLength" : 36,
          "maxLength" : 36,
          "pattern" : "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        },
        "ExternalId" : {
          "description" : "String-friendly customer provided external ID",
          "type" : "string",
          "minLength" : 2,
          "maxLength" : 128,
          "pattern" : "[a-zA-Z0-9_][a-zA-Z_\\-0-9.:]*[a-zA-Z0-9_]+"
        },
        "LogicalId" : {
          "description" : "Customer provided ID for property.",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 256,
          "pattern" : "[^\\u0000-\\u001F\\u007F]+"
        },
        "Alias" : {
          "description" : "The property alias that identifies the property.",
          "type" : "string"
        },
        "NotificationState" : {
          "description" : "The MQTT notification state (ENABLED or DISABLED) for this asset property.",
          "type" : "string",
          "enum" : [ "ENABLED", "DISABLED" ]
        },
        "Unit" : {
          "description" : "The unit of measure (such as Newtons or RPM) of the asset property. If you don't specify a value for this parameter, the service uses the value of the assetModelProperty in the asset model.",
          "type" : "string"
        }
      }
    },
    "AssetHierarchy" : {
      "description" : "A hierarchy specifies allowed parent/child asset relationships.",
      "type" : "object",
      "additionalProperties" : false,
      "required" : [ "ChildAssetId" ],
      "properties" : {
        "Id" : {
          "description" : "Customer provided actual UUID for property",
          "type" : "string",
          "minLength" : 36,
          "maxLength" : 36,
          "pattern" : "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        },
        "ExternalId" : {
          "description" : "String-friendly customer provided external ID",
          "type" : "string",
          "minLength" : 2,
          "maxLength" : 128,
          "pattern" : "[a-zA-Z0-9_][a-zA-Z_\\-0-9.:]*[a-zA-Z0-9_]+"
        },
        "LogicalId" : {
          "description" : "The LogicalID of a hierarchy in the parent asset's model.",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 256,
          "pattern" : "[^\\u0000-\\u001F\\u007F]+"
        },
        "ChildAssetId" : {
          "description" : "The ID of the child asset to be associated.",
          "type" : "string"
        }
      }
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    }
  },
  "properties" : {
    "AssetId" : {
      "description" : "The ID of the asset",
      "type" : "string",
      "minLength" : 36,
      "maxLength" : 36,
      "pattern" : "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    },
    "AssetExternalId" : {
      "description" : "The External ID of the asset",
      "type" : "string",
      "minLength" : 2,
      "maxLength" : 128,
      "pattern" : "[a-zA-Z0-9_][a-zA-Z_\\-0-9.:]*[a-zA-Z0-9_]+"
    },
    "AssetModelId" : {
      "description" : "The ID of the asset model from which to create the asset.",
      "type" : "string"
    },
    "AssetArn" : {
      "description" : "The ARN of the asset",
      "type" : "string"
    },
    "AssetName" : {
      "description" : "A unique, friendly name for the asset.",
      "type" : "string"
    },
    "AssetDescription" : {
      "description" : "A description for the asset",
      "type" : "string"
    },
    "AssetProperties" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/AssetProperty"
      }
    },
    "AssetHierarchies" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/AssetHierarchy"
      }
    },
    "Tags" : {
      "description" : "A list of key-value pairs that contain metadata for the asset.",
      "type" : "array",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "iotsitewise:TagResource", "iotsitewise:UntagResource", "iotsitewise:ListTagsForResource" ]
  },
  "required" : [ "AssetName", "AssetModelId" ],
  "readOnlyProperties" : [ "/properties/AssetArn", "/properties/AssetId", "/properties/AssetProperties/*/Id", "/properties/AssetHierarchies/*/Id" ],
  "primaryIdentifier" : [ "/properties/AssetId" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "iotsitewise:AssociateAssets", "iotsitewise:CreateAsset", "iotsitewise:DescribeAsset", "iotsitewise:DescribeAssetModel", "iotsitewise:ListAssociatedAssets", "iotsitewise:ListTagsForResource", "iotsitewise:TagResource", "iotsitewise:ListAssetModelProperties", "iotsitewise:ListAssetProperties", "iotsitewise:ListAssetModelCompositeModels", "iotsitewise:UpdateAssetProperty" ]
    },
    "read" : {
      "permissions" : [ "iotsitewise:DescribeAsset", "iotsitewise:DescribeAssetModel", "iotsitewise:ListAssociatedAssets", "iotsitewise:ListAssetModelProperties", "iotsitewise:ListAssetModelCompositeModels", "iotsitewise:ListAssetProperties", "iotsitewise:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "iotsitewise:AssociateAssets", "iotsitewise:DescribeAsset", "iotsitewise:DescribeAssetModel", "iotsitewise:DisassociateAssets", "iotsitewise:ListAssociatedAssets", "iotsitewise:ListTagsForResource", "iotsitewise:TagResource", "iotsitewise:UpdateAsset", "iotsitewise:UpdateAssetProperty", "iotsitewise:ListAssetModelProperties", "iotsitewise:ListAssetProperties", "iotsitewise:ListAssetModelCompositeModels", "iotsitewise:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "iotsitewise:DeleteAsset", "iotsitewise:DescribeAsset", "iotsitewise:DescribeAssetModel", "iotsitewise:DisassociateAssets", "iotsitewise:ListAssociatedAssets", "iotsitewise:ListAssetProperties", "iotsitewise:ListTagsForResource", "iotsitewise:ListAssetModelCompositeModels", "iotsitewise:ListAssetModelProperties", "iotsitewise:ListAssetProperties" ]
    },
    "list" : {
      "permissions" : [ "iotsitewise:ListAssetModels", "iotsitewise:ListAssets" ]
    }
  }
}