:doc:`IoTFleetWise <../../iotfleetwise>` / Client / create_state_template

*********************
create_state_template
*********************



.. py:method:: IoTFleetWise.Client.create_state_template(**kwargs)

  

  Creates a state template. State templates contain state properties, which are signals that belong to a signal catalog that is synchronized between the Amazon Web Services IoT FleetWise Edge and the Amazon Web Services Cloud.

   

  .. warning::

     

    Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see `Amazon Web Services Region and feature availability <https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html>`__ in the *Amazon Web Services IoT FleetWise Developer Guide*.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/CreateStateTemplate>`_  


  **Request Syntax**
  ::

    response = client.create_state_template(
        name='string',
        description='string',
        signalCatalogArn='string',
        stateTemplateProperties=[
            'string',
        ],
        dataExtraDimensions=[
            'string',
        ],
        metadataExtraDimensions=[
            'string',
        ],
        tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the state template.

    

  
  :type description: string
  :param description: 

    A brief description of the state template.

    

  
  :type signalCatalogArn: string
  :param signalCatalogArn: **[REQUIRED]** 

    The ARN of the signal catalog associated with the state template.

    

  
  :type stateTemplateProperties: list
  :param stateTemplateProperties: **[REQUIRED]** 

    A list of signals from which data is collected. The state template properties contain the fully qualified names of the signals.

    

  
    - *(string) --* 

    

  :type dataExtraDimensions: list
  :param dataExtraDimensions: 

    A list of vehicle attributes to associate with the payload published on the state template's MQTT topic. (See `Processing last known state vehicle data using MQTT messaging <https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data>`__). For example, if you add ``Vehicle.Attributes.Make`` and ``Vehicle.Attributes.Model`` attributes, Amazon Web Services IoT FleetWise will enrich the protobuf encoded payload with those attributes in the ``extraDimensions`` field.

    

  
    - *(string) --* 

    

  :type metadataExtraDimensions: list
  :param metadataExtraDimensions: 

    A list of vehicle attributes to associate with user properties of the messages published on the state template's MQTT topic. (See `Processing last known state vehicle data using MQTT messaging <https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data>`__). For example, if you add ``Vehicle.Attributes.Make`` and ``Vehicle.Attributes.Model`` attributes, Amazon Web Services IoT FleetWise will include these attributes as User Properties with the MQTT message.

     

    Default: An empty array

    

  
    - *(string) --* 

    

  :type tags: list
  :param tags: 

    Metadata that can be used to manage the state template.

    

  
    - *(dict) --* 

      A set of key/value pairs that are used to manage the resource.

      

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

        The tag's key.

        

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

        The tag's value.

        

      
    

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

    
    ::

      {
          'name': 'string',
          'arn': 'string',
          'id': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **name** *(string) --* 

        The name of the state template.

        
      

      - **arn** *(string) --* 

        The Amazon Resource Name (ARN) of the state template.

        
      

      - **id** *(string) --* 

        The unique ID of the state template.

        
  
  **Exceptions**
  
  *   :py:class:`IoTFleetWise.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoTFleetWise.Client.exceptions.InternalServerException`

  
  *   :py:class:`IoTFleetWise.Client.exceptions.ConflictException`

  
  *   :py:class:`IoTFleetWise.Client.exceptions.LimitExceededException`

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

  
  *   :py:class:`IoTFleetWise.Client.exceptions.ValidationException`

  
  *   :py:class:`IoTFleetWise.Client.exceptions.InvalidSignalsException`

  
  *   :py:class:`IoTFleetWise.Client.exceptions.AccessDeniedException`

  