getAutoSnapshots method

Future<GetAutoSnapshotsResult> getAutoSnapshots({
  1. required String resourceName,
})

Returns the available automatic snapshots for an instance or disk. For more information, see the Lightsail Dev Guide.

May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw OperationFailureException. May throw AccessDeniedException. May throw UnauthenticatedException.

Parameter resourceName : The name of the source instance or disk from which to get automatic snapshot information.

Implementation

Future<GetAutoSnapshotsResult> getAutoSnapshots({
  required String resourceName,
}) async {
  ArgumentError.checkNotNull(resourceName, 'resourceName');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Lightsail_20161128.GetAutoSnapshots'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'resourceName': resourceName,
    },
  );

  return GetAutoSnapshotsResult.fromJson(jsonResponse.body);
}