resetDeployments method

Future<ResetDeploymentsResponse> resetDeployments({
  1. required String groupId,
  2. String? amznClientToken,
  3. bool? force,
})

Resets a group's deployments.

May throw BadRequestException.

Parameter groupId : The ID of the Greengrass group.

Parameter amznClientToken : A client token used to correlate requests and responses.

Parameter force : If true, performs a best-effort only core reset.

Implementation

Future<ResetDeploymentsResponse> resetDeployments({
  required String groupId,
  String? amznClientToken,
  bool? force,
}) async {
  ArgumentError.checkNotNull(groupId, 'groupId');
  final headers = <String, String>{
    if (amznClientToken != null)
      'X-Amzn-Client-Token': amznClientToken.toString(),
  };
  final $payload = <String, dynamic>{
    if (force != null) 'Force': force,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/greengrass/groups/${Uri.encodeComponent(groupId)}/deployments/%24reset',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return ResetDeploymentsResponse.fromJson(response);
}