BackupSearch / Client / get_search_job

get_search_job#

BackupSearch.Client.get_search_job(**kwargs)#

This operation retrieves metadata of a search job, including its progress.

See also: AWS API Documentation

Request Syntax

response = client.get_search_job(
    SearchJobIdentifier='string'
)
Parameters:

SearchJobIdentifier (string) –

[REQUIRED]

Required unique string that specifies the search job.

Return type:

dict

Returns:

Response Syntax

{
    'Name': 'string',
    'SearchScopeSummary': {
        'TotalRecoveryPointsToScanCount': 123,
        'TotalItemsToScanCount': 123
    },
    'CurrentSearchProgress': {
        'RecoveryPointsScannedCount': 123,
        'ItemsScannedCount': 123,
        'ItemsMatchedCount': 123
    },
    'StatusMessage': 'string',
    'EncryptionKeyArn': 'string',
    'CompletionTime': datetime(2015, 1, 1),
    'Status': 'RUNNING'|'COMPLETED'|'STOPPING'|'STOPPED'|'FAILED',
    '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'
                    },
                ]
            },
        ]
    },
    'CreationTime': datetime(2015, 1, 1),
    'SearchJobIdentifier': 'string',
    'SearchJobArn': 'string'
}

Response Structure

  • (dict) –

    • Name (string) –

      Returned name of the specified search job.

    • SearchScopeSummary (dict) –

      Returned summary of the specified search job scope, including:

      • TotalBackupsToScanCount, the number of recovery points returned by the search.

      • TotalItemsToScanCount, the number of items returned by the search.

      • TotalRecoveryPointsToScanCount (integer) –

        This is the count of the total number of backups that will be scanned in a search.

      • TotalItemsToScanCount (integer) –

        This is the count of the total number of items that will be scanned in a search.

    • CurrentSearchProgress (dict) –

      Returns numbers representing BackupsScannedCount, ItemsScanned, and ItemsMatched.

      • RecoveryPointsScannedCount (integer) –

        This number is the sum of all backups that have been scanned so far during a search job.

      • ItemsScannedCount (integer) –

        This number is the sum of all items that have been scanned so far during a search job.

      • ItemsMatchedCount (integer) –

        This number is the sum of all items that match the item filters in a search job in progress.

    • StatusMessage (string) –

      A status message will be returned for either a earch job with a status of ERRORED or a status of COMPLETED jobs with issues.

      For example, a message may say that a search contained recovery points unable to be scanned because of a permissions issue.

    • EncryptionKeyArn (string) –

      The encryption key for the specified search job.

      Example: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    • CompletionTime (datetime) –

      The date and time that a search job completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

    • Status (string) –

      The current status of the specified search job.

      A search job may have one of the following statuses: RUNNING; COMPLETED; STOPPED; FAILED; TIMED_OUT; or EXPIRED .

    • SearchScope (dict) –

      The search scope is all backup properties input into a search.

      • BackupResourceTypes (list) –

        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.

      • 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) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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 Value and can optionally contain an Operator.

              • Value (integer) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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 Value and can optionally contain an Operator.

              • Value (integer) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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) –

                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_TO and NOT_EQUALS_TO with a value of 4 will 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) –

                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_TO and NOT_EQUALS_TO with a value of 4 will return all values.

    • CreationTime (datetime) –

      The date and time that a search job was created, in Unix format and Coordinated Universal Time (UTC). The value of CompletionTime is 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 identifies the specified search job.

    • SearchJobArn (string) –

      The unique string that identifies the Amazon Resource Name (ARN) of the specified search job.

Exceptions