Skip to content

list_backup_plans async

list_backup_plans(
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    next_token: Optional[string] = None,
    max_results: Optional[MaxResults] = None,
    include_deleted: Optional[Boolean] = None,
) -> ListBackupPlansOutput

Lists the active backup plans for the account.

Parameters:

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

    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.

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

    The maximum number of items to be returned.

  • include_deleted (Optional[Boolean], default: None ) –

    A Boolean value with a default value of FALSE that returns deleted backup plans when set to TRUE.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def list_backup_plans(
    self,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
    include_deleted: Optional["capo_backup.types.boolean.Boolean"] = None,
) -> "capo_backup.types.list_backup_plans_output.ListBackupPlansOutput":
    """<p>Lists the active backup plans for the account.</p>

    Args:
        next_token: <p>The next item following a partial list of returned items. For example, if a request is made to return <code>MaxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
        max_results: <p>The maximum number of items to be returned.</p>
        include_deleted: <p>A Boolean value with a default value of <code>FALSE</code> that returns deleted backup plans when set to <code>TRUE</code>.</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.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
        capo_backup.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action doesn't exist.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup.types.list_backup_plans_input.ListBackupPlansInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.list_backup_plans_output.ListBackupPlansOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_backup_plans

        (
            output,
            http_response,
        ) = await capo_backup._operations.cryo_controller_user_manager.list_backup_plans.async_list_backup_plans(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBackupPlans")
    )
    input_: capo_backup.types.list_backup_plans_input.ListBackupPlansInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if include_deleted is not None:
        input_["include_deleted"] = include_deleted

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output