Debian Codegraph @

ansible_collections/azure/azcollection/extensions/audit/event_query.yml

raw symbols SCIP
1 ---
2 azure.azcollection.*:
3 query: >-
4 (
5 {"apimanagement": "Metadata",
6 "authorization": "Governance & Operations",
7 "automation": "Governance & Operations",
8 "batch": "Event Generation",
9 "cache": "Database",
10 "cdn": "Networking",
11 "classiccompute": "Compute",
12 "compute": "Compute",
13 "containerinstance": "Compute",
14 "containerregistry": "DevOps",
15 "containerservice": "Compute",
16 "datafactory": "Storage",
17 "dbformariadb": "Database",
18 "dbformysql": "Database",
19 "dbforpostgresql": "Database",
20 "devices": "Hybrid/Edge Cloud Components",
21 "documentdb": "Database",
22 "eventhub": "Data Processing & Analytics",
23 "hdinsight": "Data Processing & Analytics",
24 "insights": "Data Processing & Analytics",
25 "keyvault": "Database",
26 "maintenance": "Governance & Operations",
27 "managedidentity": "Governance & Operations",
28 "managedservices": "Governance & Operations",
29 "management": "Governance & Operations",
30 "network": "Networking",
31 "operationalinsights": "Data Processing & Analytics",
32 "recoveryservices": "Storage",
33 "redhatopenshift": "Compute",
34 "resources": "UNKNOWN",
35 "servicebus": "App Integration & Messaging",
36 "sql": "Database",
37 "storage": "Storage",
38 "web": "App Integration & Messaging"
39 } as $mapping |
40 (.aks_agent_pools //
41 .ansible_facts.azure_vm //
42 .ansible_facts.azure_vmss //
43 .bastion_host //
44 .connection //
45 .database //
46 .deployment //
47 .elastic_pool //
48 .firewall_policy //
49 .firewall_rule //
50 .instances //
51 .ip_security_restrictions //
52 .link_service //
53 .long_term_retention_policy //
54 .response //
55 .state //
56 .short_term_retention_policy //
57 .) |
58 (if type=="array" then .[]
59 else if type=="object" then .
60 else empty end
61 end
62 ) as $data |
63 (
64 ($data.id | capture("/providers/[Mm]icrosoft.(?<resourcetype>[^/]+)/")? | .resourcetype)
65 | ascii_downcase
66 ) as $node_type |
67 (
68 ($data.id | capture("/providers/[Mm]icrosoft.[^/]+/(?<subtype>[^/]+)/")? | .subtype)
69 | ascii_downcase
70 ) as $sub_node_type |
71 select($data.id != null) |
72 {
73 name: $data.id,
74 canonical_facts: {
75 name: ($data.name // "UNKNOWN"),
76 id: $data.id,
77 node_type: $node_type
78 },
79 facts: {
80 infra_type: "PublicCloud",
81 infra_bucket: ($mapping[$node_type] // "UNKNOWN"),
82 device_type: $sub_node_type
83 }
84 }
85 )