c7n.query module¶
-
class
c7n.query.
ChildDescribeSource
(manager)[source]¶ Bases:
c7n.query.DescribeSource
-
resource_query_factory
¶ alias of
ChildResourceQuery
-
type
= 'describe-child'¶
-
-
class
c7n.query.
ChildResourceManager
(data, options)[source]¶ Bases:
c7n.query.QueryResourceManager
-
child_source
= 'describe-child'¶
-
source_type
¶
-
-
class
c7n.query.
ChildResourceQuery
(session_factory, manager)[source]¶ Bases:
c7n.query.ResourceQuery
A resource query for resources that must be queried with parent information.
Several resource types can only be queried in the context of their parents identifiers. ie. efs mount targets (parent efs), route53 resource records (parent hosted zone), ecs services (ecs cluster).
-
capture_parent_id
= False¶
-
parent_key
= 'c7n:parent-id'¶
-
-
class
c7n.query.
ConfigSource
(manager)[source]¶ Bases:
object
-
get_query_params
(query)[source]¶ Parse config select expression from policy and parameter.
On policy config supports a full statement being given, or a clause that will be added to the where expression.
If no query is specified, a default query is utilized.
A valid query should at minimum select fields for configuration, supplementaryConfiguration and must have resourceType qualifier.
-
static
retry
(func, *args, **kw)¶
-
type
= 'config'¶
-
-
class
c7n.query.
DescribeSource
(manager)[source]¶ Bases:
object
-
resource_query_factory
¶ alias of
ResourceQuery
-
type
= 'describe'¶
-
-
class
c7n.query.
MaxResourceLimit
(policy, selection_count, population_count)[source]¶ Bases:
object
-
C7N_MAXRES_OP
= 'or'¶
-
-
class
c7n.query.
QueryResourceManager
(data, options)[source]¶ Bases:
c7n.manager.ResourceManager
-
_generate_arn
= None¶
-
account_id
¶ Return the current account ID.
This should now be passed in using the –account-id flag, but for a period of time we will support the old behavior of inferring this from IAM.
-
action_registry
= <c7n.actions.core.ActionRegistry object>¶
-
augment
(resources)[source]¶ subclasses may want to augment resources with additional information.
ie. we want tags by default (rds, elb), and policy, location, acl for s3 buckets.
-
check_resource_limit
(selection_count, population_count)[source]¶ Check if policy’s execution affects more resources then its limit.
Ideally this would be at a higher level but we’ve hidden filtering behind the resource manager facade for default usage.
-
chunk_size
= 20¶
-
filter_registry
= <c7n.filters.core.FilterRegistry object>¶
-
generate_arn
¶ Generates generic arn if ID is not already arn format.
-
max_workers
= 3¶
-
permissions
= ()¶
-
region
¶ Return the current region.
-
resource_type
= ''¶
-
static
retry
(func, *args, **kw)¶
-
source_type
¶
-
-
class
c7n.query.
RetryPageIterator
(method, input_token, output_token, more_results, result_keys, non_aggregate_keys, limit_key, max_items, starting_token, page_size, op_kwargs)[source]¶ Bases:
botocore.paginate.PageIterator
-
static
retry
(func, *args, **kw)¶
-
static
-
class
c7n.query.
TypeInfo
[source]¶ Bases:
object
Resource Type Metadata
-
arn
= None¶
-
arn_separator
= '/'¶
-
arn_service
= None¶
-
arn_type
= None¶
-
batch_detail_spec
= None¶
-
config_type
= None¶
-
date
= None¶
-
default_report_fields
= ()¶
-
detail_spec
= None¶
-
dimension
= None¶
-
enum_spec
= None¶
-
filter_name
= None¶
-
filter_type
= None¶
-
global_resource
= False¶
-
id
= None¶
-
id_prefix
= None¶
-
metrics_namespace
= None¶
-
name
= None¶
-
service
= None¶
-
universal_taggable
= False¶
-