CreateAutoSnapshotPolicy

更新时间:
复制 MD 格式

You can create an automatic snapshot policy to automatically create snapshots for cloud computers based on a cron expression.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. Call DescribeRegions to query the regions supported by WUYING Workspace.

cn-hangzhou

PolicyName

string

Yes

The name of the automatic snapshot policy. It must be 2 to 128 characters in length. It must start with a letter or a Chinese character. It cannot start with http:// or https://. It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: empty.

test_auto_policy

RetentionDays

integer

Yes

The retention period of the automatic snapshot. Unit: days. Valid values: 1 to 180.

2

CronExpression

string

Yes

The cron expression for the recurring schedule.

0 0 2 ? * 1-7

DiskType

string

No

Response elements

Element

Type

Description

Example

object

PolicyId

string

The ID of the automatic snapshot policy.

sp-3hpa78d0qyt99****

RequestId

string

The request ID.

51592A88-0F2C-55E6-AD2C-2AD9C10D****

Examples

Success response

JSON format

{
  "PolicyId": "sp-3hpa78d0qyt99****",
  "RequestId": "51592A88-0F2C-55E6-AD2C-2AD9C10D****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.