Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • Машинное обучение
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Истории успеха
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Документация
  • Блог
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»
Yandex Smart Web Security
  • Начало работы
    • Обзор
    • Профили безопасности
    • WAF
    • ARL (лимит на запросы)
    • Правила
    • Условия
    • Списки
    • Квоты и лимиты
  • Управление доступом
  • Правила тарификации
  • Справочник Terraform
    • Аутентификация в API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
  • Метрики Monitoring
  • Аудитные логи Audit Trails
  • История изменений

В этой статье:

  • HTTP request
  • Path parameters
  • Response
  • SecurityRule
  • RuleCondition
  • Condition
  • AuthorityMatcher
  • StringMatcher
  • HttpMethodMatcher
  • RequestUriMatcher
  • QueryMatcher
  • HeaderMatcher
  • IpMatcher
  • IpRangesMatcher
  • GeoIpMatcher
  • SmartProtection
  • Waf
  • AnalyzeRequestBody
  1. Справочник API
  2. REST (англ.)
  3. SecurityProfile
  4. Get

SmartWebSecurity API, REST: SecurityProfile.Get

Статья создана
Yandex Cloud
Обновлена 17 декабря 2024 г.
  • HTTP request
  • Path parameters
  • Response
  • SecurityRule
  • RuleCondition
  • Condition
  • AuthorityMatcher
  • StringMatcher
  • HttpMethodMatcher
  • RequestUriMatcher
  • QueryMatcher
  • HeaderMatcher
  • IpMatcher
  • IpRangesMatcher
  • GeoIpMatcher
  • SmartProtection
  • Waf
  • AnalyzeRequestBody

Returns the specified SecurityProfile resource.

HTTP requestHTTP request

GET https://smartwebsecurity.api.cloud.yandex.net/smartwebsecurity/v1/securityProfiles/{securityProfileId}

Path parametersPath parameters

Field

Description

securityProfileId

string

Required field. ID of the SecurityProfile resource to return.

ResponseResponse

HTTP Code: 200 - OK

{
  "id": "string",
  "folderId": "string",
  "labels": "object",
  "name": "string",
  "description": "string",
  "defaultAction": "string",
  "securityRules": [
    {
      "name": "string",
      "priority": "string",
      "dryRun": "boolean",
      // Includes only one of the fields `ruleCondition`, `smartProtection`, `waf`
      "ruleCondition": {
        "action": "string",
        "condition": {
          "authority": {
            "authorities": [
              {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            ]
          },
          "httpMethod": {
            "httpMethods": [
              {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            ]
          },
          "requestUri": {
            "path": {
              // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
              "exactMatch": "string",
              "exactNotMatch": "string",
              "prefixMatch": "string",
              "prefixNotMatch": "string",
              "pireRegexMatch": "string",
              "pireRegexNotMatch": "string"
              // end of the list of possible fields
            },
            "queries": [
              {
                "key": "string",
                "value": {
                  // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                  "exactMatch": "string",
                  "exactNotMatch": "string",
                  "prefixMatch": "string",
                  "prefixNotMatch": "string",
                  "pireRegexMatch": "string",
                  "pireRegexNotMatch": "string"
                  // end of the list of possible fields
                }
              }
            ]
          },
          "headers": [
            {
              "name": "string",
              "value": {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            }
          ],
          "sourceIp": {
            "ipRangesMatch": {
              "ipRanges": [
                "string"
              ]
            },
            "ipRangesNotMatch": {
              "ipRanges": [
                "string"
              ]
            },
            "geoIpMatch": {
              "locations": [
                "string"
              ]
            },
            "geoIpNotMatch": {
              "locations": [
                "string"
              ]
            }
          }
        }
      },
      "smartProtection": {
        "mode": "string",
        "condition": {
          "authority": {
            "authorities": [
              {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            ]
          },
          "httpMethod": {
            "httpMethods": [
              {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            ]
          },
          "requestUri": {
            "path": {
              // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
              "exactMatch": "string",
              "exactNotMatch": "string",
              "prefixMatch": "string",
              "prefixNotMatch": "string",
              "pireRegexMatch": "string",
              "pireRegexNotMatch": "string"
              // end of the list of possible fields
            },
            "queries": [
              {
                "key": "string",
                "value": {
                  // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                  "exactMatch": "string",
                  "exactNotMatch": "string",
                  "prefixMatch": "string",
                  "prefixNotMatch": "string",
                  "pireRegexMatch": "string",
                  "pireRegexNotMatch": "string"
                  // end of the list of possible fields
                }
              }
            ]
          },
          "headers": [
            {
              "name": "string",
              "value": {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            }
          ],
          "sourceIp": {
            "ipRangesMatch": {
              "ipRanges": [
                "string"
              ]
            },
            "ipRangesNotMatch": {
              "ipRanges": [
                "string"
              ]
            },
            "geoIpMatch": {
              "locations": [
                "string"
              ]
            },
            "geoIpNotMatch": {
              "locations": [
                "string"
              ]
            }
          }
        }
      },
      "waf": {
        "mode": "string",
        "condition": {
          "authority": {
            "authorities": [
              {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            ]
          },
          "httpMethod": {
            "httpMethods": [
              {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            ]
          },
          "requestUri": {
            "path": {
              // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
              "exactMatch": "string",
              "exactNotMatch": "string",
              "prefixMatch": "string",
              "prefixNotMatch": "string",
              "pireRegexMatch": "string",
              "pireRegexNotMatch": "string"
              // end of the list of possible fields
            },
            "queries": [
              {
                "key": "string",
                "value": {
                  // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                  "exactMatch": "string",
                  "exactNotMatch": "string",
                  "prefixMatch": "string",
                  "prefixNotMatch": "string",
                  "pireRegexMatch": "string",
                  "pireRegexNotMatch": "string"
                  // end of the list of possible fields
                }
              }
            ]
          },
          "headers": [
            {
              "name": "string",
              "value": {
                // Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
                "exactMatch": "string",
                "exactNotMatch": "string",
                "prefixMatch": "string",
                "prefixNotMatch": "string",
                "pireRegexMatch": "string",
                "pireRegexNotMatch": "string"
                // end of the list of possible fields
              }
            }
          ],
          "sourceIp": {
            "ipRangesMatch": {
              "ipRanges": [
                "string"
              ]
            },
            "ipRangesNotMatch": {
              "ipRanges": [
                "string"
              ]
            },
            "geoIpMatch": {
              "locations": [
                "string"
              ]
            },
            "geoIpNotMatch": {
              "locations": [
                "string"
              ]
            }
          }
        },
        "wafProfileId": "string"
      },
      // end of the list of possible fields
      "description": "string"
    }
  ],
  "createdAt": "string",
  "cloudId": "string",
  "captchaId": "string",
  "advancedRateLimiterProfileId": "string",
  "analyzeRequestBody": {
    "sizeLimit": "string",
    "sizeLimitAction": "string"
  }
}

A SecurityProfile resource.

Field

Description

id

string

ID of the security profile.

folderId

string

ID of the folder that the security profile belongs to.

labels

object (map<string, string>)

Labels as key:value pairs. Maximum of 64 per resource.

name

string

Required field. Name of the security profile. The name is unique within the folder. 1-50 characters long.

description

string

Optional description of the security profile.

defaultAction

enum (DefaultAction)

Required field. Action to perform if none of rules matched.

  • DEFAULT_ACTION_UNSPECIFIED
  • ALLOW: Pass request to service.
  • DENY: Deny request.

securityRules[]

SecurityRule

List of security rules.

createdAt

string (date-time)

Creation timestamp in RFC3339 text format.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

cloudId

string

ID of the cloud that the security profile belongs to.

captchaId

string

Captcha ID to use with this security profile. Set empty to use default.

advancedRateLimiterProfileId

string

Advanced rate limiter profile ID to use with this security profile. Set empty to use default.

analyzeRequestBody

AnalyzeRequestBody

Parameters for request body analyzer.

SecurityRuleSecurityRule

A SecurityRule object, see Rules.

Field

Description

name

string

Required field. Name of the rule. The name is unique within the security profile. 1-50 characters long.

priority

string (int64)

Determines the priority for checking the incoming traffic.
Enter an integer within the range of 1 and 999999.
The rule priority must be unique within the entire security profile.
A lower numeric value means a higher priority.
The default_action has the lowest priority.

dryRun

boolean

This mode allows you to test your security profile or a single rule.
For example, you can have the number of alarms for a specific rule displayed.
Note: if this option is true, no real action affecting your traffic regarding this rule will be taken.

ruleCondition

RuleCondition

Rule actions, see Rule actions.

Includes only one of the fields ruleCondition, smartProtection, waf.

smartProtection

SmartProtection

Smart Protection rule, see Smart Protection rules.

Includes only one of the fields ruleCondition, smartProtection, waf.

waf

Waf

Web Application Firewall (WAF) rule, see WAF rules.

Includes only one of the fields ruleCondition, smartProtection, waf.

description

string

Optional description of the rule. 0-512 characters long.

RuleConditionRuleCondition

RuleCondition object.

Field

Description

action

enum (Action)

Action to perform if this rule matched.

  • ACTION_UNSPECIFIED
  • ALLOW: Pass request to service.
  • DENY: Deny request.

condition

Condition

The condition for matching the rule.

ConditionCondition

Condition object. AND semantics implied.
See documentation for matchers description.

Field

Description

authority

AuthorityMatcher

Match authority (Host header).

httpMethod

HttpMethodMatcher

Match HTTP method.

requestUri

RequestUriMatcher

Match Request URI.

headers[]

HeaderMatcher

Match HTTP headers.

sourceIp

IpMatcher

Match IP.

AuthorityMatcherAuthorityMatcher

AuthorityMatcher object.

Field

Description

authorities[]

StringMatcher

List of authorities. OR semantics implied.

StringMatcherStringMatcher

StringMatcher object.

Field

Description

exactMatch

string

Includes only one of the fields exactMatch, exactNotMatch, prefixMatch, prefixNotMatch, pireRegexMatch, pireRegexNotMatch.

exactNotMatch

string

Includes only one of the fields exactMatch, exactNotMatch, prefixMatch, prefixNotMatch, pireRegexMatch, pireRegexNotMatch.

prefixMatch

string

Includes only one of the fields exactMatch, exactNotMatch, prefixMatch, prefixNotMatch, pireRegexMatch, pireRegexNotMatch.

prefixNotMatch

string

Includes only one of the fields exactMatch, exactNotMatch, prefixMatch, prefixNotMatch, pireRegexMatch, pireRegexNotMatch.

pireRegexMatch

string

Includes only one of the fields exactMatch, exactNotMatch, prefixMatch, prefixNotMatch, pireRegexMatch, pireRegexNotMatch.

pireRegexNotMatch

string

Includes only one of the fields exactMatch, exactNotMatch, prefixMatch, prefixNotMatch, pireRegexMatch, pireRegexNotMatch.

HttpMethodMatcherHttpMethodMatcher

HttpMethodMatcher object.

Field

Description

httpMethods[]

StringMatcher

List of HTTP methods. OR semantics implied.

RequestUriMatcherRequestUriMatcher

RequestUriMatcher object. AND semantics implied.

Field

Description

path

StringMatcher

Path of the URI RFC3986.

queries[]

QueryMatcher

List of query matchers. AND semantics implied.

QueryMatcherQueryMatcher

QueryMatcher object.

Field

Description

key

string

Required field. Key of the query parameter.

value

StringMatcher

Required field. Value of the query parameter.

HeaderMatcherHeaderMatcher

HeaderMatcher object.

Field

Description

name

string

Required field. Name of header (case insensitive).

value

StringMatcher

Required field. Value of the header.

IpMatcherIpMatcher

IpMatcher object. AND semantics implied.

Field

Description

ipRangesMatch

IpRangesMatcher

ipRangesNotMatch

IpRangesMatcher

geoIpMatch

GeoIpMatcher

geoIpNotMatch

GeoIpMatcher

IpRangesMatcherIpRangesMatcher

IpRangesMatcher object.

Field

Description

ipRanges[]

string

List of IP ranges. OR semantics implied.

GeoIpMatcherGeoIpMatcher

GeoIpMatcher object.

Field

Description

locations[]

string

ISO 3166-1 alpha 2. OR semantics implied.

SmartProtectionSmartProtection

SmartProtection object.

Field

Description

mode

enum (Mode)

Mode of protection.

  • MODE_UNSPECIFIED
  • FULL: Full protection means that the traffic will be checked based on ML models and behavioral analysis,
    with suspicious requests being sent to SmartCaptcha.
  • API: API protection means checking the traffic based on ML models and behavioral analysis without sending suspicious
    requests to SmartCaptcha. The suspicious requests will be blocked.

condition

Condition

The condition for matching the rule.

WafWaf

Waf object.

Field

Description

mode

enum (Mode)

Mode of protection.

  • MODE_UNSPECIFIED
  • FULL: Full protection means that the traffic will be checked based on ML models and behavioral analysis,
    with suspicious requests being sent to SmartCaptcha.
  • API: API protection means checking the traffic based on ML models and behavioral analysis without sending suspicious
    requests to SmartCaptcha. The suspicious requests will be blocked.

condition

Condition

The condition for matching the rule.

wafProfileId

string

Required field. ID of WAF profile to use in this rule.

AnalyzeRequestBodyAnalyzeRequestBody

Field

Description

sizeLimit

string (int64)

Maximum size of body to pass to analyzer. In kilobytes.

sizeLimitAction

enum (Action)

Action to perform if maximum size of body exceeded.

  • ACTION_UNSPECIFIED
  • IGNORE: Ignore body.
  • DENY: Deny request.

Была ли статья полезна?

Предыдущая
Overview
Следующая
List
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»