Common Expression Language (CEL) (proto)
Warning
This API feature is currently work-in-progress. API features marked as work-in-progress are not considered stable, are not covered by the threat model, are not supported by the security team, and are subject to breaking changes. Do not use this feature without understanding each of the previous points.
.xds.type.v3.CelExpression
[.xds.type.v3.CelExpression proto]
Either parsed or checked representation of the Common Expression Language (CEL) program.
{
"parsed_expr": {...},
"checked_expr": {...},
"cel_expr_parsed": {...},
"cel_expr_checked": {...}
}
- parsed_expr
(.google.api.expr.v1alpha1.ParsedExpr) Parsed expression in abstract syntax tree (AST) form.
Deprecated – use
cel_expr_parsed
field instead. Ifcel_expr_parsed
orcel_expr_checked
is set, this field is not used.Only one of parsed_expr, checked_expr may be set.
- checked_expr
(.google.api.expr.v1alpha1.CheckedExpr) Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
Deprecated – use
cel_expr_checked
field instead. Ifcel_expr_parsed
orcel_expr_checked
is set, this field is not used.Only one of parsed_expr, checked_expr may be set.
- cel_expr_parsed
(.cel.expr.ParsedExpr) Parsed expression in abstract syntax tree (AST) form.
If
cel_expr_checked
is set, this field is not used.
- cel_expr_checked
(.cel.expr.CheckedExpr) Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
If set, takes precedence over
cel_expr_parsed
.
.xds.type.v3.CelExtractString
[.xds.type.v3.CelExtractString proto]
Extracts a string by evaluating a Common Expression Language (CEL) expression against the standardized set of HTTP attributes.
Attention
Besides CEL evaluation raising an error explicitly, CEL program returning a type other than
the string
, or not returning anything, are considered an error as well.
{
"expr_extract": {...},
"default_value": {...}
}
- expr_extract
(.xds.type.v3.CelExpression, REQUIRED) The CEL expression used to extract a string from the CEL environment. the “subject string”) that should be replaced.
- default_value
(StringValue) If CEL expression evaluates to an error, this value is be returned to the caller. If not set, the error is propagated to the caller.