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

********************
create_managed_thing
********************



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

  

  Creates a managed thing. A managed thing contains the device identifier, protocol supported, and capabilities of the device in a data model format defined by Managed integrations.

  

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


  **Request Syntax**
  ::

    response = client.create_managed_thing(
        Role='CONTROLLER'|'DEVICE',
        Owner='string',
        CredentialLockerId='string',
        AuthenticationMaterial='string',
        AuthenticationMaterialType='CUSTOM_PROTOCOL_QR_BAR_CODE'|'WIFI_SETUP_QR_BAR_CODE'|'ZWAVE_QR_BAR_CODE'|'ZIGBEE_QR_BAR_CODE'|'DISCOVERED_DEVICE'|'PRE_ONBOARDED_CLOUD',
        WiFiSimpleSetupConfiguration={
            'EnableAsProvisioner': True|False,
            'EnableAsProvisionee': True|False,
            'TimeoutInMinutes': 123
        },
        SerialNumber='string',
        Brand='string',
        Model='string',
        Name='string',
        CapabilityReport={
            'version': 'string',
            'nodeId': 'string',
            'endpoints': [
                {
                    'id': 'string',
                    'deviceTypes': [
                        'string',
                    ],
                    'capabilities': [
                        {
                            'id': 'string',
                            'name': 'string',
                            'version': 'string',
                            'properties': [
                                'string',
                            ],
                            'actions': [
                                'string',
                            ],
                            'events': [
                                'string',
                            ]
                        },
                    ]
                },
            ]
        },
        CapabilitySchemas=[
            {
                'Format': 'AWS'|'ZCL'|'CONNECTOR',
                'CapabilityId': 'string',
                'ExtrinsicId': 'string',
                'ExtrinsicVersion': 123,
                'Schema': {...}|[...]|123|123.4|'string'|True|None
            },
        ],
        Capabilities='string',
        ClientToken='string',
        Classification='string',
        Tags={
            'string': 'string'
        },
        MetaData={
            'string': 'string'
        }
    )
    
  :type Role: string
  :param Role: **[REQUIRED]** 

    The type of device used. This will be the hub controller, cloud device, or AWS IoT device.

    

  
  :type Owner: string
  :param Owner: 

    Owner of the device, usually an indication of whom the device belongs to. This value should not contain personal identifiable information.

    

  
  :type CredentialLockerId: string
  :param CredentialLockerId: 

    The identifier of the credential for the managed thing.

    

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

    The authentication material defining the device connectivity setup requests. The authorization materials used are the device bar code.

    

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

    The type of authentication material used for device connectivity setup requests.

    

  
  :type WiFiSimpleSetupConfiguration: dict
  :param WiFiSimpleSetupConfiguration: 

    The Wi-Fi Simple Setup configuration for the managed thing, which defines provisioning capabilities and timeout settings.

    

  
    - **EnableAsProvisioner** *(boolean) --* 

      Indicates whether the device can act as a provisioner in Wi-Fi Simple Setup, allowing it to configure other devices.

      

    
    - **EnableAsProvisionee** *(boolean) --* 

      Indicates whether the device can act as a provisionee in Wi-Fi Simple Setup, allowing it to be configured by other devices.

      

    
    - **TimeoutInMinutes** *(integer) --* 

      The timeout duration in minutes for Wi-Fi Simple Setup. Valid range is 5 to 15 minutes.

      

    
  
  :type SerialNumber: string
  :param SerialNumber: 

    The serial number of the device.

    

  
  :type Brand: string
  :param Brand: 

    The brand of the device.

    

  
  :type Model: string
  :param Model: 

    The model of the device.

    

  
  :type Name: string
  :param Name: 

    The name of the managed thing representing the physical device.

    

  
  :type CapabilityReport: dict
  :param CapabilityReport: 

    A report of the capabilities for the managed thing.

    

  
    - **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) --* 

        The endpoint used in the capability report.

        

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

          The id of the endpoint used in the capability report.

          

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

          The type of device.

          

        
          - *(string) --* 

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

          The capabilities used in the capability report.

          

        
          - *(dict) --* 

            The capability used in capability report.

            

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

              The id of the schema version.

              

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

              The name of the capability.

              

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

              The version of the capability.

              

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

              The capability properties used in the capability report.

              

            
              - *(string) --* 

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

              The capability actions used in the capability report.

              

            
              - *(string) --* 

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

              The capability events used in the capability report.

              

            
              - *(string) --* 

              
          
          
      
      
  
  
  :type CapabilitySchemas: list
  :param CapabilitySchemas: 

    The capability schemas that define the functionality and features supported by the managed thing, including device capabilities and their associated properties.

    

  
    - *(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.

        

      
    

  :type Capabilities: string
  :param Capabilities: 

    The capabilities of the device such as light bulb.

    

  
  :type ClientToken: string
  :param ClientToken: 

    An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.

    This field is autopopulated if not provided.

  
  :type Classification: string
  :param Classification: 

    The classification of the managed thing such as light bulb or thermostat.

    

  
  :type Tags: dict
  :param Tags: 

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

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type MetaData: dict
  :param MetaData: 

    The metadata for the managed thing.

     

    .. note::

      

      The ``managedThing`` ``metadata`` parameter is used for associating attributes with a ``managedThing`` that can be used for grouping over-the-air (OTA) tasks. Name value pairs in ``metadata`` can be used in the ``OtaTargetQueryString`` parameter for the ``CreateOtaTask`` API operation.

      

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Id': 'string',
          'Arn': 'string',
          'CreatedAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Id** *(string) --* 

        The id of the managed thing.

        
      

      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the managed thing.

        
      

      - **CreatedAt** *(datetime) --* 

        The timestamp value of when the device creation request occurred.

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

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

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

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

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

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

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

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

  