listRecoveryPointsByResource method
The information about the recovery points of the type specified by a resource Amazon Resource Name (ARN).
May throw InvalidParameterValueException.
May throw MissingParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter resourceArn :
An ARN that uniquely identifies a resource. The format of the ARN depends
on the resource type.
Parameter managedByAWSBackupOnly :
This attribute filters recovery points based on ownership.
If this is set to TRUE, the response will contain recovery
points associated with the selected resources that are managed by Backup.
If this is set to FALSE, the response will contain all
recovery points associated with the selected resource.
Type: Boolean
Parameter maxResults :
The maximum number of items to be returned.
Parameter nextToken :
The next item following a partial list of returned items. For example, if
a request is made to return MaxResults number of items,
NextToken allows you to return more items in your list
starting at the location pointed to by the next token.
Implementation
Future<ListRecoveryPointsByResourceOutput> listRecoveryPointsByResource({
required String resourceArn,
bool? managedByAWSBackupOnly,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (managedByAWSBackupOnly != null)
'managedByAWSBackupOnly': [managedByAWSBackupOnly.toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/resources/${Uri.encodeComponent(resourceArn)}/recovery-points',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListRecoveryPointsByResourceOutput.fromJson(response);
}