removeThingFromThingGroup method

Future<void> removeThingFromThingGroup({
  1. String? thingArn,
  2. String? thingGroupArn,
  3. String? thingGroupName,
  4. String? thingName,
})

Remove the specified thing from the specified group.

You must specify either a thingGroupArn or a thingGroupName to identify the thing group and either a thingArn or a thingName to identify the thing to remove from the thing group.

Requires permission to access the RemoveThingFromThingGroup action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter thingArn : The ARN of the thing to remove from the group.

Parameter thingGroupArn : The group ARN.

Parameter thingGroupName : The group name.

Parameter thingName : The name of the thing to remove from the group.

Implementation

Future<void> removeThingFromThingGroup({
  String? thingArn,
  String? thingGroupArn,
  String? thingGroupName,
  String? thingName,
}) async {
  final $payload = <String, dynamic>{
    if (thingArn != null) 'thingArn': thingArn,
    if (thingGroupArn != null) 'thingGroupArn': thingGroupArn,
    if (thingGroupName != null) 'thingGroupName': thingGroupName,
    if (thingName != null) 'thingName': thingName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/thing-groups/removeThingFromThingGroup',
    exceptionFnMap: _exceptionFns,
  );
}