{
  "typeName" : "AWS::IoTWireless::FuotaTask",
  "description" : "Create and manage FUOTA tasks.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "taggable" : true,
  "definitions" : {
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "additionalProperties" : false
    },
    "LoRaWAN" : {
      "type" : "object",
      "properties" : {
        "StartTime" : {
          "description" : "FUOTA task LoRaWAN start time",
          "type" : "string",
          "maxLength" : 64
        },
        "RfRegion" : {
          "description" : "FUOTA task LoRaWAN RF region",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 64
        }
      },
      "additionalProperties" : false,
      "required" : [ "RfRegion" ]
    }
  },
  "properties" : {
    "Name" : {
      "description" : "Name of FUOTA task",
      "type" : "string",
      "maxLength" : 256
    },
    "Description" : {
      "description" : "FUOTA task description",
      "type" : "string",
      "maxLength" : 2048
    },
    "LoRaWAN" : {
      "description" : "FUOTA task LoRaWAN",
      "$ref" : "#/definitions/LoRaWAN"
    },
    "FirmwareUpdateImage" : {
      "description" : "FUOTA task firmware update image binary S3 link",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048
    },
    "FirmwareUpdateRole" : {
      "description" : "FUOTA task firmware IAM role for reading S3",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256
    },
    "Arn" : {
      "description" : "FUOTA task arn. Returned after successful create.",
      "type" : "string"
    },
    "Id" : {
      "description" : "FUOTA task id. Returned after successful create.",
      "type" : "string",
      "maxLength" : 256
    },
    "Tags" : {
      "description" : "A list of key-value pairs that contain metadata for the FUOTA task.",
      "type" : "array",
      "uniqueItems" : true,
      "maxItems" : 200,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "FuotaTaskStatus" : {
      "description" : "FUOTA task status. Returned after successful read.",
      "type" : "string"
    },
    "AssociateWirelessDevice" : {
      "description" : "Wireless device to associate. Only for update request.",
      "type" : "string",
      "maxLength" : 256
    },
    "DisassociateWirelessDevice" : {
      "description" : "Wireless device to disassociate. Only for update request.",
      "type" : "string",
      "maxLength" : 256
    },
    "AssociateMulticastGroup" : {
      "description" : "Multicast group to associate. Only for update request.",
      "type" : "string",
      "maxLength" : 256
    },
    "DisassociateMulticastGroup" : {
      "description" : "Multicast group to disassociate. Only for update request.",
      "type" : "string",
      "maxLength" : 256
    }
  },
  "additionalProperties" : false,
  "required" : [ "LoRaWAN", "FirmwareUpdateImage", "FirmwareUpdateRole" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/Id", "/properties/FuotaTaskStatus", "/properties/LoRaWAN/StartTime" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "iotwireless:CreateFuotaTask", "iotwireless:TagResource", "iotwireless:ListTagsForResource", "iam:GetRole", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "iotwireless:GetFuotaTask", "iotwireless:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "iotwireless:UpdateFuotaTask", "iotwireless:UntagResource", "iotwireless:ListTagsForResource", "iotwireless:AssociateMulticastGroupWithFuotaTask", "iotwireless:DisassociateMulticastGroupFromFuotaTask", "iotwireless:AssociateWirelessDeviceWithFuotaTask", "iotwireless:DisassociateWirelessDeviceFromFuotaTask" ]
    },
    "delete" : {
      "permissions" : [ "iotwireless:DeleteFuotaTask" ]
    },
    "list" : {
      "permissions" : [ "iotwireless:ListFuotaTasks", "iotwireless:ListTagsForResource" ]
    }
  }
}