Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • Машинное обучение
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Истории успеха
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Yandex Audit Trails
  • Начало работы
  • Управление доступом
  • Правила тарификации
  • Справочник Terraform
    • Аутентификация в API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • ListOperations
        • ListAccessBindings
        • SetAccessBindings
        • UpdateAccessBindings
  • Метрики Monitoring
  • Справочник событий уровня конфигурации
  • Справочник событий уровня сервисов
  • История изменений
  • Обучающие курсы

В этой статье:

  • gRPC request
  • UpdateTrailRequest
  • Destination
  • ObjectStorage
  • CloudLogging
  • DataStream
  • Filter
  • PathFilter
  • PathFilterElement
  • PathFilterElementAny
  • Resource
  • PathFilterElementSome
  • EventFilter
  • EventFilterElement
  • EventFilterElementCategory
  • FilteringPolicy
  • ManagementEventsFiltering
  • DataEventsFiltering
  • EventTypes
  • DnsDataEventsFilter
  • operation.Operation
  • UpdateTrailMetadata
  • Trail
  • Destination
  • ObjectStorage
  • CloudLogging
  • DataStream
  • Filter
  • PathFilter
  • PathFilterElement
  • PathFilterElementAny
  • Resource
  • PathFilterElementSome
  • EventFilter
  • EventFilterElement
  • EventFilterElementCategory
  • FilteringPolicy
  • ManagementEventsFiltering
  • DataEventsFiltering
  • EventTypes
  • DnsDataEventsFilter
  1. Справочник API
  2. gRPC (англ.)
  3. Trail
  4. Update

Audit Trails API, gRPC: TrailService.Update

Статья создана
Yandex Cloud
Обновлена 14 января 2025 г.
  • gRPC request
  • UpdateTrailRequest
  • Destination
  • ObjectStorage
  • CloudLogging
  • DataStream
  • Filter
  • PathFilter
  • PathFilterElement
  • PathFilterElementAny
  • Resource
  • PathFilterElementSome
  • EventFilter
  • EventFilterElement
  • EventFilterElementCategory
  • FilteringPolicy
  • ManagementEventsFiltering
  • DataEventsFiltering
  • EventTypes
  • DnsDataEventsFilter
  • operation.Operation
  • UpdateTrailMetadata
  • Trail
  • Destination
  • ObjectStorage
  • CloudLogging
  • DataStream
  • Filter
  • PathFilter
  • PathFilterElement
  • PathFilterElementAny
  • Resource
  • PathFilterElementSome
  • EventFilter
  • EventFilterElement
  • EventFilterElementCategory
  • FilteringPolicy
  • ManagementEventsFiltering
  • DataEventsFiltering
  • EventTypes
  • DnsDataEventsFilter

Updates the specified trail.

gRPC requestgRPC request

rpc Update (UpdateTrailRequest) returns (operation.Operation)

UpdateTrailRequestUpdateTrailRequest

{
  "trail_id": "string",
  "update_mask": "google.protobuf.FieldMask",
  "name": "string",
  "description": "string",
  "labels": "map<string, string>",
  "destination": {
    // Includes only one of the fields `object_storage`, `cloud_logging`, `data_stream`
    "object_storage": {
      "bucket_id": "string",
      "object_prefix": "string"
    },
    "cloud_logging": {
      // Includes only one of the fields `log_group_id`
      "log_group_id": "string"
      // end of the list of possible fields
    },
    "data_stream": {
      "database_id": "string",
      "stream_name": "string"
    }
    // end of the list of possible fields
  },
  "service_account_id": "string",
  "filter": {
    "path_filter": {
      "root": {
        // Includes only one of the fields `any_filter`, `some_filter`
        "any_filter": {
          "resource": {
            "id": "string",
            "type": "string"
          }
        },
        "some_filter": {
          "resource": {
            "id": "string",
            "type": "string"
          },
          "filters": [
            "PathFilterElement"
          ]
        }
        // end of the list of possible fields
      }
    },
    "event_filter": {
      "filters": [
        {
          "service": "string",
          "categories": [
            {
              "plane": "EventCategoryFilter",
              "type": "EventAccessTypeFilter"
            }
          ],
          "path_filter": {
            "root": {
              // Includes only one of the fields `any_filter`, `some_filter`
              "any_filter": {
                "resource": {
                  "id": "string",
                  "type": "string"
                }
              },
              "some_filter": {
                "resource": {
                  "id": "string",
                  "type": "string"
                },
                "filters": [
                  "PathFilterElement"
                ]
              }
              // end of the list of possible fields
            }
          }
        }
      ]
    }
  },
  "filtering_policy": {
    "management_events_filter": {
      "resource_scopes": [
        {
          "id": "string",
          "type": "string"
        }
      ]
    },
    "data_events_filters": [
      {
        "service": "string",
        // Includes only one of the fields `included_events`, `excluded_events`
        "included_events": {
          "event_types": [
            "string"
          ]
        },
        "excluded_events": {
          "event_types": [
            "string"
          ]
        },
        // end of the list of possible fields
        // Includes only one of the fields `dns_filter`
        "dns_filter": {
          "only_recursive_queries": "bool"
        },
        // end of the list of possible fields
        "resource_scopes": [
          {
            "id": "string",
            "type": "string"
          }
        ]
      }
    ]
  }
}

Field

Description

trail_id

string

Required field. ID of the trail to update.

update_mask

google.protobuf.FieldMask

Field mask that specifies which attributes of the trail are going to be updated.

name

string

New name of the trail.

description

string

New description of the trail.

labels

object (map<string, string>)

New custom labels for the secret as key:value pairs. Maximum 64 per key.

destination

Destination

New destination configuration for the trail

service_account_id

string

New service account ID of the trail

filter

Filter

Updated filtering configuration of the trail
deprecated: use filtering_policy instead

filtering_policy

FilteringPolicy

Updated event filtering policy

DestinationDestination

Field

Description

object_storage

ObjectStorage

Configuration for event delivery to Object Storage

Uploaded objects will have prefix <trail_id>/ by default

Includes only one of the fields object_storage, cloud_logging, data_stream.

cloud_logging

CloudLogging

Configuration for event delivery to Cloud Logging

Includes only one of the fields object_storage, cloud_logging, data_stream.

data_stream

DataStream

Configuration for event delivery to YDS

Includes only one of the fields object_storage, cloud_logging, data_stream.

ObjectStorageObjectStorage

Field

Description

bucket_id

string

Name of the destination bucket

object_prefix

string

Prefix for exported objects. Optional
If specified, uploaded objects will have prefix <object_prefix>/<trail_id>/

CloudLoggingCloudLogging

Field

Description

log_group_id

string

ID of the Cloud Logging destination group

Includes only one of the fields log_group_id.

DataStreamDataStream

Field

Description

database_id

string

ID of the database hosting the destination YDS

stream_name

string

Name of the destination YDS

FilterFilter

Field

Description

path_filter

PathFilter

Configuration of default events gathering for the trail
If not specified, default events won't be gathered for the trail

event_filter

EventFilter

Required field. Configuration of additional events gathering from specific services

PathFilterPathFilter

Field

Description

root

PathFilterElement

Required field. Root element of the resource path filter for the trail
Resource described in that filter node must contain the trail itself

PathFilterElementPathFilterElement

Field

Description

any_filter

PathFilterElementAny

Filter element with ANY type. If used, configures the trail to gather any events from the resource

Includes only one of the fields any_filter, some_filter.

some_filter

PathFilterElementSome

Filter element with SOME type. If used, configures the trail to gather some of the events from the resource

Includes only one of the fields any_filter, some_filter.

PathFilterElementAnyPathFilterElementAny

Field

Description

resource

Resource

Required field. Resource definition

ResourceResource

Field

Description

id

string

Required field. ID of the resource

type

string

Required field. Type of the resource

PathFilterElementSomePathFilterElementSome

Field

Description

resource

Resource

Required field. Definition of the resource that contains nested resources

filters[]

PathFilterElement

Filters for the resources contained in the parent resource

EventFilterEventFilter

Field

Description

filters[]

EventFilterElement

List of filters for services

EventFilterElementEventFilterElement

Field

Description

service

string

Required field. Service ID of the gathered events

categories[]

EventFilterElementCategory

List of the event categories gathered for a specified service

path_filter

PathFilter

Required field. Resource path filter for a specified service

EventFilterElementCategoryEventFilterElementCategory

Field

Description

plane

enum EventCategoryFilter

Required field. Plane of the gathered category

  • EVENT_CATEGORY_FILTER_UNSPECIFIED
  • CONTROL_PLANE: The events that are generated during the interaction with the service's resources
  • DATA_PLANE: Events that are generated during interaction with data within the service's resources

type

enum EventAccessTypeFilter

Required field. Type of the gathered category

  • EVENT_ACCESS_TYPE_FILTER_UNSPECIFIED
  • WRITE: Events for operations that do perform some modification
  • READ: Events for operations that do not perform any modifications

FilteringPolicyFilteringPolicy

Combination of policies describing event filtering process of the trail
At least one filed must be filled

Field

Description

management_events_filter

ManagementEventsFiltering

Singular filter describing gathering management events

data_events_filters[]

DataEventsFiltering

List of filters describing gathering data events

ManagementEventsFilteringManagementEventsFiltering

Policy for gathering management events

Field

Description

resource_scopes[]

Resource

A list of resources which will be monitored by the trail

DataEventsFilteringDataEventsFiltering

Policy for gathering data events

Field

Description

service

string

Required field. Name of the service whose events will be delivered

included_events

EventTypes

Explicitly included events of specified service
New events of the service won't be delivered by default

Includes only one of the fields included_events, excluded_events.

excluded_events

EventTypes

Explicitly excluded events of specified service
New events of the service will be delivered by default

Includes only one of the fields included_events, excluded_events.

dns_filter

DnsDataEventsFilter

Filter is allowed only if service = dns

Includes only one of the fields dns_filter.

resource_scopes[]

Resource

A list of resources which will be monitored by the trail

EventTypesEventTypes

Policy with explicitly specified event group

Field

Description

event_types[]

string

DnsDataEventsFilterDnsDataEventsFilter

Field

Description

only_recursive_queries

bool

Only recursive queries will be delivered

operation.Operationoperation.Operation

{
  "id": "string",
  "description": "string",
  "created_at": "google.protobuf.Timestamp",
  "created_by": "string",
  "modified_at": "google.protobuf.Timestamp",
  "done": "bool",
  "metadata": {
    "trail_id": "string"
  },
  // Includes only one of the fields `error`, `response`
  "error": "google.rpc.Status",
  "response": {
    "id": "string",
    "folder_id": "string",
    "created_at": "google.protobuf.Timestamp",
    "updated_at": "google.protobuf.Timestamp",
    "name": "string",
    "description": "string",
    "labels": "map<string, string>",
    "destination": {
      // Includes only one of the fields `object_storage`, `cloud_logging`, `data_stream`
      "object_storage": {
        "bucket_id": "string",
        "object_prefix": "string"
      },
      "cloud_logging": {
        // Includes only one of the fields `log_group_id`
        "log_group_id": "string"
        // end of the list of possible fields
      },
      "data_stream": {
        "database_id": "string",
        "stream_name": "string"
      }
      // end of the list of possible fields
    },
    "service_account_id": "string",
    "status": "Status",
    "filter": {
      "path_filter": {
        "root": {
          // Includes only one of the fields `any_filter`, `some_filter`
          "any_filter": {
            "resource": {
              "id": "string",
              "type": "string"
            }
          },
          "some_filter": {
            "resource": {
              "id": "string",
              "type": "string"
            },
            "filters": [
              "PathFilterElement"
            ]
          }
          // end of the list of possible fields
        }
      },
      "event_filter": {
        "filters": [
          {
            "service": "string",
            "categories": [
              {
                "plane": "EventCategoryFilter",
                "type": "EventAccessTypeFilter"
              }
            ],
            "path_filter": {
              "root": {
                // Includes only one of the fields `any_filter`, `some_filter`
                "any_filter": {
                  "resource": {
                    "id": "string",
                    "type": "string"
                  }
                },
                "some_filter": {
                  "resource": {
                    "id": "string",
                    "type": "string"
                  },
                  "filters": [
                    "PathFilterElement"
                  ]
                }
                // end of the list of possible fields
              }
            }
          }
        ]
      }
    },
    "status_error_message": "string",
    "cloud_id": "string",
    "filtering_policy": {
      "management_events_filter": {
        "resource_scopes": [
          {
            "id": "string",
            "type": "string"
          }
        ]
      },
      "data_events_filters": [
        {
          "service": "string",
          // Includes only one of the fields `included_events`, `excluded_events`
          "included_events": {
            "event_types": [
              "string"
            ]
          },
          "excluded_events": {
            "event_types": [
              "string"
            ]
          },
          // end of the list of possible fields
          // Includes only one of the fields `dns_filter`
          "dns_filter": {
            "only_recursive_queries": "bool"
          },
          // end of the list of possible fields
          "resource_scopes": [
            {
              "id": "string",
              "type": "string"
            }
          ]
        }
      ]
    }
  }
  // end of the list of possible fields
}

An Operation resource. For more information, see Operation.

Field

Description

id

string

ID of the operation.

description

string

Description of the operation. 0-256 characters long.

created_at

google.protobuf.Timestamp

Creation timestamp.

created_by

string

ID of the user or service account who initiated the operation.

modified_at

google.protobuf.Timestamp

The time when the Operation resource was last modified.

done

bool

If the value is false, it means the operation is still in progress.
If true, the operation is completed, and either error or response is available.

metadata

UpdateTrailMetadata

Service-specific metadata associated with the operation.
It typically contains the ID of the target resource that the operation is performed on.
Any method that returns a long-running operation should document the metadata type, if any.

error

google.rpc.Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

response

Trail

The normal response of the operation in case of success.
If the original method returns no data on success, such as Delete,
the response is google.protobuf.Empty.
If the original method is the standard Create/Update,
the response should be the target resource of the operation.
Any method that returns a long-running operation should document the response type, if any.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

UpdateTrailMetadataUpdateTrailMetadata

Field

Description

trail_id

string

ID of the trail that is being updated

TrailTrail

Trail describes the filtering and destination configuration of the process of sending Audit events

Field

Description

id

string

ID of the trail

folder_id

string

Required field. ID of the folder that the trail belongs to

created_at

google.protobuf.Timestamp

Required field. The timestamp for the creation operation

updated_at

google.protobuf.Timestamp

Required field. The timestamp of the last update operation

name

string

Name of the trail

description

string

Description of the trail

labels

object (map<string, string>)

Custom labels of the trail as key:value pairs. Maximum 64 per key

destination

Destination

Required field. Destination configuration of the trail

service_account_id

string

Service account ID of the trail

status

enum Status

Required field. Status of the trail

  • STATUS_UNSPECIFIED
  • ACTIVE: The trail is active and Audit events are processed
  • ERROR: The trail configuration has issues that are preventing Audit Trails from delivering events
  • DELETED: The trail is being deleted

filter

Filter

Filtering configuration of the trail
deprecated: use filtering_policy instead

status_error_message

string

Current error message of the trail. Empty in case if the trail is active

cloud_id

string

Required field. ID of the cloud that the trail belongs to

filtering_policy

FilteringPolicy

Event filtering policy
Describes which groups of events will be sent and which resources will be monitored

DestinationDestination

Field

Description

object_storage

ObjectStorage

Configuration for event delivery to Object Storage

Uploaded objects will have prefix <trail_id>/ by default

Includes only one of the fields object_storage, cloud_logging, data_stream.

cloud_logging

CloudLogging

Configuration for event delivery to Cloud Logging

Includes only one of the fields object_storage, cloud_logging, data_stream.

data_stream

DataStream

Configuration for event delivery to YDS

Includes only one of the fields object_storage, cloud_logging, data_stream.

ObjectStorageObjectStorage

Field

Description

bucket_id

string

Name of the destination bucket

object_prefix

string

Prefix for exported objects. Optional
If specified, uploaded objects will have prefix <object_prefix>/<trail_id>/

CloudLoggingCloudLogging

Field

Description

log_group_id

string

ID of the Cloud Logging destination group

Includes only one of the fields log_group_id.

DataStreamDataStream

Field

Description

database_id

string

ID of the database hosting the destination YDS

stream_name

string

Name of the destination YDS

FilterFilter

Field

Description

path_filter

PathFilter

Configuration of default events gathering for the trail
If not specified, default events won't be gathered for the trail

event_filter

EventFilter

Required field. Configuration of additional events gathering from specific services

PathFilterPathFilter

Field

Description

root

PathFilterElement

Required field. Root element of the resource path filter for the trail
Resource described in that filter node must contain the trail itself

PathFilterElementPathFilterElement

Field

Description

any_filter

PathFilterElementAny

Filter element with ANY type. If used, configures the trail to gather any events from the resource

Includes only one of the fields any_filter, some_filter.

some_filter

PathFilterElementSome

Filter element with SOME type. If used, configures the trail to gather some of the events from the resource

Includes only one of the fields any_filter, some_filter.

PathFilterElementAnyPathFilterElementAny

Field

Description

resource

Resource

Required field. Resource definition

ResourceResource

Field

Description

id

string

Required field. ID of the resource

type

string

Required field. Type of the resource

PathFilterElementSomePathFilterElementSome

Field

Description

resource

Resource

Required field. Definition of the resource that contains nested resources

filters[]

PathFilterElement

Filters for the resources contained in the parent resource

EventFilterEventFilter

Field

Description

filters[]

EventFilterElement

List of filters for services

EventFilterElementEventFilterElement

Field

Description

service

string

Required field. Service ID of the gathered events

categories[]

EventFilterElementCategory

List of the event categories gathered for a specified service

path_filter

PathFilter

Required field. Resource path filter for a specified service

EventFilterElementCategoryEventFilterElementCategory

Field

Description

plane

enum EventCategoryFilter

Required field. Plane of the gathered category

  • EVENT_CATEGORY_FILTER_UNSPECIFIED
  • CONTROL_PLANE: The events that are generated during the interaction with the service's resources
  • DATA_PLANE: Events that are generated during interaction with data within the service's resources

type

enum EventAccessTypeFilter

Required field. Type of the gathered category

  • EVENT_ACCESS_TYPE_FILTER_UNSPECIFIED
  • WRITE: Events for operations that do perform some modification
  • READ: Events for operations that do not perform any modifications

FilteringPolicyFilteringPolicy

Combination of policies describing event filtering process of the trail
At least one filed must be filled

Field

Description

management_events_filter

ManagementEventsFiltering

Singular filter describing gathering management events

data_events_filters[]

DataEventsFiltering

List of filters describing gathering data events

ManagementEventsFilteringManagementEventsFiltering

Policy for gathering management events

Field

Description

resource_scopes[]

Resource

A list of resources which will be monitored by the trail

DataEventsFilteringDataEventsFiltering

Policy for gathering data events

Field

Description

service

string

Required field. Name of the service whose events will be delivered

included_events

EventTypes

Explicitly included events of specified service
New events of the service won't be delivered by default

Includes only one of the fields included_events, excluded_events.

excluded_events

EventTypes

Explicitly excluded events of specified service
New events of the service will be delivered by default

Includes only one of the fields included_events, excluded_events.

dns_filter

DnsDataEventsFilter

Filter is allowed only if service = dns

Includes only one of the fields dns_filter.

resource_scopes[]

Resource

A list of resources which will be monitored by the trail

EventTypesEventTypes

Policy with explicitly specified event group

Field

Description

event_types[]

string

DnsDataEventsFilterDnsDataEventsFilter

Field

Description

only_recursive_queries

bool

Only recursive queries will be delivered

Была ли статья полезна?

Предыдущая
Create
Следующая
Delete
Проект Яндекса
© 2025 ООО «Яндекс.Облако»