Retrieves the list of IA storage class files and subdirectories that contain IA storage class files under a specified directory in a General-purpose NAS file system.
Operation description
Only General-purpose NAS file systems support this feature.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:ListDirectoriesAndFiles |
get |
*FileSystem
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The file system ID. |
31a8e4**** |
| Path |
string |
Yes |
The absolute path of the specified directory. The path must start with a forward slash (/) and must be an existing path in the mount target. |
/pathway/to/folder |
| NextToken |
string |
No |
The pagination token that is used in the next request to retrieve a new page of results. If the return results are truncated, you can use NextToken to initiate a new request to retrieve the content after the current truncation position. |
TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0= |
| StorageType |
string |
Yes |
The storage class type.
Note
When StorageType is set to All, you must set DirectoryOnly to true. Valid values:
|
InfrequentAccess |
| DirectoryOnly |
boolean |
No |
Specifies whether to query only directories. Valid values:
Note
When StorageType is set to All, DirectoryOnly must be set to true and cannot be set to false. |
false |
| MaxResults |
integer |
No |
The number of directories or files included in each query result. Valid values: 10 to 128. Default value: 100. |
100 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination token that is used in the next request to retrieve a new page of results. If the return results are truncated, you can use NextToken to initiate a new request to retrieve the content after the current truncation position. |
TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0= |
| RequestId |
string |
The request ID. |
2D69A58F-345C-4FDE-88E4-BF518948**** |
| Entries |
array<object> |
The collection of directory or file information. |
|
|
object |
The collection of directory or file information. |
||
| Type |
string |
The type of the returned result. Valid values:
|
File |
| HasInfrequentAccessFile |
boolean |
Indicates whether the directory contains IA storage class files. This parameter is returned and meaningful only when Type is set to Directory. Valid values:
|
true |
| Ctime |
string |
The time when the metadata was modified. The time follows the ISO 8601 standard and is returned in the format: This parameter is returned and meaningful only when Type is set to File. |
2021-02-11T10:08:10Z |
| Mtime |
string |
The time when the file was modified. The time follows the ISO 8601 standard and is returned in the format: This parameter is returned and meaningful only when Type is set to File. |
2021-02-11T10:08:08Z |
| Size |
integer |
The size of the file. Unit: bytes. This parameter is returned and meaningful only when Type is set to File. |
1024 |
| StorageType |
string |
The storage class type of the returned file. This parameter is returned and meaningful only when Type is set to File. Valid values:
|
InfrequentAccess |
| Atime |
string |
The query time. The time follows the ISO 8601 standard and is returned in the format: This parameter is returned and meaningful only when Type is set to File. |
2021-02-01T10:08:08Z |
| Name |
string |
The file name or directory name. |
file.txt |
| RetrieveTime |
string |
The time when the most recent data retrieval task was run. The time follows the ISO 8601 standard and is returned in the format: This parameter is returned and meaningful only when Type is set to File. |
2021-02-11T10:08:08Z |
| Inode |
string |
The inode of the file or directory. |
66 |
| FileId |
string |
The FileId of the directory or file. |
66 |
| Owner |
string |
The portable account ID. This parameter is meaningful only when ProtocolType is set to SMB and access control is enabled. |
37862c**** |
| HasArchiveFile |
string |
Indicates whether the directory contains archive storage class files. This parameter is returned and meaningful only when Type is set to Directory. Valid values:
|
true |
| OfflineDuration |
integer |
The total duration for which the file has been stored as an archive file. Unit: seconds. |
3600 |
| OfflineUnchangedDuration |
integer |
The total duration for which the file has remained unchanged since it was stored as an archive file. Unit: seconds. |
3600 |
Examples
Success response
JSON format
{
"NextToken": "TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0=",
"RequestId": "2D69A58F-345C-4FDE-88E4-BF518948****",
"Entries": [
{
"Type": "File",
"HasInfrequentAccessFile": true,
"Ctime": "2021-02-11T10:08:10Z",
"Mtime": "2021-02-11T10:08:08Z",
"Size": 1024,
"StorageType": "InfrequentAccess",
"Atime": "2021-02-01T10:08:08Z",
"Name": "file.txt",
"RetrieveTime": "2021-02-11T10:08:08Z",
"Inode": "66",
"FileId": "66",
"Owner": "37862c****",
"HasArchiveFile": "true",
"OfflineDuration": 3600,
"OfflineUnchangedDuration": 3600
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationDenied.InvalidNextToken | The specified NextToken is invalid. | The specified NextToken is invalid. |
| 404 | InvalidFileSystem.NotFound | The specified file system does not exist. | The specified file system does not exist. |
| 404 | InvalidParameter.PathNotExist | The specified path does not exist. | The specified path does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.