listProtectedResourcesByBackupVault method
This request lists the protected resources corresponding to each backup vault.
May throw InvalidParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter backupVaultName :
The list of protected resources by backup vault within the vault(s) you
specify by name.
Parameter backupVaultAccountId :
The list of protected resources by backup vault within the vault(s) you
specify by account ID.
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<ListProtectedResourcesByBackupVaultOutput>
listProtectedResourcesByBackupVault({
required String backupVaultName,
String? backupVaultAccountId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (backupVaultAccountId != null)
'backupVaultAccountId': [backupVaultAccountId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/backup-vaults/${Uri.encodeComponent(backupVaultName)}/resources',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListProtectedResourcesByBackupVaultOutput.fromJson(response);
}