Lists Infrequent Access files and the subdirectories that contain them from a specified directory on 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 ID of the file system. |
31a8e4**** |
| Path |
string |
Yes |
The absolute path of the directory. The path must start with a forward slash (/) and exist on the mount target. |
/pathway/to/folder |
| NextToken |
string |
No |
A continuation token used to retrieve the next page of results when the response is truncated. |
TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0= |
| StorageType |
string |
Yes |
The storage type.
Note
If you set |
InfrequentAccess |
| DirectoryOnly |
boolean |
No |
Whether to list only directories. Valid values:
Note
If you set |
false |
| MaxResults |
integer |
No |
The maximum number of directories or files to return per page. Value range: 10–128 Default value: 100 |
100 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination token. If the response is truncated, include this token in the next request to retrieve the next page of results. |
TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0= |
| RequestId |
string |
The request ID. |
2D69A58F-345C-4FDE-88E4-BF518948**** |
| Entries |
array<object> |
The list of directory and file entries. |
|
|
object |
A directory or file entry. |
||
| Type |
string |
The type of the entry. Valid values:
|
File |
| HasInfrequentAccessFile |
boolean |
Specifies whether the directory contains any infrequent access files. This parameter is returned only when Valid values:
|
true |
| Ctime |
string |
The metadata change time (ctime) of the file. The time is in the ISO 8601 format: This parameter is returned only when |
2021-02-11T10:08:10Z |
| Mtime |
string |
The last modification time (mtime) of the file. The time is in the ISO 8601 format: This parameter is returned only when |
2021-02-11T10:08:08Z |
| Size |
integer |
The size of the file, in bytes. This parameter is returned only when This value is returned and is meaningful only when Type is File. |
1024 |
| StorageType |
string |
The storage class of the file. This parameter is returned only when Valid values:
|
InfrequentAccess |
| Atime |
string |
The last access time (atime) of the file. The time is in the ISO 8601 format: This parameter is returned only when |
2021-02-01T10:08:08Z |
| Name |
string |
The name of the file or directory. |
file.txt |
| RetrieveTime |
string |
The last data retrieval time. The time is in the ISO 8601 format: This parameter is returned only when |
2021-02-11T10:08:08Z |
| Inode |
string |
The inode of the file or directory. |
66 |
| FileId |
string |
The ID of the file or directory. |
66 |
| Owner |
string |
The owner of the file or directory. This parameter is returned only when |
37862c**** |
| HasArchiveFile |
string |
Specifies whether the directory contains any archive files. This parameter is returned only when Valid values:
|
true |
| OfflineDuration |
integer |
||
| OfflineUnchangedDuration |
integer |
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": 0,
"OfflineUnchangedDuration": 0
}
]
}
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.