startSearchJob method
This operation creates a search job which returns recovery points filtered by SearchScope and items filtered by ItemFilters.
You can optionally include ClientToken, EncryptionKeyArn, Name, and/or Tags.
May throw ConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
Parameter searchScope :
This object can contain BackupResourceTypes, BackupResourceArns,
BackupResourceCreationTime, BackupResourceTags, and SourceResourceArns to
filter the recovery points returned by the search job.
Parameter clientToken :
Include this parameter to allow multiple identical calls for idempotency.
A client token is valid for 8 hours after the first request that uses it is completed. After this time, any request with the same token is treated as a new request.
Parameter encryptionKeyArn :
The encryption key for the specified search job.
Parameter itemFilters :
Item Filters represent all input item properties specified when the search
was created.
Contains either EBSItemFilters or S3ItemFilters
Parameter name :
Include alphanumeric characters to create a name for this search job.
Parameter tags :
List of tags returned by the operation.
Implementation
Future<StartSearchJobOutput> startSearchJob({
required SearchScope searchScope,
String? clientToken,
String? encryptionKeyArn,
ItemFilters? itemFilters,
String? name,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'SearchScope': searchScope,
if (clientToken != null) 'ClientToken': clientToken,
if (encryptionKeyArn != null) 'EncryptionKeyArn': encryptionKeyArn,
if (itemFilters != null) 'ItemFilters': itemFilters,
if (name != null) 'Name': name,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/search-jobs',
exceptionFnMap: _exceptionFns,
);
return StartSearchJobOutput.fromJson(response);
}