deregisterGatewayInstance method
Deregisters an instance. Before you deregister an instance, all bridges running on the instance must be stopped. If you want to deregister an instance without stopping the bridges, you must use the --force option.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
Parameter gatewayInstanceArn :
The Amazon Resource Name (ARN) of the gateway that contains the instance
that you want to deregister.
Parameter force :
Force the deregistration of an instance. Force will deregister an
instance, even if there are bridges running on it.
Implementation
Future<DeregisterGatewayInstanceResponse> deregisterGatewayInstance({
required String gatewayInstanceArn,
bool? force,
}) async {
final $query = <String, List<String>>{
if (force != null) 'force': [force.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/v1/gateway-instances/${Uri.encodeComponent(gatewayInstanceArn)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeregisterGatewayInstanceResponse.fromJson(response);
}