Skip to content

describe_backup_policy

describe_backup_policy(
    file_system_id: FileSystemId, *, config_overrides: Optional[EFSClientConfig] = 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 the specified IAM policy or resource policy cannot be located or accessed. Depending on the action being performed, the error may also be returned if the default file system policy is in effect for the EFS file system or if no backup policy is specified.

  • 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/efs.py
def describe_backup_policy(
    self,
    file_system_id: "capo_efs.types.file_system_id.FileSystemId",
    *,
    config_overrides: Optional[EFSClientConfig] = 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 the specified IAM policy or resource policy cannot be located or accessed. Depending on the action being performed, the error may also be returned if the default file system policy is in effect for the EFS file system or if no backup policy is specified.</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.
    """

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

        output, http_response = (
            capo_efs._operations.magnolio_api_service_v20150201.describe_backup_policy.describe_backup_policy(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output