:doc:`ManagedintegrationsforIoTDeviceManagement <../../iot-managed-integrations>` / Client / send_connector_event

********************
send_connector_event
********************



.. py:method:: ManagedintegrationsforIoTDeviceManagement.Client.send_connector_event(**kwargs)

  

  Relays third-party device events for a connector such as a new device or a device state change event.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-managed-integrations-2025-03-03/SendConnectorEvent>`_  


  **Request Syntax**
  ::

    response = client.send_connector_event(
        ConnectorId='string',
        UserId='string',
        Operation='DEVICE_COMMAND_RESPONSE'|'DEVICE_DISCOVERY'|'DEVICE_EVENT'|'DEVICE_COMMAND_REQUEST',
        OperationVersion='string',
        StatusCode=123,
        Message='string',
        DeviceDiscoveryId='string',
        ConnectorDeviceId='string',
        TraceId='string',
        Devices=[
            {
                'ConnectorDeviceId': 'string',
                'ConnectorDeviceName': 'string',
                'CapabilityReport': {
                    'version': 'string',
                    'nodeId': 'string',
                    'endpoints': [
                        {
                            'id': 'string',
                            'deviceTypes': [
                                'string',
                            ],
                            'clusters': [
                                {
                                    'id': 'string',
                                    'revision': 123,
                                    'publicId': 'string',
                                    'name': 'string',
                                    'specVersion': 'string',
                                    'attributes': [
                                        {
                                            'id': 'string',
                                            'name': 'string',
                                            'value': {...}|[...]|123|123.4|'string'|True|None
                                        },
                                    ],
                                    'commands': [
                                        'string',
                                    ],
                                    'events': [
                                        'string',
                                    ],
                                    'featureMap': 123,
                                    'generatedCommands': [
                                        'string',
                                    ],
                                    'fabricIndex': 123
                                },
                            ],
                            'parts': [
                                'string',
                            ],
                            'semanticTags': [
                                'string',
                            ],
                            'clientClusters': [
                                'string',
                            ]
                        },
                    ]
                },
                'CapabilitySchemas': [
                    {
                        'Format': 'AWS'|'ZCL'|'CONNECTOR',
                        'CapabilityId': 'string',
                        'ExtrinsicId': 'string',
                        'ExtrinsicVersion': 123,
                        'Schema': {...}|[...]|123|123.4|'string'|True|None
                    },
                ],
                'DeviceMetadata': {...}|[...]|123|123.4|'string'|True|None
            },
        ],
        MatterEndpoint={
            'id': 'string',
            'clusters': [
                {
                    'id': 'string',
                    'attributes': {...}|[...]|123|123.4|'string'|True|None,
                    'commands': {
                        'string': {...}|[...]|123|123.4|'string'|True|None
                    },
                    'events': {
                        'string': {...}|[...]|123|123.4|'string'|True|None
                    }
                },
            ]
        }
    )
    
  :type ConnectorId: string
  :param ConnectorId: **[REQUIRED]** 

    The id of the connector between the third-party cloud provider and IoT managed integrations.

    

  
  :type UserId: string
  :param UserId: 

    The id of the third-party cloud provider.

    

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

    The Open Connectivity Foundation (OCF) operation requested to be performed on the managed thing.

     

    .. note::

      

      The field op can have a value of "I" or "U". The field "cn" will contain the capability types.

      

    

  
  :type OperationVersion: string
  :param OperationVersion: 

    The Open Connectivity Foundation (OCF) security specification version for the operation being requested on the managed thing. For more information, see `OCF Security Specification <https://openconnectivity.org/specs/OCF_Security_Specification_v1.0.0.pdf>`__.

    

  
  :type StatusCode: integer
  :param StatusCode: 

    The status code of the Open Connectivity Foundation (OCF) operation being performed on the managed thing.

    

  
  :type Message: string
  :param Message: 

    The device state change event payload.

     

    This parameter will include the following three fields:

     

    
    * ``uri``: ``schema auc://<PARTNER-DEVICE-ID>/ResourcePath`` (The ``Resourcepath`` corresponds to an OCF resource.)
     
    * ``op``: For device state changes, this field must populate as ``n+d``.
     
    * ``cn``: The content depends on the OCF resource referenced in ``ResourcePath``.
    

    

  
  :type DeviceDiscoveryId: string
  :param DeviceDiscoveryId: 

    The id for the device discovery job.

    

  
  :type ConnectorDeviceId: string
  :param ConnectorDeviceId: 

    The third-party device id as defined by the connector. This device id must not contain personal identifiable information (PII).

     

    .. note::

      

      This parameter is used for cloud-to-cloud devices only.

      

    

  
  :type TraceId: string
  :param TraceId: 

    The trace request identifier. This is generated by IoT managed integrations and can be used to trace this command and its related operations in CloudWatch.

    

  
  :type Devices: list
  :param Devices: 

    The list of devices.

    

  
    - *(dict) --* 

      Describe the device using the relevant metadata and supported clusters for device discovery.

      

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

        The device id as defined by the connector.

         

        .. note::

          

          This parameter is used for cloud-to-cloud devices only.

          

        

      
      - **ConnectorDeviceName** *(string) --* 

        The name of the device as defined by the connector.

        

      
      - **CapabilityReport** *(dict) --* **[REQUIRED]** 

        The capability report for the device.

        

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

          The version of the capability report.

          

        
        - **nodeId** *(string) --* 

          The numeric identifier of the node.

          

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

          The endpoints used in the capability report.

          

        
          - *(dict) --* 

            Matter endpoint used in capability report.

            

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

              The id of the Amazon Web Services Matter capability report endpoint.

              

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

              The type of device.

              

            
              - *(string) --* 

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

              Matter clusters used in capability report.

              

            
              - *(dict) --* 

                Capability used in Matter capability report.

                

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

                  The id of the Amazon Web Services Matter capability report cluster.

                  

                
                - **revision** *(integer) --* **[REQUIRED]** 

                  The id of the revision for the Amazon Web Services Matter capability report.

                  

                
                - **publicId** *(string) --* 

                  The id of the schema version.

                  

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

                  The capability name used in the Amazon Web Services Matter capability report.

                  

                
                - **specVersion** *(string) --* 

                  The spec version used in the Amazon Web Services Matter capability report.

                  

                
                - **attributes** *(list) --* 

                  The attributes of the Amazon Web Services Matter capability report.

                  

                
                  - *(dict) --* 

                    Matter attribute used in capability report.

                    

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

                      The id of the Matter attribute.

                      

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

                      Name for the Amazon Web Services Matter capability report attribute.

                      

                    
                    - **value** (:ref:`document<document>`) -- 

                      Value for the Amazon Web Services Matter capability report attribute.

                      

                    
                  
              
                - **commands** *(list) --* 

                  The commands used with the Amazon Web Services Matter capability report.

                  

                
                  - *(string) --* 

                  
              
                - **events** *(list) --* 

                  The events used with the Amazon Web Services Matter capability report.

                  

                
                  - *(string) --* 

                  
              
                - **featureMap** *(integer) --* 

                  32 bit-map used to indicate which features a cluster supports.

                  

                
                - **generatedCommands** *(list) --* 

                  Matter clusters used in capability report.

                  

                
                  - *(string) --* 

                  
              
                - **fabricIndex** *(integer) --* 

                  The fabric index for the Amazon Web Services Matter capability report.

                  

                
              
          
            - **parts** *(list) --* 

              Heirachy of child endpoints contained in the given endpoint.

              

            
              - *(string) --* 

              
          
            - **semanticTags** *(list) --* 

              Semantic information related to endpoint.

              

            
              - *(string) --* 

              
          
            - **clientClusters** *(list) --* 

              Semantic information related to endpoint.

              

            
              - *(string) --* 

              
          
          
      
      
      - **CapabilitySchemas** *(list) --* 

        Report of all capabilities supported by the device.

        

      
        - *(dict) --* 

          Structure representing a capability schema item that defines the functionality and features supported by a managed thing.

          

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

            The format of the capability schema, which defines how the schema is structured and interpreted.

            

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

            The unique identifier of the capability defined in the schema.

            

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

            The external identifier for the capability, used when referencing the capability outside of the AWS ecosystem.

            

          
          - **ExtrinsicVersion** *(integer) --* **[REQUIRED]** 

            The version of the external capability definition, used to track compatibility with external systems.

            

          
          - **Schema** (:ref:`document<document>`) -- **[REQUIRED]** 

            The actual schema definition that describes the capability's properties, actions, and events.

            

          
        
    
      - **DeviceMetadata** (:ref:`document<document>`) -- 

        The metadata attributes for a device.

        

      
    

  :type MatterEndpoint: dict
  :param MatterEndpoint: 

    The device endpoint.

    

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

      The Matter endpoint id.

      

    
    - **clusters** *(list) --* 

      A list of Matter clusters for a managed thing.

      

    
      - *(dict) --* 

        Describe a Matter cluster with an id, and the relevant attributes, commands, and events.

        

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

          The cluster id.

          

        
        - **attributes** (:ref:`document<document>`) -- 

          The Matter attributes.

          

        
        - **commands** *(dict) --* 

          Describe the Matter commands with the Matter command identifier mapped to the command fields.

          

        
          - *(string) --* 

          
            - (:ref:`document<document>`) -- 

            
      
    
        - **events** *(dict) --* 

          Describe the Matter events with the Matter event identifier mapped to the event fields.

          

        
          - *(string) --* 

          
            - (:ref:`document<document>`) -- 

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

    
    ::

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

    

    - *(dict) --* 
      

      - **ConnectorId** *(string) --* 

        The id of the connector between the third-party cloud provider and IoT managed integrations.

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

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

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

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

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

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

  