Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Logging
  • Getting started
    • All guides
    • Adding records
    • Reading records
    • Managing log group access permissions
      • Creating a log group
      • Updating a log group
      • Viewing monitoring charts
      • Deleting a log group
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Managing a log group
  3. Updating a log group

Updating a log group

Written by
Yandex Cloud
Updated at July 20, 2026
View in Markdown
Management console
CLI
Terraform
API
  1. In the management console, select the folder containing your log group.
  2. Navigate to Cloud Logging.
  3. Next to the log group, click .
  4. In the menu that opens, click Edit.
  5. Update the log group settings.
  6. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

To access a log group, use its name or unique ID. To find them out, get a list of log groups in the folder.

To update log group settings, such as the record retention period, run this command:

yc logging group update --name=default --retention-period=24h

Where:

  • --name: Name of the log group whose record retention period you want to update.

  • --retention-period: New retention period for log group records.

    You can only set the record retention period in hours, minutes, or seconds, e.g., 1h or 1440m.

Result:

id: af3mu6hnd0**********
folder_id: aoek6qrs8t**********
cloud_id: aoegtvhtp8**********
created_at: "2023-06-22T09:51:43.614Z"
name: default
status: ACTIVE
retention_period: 86400s

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.

To update the settings of a log group created with Terraform:

  1. Open the Terraform configuration file and edit the setting, such as the record retention period, in the log group description as needed:

    ...
    resource "yandex_logging_group" "group1" {
      name             = "test-logging-group"
      folder_id        = "<folder_ID>"
      retention_period = "5h"
    }
    ...
    

    Where:

    • name: Log group name. This is an optional setting.

    • folder_id: Folder ID. This is an optional setting. It defaults to the value specified in the provider settings.

    • retention_period: New retention period for log group records.

      You can only set the record retention period in hours, minutes, or seconds, e.g., 1h or 1440m.

    For more on the properties of the yandex_logging_group resource, see this provider guide.

  2. Validate your configuration using this command:

    terraform validate
    

    If the configuration is valid, you will get this message:

    Success! The configuration is valid.
    
  3. Run this command:

    terraform plan
    

    You will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.

  4. Apply the configuration changes:

    terraform apply
    
  5. Type yes and press Enter to confirm the changes.

    You can check the log group update in the management console or using this CLI command:

    yc logging group get <log_group_name>
    

To update a log group, use the update REST API method for the LogGroup resource or the LogGroupService/Update gRPC API call.

Request example

The example below uses grpcurl. To run this example, authenticate with the API and clone the cloudapi repository.

In our example, we are updating the record retention period.

Create a file named payload.json:

{
   "log_group_id": "<log_group_ID>",
   "retention_period": "24h",
   "update_mask": {
      "paths": ["retention_period"]
   }
}

Send this request:

grpcurl -rpc-header "Authorization: Bearer $(yc iam create-token)" \
  -d @ \
  -import-path ~/cloudapi/ \
  -import-path ~/cloudapi/third_party/googleapis/ \
  -proto ~/cloudapi/yandex/cloud/logging/v1/log_group_service.proto \
logging.api.cloud.yandex.net:443 yandex.cloud.logging.v1.LogGroupService.Update < payload.json

Response:

{
  "id": "e23omac87b3a********",
  "description": "Update log group",
  "createdAt": "2023-03-25T05:39:24.058608338Z",
  "createdBy": "ajego134p5h1********",
  "modifiedAt": "2023-03-25T05:39:24.058608338Z",
  "metadata": {
    "@type": "type.googleapis.com/yandex.cloud.logging.v1.UpdateLogGroupMetadata",
    "logGroupId": "e23ff0on5amv********"
  }
}

Was the article helpful?

Previous
Creating a log group
Next
Viewing monitoring charts
© 2026 Direct Cursus Technology L.L.C.