batchDisassociateClientDeviceFromCoreDevice method

Future<BatchDisassociateClientDeviceFromCoreDeviceResponse> batchDisassociateClientDeviceFromCoreDevice({
  1. required String coreDeviceThingName,
  2. List<DisassociateClientDeviceFromCoreDeviceEntry>? entries,
})

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

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

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

Parameter entries : The list of client devices to disassociate.

Implementation

Future<BatchDisassociateClientDeviceFromCoreDeviceResponse>
    batchDisassociateClientDeviceFromCoreDevice({
  required String coreDeviceThingName,
  List<DisassociateClientDeviceFromCoreDeviceEntry>? entries,
}) async {
  final $payload = <String, dynamic>{
    if (entries != null) 'entries': entries,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/greengrass/v2/coreDevices/${Uri.encodeComponent(coreDeviceThingName)}/disassociateClientDevices',
    exceptionFnMap: _exceptionFns,
  );
  return BatchDisassociateClientDeviceFromCoreDeviceResponse.fromJson(
      response);
}