Skip to content

Commit 6716d9a

Browse files
authored
Add ONVIF bicep files (#117)
## Purpose <!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? --> * Add ONVIF bicep files to support how-to article: https://learn.microsoft.com/en-us/azure/iot-operations/discover-manage-assets/howto-use-onvif-connector ## Does this introduce a breaking change? <!-- Mark one with an "x". --> ``` [ ] Yes [x] No ``` ## Pull Request Type What kind of change does this Pull Request introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [ ] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [x] Documentation content changes [ ] Other... Please describe: ```
1 parent 5f84f2f commit 6716d9a

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

samples/media-connector-bicep/aep-media-connector.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ param customLocationName string
99
@description('Specifies the name of the asset endpoint resource to create.')
1010
param aepName string
1111

12-
@description('The name of the Kubernetes secret you are using.')
12+
@description('The name of the Kubernetes secret you are using to store the camera credentials.')
1313
param secretName string
1414

1515
/*****************************************************************************/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
metadata description = 'Asset endpoint profile for ONVIF connector'
2+
3+
@description('The ONVIF discovery endpoint.')
4+
param onvifAddress string
5+
6+
@description('The name of the custom location you are using.')
7+
param customLocationName string
8+
9+
@description('Specifies the name of the asset endpoint resource to create.')
10+
param aepName string
11+
12+
@description('The name of the Kubernetes secret you are using to store the camera credentials.')
13+
param secretName string
14+
15+
/*****************************************************************************/
16+
/* Asset endpoint profile */
17+
/*****************************************************************************/
18+
resource assetEndpoint 'Microsoft.DeviceRegistry/assetEndpointProfiles@2024-11-01' = {
19+
name: aepName
20+
location: resourceGroup().location
21+
extendedLocation: {
22+
type: 'CustomLocation'
23+
name: customLocationName
24+
}
25+
properties: {
26+
targetAddress: onvifAddress
27+
endpointProfileType: 'Microsoft.Onvif'
28+
#disable-next-line no-hardcoded-env-urls //Schema required during public preview
29+
additionalConfiguration: '{"@schema":"https://aiobrokers.blob.core.windows.net/aio-onvif-connector/1.0.0.json"}'
30+
authentication: {
31+
method: 'UsernamePassword'
32+
usernamePasswordCredentials: {
33+
passwordSecretName: '${secretName}/password'
34+
usernameSecretName: '${secretName}/username'
35+
}
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
metadata description = 'ONVIF camera PTZ capabilities'
2+
param aepName string
3+
param customLocationName string
4+
param assetName string = 'camera-ptz'
5+
param displayName string = 'Camera PTZ service'
6+
7+
/*****************************************************************************/
8+
/* Asset */
9+
/*****************************************************************************/
10+
resource asset 'Microsoft.DeviceRegistry/assets@2024-11-01' = {
11+
name: assetName
12+
location: resourceGroup().location
13+
extendedLocation: {
14+
type: 'CustomLocation'
15+
name: customLocationName
16+
}
17+
properties: {
18+
displayName: displayName
19+
assetEndpointProfileRef: aepName
20+
}
21+
}

0 commit comments

Comments
 (0)