Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • 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
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Smart Web Security
  • Getting started
    • All guides
      • Creating a profile
      • Editing basic profile settings
      • Getting profile information
      • Deleting a profile
      • Adding a rule
      • Editing a rule
      • Deleting a rule
      • Connecting a profile to a resource
      • Disconnecting a profile from a resource
    • Address lists
    • Viewing operations
    • Configuring monitoring
    • Setting up alerts
    • Configuring logs via Smart Web Security
    • Configuring logs via Application Load Balancer
    • Migrating to WAF with support for Yandex rules
    • Overview
    • Security profiles
    • WAF
    • ARL (request limit)
    • Rules
    • Conditions
    • Lists
    • Protecting domains
    • Logging
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Disconnecting from a virtual host
  • Disconnecting from a domain
  • Disconnecting from an API gateway
  1. Step-by-step guides
  2. Security profiles
  3. Disconnecting a profile from a resource

Disconnecting a security profile from a resource

Written by
Yandex Cloud
Updated at July 29, 2025
  • Disconnecting from a virtual host
  • Disconnecting from a domain
  • Disconnecting from an API gateway

Disconnecting from a virtual hostDisconnecting from a virtual host

Management console
CLI
Terraform
API
  1. In the management console, select the folder containing the security profile.
  2. In the list of services, select Smart Web Security.
  3. Select the security profile to disconnect from the Yandex Application Load Balancer virtual host.
  4. Navigate to the Connected hosts tab.
  5. Next to the host in question, click and select Disconnect from profile.
  6. Confirm your action.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

  1. To view a list of HTTP routers in the default folder, run this command:

    yc application-load-balancer http-router list
    

    Result:

    +----------------------+-------------------+-------------+-------------+
    |          ID          |       NAME        | VHOST COUNT | ROUTE COUNT |
    +----------------------+-------------------+-------------+-------------+
    | ds7e9te73uak******** |  my-first-router  |           1 |           1 |
    +----------------------+-------------------+-------------+-------------+
    
  2. To view a list of virtual hosts for the selected HTTP router, run this command:

    yc application-load-balancer http-router get <HTTP_router_name_or_ID>
    

    Result:

    id: ds7e9te73uak********
    name: my-first-router
    folder_id: b1gt6g8ht345********
    virtual_hosts:
      - name: test-virtual-host
        routes:
          - name: test-route
            http:
              match:
                path:
                  prefix_match: /
              route:
                backend_group_id: ds7e12p7l6j4********
                timeout: 60s
                auto_host_rewrite: false
        route_options:
          security_profile_id: fev3s055oq64********
    created_at: "2024-08-05T08:34:03.973000654Z"
    

    Names of virtual hosts are specified in the virtual_hosts.name parameter. The example above features only one virtual host: test-virtual-host.

  3. To disconnect a security profile from a virtual host, run this command:

    yc application-load-balancer virtual-host update <virtual_host_name> \
       --http-router-name <HTTP_router_name> \
       --security-profile-id ""
    

    Where:

    • <virtual_host_name>: Virtual host name from the previous step.
    • --http-router-name: HTTP router name. This is a required setting. Instead of the HTTP router name, you can provide its ID in the http-router-id parameter.
    • --security-profile-id: Security profile ID. This is a required setting.

    Result:

    done (1s)
    name: test-virtual-host
    routes:
      - name: test-route
        http:
          match:
            path:
              prefix_match: /
          route:
            backend_group_id: ds7e12p7l6j4********
            timeout: 60s
            auto_host_rewrite: false
    route_options: {}
    

For more information about the yc application-load-balancer virtual-host update command, see the CLI reference.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the relevant documentation on the Terraform website or its mirror.

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

You can disconnect a Yandex Smart Web Security profile from a Yandex Application Load Balancer in the virtual host settings.

  1. In the Terraform configuration file, for the yandex_alb_virtual_host resource, delete security_profile_id under route_options.

    resource "yandex_alb_virtual_host" "my-virtual-host" {
      name                    = "<virtual_host_name>"
      ...
    
      route_options {
        security_profile_id   = "<security_profile_ID>"
      }
    }
    
  2. Apply the changes:

    1. In the terminal, go to the directory where you edited the configuration file.

    2. Make sure the configuration file is correct using this command:

      terraform validate
      

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

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

      terraform plan
      

      You will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.

    4. Apply the changes:

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

You can check the resource updates using the management console or this CLI command:

yc alb http-router get <HTTP_router_ID>

Use the update REST API method for the VirtualHost resource or the VirtualHostService/Update gRPC API call in Application Load Balancer.

Disconnecting from a domainDisconnecting from a domain

Management console
  1. In the management console, select the folder containing the security profile.
  2. In the list of services, select Smart Web Security.
  3. Select Domain protection → Domains.
  4. Select a domain.
  5. In the top-right corner, click Edit.
  6. Delete the connected security profile.
  7. Click Save.

Disconnecting from an API gatewayDisconnecting from an API gateway

Management console
  1. In the management console, select the folder the API gateway is in.
  2. In the list of services, select API Gateway.
  3. Select the API gateway.
  4. In the top-right corner, click Edit.
  5. Delete the x-yc-apigateway:smartWebSecurity extension from the API gateway specification.

Was the article helpful?

Previous
Connecting a profile to a resource
Next
Creating a profile
© 2025 Direct Cursus Technology L.L.C.