Bicep 资源定义
可以使用目标操作部署 serviceEndpointPolicies 资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
用法示例
Bicep 示例
部署子网服务端点存储策略的基本示例。
param location string = 'westeurope'
param resourceName string = 'acctest0001'
resource serviceEndpointPolicy 'Microsoft.Network/serviceEndpointPolicies@2022-07-01' = {
name: resourceName
location: location
properties: {}
}
Azure 验证模块
以下 Azure 验证模块 可用于部署此资源类型。
若要创建 Microsoft.Network/serviceEndpointPolicies 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.Network/serviceEndpointPolicies@2018-10-01' = {
etag: 'string'
location: 'string'
name: 'string'
properties: {
serviceEndpointPolicyDefinitions: [
{
etag: 'string'
id: 'string'
name: 'string'
properties: {
description: 'string'
service: 'string'
serviceResources: [
'string'
]
}
}
]
}
tags: {
{customized property}: 'string'
}
}
属性值
Microsoft.Network/serviceEndpoint策略
ServiceEndpointPolicyDefinition
| 名字 |
描述 |
价值 |
| 描述 |
此规则的说明。 限制为 140 个字符。 |
字符串 |
| 服务 |
服务终结点名称。 |
字符串 |
| 服务资源 |
服务资源列表。 |
字符串[] |
ARM 模板资源定义
可以使用目标操作部署 serviceEndpointPolicies 资源类型:
用法示例
Azure 快速入门模板
以下 Azure 快速入门模板 部署此资源类型。
若要创建 Microsoft.Network/serviceEndpointPolicies 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.Network/serviceEndpointPolicies",
"apiVersion": "2018-10-01",
"name": "string",
"etag": "string",
"location": "string",
"properties": {
"serviceEndpointPolicyDefinitions": [
{
"etag": "string",
"id": "string",
"name": "string",
"properties": {
"description": "string",
"service": "string",
"serviceResources": [ "string" ]
}
}
]
},
"tags": {
"{customized property}": "string"
}
}
属性值
Microsoft.Network/serviceEndpoint策略
| 名字 |
描述 |
价值 |
| apiVersion |
API 版本 |
'2018-10-01' |
| ETAG |
一个唯一的只读字符串,每当更新资源时更改。 |
字符串 |
| 位置 |
资源位置。 |
字符串 |
| 名字 |
资源名称 |
string (必需) |
| 性能 |
服务终结点策略的属性。 |
ServiceEndpointPolicyPropertiesFormat |
| 标签 |
资源标记 |
标记名称和值的字典。 请参阅模板 中的 标记 |
| 类型 |
资源类型 |
“Microsoft.Network/serviceEndpointPolicies” |
ServiceEndpointPolicyDefinition
| 名字 |
描述 |
价值 |
| 描述 |
此规则的说明。 限制为 140 个字符。 |
字符串 |
| 服务 |
服务终结点名称。 |
字符串 |
| 服务资源 |
服务资源列表。 |
字符串[] |
可以使用目标操作部署 serviceEndpointPolicies 资源类型:
-
资源组 关于每个API版本中变更属性的列表,请参见 更改日志。
用法示例
部署子网服务端点存储策略的基本示例。
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "serviceEndpointPolicy" {
type = "Microsoft.Network/serviceEndpointPolicies@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
若要创建 Microsoft.Network/serviceEndpointPolicies 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/serviceEndpointPolicies@2018-10-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
etag = "string"
properties = {
serviceEndpointPolicyDefinitions = [
{
etag = "string"
id = "string"
name = "string"
properties = {
description = "string"
service = "string"
serviceResources = [
"string"
]
}
}
]
}
}
}
属性值
Microsoft.Network/serviceEndpoint策略
| 名字 |
描述 |
价值 |
| ETAG |
一个唯一的只读字符串,每当更新资源时更改。 |
字符串 |
| 位置 |
资源位置。 |
字符串 |
| 名字 |
资源名称 |
string (必需) |
| 性能 |
服务终结点策略的属性。 |
ServiceEndpointPolicyPropertiesFormat |
| 标签 |
资源标记 |
标记名称和值的字典。 |
| 类型 |
资源类型 |
“Microsoft.Network/serviceEndpointPolicies@2018-10-01” |
ServiceEndpointPolicyDefinition
| 名字 |
描述 |
价值 |
| 描述 |
此规则的说明。 限制为 140 个字符。 |
字符串 |
| 服务 |
服务终结点名称。 |
字符串 |
| 服务资源 |
服务资源列表。 |
字符串[] |