Managed Service for PostgreSQL API, REST: BackupRetentionPolicy.Create
Add a new retention policy.
HTTP request
POST https://mdb.api.cloud.yandex.net/managed-postgresql/v1/clusters/{clusterId}/retention_policies
Path parameters
Field |
Description |
clusterId |
string Required field. ID of the PostgreSQL cluster. |
Body parameters
{
"cron": {
"dayOfMonth": "string",
"month": "string",
"dayOfWeek": "string"
},
"retainForDays": "string",
"description": "string",
"policyName": "string"
}
Field |
Description |
cron |
CronTab schedule. |
retainForDays |
string (int64) Retention duration. |
description |
string Policy description. |
policyName |
string Required field. Required. Policy name. |
CronTab
Message to describe a crontab schedule.
Field |
Description |
dayOfMonth |
string |
month |
string |
dayOfWeek |
string |
Response
HTTP Code: 200 - OK
{
"policy": {
"policyId": "string",
"clusterId": "string",
"policyName": "string",
"createdAt": "string",
"cron": {
"dayOfMonth": "string",
"month": "string",
"dayOfWeek": "string"
},
"retainForDays": "string",
"description": "string"
}
}
Field |
Description |
policy |
Newly created BackupRetentionPolicy. |
BackupRetentionPolicy
Message to describe a retention policy for cluster backups.
Field |
Description |
policyId |
string Required field. Required. Policy ID. |
clusterId |
string Required field. PostgreSQL cluster ID. |
policyName |
string Required field. Required. Policy name. |
createdAt |
string (date-time) Creation timestamp in RFC3339 String in RFC3339 To work with values in this field, use the APIs described in the |
cron |
CronTab schedule. |
retainForDays |
string (int64) Retention duration. |
description |
string Human-readable description. |
CronTab
Message to describe a crontab schedule.
Field |
Description |
dayOfMonth |
string |
month |
string |
dayOfWeek |
string |