Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Smart Web Security
  • Getting started
    • All guides
      • Creating a profile
      • Editing basic profile settings
      • Getting information about a profile
      • Deleting a profile
      • Adding a rule
      • Editing a rule
      • Deleting a rule
      • Connecting a profile to a host
      • Disconnecting a profile from a host
    • Managing address lists
    • Viewing operations with profiles
    • Configuring monitoring
    • Setting up alerts
    • Configuring logging
    • Overview
    • Security profiles
    • WAF
    • ARL (request limit)
    • Rules
    • Conditions
    • Lists
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Managing security profiles
  3. Deleting a profile

Deleting a security profile

Written by
Yandex Cloud
Updated at May 13, 2025
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. In the row with the profile you need, click and select Delete.
  4. Confirm the deletion.

If you do not have the Yandex Cloud (CLI) command line interface yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the CLI command for deleting a security profile:

    yc smartwebsecurity security-profile delete --help
    
  2. To view a list of current security profiles in the default folder, run this command:

    yc smartwebsecurity security-profile list
    

    Result:

    +----------------------+-------------------+---------------------+----------------+------------+-------------+
    |          ID          |       NAME        |       CREATED       | DEFAULT ACTION | CAPTCHA ID | RULES COUNT |
    +----------------------+-------------------+---------------------+----------------+------------+-------------+
    | fev3s055oq64******** | my-new-profile    | 2024-08-05 06:57:18 | DENY           |            |           1 |
    | fevlqk8vei9p******** | my-sample-profile | 2024-08-05 06:57:28 | DENY           |            |           2 |
    +----------------------+-------------------+---------------------+----------------+------------+-------------+
    
  3. To delete a security profile, run this command, specifying the profile name or ID:

    yc smartwebsecurity security-profile delete <security_profile_name_or_ID>
    
  4. To make sure the security profile is deleted, re-run this command:

    yc smartwebsecurity security-profile list
    

    Note

    Deleting a security profile may affect access to the virtual hosts it is connected to.

For more information about the yc smartwebsecurity security-profile delete command, see the CLI reference.

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

To delete a Yandex Smart Web Security security profile created with Terraform:

  1. Open the Terraform configuration file and delete the fragment with the profile description.

    Example of security profile description in the Terraform configuration
    resource "yandex_sws_security_profile" "demo-profile-simple" {
      name                             = "<security_profile_name>"
      default_action                   = "DENY"
      captcha_id                       = "<captcha_ID>"
      advanced_rate_limiter_profile_id = "<ARL_profile_ID>"
    
      # Smart Protection rule
      security_rule {
        name     = "smart-protection"
        priority = 99999
    
        smart_protection {
          mode = "API"
        }
      }
    
      #Basic rule
      security_rule {
        name = "base-rule-geo"
        priority = 100000
        rule_condition {
          action = "ALLOW"
          condition {
            source_ip {
              geo_ip_match {
                locations = ["ru", "kz"]
              }
            }
          }
        }
      }
    
      # WAF profile rule
      security_rule {
        name     = "waf"
        priority = 88888
    
        waf {
          mode           = "API"
          waf_profile_id = "<WAF_profile_ID>"
        }
      }
    }
    
  2. Apply the changes:

    1. In the terminal, change to the folder where you edited the configuration file.

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

      terraform validate
      

      If the configuration is correct, the following message is returned:

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

      terraform plan
      

      The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.

    4. Apply the configuration changes:

      terraform apply
      
    5. Confirm the changes: type yes in the terminal and press Enter.

You can check the deletion of the resources using the management console or this CLI command:

yc smartwebsecurity security-profile list

Use the delete REST API method for the SecurityProfile resource or the SecurityProfileService/Delete gRPC API call.

Was the article helpful?

Previous
Getting information about a profile
Next
Adding a rule
Yandex project
© 2025 Yandex.Cloud LLC