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"