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
    • 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
  1. Step-by-step guides
  2. ARL profiles
  3. Creating a profile

Creating an ARL profile

Written by
Yandex Cloud
Updated at July 29, 2025
Management console
Terraform
API
  1. In the management console, select the folder where you want to create an ARL profile.
  2. In the list of services, select Smart Web Security.
  3. In the left-hand panel, select ARL profiles and click Create ARL profile.
  4. Name the profile.
  5. Optionally, provide a description.
  6. Optionally, add labels to your profile.
  7. Add ARL rules.
  8. Click Create.

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.

To create an ARL profile:

  1. In the Terraform configuration file, describe the resources you want to create:

    # ARL profile
    
    resource "yandex_sws_advanced_rate_limiter_profile" "arl-profile" {
      name        = "<profile_name>"
      description = "<profile_description>"
    
      # Rule 1
    
      advanced_rate_limiter_rule {
        name        = "<rule_name>"
        priority    = <rule_priority>
        description = "<rule_description>"
        dry_run     = true
    
        static_quota {
          action = "DENY"
          limit  = <rule_limit>
          period = <rule_period>
          condition {
            request_uri {
              path {
                exact_match = "/api"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: ARL profile name.
    • description: ARL profile description. This is an optional setting.
    • labels: ARL profile labels. This is an optional setting.
    • advanced_rate_limiter_rule: Rule section.
      • name: Rule name.
      • priority: Rule priority, a unique number from 1 to 999999. Rules with smaller numerical values apply first.
      • description: Rule description. This is an optional setting.
      • dry_run: Dry run flag. Set it to true to test the rule and estimate the load on your web service. Requests will not be blocked in this mode. However, the system will log triggered rules. This is an optional setting.
      • static_quota: Request count mode where each request is counted individually without grouping. You can only specify either static_quota or dynamic_quota.
        • action: Action if the limit is exceeded. Always set it to DENY.
        • limit: Maximum number of allowed requests per period.
        • period: Time period in seconds during which the limit applies.
        • condition: Condition for applying the rule. This is an optional setting. For more information, see the advanced_rate_limiter_rule.static_quota.condition description in this provider article.
      • dynamic_quota: Request count mode where groups of requests sharing one or more properties are counted. You can only specify either static_quota or dynamic_quota.
        • action: Action if the limit is exceeded. Always set it to DENY.
        • limit: Maximum number of allowed requests per period.
        • period: Time period in seconds during which the limit applies.
        • condition: Condition for applying the rule. This is an optional setting. For more information, see the advanced_rate_limiter_rule.dynamic_quota.condition description in this provider article.
        • characteristic: Description of properties to group requests by. You can only specify either simple_characteristic or key_characteristic.
          • case_insensitive: Case insensitive, if true, or sensitive, if false.
          • key_characteristic: Section of parameters requiring a key (string) to group requests by.
            • type: Grouping type. The possible values are COOKIE_KEY, HEADER_KEY, and QUERY_KEY.
            • value: Key value (string) to group requests by.
          • simple_characteristic: Section with parameters for autogrouping, i.e., requests are automatically grouped by the specified parameter.
            • type: Grouping type. The possible values are REQUEST_PATH, HTTP_METHOD, IP, GEO, and HOST.

    For more information about the yandex_sws_advanced_rate_limiter_profile properties, see this Terraform provider article.

  2. Create the resources:

    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.

    Terraform will create all the required resources. You can check the new resources in the management console.

Once your ARL profile is created, you can add rules.

Use the create REST API method for the AdvancedRateLimiterProfile resource or the AdvancedRateLimiterProfile/Create gRPC API call.

See alsoSee also

  • Adding a rule to an ARL profile
  • Editing basic settings of a security profile
  • Deleting an ARL profile

Was the article helpful?

Previous
Deleting an exclusion rule
Next
Editing basic profile settings
© 2025 Direct Cursus Technology L.L.C.