> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update

> Updates a recording rule.



## OpenAPI

````yaml https://api.nebius.cloud/openapi.json patch /monitoring/v1/recording-rules
openapi: 3.0.3
info:
  title: Nebius API
  version: version not set
servers:
  - url: https://api.nebius.cloud
security:
  - bearerAuth: []
tags:
  - name: nebius.ai.v1.EndpointService
  - name: nebius.ai.v1.JobService
  - name: nebius.applications.v1alpha1.K8sReleaseService
  - name: nebius.audit.v2.AuditEventExportService
  - name: nebius.audit.v2.AuditEventService
  - name: nebius.billing.v1.CalculatorService
  - name: nebius.billing.v1alpha1.CalculatorService
  - name: nebius.billing.v1alpha1.OneTimeExportService
  - name: nebius.capacity.v1.CapacityAllowanceService
  - name: nebius.capacity.v1.CapacityBlockGroupService
  - name: nebius.capacity.v1.CapacityIntervalService
  - name: nebius.capacity.v1.ResourceAdviceService
  - name: nebius.compute.v1.DiskService
  - name: nebius.compute.v1.DiskSnapshotService
  - name: nebius.compute.v1.FilesystemService
  - name: nebius.compute.v1.GpuClusterService
  - name: nebius.compute.v1.ImageService
  - name: nebius.compute.v1.InstanceService
  - name: nebius.compute.v1.MaintenanceService
  - name: nebius.compute.v1.NVLInstanceGroupService
  - name: nebius.compute.v1.NodeService
  - name: nebius.compute.v1.PlatformService
  - name: nebius.dns.v1.RecordService
  - name: nebius.dns.v1.ZoneService
  - name: nebius.iam.v1.AccessKeyService
  - name: nebius.iam.v1.AccessPermitService
  - name: nebius.iam.v1.AuthPublicKeyService
  - name: nebius.iam.v1.FederatedCredentialsService
  - name: nebius.iam.v1.FederationCertificateService
  - name: nebius.iam.v1.FederationService
  - name: nebius.iam.v1.GroupMembershipService
  - name: nebius.iam.v1.GroupService
  - name: nebius.iam.v1.InvitationService
  - name: nebius.iam.v1.ProfileService
  - name: nebius.iam.v1.ProjectService
  - name: nebius.iam.v1.ServiceAccountService
  - name: nebius.iam.v1.SessionManagementService
  - name: nebius.iam.v1.StaticKeyService
  - name: nebius.iam.v1.TenantService
  - name: nebius.iam.v1.TenantUserAccountService
  - name: nebius.iam.v1.TenantUserAccountWithAttributesService
  - name: nebius.iam.v2.AccessKeyService
  - name: nebius.iam.v2.ProjectService
  - name: nebius.iam.v2.TenantService
  - name: nebius.kms.v1.AsymmetricCryptoService
  - name: nebius.kms.v1.AsymmetricKeyService
  - name: nebius.kms.v1.SymmetricCryptoService
  - name: nebius.kms.v1.SymmetricKeyService
  - name: nebius.logging.agentmanager.v1.VersionService
  - name: nebius.logging.v1.LogExportService
  - name: nebius.maintenance.v1alpha1.MaintenanceService
  - name: nebius.mk8s.v1.ClusterService
  - name: nebius.mk8s.v1.NodeGroupService
  - name: nebius.mk8s.v1alpha1.ClusterService
  - name: nebius.mk8s.v1alpha1.NodeGroupService
  - name: nebius.monitoring.v1.RecordingRuleService
  - name: nebius.msp.mlflow.v1alpha1.ClusterService
  - name: nebius.msp.postgresql.v1alpha1.BackupService
  - name: nebius.msp.postgresql.v1alpha1.ClusterService
  - name: nebius.mysterybox.v1.PayloadService
  - name: nebius.mysterybox.v1.SecretService
  - name: nebius.mysterybox.v1.SecretVersionService
  - name: nebius.quotas.v1.QuotaAllowanceService
  - name: nebius.registry.v1.ArtifactService
  - name: nebius.registry.v1.RegistryService
  - name: nebius.storage.v1.BucketService
  - name: nebius.storage.v1.InventoryService
  - name: nebius.storage.v1.TransferService
  - name: nebius.storage.v1alpha1.TransferService
  - name: nebius.tunnel.v1.TunnelService
  - name: nebius.vpc.v1.AllocationService
  - name: nebius.vpc.v1.NetworkService
  - name: nebius.vpc.v1.PoolService
  - name: nebius.vpc.v1.RouteService
  - name: nebius.vpc.v1.RouteTableService
  - name: nebius.vpc.v1.SecurityGroupService
  - name: nebius.vpc.v1.SecurityRuleService
  - name: nebius.vpc.v1.SubnetService
  - name: nebius.vpc.v1.TargetGroupService
  - name: nebius.vpc.v1alpha1.AllocationService
  - name: nebius.vpc.v1alpha1.NetworkService
  - name: nebius.vpc.v1alpha1.PoolService
  - name: nebius.vpc.v1alpha1.ScopeService
  - name: nebius.vpc.v1alpha1.SubnetService
paths:
  /monitoring/v1/recording-rules:
    patch:
      tags:
        - nebius.monitoring.v1.RecordingRuleService
      summary: Update
      description: Updates a recording rule.
      operationId: RecordingRuleService_Update
      parameters:
        - description: Field mask specifying fields to reset to their default values.
          in: header
          name: X-ResetMask
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/nebius.monitoring.v1.UpdateRecordingRuleRequest
        description: Request to update a recording rule.
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/nebius.common.v1alpha1.Operation'
          description: A successful response.
components:
  schemas:
    nebius.monitoring.v1.UpdateRecordingRuleRequest:
      description: Request to update a recording rule.
      properties:
        metadata:
          allOf:
            - $ref: '#/components/schemas/nebius.common.v1.ResourceMetadata'
          description: Metadata for the recording rule to update.
        spec:
          allOf:
            - $ref: '#/components/schemas/nebius.monitoring.v1.RecordingRuleSpec'
          description: Updated specification of the recording rule.
      required:
        - metadata
      type: object
    nebius.common.v1alpha1.Operation:
      properties:
        createdAt:
          description: Creation timestamp.
          format: date-time
          type: string
        createdBy:
          description: ID of the user or service account who initiated the operation.
          type: string
        description:
          description: Human readable description of the operation. 0-256 characters long.
          type: string
        finishedAt:
          description: The time when the operation finished.
          format: date-time
          type: string
        id:
          description: ID of the operation.
          type: string
        progressData:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Any'
          description: >-
            Additional information about the progress of an operation, e.g., a
            progress percentage.

            MAY be absent while the operation is running, MUST be absent after
            the operation has completed.


            Format of message inside [progress_data] is service-dependent and
            MUST be documented by the

            service, IF it is used.
        request:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Any'
          description: The request that generated this operation.
        requestHeaders:
          additionalProperties:
            $ref: >-
              #/components/schemas/nebius.common.v1alpha1.Operation.request_header
          description: >-
            The request headers that are essential for the request that
            generated the operation.

            For instance, `x-resetmask`. Without these headers the request might
            have been processed

            differently if repeated.

            All the header names *must* be converted to lower case.

            Validator is based on:

            https://httpwg.org/specs/rfc9110.html#considerations.for.new.field.names
          type: object
        resource:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Any'
          description: >-
            Snapshot of the resource at the moment this operation started.

            - [resource.spec] and [resource.metadata] reflect the desired
            resource state at the moment
              this operation started.
              E.g., in an Update operation it will be the *updated* resource spec and metadata,
              in a Create operation it will be the spec and metadata *of the resource being created*,
              and so on.
            - [resource.status] reflects the status of the resource at the
            moment this operation started.
              This is a snapshot, call the `<Resource>Service/Get` to get current status of the resource.

            The [resource] field MUST never be updated *after* this operation
            has started.


            In a Delete operation, an operation affecting multiple resources or
            an operation that doesn't

            affect any API resources at all (e.g. a routine maintenance
            operation visible to the user),

            the [resource] inside MUST be a [google.protobuf.Empty].
        resourceId:
          description: >-
            ID of the resource that this operation creates, updates, deletes or
            otherwise changes.


            If the operation affects multiple resources or does not affect any
            API resources at all

            (e.g. a routine maintenance operation visible to the user), the
            [resource_id] must be empty.
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/google.rpc.Status'
          description: >-
            The status of this operation. Set when this operation is completed.

            See
            https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto.


            [status.code] is
            https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto:

            - If [status.code] == OK, the operation has completed successfully.

            - If [status.code] != OK, the operation has failed or has been
            cancelled.
              - [status.message] will contain a user-readable and actionable error message.
              - [status.details] will contain additional diagnostic information in the form of
                [ServiceError] from ../error/v1alpha1/error.proto
            - [status.code] must belong to an Operation-compatible subset of
            GRPC codes:
              OK, CANCELLED, PERMISSION_DENIED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, INTERNAL
      type: object
    nebius.common.v1.ResourceMetadata:
      description: Common resource metadata.
      properties:
        createdAt:
          description: Timestamp indicating when the resource was created.
          format: date-time
          readOnly: true
          type: string
        id:
          description: Identifier for the resource, unique for its resource type.
          type: string
        labels:
          additionalProperties:
            type: string
          description: Labels associated with the resource.
          type: object
        name:
          description: Human readable name for the resource.
          type: string
        parentId:
          description: Identifier of the parent resource to which the resource belongs.
          type: string
        resourceVersion:
          description: >-
            Version of the resource for safe concurrent modifications and
            consistent reads.

            Positive and monotonically increases on each resource spec change
            (but *not* on each change of the

            resource's container(s) or status).

            Service allows zero value or current.
          format: int64
          type: string
        updatedAt:
          description: Timestamp indicating when the resource was last updated.
          format: date-time
          readOnly: true
          type: string
      required:
        - parentId
      type: object
    nebius.monitoring.v1.RecordingRuleSpec:
      description: Specification of a recording rule.
      properties:
        bucket:
          description: Bucket where the rule writes its resulting time series.
          type: string
        expr:
          description: MetricsQL expression evaluated by the rule.
          type: string
        record:
          description: Name of the resulting time series.
          type: string
        recordLabels:
          additionalProperties:
            type: string
          description: Labels added to the resulting time series.
          type: object
      required:
        - bucket
        - record
        - expr
      type: object
    google.protobuf.Any:
      additionalProperties: {}
      description: >-
        `Any` contains an arbitrary serialized protocol buffer message along
        with a

        URL that describes the type of the serialized message.


        Protobuf library provides support to pack/unpack Any values in the form

        of utility functions or additional generated methods of the Any type.


        Example 1: Pack and unpack a message in C++.

            Foo foo = ...;
            Any any;
            any.PackFrom(foo);
            ...
            if (any.UnpackTo(&foo)) {
              ...
            }

        Example 2: Pack and unpack a message in Java.

            Foo foo = ...;
            Any any = Any.pack(foo);
            ...
            if (any.is(Foo.class)) {
              foo = any.unpack(Foo.class);
            }
            // or ...
            if (any.isSameTypeAs(Foo.getDefaultInstance())) {
              foo = any.unpack(Foo.getDefaultInstance());
            }

         Example 3: Pack and unpack a message in Python.

            foo = Foo(...)
            any = Any()
            any.Pack(foo)
            ...
            if any.Is(Foo.DESCRIPTOR):
              any.Unpack(foo)
              ...

         Example 4: Pack and unpack a message in Go

             foo := &pb.Foo{...}
             any, err := anypb.New(foo)
             if err != nil {
               ...
             }
             ...
             foo := &pb.Foo{}
             if err := any.UnmarshalTo(foo); err != nil {
               ...
             }

        The pack methods provided by protobuf library will by default use

        'type.googleapis.com/full.type.name' as the type URL and the unpack

        methods only use the fully qualified type name after the last '/'

        in the type URL, for example "foo.bar.com/x/y.z" will yield type

        name "y.z".


        JSON

        ====

        The JSON representation of an `Any` value uses the regular

        representation of the deserialized, embedded message, with an

        additional field `@type` which contains the type URL. Example:

            package google.profile;
            message Person {
              string first_name = 1;
              string last_name = 2;
            }

            {
              "@type": "type.googleapis.com/google.profile.Person",
              "firstName": <string>,
              "lastName": <string>
            }

        If the embedded message type is well-known and has a custom JSON

        representation, that representation will be embedded adding a field

        `value` which holds the custom JSON in addition to the `@type`

        field. Example (for message [google.protobuf.Duration][]):

            {
              "@type": "type.googleapis.com/google.protobuf.Duration",
              "value": "1.212s"
            }
      properties:
        '@type':
          description: >-
            A URL/resource name that uniquely identifies the type of the
            serialized

            protocol buffer message. This string must contain at least

            one "/" character. The last segment of the URL's path must represent

            the fully qualified name of the type (as in

            `path/google.protobuf.Duration`). The name should be in a canonical
            form

            (e.g., leading "." is not accepted).


            In practice, teams usually precompile into the binary all types that
            they

            expect it to use in the context of Any. However, for URLs which use
            the

            scheme `http`, `https`, or no scheme, one can optionally set up a
            type

            server that maps type URLs to message definitions as follows:


            * If no scheme is provided, `https` is assumed.

            * An HTTP GET on the URL must yield a [google.protobuf.Type][]
              value in binary format, or produce an error.
            * Applications are allowed to cache lookup results based on the
              URL, or have them precompiled into a binary to avoid any
              lookup. Therefore, binary compatibility needs to be preserved
              on changes to types. (Use versioned type names to manage
              breaking changes.)

            Note: this functionality is not currently available in the official

            protobuf release, and it is not used for type URLs beginning with

            type.googleapis.com. As of May 2023, there are no widely used type
            server

            implementations and no plans to implement one.


            Schemes other than `http`, `https` (or the empty scheme) might be

            used with implementation specific semantics.
          type: string
      type: object
    nebius.common.v1alpha1.Operation.request_header:
      description: >-
        Request header is a container for all the values of a particular header
        of a request

        as there is no such thing as map<string, repeated string>
      properties:
        values:
          description: The values of a particular header from a request
          items:
            type: string
          type: array
      type: object
    google.rpc.Status:
      description: >-
        The `Status` type defines a logical error model that is suitable for

        different programming environments, including REST APIs and RPC APIs. It
        is

        used by [gRPC](https://github.com/grpc). Each `Status` message contains

        three pieces of data: error code, error message, and error details.


        You can find out more about this error model and how to work with it in
        the

        [API Design Guide](https://cloud.google.com/apis/design/errors).
      properties:
        code:
          description: |-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          format: int32
          type: integer
        details:
          description: >-
            A list of messages that carry the error details.  There is a common
            set of

            message types for APIs to use.
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
          type: array
        message:
          description: >-
            A developer-facing error message, which should be in English. Any

            user-facing error message should be localized and sent in the

            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized

            by the client.
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      description: The Authorization header expects a Bearer token.
      scheme: bearer
      type: http

````