> ## 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.

# Get

> Retrieves a security rule by its ID.



## OpenAPI

````yaml https://api.nebius.cloud/openapi.json get /vpc/v1/security-rules/{id}
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.DevlabService
  - name: nebius.ai.v1.EndpointService
  - name: nebius.ai.v1.HardwareService
  - name: nebius.ai.v1.JobService
  - name: nebius.applications.v1alpha1.K8sReleaseService
  - name: nebius.applications.v1alpha1.VmAppTemplateService
  - name: nebius.audit.v2.AuditEventExportService
  - name: nebius.audit.v2.AuditEventService
  - name: nebius.billing.v1.CalculatorService
  - name: nebius.billing.v1.PricingPolicyService
  - name: nebius.billing.v1alpha1.CalculatorService
  - name: nebius.billing.v1alpha1.OneTimeExportService
  - name: nebius.billing.v1alpha1.SpotPriceService
  - 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.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:
  /vpc/v1/security-rules/{id}:
    get:
      tags:
        - nebius.vpc.v1.SecurityRuleService
      summary: Get
      description: Retrieves a security rule by its ID.
      operationId: SecurityRuleService_Get
      parameters:
        - description: ID of the security rule.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/nebius.vpc.v1.SecurityRule'
          description: A successful response.
components:
  schemas:
    nebius.vpc.v1.SecurityRule:
      description: >-
        SecurityRules define rules for controlling network traffic within a
        network.

        These rules specify when traffic is ALLOWED or DENIED based on
        direction, protocol,

        match source, and ports.
      properties:
        metadata:
          allOf:
            - $ref: '#/components/schemas/nebius.common.v1.ResourceMetadata'
          description: '`metadata.parent_id` represents the SecurityGroup.'
        spec:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.SecurityRuleSpec'
          description: >-
            Specification of the security rule's configuration.

            Defines the parameters and constraints for rules that control
            network traffic.
        status:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.SecurityRuleStatus'
          description: Current status of the security rule.
      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.vpc.v1.SecurityRuleSpec:
      properties:
        access:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.RuleAccessAction'
          description: |-
            Access action for the rule.
            Required. Determines whether matching traffic is allowed or denied.
        egress:
          $ref: '#/components/schemas/nebius.vpc.v1.RuleEgress'
        ingress:
          $ref: '#/components/schemas/nebius.vpc.v1.RuleIngress'
        priority:
          description: >-
            Priority of the rule. Valid range: 0-1000.

            Optional. If not specified or set to 0, defaults to 500.

            Rules are evaluated in priority order (lower numbers first) using a
            first-match algorithm:

            only the first matching rule takes effect (ALLOW or DENY), and
            subsequent rules are skipped.


            When multiple rules share the same priority, DENY rules are
            evaluated before ALLOW rules.

            The final evaluation order is reflected in 'effective_priority' (see
            SecurityRuleStatus).
          format: int32
          type: integer
        protocol:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.RuleProtocol'
          description: |-
            Protocol used in the rule.
            Supported values: ANY, TCP, UDP, ICMP.
        type:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.RuleType'
          description: |-
            Type of the rule (STATEFUL or STATELESS)
            Default value is STATEFUL
      required:
        - access
        - protocol
      type: object
    nebius.vpc.v1.SecurityRuleStatus:
      properties:
        destination:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.RuleMatchStatus'
          description: Destination of the traffic that matched the rule.
        direction:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.RuleDirection'
          description: Direction of traffic affected by the rule.
        effectivePriority:
          description: >-
            Effective priority used for rule evaluation order, calculated by the
            system.

            This value is computed from the user-specified 'priority'
            (SecurityRuleSpec).

            Rules are evaluated in ascending order of effective_priority using a
            first-match algorithm.
          format: int32
          type: integer
        source:
          allOf:
            - $ref: '#/components/schemas/nebius.vpc.v1.RuleMatchStatus'
          description: Source of the traffic that matched the rule.
        state:
          $ref: '#/components/schemas/nebius.vpc.v1.SecurityRuleStatus.State'
      type: object
    nebius.vpc.v1.RuleAccessAction:
      default: ACCESS_UNSPECIFIED
      description: 'Access specifies action on matching traffic: ALLOW or DENY.'
      enum:
        - ACCESS_UNSPECIFIED
        - ALLOW
        - DENY
      type: string
    nebius.vpc.v1.RuleEgress:
      description: Defines match for outgoing traffic.
      properties:
        destinationCidrs:
          description: |-
            CIDR blocks as the destination.
            Optional. Empty list means any address.
            Each value must be a valid IPv4 CIDR.
            Specify at most 8 CIDRs.
          items:
            type: string
          type: array
        destinationPorts:
          description: |-
            List of ports to which the rule applies.
            Optional. Empty list means any port.
            Valid range: 1–65535.
            Maximum of 8 ports can be specified.
          items:
            format: int32
            type: integer
          type: array
        destinationSecurityGroupId:
          description: ID of the referenced Security Group as the destination.
          type: string
      type: object
    nebius.vpc.v1.RuleIngress:
      description: Defines match for incoming traffic.
      properties:
        destinationPorts:
          description: |-
            List of destination ports to which the rule applies.
            Optional. Empty list means any port.
            Valid range: 1–65535.
            Maximum of 8 ports can be specified.
          items:
            format: int32
            type: integer
          type: array
        sourceCidrs:
          description: |-
            CIDR blocks as the source.
            Optional. Empty list means any address.
            Each value must be a valid IPv4 CIDR.
            Specify at most 8 CIDRs.
          items:
            type: string
          type: array
        sourceSecurityGroupId:
          description: ID of the referenced Security Group as the source.
          type: string
      type: object
    nebius.vpc.v1.RuleProtocol:
      default: PROTOCOL_UNSPECIFIED
      description: Protocol specifies traffic protocol.
      enum:
        - PROTOCOL_UNSPECIFIED
        - ANY
        - TCP
        - UDP
        - ICMP
      type: string
    nebius.vpc.v1.RuleType:
      default: RULE_TYPE_UNSPECIFIED
      description: RuleType specifies whether the security rule is stateful or stateless.
      enum:
        - RULE_TYPE_UNSPECIFIED
        - STATEFUL
        - STATELESS
      type: string
    nebius.vpc.v1.RuleMatchStatus:
      properties:
        cidrs:
          description: List of CIDR blocks.
          items:
            type: string
          type: array
        ports:
          description: List of ports.
          items:
            format: int32
            type: integer
          type: array
        securityGroupId:
          description: ID of the Security Group.
          type: string
      type: object
    nebius.vpc.v1.RuleDirection:
      default: DIRECTION_UNSPECIFIED
      description: >-
        Direction specifies whether traffic is INGRESS (incoming) or EGRESS
        (outgoing).
      enum:
        - DIRECTION_UNSPECIFIED
        - INGRESS
        - EGRESS
      type: string
    nebius.vpc.v1.SecurityRuleStatus.State:
      default: STATE_UNSPECIFIED
      description: State describes lifecycle phases of a security rule.
      enum:
        - STATE_UNSPECIFIED
        - CREATING
        - READY
        - DELETING
      type: string
  securitySchemes:
    bearerAuth:
      description: The Authorization header expects a Bearer token.
      scheme: bearer
      type: http

````