c7n.schema module¶
-
class
c7n.schema.
ElementSchema
[source]¶ Bases:
object
Utility functions for working with resource’s filters and actions.
-
static
_expand_schema
(schema, definitions)[source]¶ Expand references in schema to their full schema
-
static
doc
(cls)[source]¶ Return ‘best’ formatted doc string for a given class.
Walks up class hierarchy, skipping known bad. Returns empty string if no suitable doc string found.
-
static
-
c7n.schema.
policy_error_scope
(error, data)[source]¶ Scope a schema error to its policy name and resource.
-
c7n.schema.
process_resource
(type_name, resource_type, resource_defs, aliases=None, definitions=None, provider_name=None)[source]¶
-
c7n.schema.
specific_error
(error)[source]¶ Try to find the best error for humans to resolve
The jsonschema.exceptions.best_match error is based purely on a mix of a strong match (ie. not anyOf, oneOf) and schema depth, this often yields odd results that are semantically confusing, instead we can use a bit of structural knowledge of schema to provide better results.