ApiSnapshotPolicy Data Model

A snapshot policy.

Snapshot policies have service specific arguments. This object has methods to retrieve arguments for all supported types of snapshots, but only one argument type is allowed to be set; the backend will check that the provided argument matches the type of the service with which the snapshot policy is associated.

Properties
name data type description
name string Name of the snapshot policy.
description string Description of the snapshot policy.
hourlySnapshots number Number of hourly snapshots to be retained. Defaults to 0
dailySnapshots number Number of daily snapshots to be retained. Defaults to 0
weeklySnapshots number Number of weekly snapshots to be retained. Defaults to 0
monthlySnapshots number Number of monthly snapshots to be retained. Defaults to 0
yearlySnapshots number Number of yearly snapshots to be retained. Defaults to 0
minuteOfHour number Minute in the hour that hourly, daily, weekly, monthly and yearly snapshots should be created. Valid values are 0 to 59. Default value is 0.
hoursForHourlySnapshots array of number Hours of the day that hourly snapshots should be created. Valid values are 0 to 23. If this list is null or empty, then hourly snapshots are created for every hour.
hourOfDay number Hour in the day that daily, weekly, monthly and yearly snapshots should be created. Valid values are 0 to 23. Default value is 0.
dayOfWeek number Day of the week that weekly snapshots should be created. Valid values are 1 to 7, 1 representing Sunday. Default value is 1.
dayOfMonth number Day of the month that monthly and yearly snapshots should be created. Values from 1 to 31 are allowed. Additionally 0 to -30 can be used to specify offsets from the last day of the month. Default value is 1.

If this value is invalid for any month for which snapshots are required, the backend will throw an exception.

monthOfYear number Month of the year that yearly snapshots should be created. Valid values are 1 to 12, 1 representing January. Default value is 1.
alertOnStart boolean Whether to alert on start of snapshot creation/deletion activity. Defaults to false
alertOnSuccess boolean Whether to alert on successful completion of snapshot creation/deletion activity. Defaults to false.
alertOnFail boolean Whether to alert on failure of snapshot creation/deletion activity. Defaults to false.
alertOnAbort boolean Whether to alert on abort of snapshot creation/deletion activity. Defaults to false.
hbaseArguments ApiHBaseSnapshotPolicyArguments Arguments specific to HBase snapshot policies.
hdfsArguments ApiHdfsSnapshotPolicyArguments Arguments specific to Hdfs snapshot policies.
lastCommand ApiSnapshotCommand Latest command of this policy. The command might still be active.
lastSuccessfulCommand ApiSnapshotCommand Last successful command of this policy. Returns null if there has been no successful command.
paused boolean Whether to pause a snapshot policy, available since V11.

Example

{
  "name" : "...",
  "description" : "...",
  "hourlySnapshots" : 12345,
  "dailySnapshots" : 12345,
  "weeklySnapshots" : 12345,
  "monthlySnapshots" : 12345,
  "yearlySnapshots" : 12345,
  "minuteOfHour" : 12345,
  "hoursForHourlySnapshots" : [ 12345, 12345 ],
  "hourOfDay" : 12345,
  "dayOfWeek" : 12345,
  "dayOfMonth" : 12345,
  "monthOfYear" : 12345,
  "alertOnStart" : true,
  "alertOnSuccess" : true,
  "alertOnFail" : true,
  "alertOnAbort" : true,
  "hbaseArguments" : {
    "tableRegExps" : [ "...", "..." ],
    "storage" : "REMOTE_S3"
  },
  "hdfsArguments" : {
    "pathPatterns" : [ "...", "..." ]
  },
  "lastCommand" : {
    "hbaseResult" : {
      "processedTableCount" : 12345,
      "processedTables" : [ "...", "..." ],
      "unprocessedTableCount" : 12345,
      "unprocessedTables" : [ "...", "..." ],
      "createdSnapshotCount" : 12345,
      "createdSnapshots" : [ { }, { } ],
      "deletedSnapshotCount" : 12345,
      "deletedSnapshots" : [ { }, { } ],
      "creationErrorCount" : 12345,
      "creationErrors" : [ { }, { } ],
      "deletionErrorCount" : 12345,
      "deletionErrors" : [ { }, { } ]
    },
    "hdfsResult" : {
      "processedPathCount" : 12345,
      "processedPaths" : [ "...", "..." ],
      "unprocessedPathCount" : 12345,
      "unprocessedPaths" : [ "...", "..." ],
      "createdSnapshotCount" : 12345,
      "createdSnapshots" : [ { }, { } ],
      "deletedSnapshotCount" : 12345,
      "deletedSnapshots" : [ { }, { } ],
      "creationErrorCount" : 12345,
      "creationErrors" : [ { }, { } ],
      "deletionErrorCount" : 12345,
      "deletionErrors" : [ { }, { } ]
    },
    "id" : 12345,
    "name" : "...",
    "startTime" : "...",
    "endTime" : "...",
    "active" : true,
    "success" : true,
    "resultMessage" : "...",
    "resultDataUrl" : "...",
    "clusterRef" : {
      "clusterName" : "...",
      "displayName" : "..."
    },
    "serviceRef" : {
      "peerName" : "...",
      "clusterName" : "...",
      "serviceName" : "...",
      "serviceDisplayName" : "...",
      "serviceType" : "..."
    },
    "roleRef" : {
      "clusterName" : "...",
      "serviceName" : "...",
      "roleName" : "...",
      "healthSummary" : "DISABLED",
      "roleStatus" : "NA"
    },
    "hostRef" : {
      "hostId" : "...",
      "hostname" : "..."
    },
    "parent" : {
      "id" : 12345,
      "name" : "...",
      "startTime" : "...",
      "endTime" : "...",
      "active" : true,
      "success" : true,
      "resultMessage" : "...",
      "resultDataUrl" : "...",
      "clusterRef" : { },
      "serviceRef" : { },
      "roleRef" : { },
      "hostRef" : { },
      "parent" : { },
      "children" : { },
      "canRetry" : true
    },
    "children" : {
      "items" : [ { }, { } ]
    },
    "canRetry" : true
  },
  "lastSuccessfulCommand" : {
    "hbaseResult" : {
      "processedTableCount" : 12345,
      "processedTables" : [ "...", "..." ],
      "unprocessedTableCount" : 12345,
      "unprocessedTables" : [ "...", "..." ],
      "createdSnapshotCount" : 12345,
      "createdSnapshots" : [ { }, { } ],
      "deletedSnapshotCount" : 12345,
      "deletedSnapshots" : [ { }, { } ],
      "creationErrorCount" : 12345,
      "creationErrors" : [ { }, { } ],
      "deletionErrorCount" : 12345,
      "deletionErrors" : [ { }, { } ]
    },
    "hdfsResult" : {
      "processedPathCount" : 12345,
      "processedPaths" : [ "...", "..." ],
      "unprocessedPathCount" : 12345,
      "unprocessedPaths" : [ "...", "..." ],
      "createdSnapshotCount" : 12345,
      "createdSnapshots" : [ { }, { } ],
      "deletedSnapshotCount" : 12345,
      "deletedSnapshots" : [ { }, { } ],
      "creationErrorCount" : 12345,
      "creationErrors" : [ { }, { } ],
      "deletionErrorCount" : 12345,
      "deletionErrors" : [ { }, { } ]
    },
    "id" : 12345,
    "name" : "...",
    "startTime" : "...",
    "endTime" : "...",
    "active" : true,
    "success" : true,
    "resultMessage" : "...",
    "resultDataUrl" : "...",
    "clusterRef" : {
      "clusterName" : "...",
      "displayName" : "..."
    },
    "serviceRef" : {
      "peerName" : "...",
      "clusterName" : "...",
      "serviceName" : "...",
      "serviceDisplayName" : "...",
      "serviceType" : "..."
    },
    "roleRef" : {
      "clusterName" : "...",
      "serviceName" : "...",
      "roleName" : "...",
      "healthSummary" : "BAD",
      "roleStatus" : "BUSY"
    },
    "hostRef" : {
      "hostId" : "...",
      "hostname" : "..."
    },
    "parent" : {
      "id" : 12345,
      "name" : "...",
      "startTime" : "...",
      "endTime" : "...",
      "active" : true,
      "success" : true,
      "resultMessage" : "...",
      "resultDataUrl" : "...",
      "clusterRef" : { },
      "serviceRef" : { },
      "roleRef" : { },
      "hostRef" : { },
      "parent" : { },
      "children" : { },
      "canRetry" : true
    },
    "children" : {
      "items" : [ { }, { } ]
    },
    "canRetry" : true
  },
  "paused" : true
}