AWS IoT Greengrass V2

2021/06/14 - AWS IoT Greengrass V2 - 3 new api methods

Changes  We have verified the APIs being released here and are ready to release

BatchDisassociateClientDeviceFromCoreDevice (new) Link ¶

Disassociate a list of client devices from a core device. After you disassociate a client device from a core device, the client device won't be able to use cloud discovery to retrieve the core device's connectivity information and certificates.

See also: AWS API Documentation

Request Syntax

client.batch_disassociate_client_device_from_core_device(
    entries=[
        {
            'thingName': 'string'
        },
    ],
    coreDeviceThingName='string'
)
type entries:

list

param entries:

The list of client devices to disassociate.

  • (dict) --

    Contains a request to disassociate a client device from a core device. The BatchDisassociateClientDeviceWithCoreDevice operation consumes a list of these requests.

    • thingName (string) -- [REQUIRED]

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

type coreDeviceThingName:

string

param coreDeviceThingName:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

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

Response Structure

  • (dict) --

    • errorEntries (list) --

      The list of errors (if any) for the entries in the request. Each error entry contains the name of the AWS IoT thing that failed to disassociate.

      • (dict) --

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

        • thingName (string) --

          The name of the AWS IoT thing whose disassociate request failed.

        • code (string) --

          The error code for the request.

        • message (string) --

          A message that provides additional information about the error.

ListClientDevicesAssociatedWithCoreDevice (new) Link ¶

Retrieves a paginated list of client devices that are associated with a core device.

See also: AWS API Documentation

Request Syntax

client.list_client_devices_associated_with_core_device(
    coreDeviceThingName='string',
    maxResults=123,
    nextToken='string'
)
type coreDeviceThingName:

string

param coreDeviceThingName:

[REQUIRED]

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

type maxResults:

integer

param maxResults:

The maximum number of results to be returned per paginated request.

type nextToken:

string

param nextToken:

The token to be used for the next set of paginated results.

rtype:

dict

returns:

Response Syntax

{
    'associatedClientDevices': [
        {
            'thingName': 'string',
            'associationTimestamp': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • associatedClientDevices (list) --

      A list that describes the client devices that are associated with the core device.

      • (dict) --

        Contains information about a client device that is associated to a core device for cloud discovery.

        • thingName (string) --

          The name of the AWS IoT thing that represents the associated client device.

        • associationTimestamp (datetime) --

          The time that the client device was associated, expressed in ISO 8601 format.

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

BatchAssociateClientDeviceWithCoreDevice (new) Link ¶

Associate 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 AWS IoT Greengrass to retrieve associated core devices' connectivity information and certificates. For more information, see Configure cloud discovery in the AWS IoT Greengrass V2 Developer Guide.

See also: AWS API Documentation

Request Syntax

client.batch_associate_client_device_with_core_device(
    entries=[
        {
            'thingName': 'string'
        },
    ],
    coreDeviceThingName='string'
)
type entries:

list

param entries:

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 AWS IoT thing that represents the client device to associate.

type coreDeviceThingName:

string

param coreDeviceThingName:

[REQUIRED]

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

rtype:

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 AWS 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 AWS 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.