Deleting an ARL profile
Before deleting an ARL profile, delete it from all associated security profiles.
-
In the management console
, select the folder the ARL profile resides in. -
From the list of services, select Smart Web Security.
-
In the left-hand panel, select
ARL profiles. -
In the Connecting a security profile field in the row with the ARL profile, select the security profile that uses this ARL profile.
-
At the top right, click Edit. In the window that opens:
- Select a different ARL profile from the ARL profile list or click Clear.
- Click Save.
-
Similarly, delete the ARL profile from all other associated security profiles.
-
Go back to the page of the ARL profile you want to delete.
-
At the top right, click
Delete and confirm the deletion.
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
If you do not have Terraform yet, install it and configure its Yandex Cloud provider.
To delete an ARL profile created with Terraform:
-
Open the Terraform configuration file and delete the fragment with the
yandex_sws_advanced_rate_limiter_profile
resource description:Example of an ARL profile description in the Terraform configuration
# 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 parameter.labels
: ARL profile labels. This is an optional parameter.advanced_rate_limiter_rule
: Rule section.name
: Rule name.priority
: Rule priority, a unique number from1
to999999
. Rules with smaller numerical values apply first.description
: Rule description. This is an optional parameter.dry_run
: Dry run flag. Set totrue
to test the rule and estimate the load on your web service. Requests will not be blocked in this mode. However, rule triggering will be logged. This is an optional parameter.static_quota
: Request count mode where each request is counted individually without grouping. You can only specify one section, eitherstatic_quota
ordynamic_quota
.action
: Action if the limit is exceeded. The only available value isDENY
.limit
: Maximum number of allowed queries per period.period
: Time period in seconds in which the limit applies.condition
: Condition for applying the rule. This is an optional parameter. For more information, see theadvanced_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 one section, eitherstatic_quota
ordynamic_quota
.action
: Action if the limit is exceeded. The only available value isDENY
.limit
: Maximum number of allowed queries per period.period
: Time period in seconds in which the limit applies.condition
: Condition for applying the rule. This is an optional parameter. For more information, see theadvanced_rate_limiter_rule.dynamic_quota.condition
description in this provider article .characteristic
: Description of properties to group requests by. You can specify one section, eithersimple_characteristic
orkey_characteristic
.case_insensitive
: Case insensitive, iftrue
, or sensitive, iffalse
.key_characteristic
: Section of parameters requiring a key (string) to group requests by.type
: Grouping type. The possible values areCOOKIE_KEY
,HEADER_KEY
, andQUERY_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 areREQUEST_PATH
,HTTP_METHOD
,IP
,GEO
, andHOST
.
-
Apply the changes:
-
In the terminal, change to the folder where you edited the configuration file.
-
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.
-
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.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
in the terminal and press Enter.
You can check the deletion of the resources using the management console
. -
Use the delete REST API method for the AdvancedRateLimiterProfile resource or the AdvancedRateLimiterProfile/Delete gRPC API call.