Skip to main content
Platform O&M/Backup Management/Continuous Data Protection (CDP)/CDP Operations
POSTCDP OperationsSince 4.5.0SynchronousAuth Required

CreateCdpPolicy

CreateCdpPolicy

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • nameStringRequired

      The name of the resource.

    • descriptionString

      Optional. Optional. The detailed description of the resource.

    • retentionTimePerDayIntegerRequired

      The retention time of the recovery points.

    • recoveryPointPerSecondIntegerRequired

      The retention interval of the recovery points.

    • hourlyRpSinceDayIntegerRequired

      The day from which to keep a recovery point hourly.

    • dailyRpSinceDayIntegerRequired

      The day from which to keep a recovery point per day.

    • expireTimeInDayIntegerRequired

      The valid time of the backup data.

    • fullBackupIntervalInDayIntegerRequired

      The interval of the full backup.

    • resourceUuidString

      Optional. The UUID of the resource.

    • tagUuidsList

      Optional. The UUID list of the tags.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    Succeeded.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryCdpPolicyInventoryRequired

    See inventory.

    • uuidStringRequired

      The UUID of the CDP policy.

    • nameStringRequired

      The name of the CDP policy.

    • descriptionStringRequired

      The detailed description of the CDP policy.

    • retentionTimePerDayIntegerRequired

      The retention time for the recovery points.

    • recoveryPointPerSecondIntegerRequired

      The retention interval of the recovery points.

    • createDateTimestampRequired

      The time when the CDP policy is created.

    • lastOpDateTimestampRequired

      The time when the CDP policy is last modified.

    • stateCdpPolicyStateRequired

      See state.

      • EnabledCdpPolicyStateRequired

        The CDP policy is enabled.

      • DisabledCdpPolicyStateRequired

        The CDP policy is disabled.

Endpoint

POST/zstack/v1/cdp-backup-storage/policy

/zstack/v1/cdp-backup-storage/policy

Operation ID

CreateCdpPolicy

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/cdp-backup-storage/policy' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","retentionTimePerDay":1,"recoveryPointPerSecond":1,"hourlyRpSinceDay":1,"dailyRpSinceDay":1,"expireTimeInDay":1,"fullBackupIntervalInDay":1,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "name": "MyCdpPolicyName", "description": "MyCdpDescription", "retentionTimePerDay": 7.0, "recoveryPointPerSecond": 5.0 } }

Change History

This API has no change history records yet.

View all change history