All Products
Search
Document Center

PolarDB:DeletePolarFsObjects

Last Updated:Dec 03, 2026

Deletes PolarLakebase files. Currently, only the Basic Edition and Cold Storage Edition are supported.

Operation description

Request description

  • The PolarFsInstanceId parameter is required and specifies the PolarFS instance to operate on.

  • The DBClusterId parameter is optional. If provided, it indicates that the operation is associated with a specific PolarDB cluster.

  • The Objects parameter is a required array of character strings that lists all object paths to be deleted.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DeletePolarFsObjects

none

*All Resource

*

None None

Request syntax

POST / HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

PolarFsInstanceId

string

Yes

The PolarLakebase instance ID.

pfs-2ze0i7*****

DBClusterId

string

No

The cluster ID.

pc-***

ObjectsToDelete

array

Yes

The list of files to be deleted. Parameter value examples:

  • Cold Storage Edition Example directory path to be deleted: test001/

  • Cold Storage Edition Example file path to be deleted: test001/file.txt

  • Basic Edition Example directory path to be deleted: /dir

  • Basic Edition Example file path to be deleted: /dir/file.txt

string

No

The file to be deleted.

test001/

ObjectsToDelete parameter value examples:

  • Example directory path to be deleted for Cold Storage Edition: test001/

  • Example file path to be deleted for Cold Storage Edition: test001/file.txt

  • Example directory path to be deleted for Basic Edition: /dir

  • Example file path to be deleted for Basic Edition: /dir/file.txt

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

C890995A-CF06-4F4D-8DB8-DD26C2******

PolarFsInstanceId

string

The PolarLakebase instance ID.

pfs-2ze0i7*****

Examples

Success response

JSON format

{
  "RequestId": "C890995A-CF06-4F4D-8DB8-DD26C2******",
  "PolarFsInstanceId": "pfs-2ze0i7*****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter.ObjectsToDelete ObjectsToDelete is required and must contain at least one path. The ObjectsToDelete array is empty.
400 InvalidPolarFsObjects.Malformed The specified polarFs objects to delete is not valid. The old code is retained and the Details field is enhanced to specify the exact cause of the parameter validation failure.
400 OperationDenied.DeleteNotSupportedForAccelerateType DeletePolarFsObjects is not supported for PolarFS instance '{PolarFsInstanceId}' with AccelerateType='{actual_accelerate_type}'. Supported AccelerateType values: [see API documentation]. A specific error code is added to explicitly indicate that the AccelerateType does not support deletion for {PolarFsInstanceId}. The actual accelerate type is {actual_accelerate_type}.
400 FilesystemOperation.Failed delete directory API is temporarily disabled Instances with Juice acceleration do not support the DeletePolarFsObjects operation (retaining legacy code and enhancing Details).
401 OperationDenied.UnsupportedAccelerateType The accelerate type is not support. This API is not supported for the AccelerateType of the PolarFS instance (such as Alluxio).

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.