Getting information about a WAF profile
- In the management console
, select the folder containing the WAF security profile. - In the list of services, select Smart Web Security.
- In the left-hand panel, select WAF profiles.
- Select the required profile.
- The Overview page will show the profile details.
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 don't have Terraform, install it and configure the Yandex Cloud provider.
To get information about a Yandex Smart Web Security WAF profile created using Terraform:
-
Add the
data
andoutput
sections 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
: Returned value.
You can replace
created_at
with any other parameter to get the information you need. For more information about theyandex_sws_waf_profile
data source parameters, see the relevant provider documentation . -
Create resources:
-
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.
Terraform will create all the required resources and display the output variable values in the terminal. To check the results, run this command:
terraform output
Result:
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.