Skip to content

Commit 32de948

Browse files
Add Azure Service Bus, Application Insights, and Key Vault resource templates and mappings
- Introduced blueprints and mapping configurations for Azure Service Bus resources (Namespaces, Queues, Topics, Subscriptions). - Added blueprints and mapping configurations for Azure Application Insights and Key Vault. - Updated documentation to include new resource mappings and API references for the added services.
1 parent 499212a commit 32de948

File tree

11 files changed

+993
-0
lines changed

11 files changed

+993
-0
lines changed

docs/build-your-software-catalog/sync-data-to-catalog/cloud-providers/azure/azure.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,179 @@ resources:
198198
relations:
199199
resource_group: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
200200
| .[:5] |join("/")
201+
- kind: Microsoft.ServiceBus/namespaces
202+
selector:
203+
query: 'true'
204+
apiVersion: '2022-10-01-preview'
205+
port:
206+
entity:
207+
mappings:
208+
identifier: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
209+
| join("/")
210+
title: .name
211+
blueprint: '"azureServiceBusNamespace"'
212+
properties:
213+
location: .location
214+
type: .type
215+
sku: .sku
216+
provisioningState: .properties.provisioningState
217+
status: .properties.status
218+
createdAt: .properties.createdAt
219+
updatedAt: .properties.updatedAt
220+
serviceBusEndpoint: .properties.serviceBusEndpoint
221+
metricId: .properties.metricId
222+
tags: .tags
223+
relations:
224+
resource_group: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
225+
| .[:5] |join("/")
226+
- kind: Microsoft.ServiceBus/namespaces/queues
227+
selector:
228+
query: 'true'
229+
apiVersion: '2022-10-01-preview'
230+
port:
231+
entity:
232+
mappings:
233+
identifier: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
234+
| join("/")
235+
title: .name
236+
blueprint: '"azureServiceBusQueue"'
237+
properties:
238+
type: .type
239+
createdAt: .properties.createdAt
240+
updatedAt: .properties.updatedAt
241+
accessedAt: .properties.accessedAt
242+
sizeInBytes: .properties.sizeInBytes
243+
messageCount: .properties.messageCount
244+
lockDuration: .properties.lockDuration
245+
maxSizeInMegabytes: .properties.maxSizeInMegabytes
246+
maxDeliveryCount: .properties.maxDeliveryCount
247+
enableBatchedOperations: .properties.enableBatchedOperations
248+
status: .properties.status
249+
enablePartitioning: .properties.enablePartitioning
250+
enableExpress: .properties.enableExpress
251+
requiresDuplicateDetection: .properties.requiresDuplicateDetection
252+
requiresSession: .properties.requiresSession
253+
defaultMessageTimeToLive: .properties.defaultMessageTimeToLive
254+
deadLetteringOnMessageExpiration: .properties.deadLetteringOnMessageExpiration
255+
supportOrdering: .properties.supportOrdering
256+
relations:
257+
namespace: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
258+
| .[:7] |join("/")
259+
- kind: Microsoft.ServiceBus/namespaces/topics
260+
selector:
261+
query: 'true'
262+
apiVersion: '2022-10-01-preview'
263+
port:
264+
entity:
265+
mappings:
266+
identifier: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
267+
| join("/")
268+
title: .name
269+
blueprint: '"azureServiceBusTopic"'
270+
properties:
271+
type: .type
272+
createdAt: .properties.createdAt
273+
updatedAt: .properties.updatedAt
274+
accessedAt: .properties.accessedAt
275+
sizeInBytes: .properties.sizeInBytes
276+
subscriptionCount: .properties.subscriptionCount
277+
maxSizeInMegabytes: .properties.maxSizeInMegabytes
278+
enableBatchedOperations: .properties.enableBatchedOperations
279+
status: .properties.status
280+
enablePartitioning: .properties.enablePartitioning
281+
supportOrdering: .properties.supportOrdering
282+
requiresDuplicateDetection: .properties.requiresDuplicateDetection
283+
defaultMessageTimeToLive: .properties.defaultMessageTimeToLive
284+
relations:
285+
namespace: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
286+
| .[:7] |join("/")
287+
- kind: Microsoft.ServiceBus/namespaces/topics/subscriptions
288+
selector:
289+
query: 'true'
290+
apiVersion: '2022-10-01-preview'
291+
port:
292+
entity:
293+
mappings:
294+
identifier: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
295+
| join("/")
296+
title: .name
297+
blueprint: '"azureServiceBusSubscription"'
298+
properties:
299+
type: .type
300+
createdAt: .properties.createdAt
301+
updatedAt: .properties.updatedAt
302+
accessedAt: .properties.accessedAt
303+
messageCount: .properties.messageCount
304+
maxDeliveryCount: .properties.maxDeliveryCount
305+
lockDuration: .properties.lockDuration
306+
enableBatchedOperations: .properties.enableBatchedOperations
307+
status: .properties.status
308+
requiresSession: .properties.requiresSession
309+
defaultMessageTimeToLive: .properties.defaultMessageTimeToLive
310+
relations:
311+
topic: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
312+
| .[:9] |join("/")
313+
- kind: Microsoft.Insights/components
314+
selector:
315+
query: 'true'
316+
apiVersion: '2020-02-02'
317+
port:
318+
entity:
319+
mappings:
320+
identifier: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
321+
| join("/")
322+
title: .name
323+
blueprint: '"azureApplicationInsights"'
324+
properties:
325+
location: .location
326+
type: .type
327+
kind: .kind
328+
applicationType: .properties.Application_Type
329+
applicationId: .properties.AppId
330+
instrumentationKey: .properties.InstrumentationKey
331+
connectionString: .properties.ConnectionString
332+
provisioningState: .properties.provisioningState
333+
flowType: .properties.Flow_Type
334+
requestSource: .properties.Request_Source
335+
retentionInDays: .properties.RetentionInDays
336+
samplingPercentage: .properties.SamplingPercentage
337+
publicNetworkAccessForIngestion: .properties.publicNetworkAccessForIngestion
338+
publicNetworkAccessForQuery: .properties.publicNetworkAccessForQuery
339+
tags: .tags
340+
relations:
341+
resource_group: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
342+
| .[:5] |join("/")
343+
- kind: Microsoft.KeyVault/vaults
344+
selector:
345+
query: 'true'
346+
apiVersion: '2023-07-01'
347+
port:
348+
entity:
349+
mappings:
350+
identifier: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
351+
| join("/")
352+
title: .name
353+
blueprint: '"azureKeyVault"'
354+
properties:
355+
location: .location
356+
type: .type
357+
tenantId: .properties.tenantId
358+
sku: .properties.sku
359+
vaultUri: .properties.vaultUri
360+
provisioningState: .properties.provisioningState
361+
enabledForDeployment: .properties.enabledForDeployment
362+
enabledForDiskEncryption: .properties.enabledForDiskEncryption
363+
enabledForTemplateDeployment: .properties.enabledForTemplateDeployment
364+
enableSoftDelete: .properties.enableSoftDelete
365+
softDeleteRetentionInDays: .properties.softDeleteRetentionInDays
366+
enableRbacAuthorization: .properties.enableRbacAuthorization
367+
enablePurgeProtection: .properties.enablePurgeProtection
368+
publicNetworkAccess: .properties.publicNetworkAccess
369+
networkAcls: .properties.networkAcls
370+
tags: .tags
371+
relations:
372+
resource_group: .id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
373+
| .[:5] |join("/")
201374
```
202375
203376
</details>

docs/build-your-software-catalog/sync-data-to-catalog/cloud-providers/azure/resource_templates/advanced.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ import WebAppBlueprint from './compute_resources/\_web_app_blueprint.mdx'
1818
import DatabaseAppConfig from './database_resources/\_port_app_config.mdx'
1919
import PostgresFlexibleServerBlueprint from './database_resources/\_postgres_flexible_server_blueprint.mdx'
2020

21+
import ServiceBusNamespaceBlueprint from './service_bus/\_service_bus_namespace_blueprint.mdx'
22+
import ServiceBusQueueBlueprint from './service_bus/\_service_bus_queue_blueprint.mdx'
23+
import ServiceBusTopicBlueprint from './service_bus/\_service_bus_topic_blueprint.mdx'
24+
import ServiceBusSubscriptionBlueprint from './service_bus/\_service_bus_subscription_blueprint.mdx'
25+
import ServiceBusAppConfig from './service_bus/\_port_app_config.mdx'
26+
27+
import ApplicationInsightsBlueprint from './application_insights/\_blueprint.mdx'
28+
import ApplicationInsightsAppConfig from './application_insights/\_port_app_config.mdx'
29+
30+
import KeyVaultBlueprint from './key_vault/\_blueprint.mdx'
31+
import KeyVaultAppConfig from './key_vault/\_port_app_config.mdx'
32+
2133

2234
## Mapping Storage Resources
2335

@@ -85,6 +97,66 @@ Here are the API references we used to create those blueprints and app config:
8597

8698
- [Postgres Flexible Server](https://docs.microsoft.com/en-us/rest/api/azure-postgresql/flexibleservers)
8799

100+
## Mapping Service Bus Resources
101+
102+
The following example demonstrates how to ingest your Azure Service Bus resources (Namespaces, Queues, Topics, and Subscriptions) to Port.
103+
You can use the following Port blueprint definitions and integration configuration:
104+
105+
:::note
106+
The Service Bus resources have a hierarchical relationship. The Namespace relates to the Resource Group, Queues and Topics relate to the Namespace, and Subscriptions relate to Topics. Creation of the [Resource Group blueprint](#mapping-resource-groups) is required.
107+
:::
108+
109+
<ServiceBusNamespaceBlueprint/>
110+
111+
<ServiceBusQueueBlueprint/>
112+
113+
<ServiceBusTopicBlueprint/>
114+
115+
<ServiceBusSubscriptionBlueprint/>
116+
117+
<ServiceBusAppConfig/>
118+
119+
Here are the API references we used to create those blueprints and app config:
120+
121+
- [Service Bus Namespace](https://learn.microsoft.com/en-us/rest/api/servicebus/stable/namespaces/list-by-subscription)
122+
- [Service Bus Queue](https://learn.microsoft.com/en-us/rest/api/servicebus/stable/queues/list-by-namespace)
123+
- [Service Bus Topic](https://learn.microsoft.com/en-us/rest/api/servicebus/stable/topics/list-by-namespace)
124+
- [Service Bus Subscription](https://learn.microsoft.com/en-us/rest/api/servicebus/stable/subscriptions/list-by-topic)
125+
126+
## Mapping Application Insights
127+
128+
The following example demonstrates how to ingest your Azure Application Insights components to Port.
129+
You can use the following Port blueprint definitions and integration configuration:
130+
131+
:::note
132+
Application Insights has a relation to the Resource Group, so creation of the [Resource Group blueprint](#mapping-resource-groups) is required.
133+
:::
134+
135+
<ApplicationInsightsBlueprint/>
136+
137+
<ApplicationInsightsAppConfig/>
138+
139+
Here are the API references we used to create those blueprints and app config:
140+
141+
- [Application Insights](https://learn.microsoft.com/en-us/rest/api/application-insights/components/list)
142+
143+
## Mapping Key Vault
144+
145+
The following example demonstrates how to ingest your Azure Key Vaults to Port.
146+
You can use the following Port blueprint definitions and integration configuration:
147+
148+
:::note
149+
Key Vault has a relation to the Resource Group, so creation of the [Resource Group blueprint](#mapping-resource-groups) is required.
150+
:::
151+
152+
<KeyVaultBlueprint/>
153+
154+
<KeyVaultAppConfig/>
155+
156+
Here are the API references we used to create those blueprints and app config:
157+
158+
- [Key Vault](https://learn.microsoft.com/en-us/rest/api/keyvault/vaults/list-by-subscription)
159+
88160
:::info Mapping extra resources
89161
The resources in this page are only few of the resources that the Azure Exporter supports.
90162
If you don't find the Azure resource you want to map to Port head to the [Mapping Extra Resources](/build-your-software-catalog/sync-data-to-catalog/cloud-providers/azure/resource_templates/mapping_extra_resources.md) page to learn about what kind of azure resources are supported by the Azure integration and how to map them into Port.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<details>
2+
3+
<summary> Application Insights blueprint </summary>
4+
5+
```json showLineNumbers
6+
{
7+
"identifier": "azureApplicationInsights",
8+
"title": "Application Insights",
9+
"icon": "Azure",
10+
"schema": {
11+
"properties": {
12+
"location": {
13+
"title": "Location",
14+
"type": "string",
15+
"icon": "Home"
16+
},
17+
"type": {
18+
"title": "Type",
19+
"type": "string",
20+
"icon": "Microservice"
21+
},
22+
"kind": {
23+
"title": "Kind",
24+
"type": "string"
25+
},
26+
"applicationType": {
27+
"title": "Application Type",
28+
"type": "string"
29+
},
30+
"applicationId": {
31+
"title": "Application ID",
32+
"type": "string"
33+
},
34+
"instrumentationKey": {
35+
"title": "Instrumentation Key",
36+
"type": "string",
37+
"icon": "Lock"
38+
},
39+
"connectionString": {
40+
"title": "Connection String",
41+
"type": "string"
42+
},
43+
"provisioningState": {
44+
"title": "Provisioning State",
45+
"type": "string"
46+
},
47+
"retentionInDays": {
48+
"title": "Retention In Days",
49+
"type": "number"
50+
},
51+
"samplingPercentage": {
52+
"title": "Sampling Percentage",
53+
"type": "number"
54+
},
55+
"publicNetworkAccessForIngestion": {
56+
"title": "Public Network Access For Ingestion",
57+
"type": "string"
58+
},
59+
"publicNetworkAccessForQuery": {
60+
"title": "Public Network Access For Query",
61+
"type": "string"
62+
},
63+
"tags": {
64+
"title": "Tags",
65+
"type": "object"
66+
}
67+
},
68+
"required": []
69+
},
70+
"mirrorProperties": {},
71+
"calculationProperties": {},
72+
"aggregationProperties": {},
73+
"relations": {
74+
"resource_group": {
75+
"title": "Resource Group",
76+
"target": "azureResourceGroup",
77+
"required": false,
78+
"many": false
79+
}
80+
}
81+
}
82+
```
83+
84+
</details>
85+
86+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<details>
2+
<summary>Mapping Configuration for Application Insights</summary>
3+
4+
```yaml showLineNumbers
5+
resources:
6+
- kind: Microsoft.Insights/components
7+
selector:
8+
query: 'true'
9+
apiVersion: '2020-02-02'
10+
port:
11+
entity:
12+
mappings:
13+
identifier: >-
14+
.id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase |
15+
join("/")
16+
title: .name
17+
blueprint: '"azureApplicationInsights"'
18+
properties:
19+
location: .location
20+
type: .type
21+
kind: .kind
22+
applicationType: .properties.Application_Type
23+
applicationId: .properties.AppId
24+
instrumentationKey: .properties.InstrumentationKey
25+
connectionString: .properties.ConnectionString
26+
provisioningState: .properties.provisioningState
27+
flowType: .properties.Flow_Type
28+
requestSource: .properties.Request_Source
29+
retentionInDays: .properties.RetentionInDays
30+
samplingPercentage: .properties.SamplingPercentage
31+
publicNetworkAccessForIngestion: .properties.publicNetworkAccessForIngestion
32+
publicNetworkAccessForQuery: .properties.publicNetworkAccessForQuery
33+
tags: .tags
34+
relations:
35+
resource_group: >-
36+
.id | split("/") | .[3] |= ascii_downcase |.[4] |= ascii_downcase
37+
| .[:5] |join("/")
38+
```
39+
40+
</details>
41+
42+

0 commit comments

Comments
 (0)