Domain name for API request: cfs.intl.tencentcloudapi.com.
This API is used to create a scheduled snapshot policy.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateAutoSnapshotPolicy. |
| Version | Yes | String | Common Params. The value used for this API: 2019-07-19. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| Hour | Yes | String | Snapshot repeat time point, 0-23, in hours. |
| PolicyName | No | String | Policy name. It supports up to 64 characters and can only include Chinese characters, letters, digits, underscores (_), or hyphens (-). |
| DayOfWeek | No | String | Snapshot repeat day, from Monday to Sunday. 1 indicates Monday and 7 indicates Sunday. Choose one among this parameter, DayOfMonth, and IntervalDays. |
| AliveDays | No | Integer | Snapshot retention period in days. Default value: 0, which indicates permanent retention. |
| DayOfMonth | No | String | Snapshot repeats monthly. Select a day from 1 to 31, and a snapshot will be automatically created on that day each month. For example, 1 indicates the 1st day. Choose one among this parameter, DayOfWeek, and IntervalDays. |
| IntervalDays | No | Integer | Interval in days. Choose one among this parameter, DayOfWeek, and DayOfMonth. |
| ResourceTags.N | No | Array of TagInfo | Snapshot policy tag |
| Parameter Name | Type | Description |
|---|---|---|
| AutoSnapshotPolicyId | String | Snapshot policy ID |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: cfs.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAutoSnapshotPolicy
<Common request parameters>
{
"Hour": "1",
"PolicyName": "abd",
"DayOfWeek": "1",
"AliveDays": 1,
"ResourceTags": [
{
"TagKey": "u90e8u95e8",
"TagValue": "u4e91u4ea7u54c1u4e00u90e8"
}
]
}
{
"Response": {
"AutoSnapshotPolicyId": "asp-fglw8r91",
"RequestId": "0c37adaf-f6bc-4fca-b387-454ea93127e1"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure.UnauthorizedOperation | Request unauthorized. |
| InternalError | Internal error. |
| InvalidParameter | Invalid parameter. |
| InvalidParameter.InvalidAlivedDays | The snapshot retention period is invalid. |
| InvalidParameter.InvalidParamDayofWeek | The scheduled day of the week parameter is invalid. |
| InvalidParameter.InvalidParamHour | The value of the scheduled hour parameter is incorrect. |
| InvalidParameter.InvalidSnapshotPolicyName | The file system snapshot policy name is invalid. |
| InvalidParameter.MissingPolicyParam | The policy parameter is missing. |
| InvalidParameter.SnapshotPolicyNameLimitExceeded | The file system snapshot policy name exceeds the limit. |
| InvalidParameterValue | The parameter value is incorrect. |
| InvalidParameterValue.AutoPolicyNotFound | Auto scale-out policy does not exist. |
| InvalidParameterValue.InvalidAliveDays | Invalid AliveDays valueerror. |
| InvalidParameterValue.InvalidDestinationRegions | Snapshot cross-region replication parameter is not supported in this region. |
| InvalidParameterValue.InvalidParamDayOfMonth | Invalid value of DayOfMonth. |
| InvalidParameterValue.InvalidParamDayOfWeek | Invalid parameter, DayOfWeek. |
| InvalidParameterValue.InvalidParamIntervalDays | Invalid value of IntervalDays. |
| InvalidParameterValue.InvalidSnapPolicyStatus | Invalid snapshot policy status. |
| InvalidParameterValue.InvalidSnapshotName | Invalid snapshot name. |
| InvalidParameterValue.InvalidSnapshotPolicyName | Invalid snapshot policy name. |
| InvalidParameterValue.MissingSnapNameOrAliveDay | Missing required parameter Snapshot Name or aliveDays. |
| InvalidParameterValue.SnapshotNameLimitExceeded | Snapshot name exceeds limit. name length not exceeding 64 characters. |
| InvalidParameterValue.SnapshotPolicyNameLimitExceeded | Snapshot policy name exceeds the 64-character limit. |
| UnsupportedOperation.OutOfService | Your account is in arrears. Please top up and try again. |
| UnsupportedOperation.UnauthorizedCfsQcsRole | The CFS role was not authorized. |
| UnsupportedOperation.UnverifiedUser | Unverified user. |
フィードバック