dcloud monitoring retention-policy put

Set how many days metrics and logs are kept

IAM monitoring:PutRetentionPolicyChanges stateAsks before it deletes (-y skips)

Only the fields sent change. Metrics 14–90 days, logs 1–30 days; longer retention is a paid option, not available yet. Lowering a limit deletes the data past it at the next daily sweep (03:20 UTC); there is no undo after that. Logs are kept by whole UTC days: 1 day keeps today and yesterday.

Synopsis

dcloud monitoring retention-policy put [flags]

Flags

  • --metrics-retention-daysOptional

    number

    Days of built-in metrics, 14–90 (default 90); unchanged when omitted

    Constraints: integer

  • --logs-retention-daysOptional

    number

    Days of logs, 1–30 (default 30); unchanged when omitted

    Constraints: integer

Example

dcloud monitoring retention-policy put

Generated from the API description, the same one the API checks requests against and the CLI is built from.