BackupSearch / Client / start_search_job
start_search_job#
- BackupSearch.Client.start_search_job(**kwargs)#
- 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. - See also: AWS API Documentation - Request Syntax- response = client.start_search_job( Tags={ 'string': 'string' }, Name='string', EncryptionKeyArn='string', ClientToken='string', SearchScope={ 'BackupResourceTypes': [ 'S3'|'EBS', ], 'BackupResourceCreationTime': { 'CreatedAfter': datetime(2015, 1, 1), 'CreatedBefore': datetime(2015, 1, 1) }, 'SourceResourceArns': [ 'string', ], 'BackupResourceArns': [ 'string', ], 'BackupResourceTags': { 'string': 'string' } }, ItemFilters={ 'S3ItemFilters': [ { 'ObjectKeys': [ { 'Value': 'string', 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'CONTAINS'|'DOES_NOT_CONTAIN'|'BEGINS_WITH'|'ENDS_WITH'|'DOES_NOT_BEGIN_WITH'|'DOES_NOT_END_WITH' }, ], 'Sizes': [ { 'Value': 123, 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'LESS_THAN_EQUAL_TO'|'GREATER_THAN_EQUAL_TO' }, ], 'CreationTimes': [ { 'Value': datetime(2015, 1, 1), 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'LESS_THAN_EQUAL_TO'|'GREATER_THAN_EQUAL_TO' }, ], 'VersionIds': [ { 'Value': 'string', 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'CONTAINS'|'DOES_NOT_CONTAIN'|'BEGINS_WITH'|'ENDS_WITH'|'DOES_NOT_BEGIN_WITH'|'DOES_NOT_END_WITH' }, ], 'ETags': [ { 'Value': 'string', 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'CONTAINS'|'DOES_NOT_CONTAIN'|'BEGINS_WITH'|'ENDS_WITH'|'DOES_NOT_BEGIN_WITH'|'DOES_NOT_END_WITH' }, ] }, ], 'EBSItemFilters': [ { 'FilePaths': [ { 'Value': 'string', 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'CONTAINS'|'DOES_NOT_CONTAIN'|'BEGINS_WITH'|'ENDS_WITH'|'DOES_NOT_BEGIN_WITH'|'DOES_NOT_END_WITH' }, ], 'Sizes': [ { 'Value': 123, 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'LESS_THAN_EQUAL_TO'|'GREATER_THAN_EQUAL_TO' }, ], 'CreationTimes': [ { 'Value': datetime(2015, 1, 1), 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'LESS_THAN_EQUAL_TO'|'GREATER_THAN_EQUAL_TO' }, ], 'LastModificationTimes': [ { 'Value': datetime(2015, 1, 1), 'Operator': 'EQUALS_TO'|'NOT_EQUALS_TO'|'LESS_THAN_EQUAL_TO'|'GREATER_THAN_EQUAL_TO' }, ] }, ] } ) - Parameters:
- Tags (dict) – - List of tags returned by the operation. - (string) – - (string) – 
 
 
- Name (string) – Include alphanumeric characters to create a name for this search job. 
- EncryptionKeyArn (string) – The encryption key for the specified search job. 
- ClientToken (string) – - 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. 
- SearchScope (dict) – - [REQUIRED] - This object can contain BackupResourceTypes, BackupResourceArns, BackupResourceCreationTime, BackupResourceTags, and SourceResourceArns to filter the recovery points returned by the search job. - BackupResourceTypes (list) – [REQUIRED] - The resource types included in a search. - Eligible resource types include S3 and EBS. - (string) – 
 
- BackupResourceCreationTime (dict) – - This is the time a backup resource was created. - CreatedAfter (datetime) – - This timestamp includes recovery points only created after the specified time. 
- CreatedBefore (datetime) – - This timestamp includes recovery points only created before the specified time. 
 
- SourceResourceArns (list) – - The Amazon Resource Name (ARN) that uniquely identifies the source resources. - (string) – 
 
- BackupResourceArns (list) – - The Amazon Resource Name (ARN) that uniquely identifies the backup resources. - (string) – 
 
- BackupResourceTags (dict) – - These are one or more tags on the backup (recovery point). - (string) – - (string) – 
 
 
 
- ItemFilters (dict) – - Item Filters represent all input item properties specified when the search was created. - Contains either EBSItemFilters or S3ItemFilters - S3ItemFilters (list) – - This array can contain CreationTimes, ETags, ObjectKeys, Sizes, or VersionIds objects. - (dict) – - This contains arrays of objects, which may include ObjectKeys, Sizes, CreationTimes, VersionIds, and/or Etags. - ObjectKeys (list) – - You can include 1 to 10 values. - If one value is included, the results will return only items that match the value. - If more than one value is included, the results will return all items that match any of the values. - (dict) – - This contains the value of the string and can contain one or more operators. - Value (string) – [REQUIRED] - The value of the string. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
- Sizes (list) – - You can include 1 to 10 values. - If one value is included, the results will return only items that match the value. - If more than one value is included, the results will return all items that match any of the values. - (dict) – - The long condition contains a - Valueand can optionally contain an- Operator.- Value (integer) – [REQUIRED] - The value of an item included in one of the search item filters. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
- CreationTimes (list) – - You can include 1 to 10 values. - If one value is included, the results will return only items that match the value. - If more than one value is included, the results will return all items that match any of the values. - (dict) – - A time condition denotes a creation time, last modification time, or other time. - Value (datetime) – [REQUIRED] - This is the timestamp value of the time condition. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
- VersionIds (list) – - You can include 1 to 10 values. - If one value is included, the results will return only items that match the value. - If more than one value is included, the results will return all items that match any of the values. - (dict) – - This contains the value of the string and can contain one or more operators. - Value (string) – [REQUIRED] - The value of the string. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
- ETags (list) – - You can include 1 to 10 values. - If one value is included, the results will return only items that match the value. - If more than one value is included, the results will return all items that match any of the values. - (dict) – - This contains the value of the string and can contain one or more operators. - Value (string) – [REQUIRED] - The value of the string. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
 
 
- EBSItemFilters (list) – - This array can contain CreationTimes, FilePaths, LastModificationTimes, or Sizes objects. - (dict) – - This contains arrays of objects, which may include CreationTimes time condition objects, FilePaths string objects, LastModificationTimes time condition objects, - FilePaths (list) – - You can include 1 to 10 values. - If one file path is included, the results will return only items that match the file path. - If more than one file path is included, the results will return all items that match any of the file paths. - (dict) – - This contains the value of the string and can contain one or more operators. - Value (string) – [REQUIRED] - The value of the string. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
- Sizes (list) – - You can include 1 to 10 values. - If one is included, the results will return only items that match. - If more than one is included, the results will return all items that match any of the included values. - (dict) – - The long condition contains a - Valueand can optionally contain an- Operator.- Value (integer) – [REQUIRED] - The value of an item included in one of the search item filters. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
- CreationTimes (list) – - You can include 1 to 10 values. - If one is included, the results will return only items that match. - If more than one is included, the results will return all items that match any of the included values. - (dict) – - A time condition denotes a creation time, last modification time, or other time. - Value (datetime) – [REQUIRED] - This is the timestamp value of the time condition. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
- LastModificationTimes (list) – - You can include 1 to 10 values. - If one is included, the results will return only items that match. - If more than one is included, the results will return all items that match any of the included values. - (dict) – - A time condition denotes a creation time, last modification time, or other time. - Value (datetime) – [REQUIRED] - This is the timestamp value of the time condition. 
- Operator (string) – - A string that defines what values will be returned. - If this is included, avoid combinations of operators that will return all possible values. For example, including both - EQUALS_TOand- NOT_EQUALS_TOwith a value of- 4will return all values.
 
 
 
 
 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'SearchJobArn': 'string', 'CreationTime': datetime(2015, 1, 1), 'SearchJobIdentifier': 'string' } - Response Structure- (dict) – - SearchJobArn (string) – - The unique string that identifies the Amazon Resource Name (ARN) of the specified search job. 
- CreationTime (datetime) – - The date and time that a job was created, in Unix format and Coordinated Universal Time (UTC). The value of - CompletionTimeis accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
- SearchJobIdentifier (string) – - The unique string that specifies the search job. 
 
 
 - Exceptions- BackupSearch.Client.exceptions.ThrottlingException
- BackupSearch.Client.exceptions.AccessDeniedException
- BackupSearch.Client.exceptions.ValidationException
- BackupSearch.Client.exceptions.InternalServerException
- BackupSearch.Client.exceptions.ServiceQuotaExceededException
- BackupSearch.Client.exceptions.ConflictException