Microsoft. شبكة expressRouteCircuits/نظيرات/اتصالات 2020-06-01

تعريف مورد Bicep

يمكن نشر نوع مورد expressRouteCircuits/peerings/connections مع العمليات التي تستهدف:

  • مجموعات الموارد - راجع أوامر نشر مجموعة الموارد

للحصول على قائمة بالخصائص التي تم تغييرها في كل إصدار من إصدارات واجهة برمجة التطبيقات، راجع سجل التغيير .

أمثلة الاستخدام

عينات Bicep

مثال أساسي لنشر اتصال دائرة المسار السريع.

param resourceName string = 'acctest0001'
param location string = 'westeurope'
@secure()
@description('The shared key for the Express Route circuit peering connections')
param expressRouteConnectionSharedKey string

resource expressRoutePort 'Microsoft.Network/ExpressRoutePorts@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    bandwidthInGbps: 10
    encapsulation: 'Dot1Q'
    peeringLocation: 'Airtel-Chennai2-CLS'
  }
}

resource expressRoutePort2 'Microsoft.Network/ExpressRoutePorts@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    bandwidthInGbps: 10
    encapsulation: 'Dot1Q'
    peeringLocation: 'CDC-Canberra'
  }
}

resource expressRouteCircuit 'Microsoft.Network/expressRouteCircuits@2022-07-01' = {
  name: resourceName
  location: location
  sku: {
    family: 'MeteredData'
    name: 'Standard_MeteredData'
    tier: 'Standard'
  }
  properties: {
    authorizationKey: ''
    bandwidthInGbps: 5
    expressRoutePort: {
      id: expressRoutePort.id
    }
  }
}

resource expressRouteCircuit2 'Microsoft.Network/expressRouteCircuits@2022-07-01' = {
  name: resourceName
  location: location
  sku: {
    family: 'MeteredData'
    name: 'Standard_MeteredData'
    tier: 'Standard'
  }
  properties: {
    authorizationKey: ''
    bandwidthInGbps: 5
    expressRoutePort: {
      id: expressRoutePort2.id
    }
  }
}

resource peering 'Microsoft.Network/expressRouteCircuits/peerings@2022-07-01' = {
  name: 'AzurePrivatePeering'
  parent: expressRouteCircuit
  properties: {
    azureASN: 12076
    gatewayManagerEtag: ''
    peerASN: 100
    peeringType: 'AzurePrivatePeering'
    primaryPeerAddressPrefix: '192.168.1.0/30'
    secondaryPeerAddressPrefix: '192.168.1.0/30'
    sharedKey: expressRouteConnectionSharedKey
    state: 'Enabled'
    vlanId: 100
  }
}

resource peering2 'Microsoft.Network/expressRouteCircuits/peerings@2022-07-01' = {
  name: 'AzurePrivatePeering'
  parent: expressRouteCircuit2
  properties: {
    azureASN: 12076
    gatewayManagerEtag: ''
    peerASN: 100
    peeringType: 'AzurePrivatePeering'
    primaryPeerAddressPrefix: '192.168.1.0/30'
    secondaryPeerAddressPrefix: '192.168.1.0/30'
    sharedKey: expressRouteConnectionSharedKey
    state: 'Enabled'
    vlanId: 100
  }
}

resource connection 'Microsoft.Network/expressRouteCircuits/peerings/connections@2022-07-01' = {
  name: resourceName
  parent: peering
  properties: {
    addressPrefix: '192.169.8.0/29'
    expressRouteCircuitPeering: {
      id: peering.id
    }
    peerExpressRouteCircuitPeering: {
      id: peering2.id
    }
  }
}

تنسيق المورد

لإنشاء مورد Microsoft.Network/expressRouteCircuits/peerings/connections، أضف Bicep التالي إلى القالب الخاص بك.

resource symbolicname 'Microsoft.Network/expressRouteCircuits/peerings/connections@2020-06-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    addressPrefix: 'string'
    authorizationKey: 'string'
    expressRouteCircuitPeering: {
      id: 'string'
    }
    ipv6CircuitConnectionConfig: {
      addressPrefix: 'string'
    }
    peerExpressRouteCircuitPeering: {
      id: 'string'
    }
  }
}

قيم الخصائص

Microsoft.Network/expressRouteCircuits/الأقران/الاتصالات

اسم وصف قيمة
اسم اسم المورد سلسلة (مطلوب)
الوالد في Bicep، يمكنك تحديد المورد الأصل لمورد تابع. تحتاج فقط إلى إضافة هذه الخاصية عند الإعلان عن المورد التابع خارج المورد الأصل.

لمزيد من المعلومات، راجع مورد تابع خارج المورد الأصل.
الاسم الرمزي للمورد من النوع: expressRouteCircuits/peerings
خصائص خصائص اتصال دائرة المسار السريع. ExpressRouteCircuitConnectionPropertiesFormat

ExpressRouteCircuitConnectionPropertiesFormat

اسم وصف قيمة
العنوان بادئة /29 مساحة عنوان IP لحفر عناوين العملاء للأنفاق. خيط
مفتاح التخويل مفتاح التخويل. خيط
expressRouteCircuitPeering مرجع إلى مورد التناظر الخاص لدائرة التوجيه السريع لاتصال بدء الدائرة. الموارد الفرعية
IPv6CircuitConnectionConfig بادئة عنوان IPv6الخصائص لاتصال دائرة المسار السريع. Ipv6CircuitConnectionConfig
peerExpressRouteCircuitPeering مرجع إلى Express Route Circuit Private Peering Resource للدائرة النظيرة. الموارد الفرعية

Ipv6CircuitConnectionConfig

اسم وصف قيمة
العنوان بادئة /125 مساحة عنوان IP لنحت عناوين العملاء للوصول العالمي. خيط

مصدر فرعي

اسم وصف قيمة
معرف معرف المورد. خيط

تعريف مورد قالب ARM

يمكن نشر نوع مورد expressRouteCircuits/peerings/connections مع العمليات التي تستهدف:

أمثلة الاستخدام

تنسيق المورد

لإنشاء مورد Microsoft.Network/expressRouteCircuits/peerings/connections، أضف JSON التالي إلى القالب الخاص بك.

{
  "type": "Microsoft.Network/expressRouteCircuits/peerings/connections",
  "apiVersion": "2020-06-01",
  "name": "string",
  "properties": {
    "addressPrefix": "string",
    "authorizationKey": "string",
    "expressRouteCircuitPeering": {
      "id": "string"
    },
    "ipv6CircuitConnectionConfig": {
      "addressPrefix": "string"
    },
    "peerExpressRouteCircuitPeering": {
      "id": "string"
    }
  }
}

قيم الخصائص

Microsoft.Network/expressRouteCircuits/الأقران/الاتصالات

اسم وصف قيمة
apiVersion إصدار واجهة برمجة التطبيقات '2020-06-01'
اسم اسم المورد سلسلة (مطلوب)
خصائص خصائص اتصال دائرة المسار السريع. ExpressRouteCircuitConnectionPropertiesFormat
نوع نوع المورد "Microsoft.Network/expressRouteCircuits/peerings/connections"

ExpressRouteCircuitConnectionPropertiesFormat

اسم وصف قيمة
العنوان بادئة /29 مساحة عنوان IP لحفر عناوين العملاء للأنفاق. خيط
مفتاح التخويل مفتاح التخويل. خيط
expressRouteCircuitPeering مرجع إلى مورد التناظر الخاص لدائرة التوجيه السريع لاتصال بدء الدائرة. الموارد الفرعية
IPv6CircuitConnectionConfig بادئة عنوان IPv6الخصائص لاتصال دائرة المسار السريع. Ipv6CircuitConnectionConfig
peerExpressRouteCircuitPeering مرجع إلى Express Route Circuit Private Peering Resource للدائرة النظيرة. الموارد الفرعية

Ipv6CircuitConnectionConfig

اسم وصف قيمة
العنوان بادئة /125 مساحة عنوان IP لنحت عناوين العملاء للوصول العالمي. خيط

مصدر فرعي

اسم وصف قيمة
معرف معرف المورد. خيط

تعريف مورد Terraform (موفر AzAPI)

يمكن نشر نوع مورد expressRouteCircuits/peerings/connections مع العمليات التي تستهدف:

  • مجموعات الموارد للحصول على قائمة بالخصائص المتغيرة في كل إصدار من واجهة برمجة التطبيقات، انظر سجل التغيير.

أمثلة الاستخدام

عينات Terraform

مثال أساسي لنشر اتصال دائرة المسار السريع.

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"
}

variable "express_route_connection_shared_key" {
  type        = string
  description = "The shared key for the Express Route circuit peering connections"
  sensitive   = true
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "ExpressRoutePort" {
  type      = "Microsoft.Network/ExpressRoutePorts@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      bandwidthInGbps = 10
      encapsulation   = "Dot1Q"
      peeringLocation = "Airtel-Chennai2-CLS"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "ExpressRoutePort2" {
  type      = "Microsoft.Network/ExpressRoutePorts@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      bandwidthInGbps = 10
      encapsulation   = "Dot1Q"
      peeringLocation = "CDC-Canberra"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "expressRouteCircuit" {
  type      = "Microsoft.Network/expressRouteCircuits@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      authorizationKey = ""
      bandwidthInGbps  = 5
      expressRoutePort = {
        id = azapi_resource.ExpressRoutePort.id
      }
    }
    sku = {
      family = "MeteredData"
      name   = "Standard_MeteredData"
      tier   = "Standard"
    }
  }
  ignore_casing             = true
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "expressRouteCircuit2" {
  type      = "Microsoft.Network/expressRouteCircuits@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      authorizationKey = ""
      bandwidthInGbps  = 5
      expressRoutePort = {
        id = azapi_resource.ExpressRoutePort2.id
      }
    }
    sku = {
      family = "MeteredData"
      name   = "Standard_MeteredData"
      tier   = "Standard"
    }
  }
  ignore_casing             = true
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "peering" {
  type      = "Microsoft.Network/expressRouteCircuits/peerings@2022-07-01"
  parent_id = azapi_resource.expressRouteCircuit.id
  name      = "AzurePrivatePeering"
  body = {
    properties = {
      azureASN                   = 12076
      gatewayManagerEtag         = ""
      peerASN                    = 100
      peeringType                = "AzurePrivatePeering"
      primaryPeerAddressPrefix   = "192.168.1.0/30"
      secondaryPeerAddressPrefix = "192.168.1.0/30"
      sharedKey                  = var.express_route_connection_shared_key
      state                      = "Enabled"
      vlanId                     = 100
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "peering2" {
  type      = "Microsoft.Network/expressRouteCircuits/peerings@2022-07-01"
  parent_id = azapi_resource.expressRouteCircuit2.id
  name      = "AzurePrivatePeering"
  body = {
    properties = {
      azureASN                   = 12076
      gatewayManagerEtag         = ""
      peerASN                    = 100
      peeringType                = "AzurePrivatePeering"
      primaryPeerAddressPrefix   = "192.168.1.0/30"
      secondaryPeerAddressPrefix = "192.168.1.0/30"
      sharedKey                  = var.express_route_connection_shared_key
      state                      = "Enabled"
      vlanId                     = 100
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "connection" {
  type      = "Microsoft.Network/expressRouteCircuits/peerings/connections@2022-07-01"
  parent_id = azapi_resource.peering.id
  name      = var.resource_name
  body = {
    properties = {
      addressPrefix = "192.169.8.0/29"
      expressRouteCircuitPeering = {
        id = azapi_resource.peering.id
      }
      peerExpressRouteCircuitPeering = {
        id = azapi_resource.peering2.id
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

تنسيق المورد

لإنشاء مورد Microsoft.Network/expressRouteCircuits/peerings/connections، أضف Terraform التالي إلى القالب الخاص بك.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/expressRouteCircuits/peerings/connections@2020-06-01"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      addressPrefix = "string"
      authorizationKey = "string"
      expressRouteCircuitPeering = {
        id = "string"
      }
      ipv6CircuitConnectionConfig = {
        addressPrefix = "string"
      }
      peerExpressRouteCircuitPeering = {
        id = "string"
      }
    }
  }
}

قيم الخصائص

Microsoft.Network/expressRouteCircuits/الأقران/الاتصالات

اسم وصف قيمة
اسم اسم المورد سلسلة (مطلوب)
parent_id معرف المورد الأصل لهذا المورد. معرف المورد من النوع: expressRouteCircuits/peerings
خصائص خصائص اتصال دائرة المسار السريع. ExpressRouteCircuitConnectionPropertiesFormat
نوع نوع المورد "Microsoft.Network/expressRouteCircuits/peerings/connections@2020-06-01"

ExpressRouteCircuitConnectionPropertiesFormat

اسم وصف قيمة
العنوان بادئة /29 مساحة عنوان IP لحفر عناوين العملاء للأنفاق. خيط
مفتاح التخويل مفتاح التخويل. خيط
expressRouteCircuitPeering مرجع إلى مورد التناظر الخاص لدائرة التوجيه السريع لاتصال بدء الدائرة. الموارد الفرعية
IPv6CircuitConnectionConfig بادئة عنوان IPv6الخصائص لاتصال دائرة المسار السريع. Ipv6CircuitConnectionConfig
peerExpressRouteCircuitPeering مرجع إلى Express Route Circuit Private Peering Resource للدائرة النظيرة. الموارد الفرعية

Ipv6CircuitConnectionConfig

اسم وصف قيمة
العنوان بادئة /125 مساحة عنوان IP لنحت عناوين العملاء للوصول العالمي. خيط

مصدر فرعي

اسم وصف قيمة
معرف معرف المورد. خيط