Skip to content

list_protected_resources_by_backup_vault async

list_protected_resources_by_backup_vault(
    backup_vault_name: BackupVaultName,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    backup_vault_account_id: Optional[AccountId] = None,
    next_token: Optional[string] = None,
    max_results: Optional[MaxResults] = None,
) -> ListProtectedResourcesByBackupVaultOutput

This request lists the protected resources corresponding to each backup vault.

Parameters:

  • backup_vault_name (BackupVaultName) –

    The list of protected resources by backup vault within the vault(s) you specify by name.

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

    The list of protected resources by backup vault within the vault(s) you specify by account ID.

  • 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.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def list_protected_resources_by_backup_vault(
    self,
    backup_vault_name: "capo_backup.types.backup_vault_name.BackupVaultName",
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    backup_vault_account_id: Optional[
        "capo_backup.types.account_id.AccountId"
    ] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
) -> "capo_backup.types.list_protected_resources_by_backup_vault_output.ListProtectedResourcesByBackupVaultOutput":
    """<p>This request lists the protected resources corresponding to each backup vault.</p>

    Args:
        backup_vault_name: <p>The list of protected resources by backup vault within the vault(s) you specify by name.</p>
        backup_vault_account_id: <p>The list of protected resources by backup vault within the vault(s) you specify by account ID.</p>
        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>

    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.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_protected_resources_by_backup_vault_input.ListProtectedResourcesByBackupVaultInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.list_protected_resources_by_backup_vault_output.ListProtectedResourcesByBackupVaultOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_protected_resources_by_backup_vault

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProtectedResourcesByBackupVault")
    )
    input_: capo_backup.types.list_protected_resources_by_backup_vault_input.ListProtectedResourcesByBackupVaultInput = {
        "backup_vault_name": backup_vault_name
    }
    if backup_vault_account_id is not None:
        input_["backup_vault_account_id"] = backup_vault_account_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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