Skip to content

list_restore_job_summaries

list_restore_job_summaries(
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    account_id: Optional[AccountId] = None,
    state: Optional[RestoreJobState] = None,
    resource_type: Optional[ResourceType] = None,
    aggregation_period: Optional[AggregationPeriod] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[string] = None,
) -> ListRestoreJobSummariesOutput

This request obtains a summary of restore jobs created or running within the the most recent 14 days. You can include parameters AccountID, State, ResourceType, AggregationPeriod, MaxResults, or NextToken to filter results.

This request returns a summary that contains Region, Account, State, RestourceType, MessageCategory, StartTime, EndTime, and Count of included jobs.

Parameters:

  • account_id (Optional[AccountId], default: None ) –

    Returns the job count for the specified account.

    If the request is sent from a member account or an account not part of Amazon Web Services Organizations, jobs within requestor's account will be returned.

    Root, admin, and delegated administrator accounts can use the value ANY to return job counts from every account in the organization.

    AGGREGATE_ALL aggregates job counts from all accounts within the authenticated organization, then returns the sum.

  • state (Optional[RestoreJobState], default: None ) –

    This parameter returns the job count for jobs with the specified state.

    The the value ANY returns count of all states.

    AGGREGATE_ALL aggregates job counts for all states and returns the sum.

  • resource_type (Optional[ResourceType], default: None ) –

    Returns the job count for the specified resource type. Use request GetSupportedResourceTypes to obtain strings for supported resource types.

    The the value ANY returns count of all resource types.

    AGGREGATE_ALL aggregates job counts for all resource types and returns the sum.

    The type of Amazon Web Services resource to be backed up; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.

  • aggregation_period (Optional[AggregationPeriod], default: None ) –

    The period for the returned results.

    • ONE_DAY - The daily job count for the prior 14 days.

    • SEVEN_DAYS - The aggregated job count for the prior 7 days.

    • FOURTEEN_DAYS - The aggregated job count for prior 14 days.

  • max_results (Optional[MaxResults], default: None ) –

    This parameter sets the maximum number of items to be returned.

    The value is an integer. Range of accepted values is from 1 to 500.

  • next_token (Optional[string], default: None ) –

    The next item following a partial list of returned resources. For example, if a request is made to return MaxResults number of resources, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

Raises:

Source code in docs_src/capo_backup/_services/backup.py
def list_restore_job_summaries(
    self,
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    account_id: Optional["capo_backup.types.account_id.AccountId"] = None,
    state: Optional["capo_backup.types.restore_job_state.RestoreJobState"] = None,
    resource_type: Optional["capo_backup.types.resource_type.ResourceType"] = None,
    aggregation_period: Optional[
        "capo_backup.types.aggregation_period.AggregationPeriod"
    ] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
) -> "capo_backup.types.list_restore_job_summaries_output.ListRestoreJobSummariesOutput":
    """<p>This request obtains a summary of restore jobs created or running within the the most recent 14 days. You can include parameters AccountID, State, ResourceType, AggregationPeriod, MaxResults, or NextToken to filter results.</p> <p>This request returns a summary that contains Region, Account, State, RestourceType, MessageCategory, StartTime, EndTime, and Count of included jobs.</p>

    Args:
        account_id: <p>Returns the job count for the specified account.</p> <p>If the request is sent from a member account or an account not part of Amazon Web Services Organizations, jobs within requestor's account will be returned.</p> <p>Root, admin, and delegated administrator accounts can use the value ANY to return job counts from every account in the organization.</p> <p> <code>AGGREGATE_ALL</code> aggregates job counts from all accounts within the authenticated organization, then returns the sum.</p>
        state: <p>This parameter returns the job count for jobs with the specified state.</p> <p>The the value ANY returns count of all states.</p> <p> <code>AGGREGATE_ALL</code> aggregates job counts for all states and returns the sum.</p>
        resource_type: <p>Returns the job count for the specified resource type. Use request <code>GetSupportedResourceTypes</code> to obtain strings for supported resource types.</p> <p>The the value ANY returns count of all resource types.</p> <p> <code>AGGREGATE_ALL</code> aggregates job counts for all resource types and returns the sum.</p> <p>The type of Amazon Web Services resource to be backed up; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
        aggregation_period: <p>The period for the returned results.</p> <ul> <li> <p> <code>ONE_DAY</code> - The daily job count for the prior 14 days.</p> </li> <li> <p> <code>SEVEN_DAYS</code> - The aggregated job count for the prior 7 days.</p> </li> <li> <p> <code>FOURTEEN_DAYS</code> - The aggregated job count for prior 14 days.</p> </li> </ul>
        max_results: <p>This parameter sets the maximum number of items to be returned.</p> <p>The value is an integer. Range of accepted values is from 1 to 500.</p>
        next_token: <p>The next item following a partial list of returned resources. For example, if a request is made to return <code>MaxResults</code> number of resources, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>

    Raises:
        capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
        capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
        capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_backup.types.list_restore_job_summaries_input.ListRestoreJobSummariesInput]",
    ) -> OperationResponse[
        "capo_backup.types.list_restore_job_summaries_output.ListRestoreJobSummariesOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_restore_job_summaries

        output, http_response = (
            capo_backup._operations.cryo_controller_user_manager.list_restore_job_summaries.list_restore_job_summaries(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListRestoreJobSummaries")
    )
    input_: capo_backup.types.list_restore_job_summaries_input.ListRestoreJobSummariesInput = {}
    if account_id is not None:
        input_["account_id"] = account_id
    if state is not None:
        input_["state"] = state
    if resource_type is not None:
        input_["resource_type"] = resource_type
    if aggregation_period is not None:
        input_["aggregation_period"] = aggregation_period
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output