Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for PostgreSQL
  • Getting started
  • Access management
  • Terraform reference
    • Authentication with the API
      • Overview
        • Overview
        • List
        • Create
        • Delete
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • gRPC request
  • CreateBackupRetentionPolicyRequest
  • CronTab
  • CreateBackupRetentionPolicyResponse
  • BackupRetentionPolicy
  • CronTab
  1. API reference
  2. gRPC
  3. BackupRetentionPolicy
  4. Create

Managed Service for PostgreSQL API, gRPC: BackupRetentionPolicyService.Create

Written by
Tania Lushnikova
Updated at February 21, 2025
  • gRPC request
  • CreateBackupRetentionPolicyRequest
  • CronTab
  • CreateBackupRetentionPolicyResponse
  • BackupRetentionPolicy
  • CronTab

Add a new retention policy.

gRPC requestgRPC request

rpc Create (CreateBackupRetentionPolicyRequest) returns (CreateBackupRetentionPolicyResponse)

CreateBackupRetentionPolicyRequestCreateBackupRetentionPolicyRequest

{
  "cluster_id": "string",
  "cron": {
    "day_of_month": "string",
    "month": "string",
    "day_of_week": "string"
  },
  "retain_for_days": "int64",
  "description": "string",
  "policy_name": "string"
}

Field

Description

cluster_id

string

Required field. ID of the PostgreSQL cluster.
To get the PostgreSQL cluster ID use a ClusterService.List request.

cron

CronTab

CronTab schedule.

retain_for_days

int64

Retention duration.

description

string

Policy description.

policy_name

string

Required field. Required. Policy name.

CronTabCronTab

Message to describe a crontab schedule.

Field

Description

day_of_month

string

month

string

day_of_week

string

CreateBackupRetentionPolicyResponseCreateBackupRetentionPolicyResponse

{
  "policy": {
    "policy_id": "string",
    "cluster_id": "string",
    "policy_name": "string",
    "created_at": "google.protobuf.Timestamp",
    "cron": {
      "day_of_month": "string",
      "month": "string",
      "day_of_week": "string"
    },
    "retain_for_days": "int64",
    "description": "string"
  }
}

Field

Description

policy

BackupRetentionPolicy

Newly created BackupRetentionPolicy.

BackupRetentionPolicyBackupRetentionPolicy

Message to describe a retention policy for cluster backups.

Field

Description

policy_id

string

Required field. Required. Policy ID.

cluster_id

string

Required field. PostgreSQL cluster ID.

policy_name

string

Required field. Required. Policy name.

created_at

google.protobuf.Timestamp

Creation timestamp in RFC3339 text format.

cron

CronTab

CronTab schedule.

retain_for_days

int64

Retention duration.

description

string

Human-readable description.

CronTabCronTab

Message to describe a crontab schedule.

Field

Description

day_of_month

string

month

string

day_of_week

string

Was the article helpful?

Previous
List
Next
Delete
© 2025 Direct Cursus Technology L.L.C.