GreengrassV2 / Client / batch_associate_client_device_with_core_device

batch_associate_client_device_with_core_device#

GreengrassV2.Client.batch_associate_client_device_with_core_device(**kwargs)#

Associates a list of client devices with a core device. Use this API operation to specify which client devices can discover a core device through cloud discovery. With cloud discovery, client devices connect to IoT Greengrass to retrieve associated core devices’ connectivity information and certificates. For more information, see Configure cloud discovery in the IoT Greengrass V2 Developer Guide.

Note

Client devices are local IoT devices that connect to and communicate with an IoT Greengrass core device over MQTT. You can connect client devices to a core device to sync MQTT messages and data to Amazon Web Services IoT Core and interact with client devices in Greengrass components. For more information, see Interact with local IoT devices in the IoT Greengrass V2 Developer Guide.

See also: AWS API Documentation

Request Syntax

response = client.batch_associate_client_device_with_core_device(
    entries=[
        {
            'thingName': 'string'
        },
    ],
    coreDeviceThingName='string'
)
Parameters:
  • entries (list) –

    The list of client devices to associate.

    • (dict) –

      Contains a request to associate a client device with a core device. The BatchAssociateClientDeviceWithCoreDevice operation consumes a list of these requests.

      • thingName (string) – [REQUIRED]

        The name of the IoT thing that represents the client device to associate.

  • coreDeviceThingName (string) –

    [REQUIRED]

    The name of the core device. This is also the name of the IoT thing.

Return type:

dict

Returns:

Response Syntax

{
    'errorEntries': [
        {
            'thingName': 'string',
            'code': 'string',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • errorEntries (list) –

      The list of any errors for the entries in the request. Each error entry contains the name of the IoT thing that failed to associate.

      • (dict) –

        Contains an error that occurs from a request to associate a client device with a core device. The BatchAssociateClientDeviceWithCoreDevice operation returns a list of these errors.

        • thingName (string) –

          The name of the IoT thing whose associate request failed.

        • code (string) –

          The error code for the request.

        • message (string) –

          A message that provides additional information about the error.

Exceptions

  • GreengrassV2.Client.exceptions.ValidationException

  • GreengrassV2.Client.exceptions.ResourceNotFoundException

  • GreengrassV2.Client.exceptions.AccessDeniedException

  • GreengrassV2.Client.exceptions.InternalServerException

  • GreengrassV2.Client.exceptions.ThrottlingException