:doc:`LookoutEquipment <../../lookoutequipment>` / Client / create_label

************
create_label
************



.. py:method:: LookoutEquipment.Client.create_label(**kwargs)

  

  Creates a label for an event.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lookoutequipment-2020-12-15/CreateLabel>`_  


  **Request Syntax**
  ::

    response = client.create_label(
        LabelGroupName='string',
        StartTime=datetime(2015, 1, 1),
        EndTime=datetime(2015, 1, 1),
        Rating='ANOMALY'|'NO_ANOMALY'|'NEUTRAL',
        FaultCode='string',
        Notes='string',
        Equipment='string',
        ClientToken='string'
    )
    
  :type LabelGroupName: string
  :param LabelGroupName: **[REQUIRED]** 

    The name of a group of labels.

     

    Data in this field will be retained for service usage. Follow best practices for the security of your data.

    

  
  :type StartTime: datetime
  :param StartTime: **[REQUIRED]** 

    The start time of the labeled event.

    

  
  :type EndTime: datetime
  :param EndTime: **[REQUIRED]** 

    The end time of the labeled event.

    

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

    Indicates whether a labeled event represents an anomaly.

    

  
  :type FaultCode: string
  :param FaultCode: 

    Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of the label group.

     

    Data in this field will be retained for service usage. Follow best practices for the security of your data.

    

  
  :type Notes: string
  :param Notes: 

    Metadata providing additional information about the label.

     

    Data in this field will be retained for service usage. Follow best practices for the security of your data.

    

  
  :type Equipment: string
  :param Equipment: 

    Indicates that a label pertains to a particular piece of equipment.

     

    Data in this field will be retained for service usage. Follow best practices for the security of your data.

    

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

    A unique identifier for the request to create a label. If you do not set the client request token, Lookout for Equipment generates one.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'LabelId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **LabelId** *(string) --* 

        The ID of the label that you have created.

        
  
  **Exceptions**
  
  *   :py:class:`LookoutEquipment.Client.exceptions.ValidationException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ResourceNotFoundException`

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

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

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ServiceQuotaExceededException`

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

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

  