Gallery › Sovereignty › Azure built-in policies
[Preview]: Azure Stream Analytics clusters should have a fully configured managed private endpoint connection
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0-preview Preview
Managed private endpoints enable private outbound connectivity from Azure Stream Analytics clusters to supported input and output resources. This policy audits clusters that do not have at least one managed private endpoint with a completed setup.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONStreamAnalyticsCluster_PrivateEndpoint_AINE.json · 55 lines
{
"properties": {
"displayName": "[Preview]: Azure Stream Analytics clusters should have a fully configured managed private endpoint connection",
"description": "Managed private endpoints enable private outbound connectivity from Azure Stream Analytics clusters to supported input and output resources. This policy audits clusters that do not have at least one managed private endpoint with a completed setup.",
"policyType": "BuiltIn",
"mode": "Indexed",
"metadata": {
"version": "1.0.0-preview",
"category": "Sovereignty",
"preview": true
},
"version": "1.0.0-preview",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.StreamAnalytics/clusters"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.StreamAnalytics/clusters/privateEndpoints",
"existenceCondition": {
"count": {
"field": "Microsoft.StreamAnalytics/clusters/privateEndpoints/manualPrivateLinkServiceConnections[*]",
"where": {
"field": "Microsoft.StreamAnalytics/clusters/privateEndpoints/manualPrivateLinkServiceConnections[*].privateLinkServiceConnectionState.status",
"equals": "SetUpComplete"
}
},
"greaterOrEquals": 1
}
}
}
},
"versions": [
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/53ed4ed6-59b1-4f85-b6b3-36178fe76759",
"name": "53ed4ed6-59b1-4f85-b6b3-36178fe76759"
}Bylaw53ed4ed6-59b1-4f85-b6b3-36178fe76759.bylaw.ps1 · 30 lines
# Converted from StreamAnalyticsCluster_PrivateEndpoint_AINE.json by ConvertTo-Bylaw.
Policy '53ed4ed6-59b1-4f85-b6b3-36178fe76759' {
Properties @{
DisplayName = '[Preview]: Azure Stream Analytics clusters should have a fully configured managed private endpoint connection'
Description = 'Managed private endpoints enable private outbound connectivity from Azure Stream Analytics clusters to supported input and output resources. This policy audits clusters that do not have at least one managed private endpoint with a completed setup.'
Version = '1.0.0-preview'
Category = 'Sovereignty'
Preview = $true
PolicyVersion = '1.0.0-preview'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.StreamAnalytics/clusters'
AuditIfNotExists 'Microsoft.StreamAnalytics/clusters/privateEndpoints' -Effect (Param Effect) {
Require 'manualPrivateLinkServiceConnections and privateLinkServiceConnectionState.status are as required' {
Count 'manualPrivateLinkServiceConnections[*]' -Where {
Field privateLinkServiceConnectionState.status | Must -Be 'SetUpComplete'
} | Must -BeGreaterOrEqual 1
}
}
}Source: built-in-policies/policyDefinitions/Sovereignty/StreamAnalyticsCluster_PrivateEndpoint_AINE.json in Azure/azure-policy, under the MIT licence.
Bylaw