Updates a ruleset
Updates the ruleset with the definition.
Path parameters
-
ruleset_id
string Required The mandatory ruleset ID.
Body
Required
The specification for traffic filter ruleset.
-
name
string Required Name of the ruleset
-
description
string Description of the ruleset
-
type
string Required Type of the ruleset
-
include_by_default
boolean Required Should the ruleset be automatically included in the new deployments
-
region
string Required The ruleset can be attached only to deployments in the specific region
-
rules
array[object] Required List of rules
The container for a traffic filter rule.
Responses
-
200 application/json
The ruleset definition was valid and the update has started.
-
404 application/json
The traffic filter ruleset specified by {ruleset_id} cannot be found. (code:
traffic_filter.not_found
) -
500 application/json
Error reading the traffic filter ruleset. (code:
traffic_filter.request_execution_failed
)
PUT
/deployments/traffic-filter/rulesets/{ruleset_id}
curl \
--request PUT https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets/{ruleset_id} \
--header "Content-Type: application/json" \
--data '{"name":"string","description":"string","type":"string","include_by_default":true,"region":"string","rules":[{"id":"string","remote_cluster_org_id":"string","remote_cluster_id":"string","description":"string","source":"string","azure_endpoint_name":"string","azure_endpoint_guid":"string","egress_rule":{"target":"string","ports":[42],"protocol":"all"}}]}'
Request examples
{
"name": "string",
"description": "string",
"type": "string",
"include_by_default": true,
"region": "string",
"rules": [
{
"id": "string",
"remote_cluster_org_id": "string",
"remote_cluster_id": "string",
"description": "string",
"source": "string",
"azure_endpoint_name": "string",
"azure_endpoint_guid": "string",
"egress_rule": {
"target": "string",
"ports": [
42
],
"protocol": "all"
}
}
]
}
Response examples (200)
{
"id": "string"
}
Response examples (404)
# Headers
x-cloud-error-codes: traffic_filter.not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (500)
# Headers
x-cloud-error-codes: traffic_filter.request_execution_failed
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}