Smart Web Security Load Balancer API, REST: Domain.Create
Creates a domain in the specified load balancer.
HTTP request
POST https://smartwebsecurity.api.cloud.yandex.net/smartwebsecurity/v1/loadBalancers/{loadBalancerId}/domains
Path parameters
|
Field |
Description |
|
loadBalancerId |
string Required field. ID of the Load balancer that the domain belongs to. |
Body parameters
{
"name": "string",
"serverName": "string",
"description": "string",
"securityProfileId": "string",
"httpBackend": {
"targets": [
{
"ipAddress": "string",
"description": "string",
"port": "string"
}
],
"useHttp2": "boolean",
"useTls": "boolean",
"sni": "string",
"trustedCaBytes": "string",
"timeout": "string",
"idleTimeout": "string",
"sessionAffinity": {
// Includes only one of the fields `connection`, `header`, `cookie`
"connection": {
"sourceIp": "boolean"
},
"header": {
"headerName": "string"
},
"cookie": {
"name": "string",
"ttl": "string",
"path": "string"
}
// end of the list of possible fields
}
},
"tlsListener": {
"enabled": "boolean",
"certificateId": "string",
"port": "string",
"enableHttp1": "boolean"
},
"httpListener": {
"enabled": "boolean",
"redirectToHttps": "boolean",
"port": "string"
},
"solidWafSettings": {
"solidWafProfileId": "string",
"sessionAffinity": {
// Includes only one of the fields `connection`, `header`, `cookie`
"connection": {
"sourceIp": "boolean"
},
"header": {
"headerName": "string"
},
"cookie": {
"name": "string",
"ttl": "string",
"path": "string"
}
// end of the list of possible fields
},
"webAppId": "string"
},
"rateLimit": {
"allRequestsPerSecond": "string",
"requestsPerIpPerSecond": "string"
}
}
|
Field |
Description |
|
name |
string Unique name of domain within the balancer. Value must match the regular expression |
|
serverName |
string Required field. Server name or wildcard to be matched against SNI in a TLS connection and authority(host) header. The string length in characters must be 1-255. |
|
description |
string Domain description. The maximum string length in characters is 512. |
|
securityProfileId |
string Security Profile ID of SmartWebSecurity service. |
|
httpBackend |
Backend settings. |
|
tlsListener |
Optional TLS listener settings. |
|
httpListener |
Optional plaintext listener settings. |
|
solidWafSettings |
Optional Solid WAF settings. |
|
rateLimit |
Optional rate limit settings. |
HttpBackend
|
Field |
Description |
|
targets[] |
List of targets. The number of elements must be in the range 1-20. |
|
useHttp2 |
boolean Enables HTTP2 for upstream requests. |
|
useTls |
boolean Enable TLS for upstream requests. |
|
sni |
string SNI string for TLS connections. The maximum string length in characters is 255. Value must match the regular expression |
|
trustedCaBytes |
string Trusted certificate authority certificates bundle (PEM text). |
|
timeout |
string (duration) Backend timeout. If not set, default is 300 seconds. |
|
idleTimeout |
string (duration) Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout. |
|
sessionAffinity |
Session affinity. |
Target
|
Field |
Description |
|
ipAddress |
string IPv4 address. The string length in characters must be 1-40. |
|
description |
string Target description. The maximum string length in characters is 128. |
|
port |
string (int64) Target port. Acceptable values are 1 to 65535, inclusive. |
SessionAffinity
|
Field |
Description |
|
connection |
Session affinity based on source IP address. Includes only one of the fields |
|
header |
Session affinity based on an HTTP header. Includes only one of the fields |
|
cookie |
Session affinity based on a cookie. Includes only one of the fields |
ConnectionSessionAffinity
|
Field |
Description |
|
sourceIp |
boolean IP address. |
HeaderSessionAffinity
|
Field |
Description |
|
headerName |
string Header name. The string length in characters must be 1-256. |
CookieSessionAffinity
|
Field |
Description |
|
name |
string Cookie name. The string length in characters must be 1-256. |
|
ttl |
string (duration) If not set, session cookie will be used (not persisted between browser restarts). |
|
path |
string Optional cookie path. The string length in characters must be 0-256. |
TlsListener
|
Field |
Description |
|
enabled |
boolean Enable TLS listener. |
|
certificateId |
string Certificate ID in the Certificate Manager. |
|
port |
string (int64) Listener port. If value is not set, used 443 by default. Acceptable values are 0 to 65535, inclusive. |
|
enableHttp1 |
boolean Enables HTTP/1.0 and HTTP/1.1 support and disables HTTP/2. |
HttpListener
|
Field |
Description |
|
enabled |
boolean Enable http (plaintext) listener. |
|
redirectToHttps |
boolean Automatically redirect from HTTP to HTTPS. |
|
port |
string (int64) Listener port. If value is not set, used 80 by default. Acceptable values are 0 to 65535, inclusive. |
SolidWafSettings
|
Field |
Description |
|
solidWafProfileId |
string ID of the Solid WAF profile. |
|
sessionAffinity |
Session affinity to analyzers. If not set, ConnectionSessionAffinity will be used. |
|
webAppId |
string ID of the Solid WAF web app. |
RateLimit
|
Field |
Description |
|
allRequestsPerSecond |
string (int64) Rate limit for all requests.
The minimum value is 0. |
|
requestsPerIpPerSecond |
string (int64) Rate limit for individual IP addresses.
The minimum value is 0. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |