:doc:`IoTEvents <../../iotevents>` / Client / create_input

************
create_input
************



.. py:method:: IoTEvents.Client.create_input(**kwargs)

  

  Creates an input.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotevents-2018-07-27/CreateInput>`_  


  **Request Syntax**
  ::

    response = client.create_input(
        inputName='string',
        inputDescription='string',
        inputDefinition={
            'attributes': [
                {
                    'jsonPath': 'string'
                },
            ]
        },
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type inputName: string
  :param inputName: **[REQUIRED]** 

    The name you want to give to the input.

    

  
  :type inputDescription: string
  :param inputDescription: 

    A brief description of the input.

    

  
  :type inputDefinition: dict
  :param inputDefinition: **[REQUIRED]** 

    The definition of the input.

    

  
    - **attributes** *(list) --* **[REQUIRED]** 

      The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events 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.

      

    
      - *(dict) --* 

        The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events 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.

        

      
        - **jsonPath** *(string) --* **[REQUIRED]** 

          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 AWS IoT Events ( ``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.

           

          Syntax: ``<field-name>.<field-name>...``

          

        
      
  
  
  :type tags: list
  :param tags: 

    Metadata that can be used to manage the input.

    

  
    - *(dict) --* 

      Metadata that can be used to manage the resource.

      

    
      - **key** *(string) --* **[REQUIRED]** 

        The tag's key.

        

      
      - **value** *(string) --* **[REQUIRED]** 

        The tag's value.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'inputConfiguration': {
              'inputName': 'string',
              'inputDescription': 'string',
              'inputArn': 'string',
              'creationTime': datetime(2015, 1, 1),
              'lastUpdateTime': datetime(2015, 1, 1),
              'status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **inputConfiguration** *(dict) --* 

        Information about the configuration of the input.

        
        

        - **inputName** *(string) --* 

          The name of the input.

          
        

        - **inputDescription** *(string) --* 

          A brief description of the input.

          
        

        - **inputArn** *(string) --* 

          The ARN of the input.

          
        

        - **creationTime** *(datetime) --* 

          The time the input was created.

          
        

        - **lastUpdateTime** *(datetime) --* 

          The last time the input was updated.

          
        

        - **status** *(string) --* 

          The status of the input.

          
    
  
  **Exceptions**
  
  *   :py:class:`IoTEvents.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTEvents.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTEvents.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoTEvents.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoTEvents.Client.exceptions.ResourceAlreadyExistsException`

  