Skip to content

describe_backup_policy async

describe_backup_policy(
    file_system_id: FileSystemId,
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
) -> BackupPolicyDescription

Returns the backup policy for the specified EFS file system.

Parameters:

  • file_system_id (FileSystemId) –

    Specifies which EFS file system for which to retrieve the BackupPolicy.

Raises:

  • BadRequest –

    Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

  • FileSystemNotFound –

    Returned if the specified FileSystemId value doesn't exist in the requester's Amazon Web Services account.

  • InternalServerError –

    Returned if an error occurred on the server side.

  • PolicyNotFound –

    Returned if no backup is specified for a One Zone EFS file system.

  • ValidationException –

    Returned if the Backup service is not available in the Amazon Web Services Region in which the request was made.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_efs/_services/async_efs.py
async def describe_backup_policy(
    self,
    file_system_id: "capo_efs.types.file_system_id.FileSystemId",
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
) -> "capo_efs.types.backup_policy_description.BackupPolicyDescription":
    """<p>Returns the backup policy for the specified EFS file system.</p>

    Args:
        file_system_id: <p>Specifies which EFS file system for which to retrieve the <code>BackupPolicy</code>.</p>

    Raises:
        capo_efs.errors.bad_request.BadRequest: <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
        capo_efs.errors.file_system_not_found.FileSystemNotFound: <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
        capo_efs.errors.internal_server_error.InternalServerError: <p>Returned if an error occurred on the server side.</p>
        capo_efs.errors.policy_not_found.PolicyNotFound: <p>Returned if <code>no backup</code> is specified for a One Zone EFS file system.</p>
        capo_efs.errors.validation_exception.ValidationException: <p>Returned if the Backup service is not available in the Amazon Web Services Region in which the request was made.</p>
        capo_efs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_efs.types.describe_backup_policy_request.DescribeBackupPolicyRequest]",
    ) -> AsyncOperationResponse[
        "capo_efs.types.backup_policy_description.BackupPolicyDescription"
    ]:
        import capo_efs._operations.magnolio_api_service_v20150201.describe_backup_policy

        (
            output,
            http_response,
        ) = await capo_efs._operations.magnolio_api_service_v20150201.describe_backup_policy.async_describe_backup_policy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeBackupPolicy")
    )
    input_: capo_efs.types.describe_backup_policy_request.DescribeBackupPolicyRequest = {
        "file_system_id": file_system_id
    }

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