Create ruleset association

POST /deployments/traffic-filter/rulesets/{ruleset_id}/associations

Applies the ruleset to the specified deployment.

Path parameters

Body Required

The association with a ruleset or user auth token for a deployment, template, or product.

  • entity_type string Required

    Type of the traffic filter ruleset association, such as 'deployment', 'cluster'

  • id string Required

    ID of the entity, such as the deployment ID or Elasticsearch cluster ID.

Responses

  • Create association request was valid and the association already exists

  • Create association request was valid and the association has been created

  • The traffic filter ruleset specified by {ruleset_id} cannot be found. (code: traffic_filter.not_found)

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

      Value is traffic_filter.not_found.

    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

  • Creation failed. (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/{ruleset_id}/associations
curl \
 -X POST https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations \
 -d '{"entity_type":"string","id":"string"}'
Request examples
{
  "entity_type": "string",
  "id": "string"
}
Response examples (200)
{}
Response examples (201)
{}
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"
      ]
    }
  ]
}