Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/c7n_gcp/resources/armor.py: 100%

16 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-12-08 06:51 +0000

1# Copyright The Cloud Custodian Authors. 

2# SPDX-License-Identifier: Apache-2.0 

3from c7n_gcp.provider import resources 

4from c7n_gcp.query import QueryResourceManager, TypeInfo 

5 

6 

7@resources.register("armor-policy") 

8class SecurityPolicy(QueryResourceManager): 

9 """Cloud Armor Policy 

10 

11 Cloud Armor is GCP's WAF technology providing DDOS and Layer 7 

12 (SQLi, XSS) rules based protection for load balancers and public 

13 ip VMs. 

14 

15 GC resource: https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies 

16 

17 """ 

18 

19 class resource_type(TypeInfo): 

20 service = "compute" 

21 version = "v1" 

22 component = "securityPolicies" 

23 scope_key = "project" 

24 name = id = "name" 

25 scope_template = "{}" 

26 permissions = ("compute.securityPolicies.list",) 

27 default_report_fields = ["name", "description", "creationTimestamp"] 

28 asset_type = "compute.googleapis.com/SecurityPolicy" 

29 urn_id_path = "name" 

30 urn_component = "securityPolicy"