shutdownGateway method
Shuts down a gateway. To specify which gateway to shut down, use the Amazon Resource Name (ARN) of the gateway in the body of your request.
The operation shuts down the gateway service component running in the gateway's virtual machine (VM) and not the host VM. After the gateway is shutdown, you cannot call any other API except StartGateway, DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway. Your applications cannot read from or write to the gateway's storage volumes, and there are no snapshots taken. If do not intend to use the gateway again, you must delete the gateway (using DeleteGateway) to no longer pay software charges associated with the gateway.
May throw InvalidGatewayRequestException. May throw InternalServerError.
Implementation
Future<ShutdownGatewayOutput> shutdownGateway({
required String gatewayARN,
}) async {
ArgumentError.checkNotNull(gatewayARN, 'gatewayARN');
_s.validateStringLength(
'gatewayARN',
gatewayARN,
50,
500,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.ShutdownGateway'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'GatewayARN': gatewayARN,
},
);
return ShutdownGatewayOutput.fromJson(jsonResponse.body);
}