Create a ruleset

POST /deployments/traffic-filter/rulesets

Creates a ruleset that consists of a set of rules.

Body Required

The specification for traffic filter ruleset.

  • name string Required

    Name of the ruleset

  • 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

    Hide rules attributes Show rules attributes object
    • id string

      The rule ID

    • The remote cluster organization ID

    • The remote cluster ID

    • Description of the rule

    • source string

      Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID

    • Name of the Azure Private Endpoint to allow connections from

    • Resource GUID of the Azure Private Endpoint to allow connections from

    • An egress traffic filter rule

      Additional properties are allowed.

      Hide egress_rule attributes Show egress_rule attributes object
      • target string Required

        Allowed traffic filter egress target: IP address or CIDR mask

      • ports array[integer(int32)]

        A list of target ports for an egress rule

      • protocol string Required

        The target protocol for an egress rule

        Values are all, tcp, or udp.

Responses

  • The ruleset definition is valid and the creation has started.

    Hide response attribute Show response attribute object
    • id string Required

      The new ruleset ID

  • Error creating the traffic filter ruleset. (code: traffic_filter.request_execution_failed)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is traffic_filter.request_execution_failed.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

POST /deployments/traffic-filter/rulesets
curl \
 -X POST https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets \
 -d '{"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 (201)
{
  "id": "string"
}
Response examples (500)
# Headers
x-cloud-error-codes: traffic_filter.request_execution_failed

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}