All Products
Search
Document Center

:DeleteFile

Last Updated:Jun 11, 2026

Menghapus file dari DataStudio. Jika file telah di-commit, proses asinkron akan dipicu untuk menghapus file di sistem penjadwalan. Nilai parameter DeploymentId yang dikembalikan digunakan untuk memanggil operasi GetDeployment guna mem-polling status proses asinkron.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

delete

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

ProjectId

integer

No

Nama ruang kerja DataWorks. Anda dapat log ke Konsol DataWorks dan membuka halaman Workspace Management untuk Tampilan nama ruang kerja.

Anda harus menentukan salah satu parameter ProjectId atau ProjectIdentifier untuk menentukan ruang kerja DataWorks tempat operasi diterapkan.

10000

ProjectIdentifier

string

No

ID file. Anda dapat memanggil operasi ListFiles untuk mengkueri ID file.

dw_project

FileId

integer

Yes

ID file. Anda dapat memanggil operasi ListFiles untuk mengkueri ID file.

10000201

Elemen respons

Element

Type

Description

Example

object

HttpStatusCode

integer

The ID of the deployment task that deploys the file. If the file has been committed, an asynchronous process is triggered to delete the file in the scheduling system. The value of this parameter is used to call the GetDeployment operation to poll the status of the asynchronous process.

If this parameter is empty, the file is deleted and the polling is not required.

200

DeploymentId

integer

The ID of the request. You can troubleshoot errors based on the ID.

1000000001

RequestId

string

The error message returned.

0000-ABCD-EFG****

ErrorMessage

string

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

The connection does not exist.

Success

boolean

The error code returned.

true

ErrorCode

string

The ID of the file. You can use the ListFiles interface to query the ID of the corresponding file.

Invalid.Tenant.ConnectionNotExists

Contoh

Respons sukses

JSONformat

{
  "HttpStatusCode": 200,
  "DeploymentId": 1000000001,
  "RequestId": "0000-ABCD-EFG****",
  "ErrorMessage": "The connection does not exist.",
  "Success": true,
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.