@@ -54,17 +54,17 @@ interface.
5454
55553. The CEL activation context has these expected objects:
5656
57- :Resource :
57+ :resource :
5858 This is the cloud resource being examined by C7N.
5959 This will be a CEL mapping object built from JSON source data.
6060
61- :Now :
61+ :now :
6262 This is the current time.
6363 This will be a CEL timestamp.
6464 This promotes testability by removing the need to mock
6565 a clock to provide proper ``utcnow() `` values.
6666
67- :Event :
67+ :event :
6868 For lambda-related resources, this is the triggering event.
6969 This will be a CEL mapping object built from JSON source data.
7070
@@ -85,7 +85,7 @@ This has a single attribite.
8585 In many cases, a number of additional functions are also present in this class.
8686
8787
88- A number of filter expressions rely on data not directly avalable in the ``Resource `` or ``Event `` objects.
88+ A number of filter expressions rely on data not directly avalable in the ``resource `` or ``event `` objects.
8989These are called *related resource * filters, and there are several examples.
9090
9191- ``type: image `` and ``type: image-age `` filters gather details about the image associated with a resource
@@ -249,11 +249,11 @@ See the :py:mod:`celpy.c7nlib` module for additional information on this interfa
249249
250250 It also includes three global objects:
251251
252- - ``Resource `` the cloud resource to be examined.
252+ - ``resource `` the cloud resource to be examined.
253253
254- - ``Now `` the current time as a CEL timestamp.
254+ - ``now `` the current time as a CEL timestamp.
255255
256- - ``Event `` an Event for those resources where the C7N check is triggered by a CloudWatch event.
256+ - ``event `` an event for those resources where the C7N check is triggered by a CloudWatch event.
257257
258258 """
259259 schema = type_schema(
@@ -263,9 +263,9 @@ See the :py:mod:`celpy.c7nlib` module for additional information on this interfa
263263 )
264264
265265 decls: Dict[str, celpy.Annotation] = {
266- "Resource ": celpy.celtypes.MapType,
267- "Now ": celpy.celtypes.TimestampType,
268- "Event ": celpy.celtypes.MapType,
266+ "resource ": celpy.celtypes.MapType,
267+ "now ": celpy.celtypes.TimestampType,
268+ "event ": celpy.celtypes.MapType,
269269 }
270270 decls.update(celpy.c7nlib.DECLARATIONS)
271271
@@ -292,9 +292,9 @@ See the :py:mod:`celpy.c7nlib` module for additional information on this interfa
292292 for resource in resources:
293293 with C7NContext(filter=the_filter):
294294 cel_activation = {
295- "Resource ": celpy.json_to_cel(resource),
296- "Now ": celpy.celtypes.TimestampType(now),
297- # "Event ": ...,
295+ "resource ": celpy.json_to_cel(resource),
296+ "now ": celpy.celtypes.TimestampType(now),
297+ # "event ": ...,
298298 }
299299 if self.pgm.evaluate(cel_activation):
300300 yield resource
@@ -1256,7 +1256,7 @@ Policies studied have 125 examples.
12561256 # REDACTED #
12571257
12581258 The ``type: event `` filter examines data not directly part of a resource.
1259- A Lambda is changed by an event. This ``Event `` detail is available in the activation along with the ``Resource ``.
1259+ A Lambda is changed by an event. This ``event `` detail is available in the activation along with the ``resource ``.
12601260
12611261metrics
12621262-------
0 commit comments