From 121180b5b0e945f74e3430274242f48063f42366 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 3 Mar 2021 02:34:47 +0000 Subject: [PATCH] CodeGen from PR 12855 in Azure/azure-rest-api-specs Peering new api version 2021-01-01 (#12855) * Peering new api version 2021-01-01 * Adding previous api version for diff * Updating swagger and examples for new api * Adding new parameters to the end of the resource model * Ensure parameter ordering for PeeringServiceProperties Co-authored-by: Renuka Raju --- .../2019-08-01-preview/Microsoft.Peering.json | 2 +- .../2019-09-01-preview/Microsoft.Peering.json | 2 +- .../2020-01-01-preview/Microsoft.Peering.json | 2 +- schemas/2020-04-01/Microsoft.Peering.json | 2 +- schemas/2020-10-01/Microsoft.Peering.json | 2 +- schemas/2021-01-01/Microsoft.Peering.json | 959 ++++++++++++++++++ 6 files changed, 964 insertions(+), 5 deletions(-) create mode 100644 schemas/2021-01-01/Microsoft.Peering.json diff --git a/schemas/2019-08-01-preview/Microsoft.Peering.json b/schemas/2019-08-01-preview/Microsoft.Peering.json index 719dc8026f..863920613f 100644 --- a/schemas/2019-08-01-preview/Microsoft.Peering.json +++ b/schemas/2019-08-01-preview/Microsoft.Peering.json @@ -787,4 +787,4 @@ "description": "The sub resource." } } -} \ No newline at end of file +} diff --git a/schemas/2019-09-01-preview/Microsoft.Peering.json b/schemas/2019-09-01-preview/Microsoft.Peering.json index 11afbb894e..fcb2aa06d1 100644 --- a/schemas/2019-09-01-preview/Microsoft.Peering.json +++ b/schemas/2019-09-01-preview/Microsoft.Peering.json @@ -730,4 +730,4 @@ "description": "The sub resource." } } -} \ No newline at end of file +} diff --git a/schemas/2020-01-01-preview/Microsoft.Peering.json b/schemas/2020-01-01-preview/Microsoft.Peering.json index 5332f1a086..a93742ef46 100644 --- a/schemas/2020-01-01-preview/Microsoft.Peering.json +++ b/schemas/2020-01-01-preview/Microsoft.Peering.json @@ -947,4 +947,4 @@ "description": "The sub resource." } } -} \ No newline at end of file +} diff --git a/schemas/2020-04-01/Microsoft.Peering.json b/schemas/2020-04-01/Microsoft.Peering.json index f8e67f1b9e..29797d800d 100644 --- a/schemas/2020-04-01/Microsoft.Peering.json +++ b/schemas/2020-04-01/Microsoft.Peering.json @@ -948,4 +948,4 @@ "description": "The sub resource." } } -} \ No newline at end of file +} diff --git a/schemas/2020-10-01/Microsoft.Peering.json b/schemas/2020-10-01/Microsoft.Peering.json index 11c80f37b3..d27f0002f6 100644 --- a/schemas/2020-10-01/Microsoft.Peering.json +++ b/schemas/2020-10-01/Microsoft.Peering.json @@ -948,4 +948,4 @@ "description": "The sub resource." } } -} \ No newline at end of file +} diff --git a/schemas/2021-01-01/Microsoft.Peering.json b/schemas/2021-01-01/Microsoft.Peering.json new file mode 100644 index 0000000000..1a824f1c29 --- /dev/null +++ b/schemas/2021-01-01/Microsoft.Peering.json @@ -0,0 +1,959 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-01-01/Microsoft.Peering.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Peering", + "description": "Microsoft Peering Resource Types", + "resourceDefinitions": { + "peerings": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "kind": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Direct", + "Exchange" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The kind of the peering." + }, + "location": { + "type": "string", + "description": "The location of the resource." + }, + "name": { + "type": "string", + "description": "The name of the peering." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define connectivity to the Microsoft Cloud Edge." + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/peerings_registeredAsns_childResource" + }, + { + "$ref": "#/definitions/peerings_registeredPrefixes_childResource" + } + ] + } + }, + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringSku" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The SKU that defines the tier and kind of the peering." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Peering/peerings" + ] + } + }, + "required": [ + "apiVersion", + "kind", + "location", + "name", + "properties", + "sku", + "type" + ], + "description": "Microsoft.Peering/peerings" + }, + "peeringServices": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "location": { + "type": "string", + "description": "The location of the resource." + }, + "name": { + "type": "string", + "description": "The name of the peering service." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringServiceProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define connectivity to the Peering Service." + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/peeringServices_prefixes_childResource" + } + ] + } + }, + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringServiceSku" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The SKU that defines the type of the peering service." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Peering/peeringServices" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peeringServices" + }, + "peeringServices_prefixes": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the prefix." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringServicePrefixProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The peering service prefix properties class." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Peering/peeringServices/prefixes" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peeringServices/prefixes" + }, + "peerings_registeredAsns": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the ASN." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringRegisteredAsnProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a registered ASN." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Peering/peerings/registeredAsns" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peerings/registeredAsns" + }, + "peerings_registeredPrefixes": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the registered prefix." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringRegisteredPrefixProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a registered prefix." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Peering/peerings/registeredPrefixes" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peerings/registeredPrefixes" + } + }, + "subscription_resourceDefinitions": { + "peerAsns": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "name": { + "type": "string", + "description": "The peer ASN name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeerAsnProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a peer's ASN." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Peering/peerAsns" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peerAsns" + } + }, + "definitions": { + "BgpSession": { + "type": "object", + "properties": { + "maxPrefixesAdvertisedV4": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The maximum number of prefixes advertised over the IPv4 session." + }, + "maxPrefixesAdvertisedV6": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The maximum number of prefixes advertised over the IPv6 session." + }, + "md5AuthenticationKey": { + "type": "string", + "description": "The MD5 authentication key of the session." + }, + "microsoftSessionIPv4Address": { + "type": "string", + "description": "The IPv4 session address on Microsoft's end." + }, + "microsoftSessionIPv6Address": { + "type": "string", + "description": "The IPv6 session address on Microsoft's end." + }, + "peerSessionIPv4Address": { + "type": "string", + "description": "The IPv4 session address on peer's end." + }, + "peerSessionIPv6Address": { + "type": "string", + "description": "The IPv6 session address on peer's end." + }, + "sessionPrefixV4": { + "type": "string", + "description": "The IPv4 prefix that contains both ends' IPv4 addresses." + }, + "sessionPrefixV6": { + "type": "string", + "description": "The IPv4 prefix that contains both ends' IPv4 addresses." + } + }, + "description": "The properties that define a BGP session." + }, + "ContactDetail": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The e-mail address of the contact." + }, + "phone": { + "type": "string", + "description": "The phone number of the contact." + }, + "role": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Noc", + "Policy", + "Technical", + "Service", + "Escalation", + "Other" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The role of the contact." + } + }, + "description": "The contact detail class." + }, + "DirectConnection": { + "type": "object", + "properties": { + "bandwidthInMbps": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The bandwidth of the connection." + }, + "bgpSession": { + "oneOf": [ + { + "$ref": "#/definitions/BgpSession" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a BGP session." + }, + "connectionIdentifier": { + "type": "string", + "description": "The unique identifier (GUID) for the connection." + }, + "peeringDBFacilityId": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The PeeringDB.com ID of the facility at which the connection has to be set up." + }, + "sessionAddressProvider": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Microsoft", + "Peer" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The field indicating if Microsoft provides session ip addresses." + }, + "useForPeeringService": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The flag that indicates whether or not the connection is used for peering service." + } + }, + "description": "The properties that define a direct connection." + }, + "ExchangeConnection": { + "type": "object", + "properties": { + "bgpSession": { + "oneOf": [ + { + "$ref": "#/definitions/BgpSession" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a BGP session." + }, + "connectionIdentifier": { + "type": "string", + "description": "The unique identifier (GUID) for the connection." + }, + "peeringDBFacilityId": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The PeeringDB.com ID of the facility at which the connection has to be set up." + } + }, + "description": "The properties that define an exchange connection." + }, + "PeerAsnProperties": { + "type": "object", + "properties": { + "peerAsn": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The Autonomous System Number (ASN) of the peer." + }, + "peerContactDetail": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ContactDetail" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The contact details of the peer." + }, + "peerName": { + "type": "string", + "description": "The name of the peer." + }, + "validationState": { + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "Pending", + "Approved", + "Failed" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The validation state of the ASN associated with the peer." + } + }, + "description": "The properties that define a peer's ASN." + }, + "PeeringProperties": { + "type": "object", + "properties": { + "direct": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringPropertiesDirect" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a direct peering." + }, + "exchange": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringPropertiesExchange" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define an exchange peering." + }, + "peeringLocation": { + "type": "string", + "description": "The location of the peering." + } + }, + "description": "The properties that define connectivity to the Microsoft Cloud Edge." + }, + "PeeringPropertiesDirect": { + "type": "object", + "properties": { + "connections": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/DirectConnection" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The set of connections that constitute a direct peering." + }, + "directPeeringType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Edge", + "Transit", + "Cdn", + "Internal", + "Ix", + "IxRs" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of direct peering." + }, + "peerAsn": { + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The sub resource." + } + }, + "description": "The properties that define a direct peering." + }, + "PeeringPropertiesExchange": { + "type": "object", + "properties": { + "connections": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ExchangeConnection" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The set of connections that constitute an exchange peering." + }, + "peerAsn": { + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The sub resource." + } + }, + "description": "The properties that define an exchange peering." + }, + "PeeringRegisteredAsnProperties": { + "type": "object", + "properties": { + "asn": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The customer's ASN from which traffic originates." + } + }, + "description": "The properties that define a registered ASN." + }, + "PeeringRegisteredPrefixProperties": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "The customer's prefix from which traffic originates." + } + }, + "description": "The properties that define a registered prefix." + }, + "PeeringServicePrefixProperties": { + "type": "object", + "properties": { + "peeringServicePrefixKey": { + "type": "string", + "description": "The peering service prefix key" + }, + "prefix": { + "type": "string", + "description": "The prefix from which your traffic originates." + } + }, + "description": "The peering service prefix properties class." + }, + "PeeringServiceProperties": { + "type": "object", + "properties": { + "peeringServiceLocation": { + "type": "string", + "description": "The location (state/province) of the customer." + }, + "peeringServiceProvider": { + "type": "string", + "description": "The name of the service provider." + }, + "providerBackupPeeringLocation": { + "type": "string", + "description": "The backup peering (Microsoft/service provider) location to be used for customer traffic." + }, + "providerPrimaryPeeringLocation": { + "type": "string", + "description": "The primary peering (Microsoft/service provider) location to be used for customer traffic." + } + }, + "description": "The properties that define connectivity to the Peering Service." + }, + "PeeringServiceSku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the peering service SKU." + } + }, + "description": "The SKU that defines the type of the peering service." + }, + "peeringServices_prefixes_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the prefix." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringServicePrefixProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The peering service prefix properties class." + }, + "type": { + "type": "string", + "enum": [ + "prefixes" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peeringServices/prefixes" + }, + "PeeringSku": { + "type": "object", + "properties": { + "family": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Direct", + "Exchange" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The family of the peering SKU." + }, + "name": { + "type": "string", + "description": "The name of the peering SKU." + }, + "size": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Free", + "Metered", + "Unlimited" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The size of the peering SKU." + }, + "tier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Basic", + "Premium" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The tier of the peering SKU." + } + }, + "description": "The SKU that defines the tier and kind of the peering." + }, + "peerings_registeredAsns_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the ASN." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringRegisteredAsnProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a registered ASN." + }, + "type": { + "type": "string", + "enum": [ + "registeredAsns" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peerings/registeredAsns" + }, + "peerings_registeredPrefixes_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-01-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the registered prefix." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PeeringRegisteredPrefixProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that define a registered prefix." + }, + "type": { + "type": "string", + "enum": [ + "registeredPrefixes" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Peering/peerings/registeredPrefixes" + }, + "SubResource": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier of the referenced resource." + } + }, + "description": "The sub resource." + } + } +}