ApplyDataFlowAutoRefresh
Configures automatic updates for a specified data flow.
Operation description
-
This operation applies only to Cloud Parallel File Storage (CPFS) file systems.
-
Only CPFS 2.2.0 and later support data flows. You can view the version information on the file system details page in the console.
-
You can add auto-refresh configurations only for data flows in the
Runningstate. -
You can add up to five auto-refresh configurations for a data flow.
-
It takes 2 to 5 minutes to create an auto-refresh configuration. You can call DescribeDataFlows to query the data flow status.
-
Auto-refresh relies on EventBridge to collect object modification events from the source OSS storage. Activate EventBridge before you proceed.
NoteThe event buses and event rules that CPFS creates in EventBridge contain the description
Create for cpfs auto refresh. Do not modify or delete these event buses or event rules. Otherwise, auto-refresh cannot work properly. -
Auto-refresh targets a prefix specified by the RefreshPath parameter. When you configure auto-refresh for a prefix in a CPFS data flow, an event bus is created on the user side, and an event rule is created for the prefix of the source OSS bucket. When objects within the prefix of the source OSS bucket are modified, OSS events are generated in EventBridge and processed by the CPFS data flow.
-
After you configure auto-refresh (AutoRefresh), when data changes in the source storage, the changed metadata is automatically synchronized to the CPFS file system. The changed data is loaded on demand when a user accesses the file, or loaded by starting a data flow node to load data.
-
The auto-refresh interval (AutoRefreshInterval) specifies the interval at which CPFS checks whether data updates exist in the prefix of the source OSS bucket. If data updates exist, an auto-refresh node is started. When the frequency of object modification events in the source OSS bucket exceeds the processing capacity of the CPFS data flow, automatic synchronization nodes accumulate, metadata updates are delayed, and the data stream status changes to Misconfigured. To resolve this issue, upgrade the data stream specifications or reduce the modification frequency in OSS.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:ApplyDataFlowAutoRefresh |
update |
*DataFlow
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The ID of the file system. |
cpfs-099394bd928c**** |
| DataFlowId |
string |
Yes |
The ID of the data flow. |
df-194433a5be31**** |
| AutoRefreshs |
array<object> |
Yes |
The collection of auto-refresh configurations. |
|
|
object |
No |
|||
| RefreshPath |
string |
Yes |
The auto-refresh directory. CPFS automatically checks whether data in this directory on the source has been updated and imports the updated data. Limits:
Note
The directory must already exist in CPFS and must be in a fileset that has data flow enabled. |
/prefix1/prefix2/ |
| AutoRefreshPolicy |
string |
No |
The auto-refresh policy. This policy determines how data updates from the source are imported to CPFS. Valid values:
Valid values:
|
None |
| AutoRefreshInterval |
integer |
No |
The auto-refresh interval. CPFS checks the directory for data updates at this interval. If data updates exist, an auto-refresh task is started. Unit: minutes. Valid values: 10 to 525600. Default value: 10. |
10 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run for this request. A dry run checks parameter validity and resource availability without actually creating an instance or incurring charges. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may differ for each API request. |
123e4567-e89b-12d3-a456-42665544**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
98696EF0-1607-4E9D-B01D-F20930B6**** |
Examples
Success response
JSON format
{
"RequestId": "98696EF0-1607-4E9D-B01D-F20930B6****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalCharacters | The parameter contains illegal characters. | The parameter contains illegal characters. |
| 400 | MissingFileSystemId | FileSystemId is mandatory for this action. | |
| 400 | MissingDataFlowId | DataFlowId is mandatory for this action. | |
| 403 | OperationDenied.InvalidState | The operation is not permitted when the status is processing. | The operation is not permitted when the status is processing. |
| 403 | InvalidFileSystem.AlreadyExisted | The specified file system already exists. | The specified file system already exists. |
| 403 | OperationDenied.DependencyViolation | The operation is denied due to dependancy violation. | |
| 403 | OperationDenied.NestedDir | The operation is denied due to nested directory. | |
| 403 | OperationDenied.ConflictOperation | The operation is denied due to a conflict with an ongoing operation. | |
| 403 | OperationDenied.DataFlowNotSupported | The operation is not supported. | |
| 404 | InvalidFileSystem.NotFound | The specified file system does not exist. | The specified file system does not exist. |
| 404 | InvalidDataFlow.NotFound | The specified data flow does not exist. | |
| 404 | InvalidRefreshPath.InvalidParameter | Refresh path is invalid. | |
| 404 | InvalidRefreshPath.NotFound | Refresh path does not exist. | |
| 404 | InvalidRefreshPolicy.InvalidParameter | Refresh policy is invalid. | |
| 404 | InvalidRefreshInterval.OutOfBounds | Refresh interval is out of bounds. | |
| 404 | InvalidRefreshPath.AlreadyExist | The refresh path already exists. | |
| 404 | InvalidRefreshPath.TooManyPaths | The number of refresh paths exceeds the limit. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.