pauseService method
Pause an active App Runner service. App Runner reduces compute capacity for the service to zero and loses state (for example, ephemeral storage is removed).
This is an asynchronous operation. On a successful call, you can use the
returned OperationId and the ListOperations call to
track the operation's progress.
May throw InternalServiceErrorException.
May throw InvalidRequestException.
May throw InvalidStateException.
May throw ResourceNotFoundException.
Parameter serviceArn :
The Amazon Resource Name (ARN) of the App Runner service that you want to
pause.
Implementation
Future<PauseServiceResponse> pauseService({
required String serviceArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AppRunner.PauseService'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ServiceArn': serviceArn,
},
);
return PauseServiceResponse.fromJson(jsonResponse.body);
}