History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
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. value range: 0-23 hr. |
| PolicyName | No | String | Policy name, limited to 64 characters, only supports input of chinese, letters, numbers, _, or -. |
| DayOfWeek | No | String | Snapshot repeat date, monday to sunday. 1 represents monday, 7 represents sunday. choose one from three: DayOfMonth, IntervalDays. |
| AliveDays | No | Integer | Specifies the snapshot retention duration in days. the default value is 0 (permanent). |
| DayOfMonth | No | String | Snapshot monthly recurrence, select a day from the 1st to the 31st of each month, and a snapshot will be automatically created on that day. for example, 1 represents the 1st. choose one of the three: DayOfWeek, IntervalDays. |
| IntervalDays | No | Integer | Interval days. choose one of the three with 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. |
피드백