Creates a traffic filter that consists of a set of rules.
See Private connectivity for setup guides and regional service names.
AWS PrivateLink (type: vpce)
Each rule must include:
source— the VPC endpoint ID (format:vpce-followed by 17 lowercase hex characters).
Do not set azure_endpoint_name or azure_endpoint_guid on AWS rules.
Azure Private Link (type: private_endpoint)
Each rule must include:
azure_endpoint_name— the Azure Private Endpoint resource name (2–80 characters).azure_endpoint_guid— the PE resource GUID (properties.resourceGuid), a lowercase UUID. This is not the ARM resource ID.
Do not set source on Azure rules.
Body
Required
The specification for traffic filter.
-
Name of the traffic filter
Minimum length is
1, maximum length is128. -
Description of the traffic filter
Minimum length is
0, maximum length is512. -
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 is32. Values areip,vpce, orprivate_endpoint. -
Should the traffic filter be automatically included in the new projects
-
Serverless region ID the filter applies to (e.g.
azure-australiaeast,aws-eu-west-1). The filter can only be attached to projects in this region.Minimum length is
1, maximum length is32. -
List of rules. Required fields depend on
type:ip/vpceusesource;private_endpointusesazure_endpoint_nameandazure_endpoint_guid(notsource).
curl \
--request POST 'https://api.elastic-cloud.com/api/v1/serverless/traffic-filters' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"name\": \"my-azure-pl-filter\",\n \"description\": \"Allow traffic from office VNet\",\n \"region\": \"azure-australiaeast\",\n \"type\": \"private_endpoint\",\n \"include_by_default\": false,\n \"rules\": [\n {\n \"description\": \"Office VNet PE\",\n \"azure_endpoint_name\": \"my-private-endpoint\",\n \"azure_endpoint_guid\": \"7c0f05e4-e32b-4b10-a246-7b77f7dcc63c\"\n }\n ]\n}"'
{
"name": "my-azure-pl-filter",
"description": "Allow traffic from office VNet",
"region": "azure-australiaeast",
"type": "private_endpoint",
"include_by_default": false,
"rules": [
{
"description": "Office VNet PE",
"azure_endpoint_name": "my-private-endpoint",
"azure_endpoint_guid": "7c0f05e4-e32b-4b10-a246-7b77f7dcc63c"
}
]
}
{
"name": "my-aws-pl-filter",
"region": "aws-eu-west-1",
"type": "vpce",
"include_by_default": false,
"rules": [
{
"source": "vpce-0123456789abcdef0"
}
]
}
{
"name": "my-ip-filter",
"region": "aws-eu-west-1",
"type": "ip",
"include_by_default": false,
"rules": [
{
"source": "203.0.113.0/24"
}
]
}