{
  "typeName" : "AWS::IoTEvents::Input",
  "description" : "The AWS::IoTEvents::Input resource creates an input. To monitor your devices and processes, they must have a way to get telemetry data into ITE. This is done by sending messages as *inputs* to ITE. For more information, see [How to Use](https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html) in the *Developer Guide*.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iotevents.git",
  "definitions" : {
    "InputDefinition" : {
      "type" : "object",
      "additionalProperties" : false,
      "description" : "The definition of the input.",
      "properties" : {
        "Attributes" : {
          "type" : "array",
          "uniqueItems" : true,
          "insertionOrder" : false,
          "description" : "The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the ITE system using ``BatchPutMessage``. Each such message contains a JSON payload, and those attributes (and their paired values) specified here are available for use in the ``condition`` expressions used by detectors that monitor this input.",
          "minItems" : 1,
          "maxItems" : 200,
          "items" : {
            "$ref" : "#/definitions/Attribute"
          }
        }
      },
      "required" : [ "Attributes" ]
    },
    "Attribute" : {
      "type" : "object",
      "additionalProperties" : false,
      "description" : "The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the ITE system using ``BatchPutMessage``. Each such message contains a JSON payload. Those attributes (and their paired values) specified here are available for use in the ``condition`` expressions used by detectors.",
      "properties" : {
        "JsonPath" : {
          "description" : "An expression that specifies an attribute-value pair in a JSON structure. Use this to specify an attribute from the JSON payload that is made available by the input. Inputs are derived from messages sent to ITE (``BatchPutMessage``). Each such message contains a JSON payload. The attribute (and its paired value) specified here are available for use in the ``condition`` expressions used by detectors. \n Syntax: ``<field-name>.<field-name>...``",
          "minLength" : 1,
          "maxLength" : 128,
          "pattern" : "^((`[a-zA-Z0-9_\\- ]+`)|([a-zA-Z0-9_\\-]+))(\\.((`[a-zA-Z0-9_\\- ]+`)|([a-zA-Z0-9_\\-]+)))*$",
          "type" : "string"
        }
      },
      "required" : [ "JsonPath" ]
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "description" : "Metadata that can be used to manage the resource.",
      "properties" : {
        "Key" : {
          "description" : "The tag's key.",
          "type" : "string"
        },
        "Value" : {
          "description" : "The tag's value.",
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    }
  },
  "properties" : {
    "InputDefinition" : {
      "$ref" : "#/definitions/InputDefinition",
      "description" : "The definition of the input."
    },
    "InputDescription" : {
      "description" : "A brief description of the input.",
      "minLength" : 1,
      "maxLength" : 1024,
      "type" : "string"
    },
    "InputName" : {
      "description" : "The name of the input.",
      "minLength" : 1,
      "maxLength" : 128,
      "pattern" : "^[a-zA-Z][a-zA-Z0-9_]*$",
      "type" : "string"
    },
    "Tags" : {
      "type" : "array",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "description" : "An array of key-value pairs to apply to this resource.\n For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "additionalProperties" : false,
  "required" : [ "InputDefinition" ],
  "primaryIdentifier" : [ "/properties/InputName" ],
  "createOnlyProperties" : [ "/properties/InputName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "iotevents:CreateInput", "iotevents:TagResource", "iotevents:DescribeInput", "iotevents:ListTagsForResource" ]
    },
    "read" : {
      "permissions" : [ "iotevents:DescribeInput", "iotevents:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "iotevents:UpdateInput", "iotevents:DescribeInput", "iotevents:ListTagsForResource", "iotevents:UntagResource", "iotevents:TagResource" ]
    },
    "delete" : {
      "permissions" : [ "iotevents:DeleteInput", "iotevents:DescribeInput" ]
    },
    "list" : {
      "permissions" : [ "iotevents:ListInputs" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "iotevents:UntagResource", "iotevents:TagResource", "iotevents:ListTagsForResource" ]
  }
}