deleteConnection method

Future<DeleteConnectionResponse> deleteConnection({
  1. required String connectionArn,
})

Delete an App Runner connection. You must first ensure that there are no running App Runner services that use this connection. If there are any, the DeleteConnection action fails.

May throw InternalServiceErrorException. May throw InvalidRequestException. May throw ResourceNotFoundException.

Parameter connectionArn : The Amazon Resource Name (ARN) of the App Runner connection that you want to delete.

Implementation

Future<DeleteConnectionResponse> deleteConnection({
  required String connectionArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AppRunner.DeleteConnection'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConnectionArn': connectionArn,
    },
  );

  return DeleteConnectionResponse.fromJson(jsonResponse.body);
}