Create a traffic filter
- Base URL
-
https://api.elastic-cloud.com
- POST /api/v1/serverless/traffic-filters
Creates a traffic filter that consists of a set of rules.
See Private connectivity for setup guides and regional service names.
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.
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.
Each rule must include:
source— the decimal PSC connection ID reported by the consumer forwarding rule.
Do not set azure_endpoint_name or azure_endpoint_guid on GCP rules. GCP PSC
connections are accepted automatically by the service attachment, so creating this
traffic filter does not trigger a cloud approval or resolution operation.
Request body
The specification for traffic filter.
-
typeenum · min length: 1 · max length: 32required -
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)psc_endpoint— GCP Private Service Connect endpoint (source)
-
Values:
ipvpceprivate_endpointpsc_endpoint -
regionstring · min length: 1 · max length: 32required -
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. -
rulesobject[] -
List of rules. Required fields depend on
type:ip,vpceandpsc_endpointusesource.private_endpointusesazure_endpoint_nameandazure_endpoint_guid, notsource.
-
sourcestring -
Allowed source for
ip,vpce, orpsc_endpointfilters: an IP address, CIDR mask, AWS VPC endpoint ID (vpce-followed by 17 lowercase hex characters), or GCP PSC connection ID. Must not be set forprivate_endpointfilters. -
azure_endpoint_namestring · min length: 2 · max length: 80 · pattern: ^[a-zA-Z0-9][-\w.]{0,78}[\w]$ -
Azure Private Endpoint resource name. Required for
private_endpointfilters; not applicable toip,vpce, orpsc_endpointfilters. 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.
Responses
The traffic filter definition is valid and the creation has started.
-
typeenum · min length: 1 · max length: 32required -
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)psc_endpoint— GCP Private Service Connect endpoint (source)
-
Values:
ipvpceprivate_endpointpsc_endpoint -
include_by_defaultbooleanrequired -
Should the traffic filter be automatically included in the new projects
-
regionstring · min length: 1 · max length: 32required -
The traffic filter can be attached only to projects in the specific region
-
rulesobject[]required -
List of rules
-
sourcestring -
Allowed source for
ip,vpce, orpsc_endpointfilters: an IP address, CIDR mask, AWS VPC endpoint ID (vpce-followed by 17 lowercase hex characters), or GCP PSC connection ID. Must not be set forprivate_endpointfilters. -
azure_endpoint_namestring · min length: 2 · max length: 80 · pattern: ^[a-zA-Z0-9][-\w.]{0,78}[\w]$ -
Azure Private Endpoint resource name. Required for
private_endpointfilters; not applicable toip,vpce, orpsc_endpointfilters. 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.
Bad request
Unauthorized
Conflict