listCopyJobs method
Returns metadata about your copy jobs.
May throw InvalidParameterValueException. May throw ServiceUnavailableException.
Parameter byAccountId :
The account ID to list the jobs from. Returns only copy jobs associated
with the specified account ID.
Parameter byCreatedAfter :
Returns only copy jobs that were created after the specified date.
Parameter byCreatedBefore :
Returns only copy jobs that were created before the specified date.
Parameter byDestinationVaultArn :
An Amazon Resource Name (ARN) that uniquely identifies a source backup
vault to copy from; for example,
arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
Parameter byResourceArn :
Returns only copy jobs that match the specified resource Amazon Resource
Name (ARN).
Parameter byResourceType :
Returns only backup jobs for the specified resources:
-
DynamoDBfor Amazon DynamoDB -
EBSfor Amazon Elastic Block Store -
EC2for Amazon Elastic Compute Cloud -
EFSfor Amazon Elastic File System -
RDSfor Amazon Relational Database Service -
Storage Gatewayfor AWS Storage Gateway
Parameter byState :
Returns only copy jobs that are in the specified state.
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<ListCopyJobsOutput> listCopyJobs({
String? byAccountId,
DateTime? byCreatedAfter,
DateTime? byCreatedBefore,
String? byDestinationVaultArn,
String? byResourceArn,
String? byResourceType,
CopyJobState? byState,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (byAccountId != null) 'accountId': [byAccountId],
if (byCreatedAfter != null)
'createdAfter': [_s.iso8601ToJson(byCreatedAfter).toString()],
if (byCreatedBefore != null)
'createdBefore': [_s.iso8601ToJson(byCreatedBefore).toString()],
if (byDestinationVaultArn != null)
'destinationVaultArn': [byDestinationVaultArn],
if (byResourceArn != null) 'resourceArn': [byResourceArn],
if (byResourceType != null) 'resourceType': [byResourceType],
if (byState != null) 'state': [byState.toValue()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/copy-jobs/',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListCopyJobsOutput.fromJson(response);
}