removeThingFromThingGroup method
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.
May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceNotFoundException.
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 {
_s.validateStringLength(
'thingGroupName',
thingGroupName,
1,
128,
);
_s.validateStringLength(
'thingName',
thingName,
1,
128,
);
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,
);
}