cloud_scanner.rules package¶
Submodules¶
cloud_scanner.rules.example_rules module¶
-
class
cloud_scanner.rules.example_rules.
ExampleRule1
(queue: cloud_scanner.contracts.queue.Queue)¶ Bases:
cloud_scanner.contracts.tag_update_rule.TagUpdateRule
-
check_condition
(resource: cloud_scanner.contracts.resource.Resource) → bool¶ Returns True/False whether the rule should be performed on the input resource.
Parameters: resource – The resource to check if the rule should be ran upon. Returns: Boolean if the resource should be processed with the rule.
The dictionary of tags to update the resource with.
Parameters: resource – The resource to update tags on. Returns: dict of tags as key value pairs.
-
-
class
cloud_scanner.rules.example_rules.
ExampleRule2
(queue: cloud_scanner.contracts.queue.Queue)¶ Bases:
cloud_scanner.contracts.tag_update_rule.TagUpdateRule
-
check_condition
(resource: cloud_scanner.contracts.resource.Resource) → bool¶ Returns True/False whether the rule should be performed on the input resource.
Parameters: resource – The resource to check if the rule should be ran upon. Returns: Boolean if the resource should be processed with the rule.
The dictionary of tags to update the resource with.
Parameters: resource – The resource to update tags on. Returns: dict of tags as key value pairs.
-
-
class
cloud_scanner.rules.example_rules.
ExampleRule3
(queue: cloud_scanner.contracts.queue.Queue)¶ Bases:
cloud_scanner.contracts.tag_update_rule.TagUpdateRule
-
check_condition
(resource: cloud_scanner.contracts.resource.Resource) → bool¶ Returns True/False whether the rule should be performed on the input resource.
Parameters: resource – The resource to check if the rule should be ran upon. Returns: Boolean if the resource should be processed with the rule.
The dictionary of tags to update the resource with.
Parameters: resource – The resource to update tags on. Returns: dict of tags as key value pairs.
-
-
class
cloud_scanner.rules.example_rules.
ExampleRule4
(queue: cloud_scanner.contracts.queue.Queue)¶ Bases:
cloud_scanner.contracts.tag_update_rule.TagUpdateRule
-
check_condition
(resource: cloud_scanner.contracts.resource.Resource) → bool¶ Returns True/False whether the rule should be performed on the input resource.
Parameters: resource – The resource to check if the rule should be ran upon. Returns: Boolean if the resource should be processed with the rule.
The dictionary of tags to update the resource with.
Parameters: resource – The resource to update tags on. Returns: dict of tags as key value pairs.
-
-
cloud_scanner.rules.example_rules.
create_rule
(cls)¶