updateDynamicThingGroup method

Future<UpdateDynamicThingGroupResponse> updateDynamicThingGroup({
  1. required String thingGroupName,
  2. required ThingGroupProperties thingGroupProperties,
  3. int? expectedVersion,
  4. String? indexName,
  5. String? queryString,
  6. String? queryVersion,
})

Updates a dynamic thing group.

Requires permission to access the UpdateDynamicThingGroup action.

May throw InternalFailureException. May throw InvalidQueryException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw VersionConflictException.

Parameter thingGroupName : The name of the dynamic thing group to update.

Parameter thingGroupProperties : The dynamic thing group properties to update.

Parameter expectedVersion : The expected version of the dynamic thing group to update.

Parameter indexName : The dynamic thing group index to update.

Parameter queryString : The dynamic thing group search query string to update.

Parameter queryVersion : The dynamic thing group query version to update.

Implementation

Future<UpdateDynamicThingGroupResponse> updateDynamicThingGroup({
  required String thingGroupName,
  required ThingGroupProperties thingGroupProperties,
  int? expectedVersion,
  String? indexName,
  String? queryString,
  String? queryVersion,
}) async {
  final $payload = <String, dynamic>{
    'thingGroupProperties': thingGroupProperties,
    if (expectedVersion != null) 'expectedVersion': expectedVersion,
    if (indexName != null) 'indexName': indexName,
    if (queryString != null) 'queryString': queryString,
    if (queryVersion != null) 'queryVersion': queryVersion,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/dynamic-thing-groups/${Uri.encodeComponent(thingGroupName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDynamicThingGroupResponse.fromJson(response);
}