All Products
Search
Document Center

Elastic Compute Service:ModifyAutoSnapshotPolicyEx

Last Updated:Mar 19, 2024

The operation that you want to perform. Set the value to \*\*ModifyAutoSnapshotPolicyEx\*\*.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
regionIdstringYes

The ID of the automatic snapshot policy. You can call the DescribeAutoSnapshotPolicyEx operation to query available automatic snapshot policies.

cn-hangzhou
autoSnapshotPolicyIdstringYes

The name of the automatic snapshot policy. If this parameter is not specified, the original name of the automatic snapshot policy is retained.

sp-bp12m37ccmxvbmi5****
autoSnapshotPolicyNamestringNo

The points in time of the day at which to create automatic snapshots. The time must be in UTC+8. Unit: hours. Valid values are 0 to 23, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, a value of 1 indicates 01:00:00.

To schedule multiple automatic snapshots to be created in a day, you can specify multiple hours.

  • You can specify up to 24 points in time.
  • You must set this parameter to a JSON array such as ["0", "1", ... "23"]. Separate the points in time with commas (,).
SPTestName
timePointsstringNo

The days of the week on which to create automatic snapshots. Valid values are 1 to 7, which correspond to the days of the week. For example, a value of 1 indicates Monday.

To schedule multiple automatic snapshots to be created in a week, you can specify multiple days.

  • You can specify up to seven days over a one-week period.
  • You must set this parameter to a JSON array such as ["1", "2" ... "7"]. Separate the values in the array with commas (,).
["0", "1"]
repeatWeekdaysstringNo

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

  • -1: The automatic snapshot is permanently retained.
  • 1 to 65536: The auto snapshot is retained for the specified number of days.

Default value: -1.

["1", "7"]
retentionDaysintegerNo

Specifies whether to enable cross-region replication for the automatic snapshot.

  • true: enables cross-region replication for the automatic snapshot.
  • false: disables cross-region replication for the automatic snapshot.
30
EnableCrossRegionCopybooleanNo

The destination region to which to copy the snapshot. You can specify only a single destination region.

false
TargetCopyRegionsstringNo

The retention period of the snapshot copy in the destination region. Unit: days. Valid values:

  • -1: The snapshot is permanently retained.
  • 1 to 65535: The automatic snapshot is retained for the specified number of days.

Default value: -1.

["cn-hangzhou"]
CopiedSnapshotsRetentionDaysintegerNo

The ID of the request.

30

Response parameters

ParameterTypeDescriptionExample
The current API has no return parameters

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status codeError codeError messageDescription
403ParameterInvalidThe specified RegionId parameter is invalid.The specified region ID is invalid.
403ParameterInvalidThe specified RepeatWeekDays parameter is invalid.The specified RepeatWeekdays parameter is invalid.
403ParameterInvalidThe specified TimePoints parameter is invalid.The specified TimePoints parameter is invalid.
403ParameterInvalidThe specified AutoSnapshotPolicyId is invalid.The specified automatic snapshot policy ID is invalid.
403ParameterInvalidThe specified RetentionDays parameter is invalid.The specified RetentionDays parameter is invalid.
403InvalidParameter.TargetCopyRegionsThe specified TargetCopyRegions is invalid.-
403InvalidParameter.CopiedSnapshotsRetentionDaysThe specified CopiedSnapshotsRetentionDays is invalid.-
404ParameterInvalidThe specified automatic snapshot policy does not exist.The specified automatic snapshot policy does not exist.
404ParameterInvalidThe specified automatic snapshot policy does not exist in the region.The specified automatic snapshot policy does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-29The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
2024-02-28The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
2024-02-28The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    Error Codes 404 change
    Added Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: CopyEncryptionConfiguration