Updates a traffic filter

PATCH /api/v1/serverless/traffic-filters/{id}

Updates the traffic filter with the definition.

Path parameters

  • id string Required

    The traffic filter ID.

application/json

Body Required

The specification for traffic filter.

  • name string

    Name of the traffic filter

  • description string

    Description of the traffic filter

  • include_by_default boolean

    Should the traffic filter be automatically included in the new projects

  • rules array[object]

    List of rules

    Hide rules attributes Show rules attributes object

    A single traffic filter rule. Which fields are required depends on the parent filter's type — the fields are mutually exclusive between Azure and IP/VPC rules.

    • description string

      Optional human-readable description of the rule.

    • source string

      Allowed source for ip or vpce filters: an IP address, CIDR mask, or AWS VPC endpoint ID (vpce- followed by 17 lowercase hex characters). Must not be set for private_endpoint filters.

    • azure_endpoint_name string

      Azure Private Endpoint resource name. Required for private_endpoint filters; not applicable to ip or vpce filters. Must be 2–80 characters, start with an alphanumeric character, and end with an alphanumeric character or underscore. May contain alphanumerics, underscores, periods, and hyphens.

      Minimum length is 2, maximum length is 80. Format should match the following pattern: ^[a-zA-Z0-9][-\w.]{0,78}[\w]$.

    • azure_endpoint_guid string

      Azure Private Endpoint resource GUID (properties.resourceGuid from the Azure resource). Required for private_endpoint filters. Must be a lowercase UUID. This is not the ARM resource ID.

      Format should match the following pattern: ^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$.

Responses

  • 200 application/json

    The traffic filter definition was valid and the update has started.

    Hide headers attribute Show headers attribute
    • ETag string
    Hide response attributes Show response attributes object
    • id string Required

      The traffic filter ID

      Minimum length is 32, maximum length is 32.

    • name string Required

      Name of the traffic filter

      Minimum length is 1, maximum length is 128.

    • description string

      Description of the traffic filter

      Minimum length is 0, maximum length is 512.

    • type string Required

      Type of the traffic filter. Determines which rule fields are valid:

      • ip — IP/CIDR allowlist (source)
      • vpce — AWS PrivateLink VPC endpoint (source)
      • private_endpoint — Azure Private Link (azure_endpoint_name, azure_endpoint_guid)

      Minimum length is 1, maximum length is 32. Values are ip, vpce, or private_endpoint.

    • include_by_default boolean Required

      Should the traffic filter be automatically included in the new projects

    • region string Required

      The traffic filter can be attached only to projects in the specific region

      Minimum length is 1, maximum length is 32.

    • rules array[object] Required

      List of rules

      Hide rules attributes Show rules attributes object

      A single traffic filter rule. Which fields are required depends on the parent filter's type — the fields are mutually exclusive between Azure and IP/VPC rules.

      • description string

        Optional human-readable description of the rule.

      • source string

        Allowed source for ip or vpce filters: an IP address, CIDR mask, or AWS VPC endpoint ID (vpce- followed by 17 lowercase hex characters). Must not be set for private_endpoint filters.

      • azure_endpoint_name string

        Azure Private Endpoint resource name. Required for private_endpoint filters; not applicable to ip or vpce filters. Must be 2–80 characters, start with an alphanumeric character, and end with an alphanumeric character or underscore. May contain alphanumerics, underscores, periods, and hyphens.

        Minimum length is 2, maximum length is 80. Format should match the following pattern: ^[a-zA-Z0-9][-\w.]{0,78}[\w]$.

      • azure_endpoint_guid string

        Azure Private Endpoint resource GUID (properties.resourceGuid from the Azure resource). Required for private_endpoint filters. Must be a lowercase UUID. This is not the ARM resource ID.

        Format should match the following pattern: ^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$.

  • 400 application/json

    Bad request

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

      An error response returned by the API.

      Hide errors attributes Show errors attributes object

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

  • 401 application/json

    Unauthorized

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

      An error response returned by the API.

      Hide errors attributes Show errors attributes object

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

  • 404 application/json

    Not Found

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

      An error response returned by the API.

      Hide errors attributes Show errors attributes object

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

  • 409 application/json

    Conflict

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

      An error response returned by the API.

      Hide errors attributes Show errors attributes object

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

  • 500 application/json

    Internal server error

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

      An error response returned by the API.

      Hide errors attributes Show errors attributes object

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

PATCH /api/v1/serverless/traffic-filters/{id}
curl \
 --request PATCH 'https://api.elastic-cloud.com/api/v1/serverless/traffic-filters/{id}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","description":"string","include_by_default":true,"rules":[{"description":"string","source":"vpce-0123456789abcdef0","azure_endpoint_name":"my-private-endpoint","azure_endpoint_guid":"7c0f05e4-e32b-4b10-a246-7b77f7dcc63c"}]}'