All Products
Search
Document Center

ApsaraDB for MongoDB:ModifyBackupPolicy

Last Updated:Jan 16, 2024

Modifies the backup policy of an ApsaraDB for MongoDB instance.

Debugging

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

Debug

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dds:ModifyBackupPolicyWRITE
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

dds-bp16cb162771****
PreferredBackupTimestringYes

The time range to back up data. Specify the time in the HH:mmZ-HH:mmZ format. The time must be in UTC.

Note The time range is 1 hour.
03:00Z-04:00Z
PreferredBackupPeriodstringYes

The day of a week on which to back up data. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Note Separate multiple values with commas (,).
Monday,Wednesday,Friday,Sunday
BackupRetentionPeriodlongNo

The retention period of full backups.

Note
  • If your instance is created before September 10, 2021, backups are retained for seven days by default.
  • If your instance is created after September 10, 2021, backups are retained for 30 days by default.
  • 30
    EnableBackupLoglongNo

    Specifies whether to enable log backup. Default value: 0. Valid values:

    • 0: disables log backup.
    • 1: enables log backup.
    0
    LogBackupRetentionPeriodlongNo

    The number of days for which log backups are retained. Default value: 7.

    Valid values: 7 to 730.

    7
    SnapshotBackupTypestringNo

    The snapshot backup type. Default value: Standard. Valid values:

    • Flash: single-digit second backup
    • Standard: standard backup
    Standard
    BackupIntervalstringNo

    The frequency at which high-frequency backups are created. Valid values:

    • -1: disables high-frequency backup.
    • 15: every 15 minutes.
    • 30: every 30 minutes.
    • 60: every hour.
    • 120: every 2 hours.
    • 180: every 3 hours.
    • 240: every 4 hours.
    • 360: every 6 hours.
    • 480: every 8 hours.
    • 720: every 12 hours.
    Note
  • If SnapshotBackupType is set to Standard, this parameter is set to -1 and cannot be changed.
  • High-frequency backup takes effect only when SnapshotBackupType is set to Flash and the value of this parameter is greater than 0.
  • -1

    Response parameters

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    The ID of the request.

    644A359C-B871-4DD3-97B5-ED91EF5809C2

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "644A359C-B871-4DD3-97B5-ED91EF5809C2"
    }

    Error codes

    HTTP status codeError codeError message
    400InvalidPreferredBackupPeriod.MalformedSpecified parameter PreferredBackupPeriod is not valid.
    400InvalidPreferredBackupTime.MalformedSpecified parameter PreferredBackupTime is not valid.

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

    Change history

    Change timeSummary of changesOperation
    No change history