Mengkueri daftar Sumber daya file di DataStudio. Anda juga dapat menentukan kondisi filter untuk mengkueri Sumber daya file tertentu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
list |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
ID ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Workspace untuk mengkueri ID tersebut. Anda harus mengonfigurasi parameter ini untuk menentukan ruang kerja DataWorks tempat operasi API diterapkan. |
10002 |
| Owner |
string |
No |
ID akun Alibaba Cloud yang digunakan oleh administrator ruang kerja. Anda dapat log ke Konsol Manajemen Alibaba Cloud dan Tampilan ID pada halaman Pengaturan Keamanan. |
110755000425XXXX |
| Type |
string |
No |
Tipe Sumber daya. Parameter ini menentukan kondisi filter. Nilai valid:
Valid values:
|
Python |
| Name |
string |
No |
Nama Sumber daya file. Mendukung pencarian fuzzy. |
test |
| PageNumber |
integer |
No |
Nomor halaman data yang akan diambil, digunakan untuk paginasi. |
1 |
| PageSize |
integer |
No |
Nomor halaman data yang akan diambil, digunakan untuk paginasi. |
10 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
99EBE7CF-69C0-5089-BE3E-79563C31XXXX |
| PagingInfo |
object |
The pagination information. |
|
| TotalCount |
integer |
The total number of entries returned. |
131 |
| PageSize |
integer |
The number of entries per page. |
10 |
| PageNumber |
integer |
The page number. |
1 |
| Resources |
array<object> |
The returned resource list. |
|
|
array<object> |
The elements in the resource list. |
||
| Name |
string |
The resource name. |
math.py |
| ProjectId |
integer |
The ID of the DataWorks workspace. To obtain the workspace ID, log on to the DataWorks console and navigate to the workspace configuration page. |
344247 |
| Owner |
string |
The owner of the file resource. |
110755000425XXXX |
| CreateTime |
integer |
The time when the file resource was created. This value is a UNIX timestamp. |
1724505917000 |
| ModifyTime |
integer |
The timestamp when the file resource was last modified. |
1724505917000 |
| DataSource |
object |
The data source. |
|
| Name |
string |
The name of the data source. |
odps_first |
| Type |
string |
The type of the data source. |
odps |
| Script |
object |
The script information. |
|
| Path |
string |
The script path. |
root/demo |
| Runtime |
object |
Runtime |
|
| Command |
string |
Command. This parameter indicates the file type. |
ODPS_PYTHON |
| Id |
string |
The ID of the script. Catatan
This field is of type Long in SDK versions prior to 8.0.0, and of type String in SDK version 8.0.0 and later. This change does not affect the normal use of the SDK. The parameter is returned based on the type defined in the SDK. Compilation failures caused by the type change may occur only when you upgrade the SDK across version 8.0.0. In this case, you must manually update the data type. |
123348864897630XXXX |
| Type |
string |
The resource type. Valid values:
Valid values:
|
Jar |
| SourceType |
string |
The source storage type of the file resource. Valid values:
Valid values:
|
Local |
| SourcePath |
string |
Source path of the file resource. This parameter is empty if the type is Local. |
XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py |
| TargetType |
string |
The destination storage type. Valid values:
Valid values:
|
Oss |
| TargetPath |
string |
The destination storage path. |
XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py |
| Id |
string |
The unique identifier of the file resource. Catatan
Prior to SDK version 8.0.0, this field is of type Long. In SDK version 8.0.0 and later, it is of type String. This change does not affect the normal use of the SDK. The parameter is returned based on the type defined in the SDK. Compilation failures caused by the type change may occur only when you upgrade the SDK across version 8.0.0. In this case, you must manually update the data type. |
631478864897630XXXX |
Contoh
Respons sukses
JSONformat
{
"RequestId": "99EBE7CF-69C0-5089-BE3E-79563C31XXXX",
"PagingInfo": {
"TotalCount": 131,
"PageSize": 10,
"PageNumber": 1,
"Resources": [
{
"Name": "math.py",
"ProjectId": 344247,
"Owner": "110755000425XXXX",
"CreateTime": 1724505917000,
"ModifyTime": 1724505917000,
"DataSource": {
"Name": "odps_first",
"Type": "odps"
},
"Script": {
"Path": "root/demo",
"Runtime": {
"Command": "ODPS_PYTHON"
},
"Id": "123348864897630XXXX"
},
"Type": "Jar",
"SourceType": "Local",
"SourcePath": "XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py",
"TargetType": "Oss",
"TargetPath": "XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py",
"Id": "631478864897630XXXX"
}
]
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.