Getting information about a WAF profile
- In the management console
, select the folder containing the WAF profile. - In the list of services, select Smart Web Security.
- In the left-hand panel, select WAF profiles.
- Select the profile in question.
- The Overview page will show the profile details:
- Basic profile parameters.
- Security profiles the WAF profile is attached to.
- Rule sets included in the profile, number of active rules in each set, as well as anomaly threshold and paranoia level for the OWASP set.
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To get information about a Yandex Smart Web Security WAF profile created with Terraform:
-
Add the
dataandoutputsections to the Terraform configuration file:data "yandex_sws_waf_profile" "default" { name = "<WAF_profile_name>" } output "profile-created" { value = data.yandex_sws_waf_profile.default.created_at }Where:
data "yandex_sws_waf_profile": Description of the WAF profile as a data source:name: WAF profile name.
output "profile-created": Output variable that contains information about the WAF profile creation timestamp:value: Return value.
You can replace
created_atwith any other parameter to get the information you need. For more information about theyandex_sws_waf_profiledata source properties, see this Terraform provider article. -
Create the resources:
-
In the terminal, go to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is correct, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou 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.
-
Apply the changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create the required resources and display their output variables. To check the results, run this command:
terraform outputResult:
profile-created = "2024-12-13T17:45:34Z" -
To get information about a Yandex Smart Web Security WAF profile, use the get REST API method for the WafProfile resource or the WafProfile/Get gRPC API call.