From 30ed59ce9de13cb7902fca6d2f011b4a923a69a9 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Wed, 11 May 2016 15:18:42 -0700 Subject: [PATCH] Added expression support --- .../Expected/Batch/Microsoft.Batch.json | 33 +- .../Expected/CDN/Microsoft.Cdn.json | 248 +- .../Expected/Compute/Microsoft.Compute.json | 1245 +++++-- .../Expected/Network/Microsoft.Network.json | 2862 +++++++++++++---- .../Expected/Storage/Microsoft.Storage.json | 151 +- .../Microsoft.CertificateRegistration.json | 251 +- .../Web/Microsoft.DomainRegistration.json | 286 +- .../Expected/Web/Microsoft.Web.json | 1705 ++++++++-- .../ResourceSchemaWriterTests.cs | 12 +- .../ResourceSchemaWriter.cs | 46 +- 10 files changed, 5491 insertions(+), 1348 deletions(-) diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json index 1ada2e165d..e35a69c99b 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json @@ -24,14 +24,28 @@ "description": "The region in which the account is created." }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The user specified tags associated with the account." }, "properties": { - "$ref": "#/definitions/AccountBaseProperties", + "oneOf": [ + { + "$ref": "#/definitions/AccountBaseProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The properties of the account." } }, @@ -48,7 +62,14 @@ "type": "object", "properties": { "autoStorage": { - "$ref": "#/definitions/AutoStorageBaseProperties", + "oneOf": [ + { + "$ref": "#/definitions/AutoStorageBaseProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The properties related to auto storage account." } }, diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json index aea39fe2be..bf7c8c6821 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json @@ -24,14 +24,28 @@ "description": "Profile location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Profile tags" }, "sku": { - "$ref": "#/definitions/Sku", + "oneOf": [ + { + "$ref": "#/definitions/Sku" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The SKU (pricing tier) of the CDN profile." } }, @@ -73,14 +87,28 @@ "description": "Endpoint location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Endpoint tags" }, "properties": { - "$ref": "#/definitions/EndpointPropertiesCreateParameters" + "oneOf": [ + { + "$ref": "#/definitions/EndpointPropertiesCreateParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -120,7 +148,14 @@ ] }, "properties": { - "$ref": "#/definitions/CustomDomainPropertiesParameters" + "oneOf": [ + { + "$ref": "#/definitions/CustomDomainPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -146,7 +181,14 @@ ] }, "properties": { - "$ref": "#/definitions/OriginPropertiesParameters" + "oneOf": [ + { + "$ref": "#/definitions/OriginPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -178,7 +220,14 @@ "description": "Origin name" }, "properties": { - "$ref": "#/definitions/DeepCreatedOriginProperties" + "oneOf": [ + { + "$ref": "#/definitions/DeepCreatedOriginProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -194,11 +243,25 @@ "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported." }, "httpPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The value of the HTTP port. Must be between 1 and 65535" }, "httpsPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The value of the HTTPS port. Must be between 1 and 65535" } }, @@ -219,39 +282,81 @@ "description": "The path used for origin requests." }, "contentTypesToCompress": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "List of content types on which compression will be applied. The value for the elements should be a valid MIME type." }, "isCompressionEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Indicates whether content compression is enabled. Default value is false. If compression is enabled, the content transferred from the CDN endpoint to the end user will be compressed. The requested content must be larger than 1 byte and smaller than 1 MB." }, "isHttpAllowed": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed." }, "isHttpsAllowed": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Indicates whether https traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed." }, "queryStringCachingBehavior": { - "type": "string", - "enum": [ - "IgnoreQueryString", - "BypassCaching", - "UseQueryString", - "NotSet" + "oneOf": [ + { + "type": "string", + "enum": [ + "IgnoreQueryString", + "BypassCaching", + "UseQueryString", + "NotSet" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Defines the query string caching behavior. Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet'" }, "origins": { - "type": "array", - "items": { - "$ref": "#/definitions/DeepCreatedOrigin" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/DeepCreatedOrigin" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The set of origins for the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options." } }, @@ -279,14 +384,28 @@ "description": "Endpoint location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Endpoint tags" }, "properties": { - "$ref": "#/definitions/EndpointPropertiesCreateParameters" + "oneOf": [ + { + "$ref": "#/definitions/EndpointPropertiesCreateParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -326,7 +445,14 @@ ] }, "properties": { - "$ref": "#/definitions/CustomDomainPropertiesParameters" + "oneOf": [ + { + "$ref": "#/definitions/CustomDomainPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -352,7 +478,14 @@ ] }, "properties": { - "$ref": "#/definitions/OriginPropertiesParameters" + "oneOf": [ + { + "$ref": "#/definitions/OriginPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -370,11 +503,25 @@ "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported." }, "httpPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The value of the HTTP port. Must be between 1 and 65535." }, "httpsPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The value of the HTTPS port. Must be between 1 and 65535." } }, @@ -386,12 +533,19 @@ "type": "object", "properties": { "name": { - "type": "string", - "enum": [ - "Standard_Verizon", - "Premium_Verizon", - "Custom_Verizon", - "Standard_Akamai" + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard_Verizon", + "Premium_Verizon", + "Custom_Verizon", + "Standard_Akamai" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', 'Standard_Akamai'" } diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json index bd56d31a80..d6cf3e6455 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json @@ -20,7 +20,14 @@ ] }, "properties": { - "$ref": "#/definitions/AvailabilitySetProperties" + "oneOf": [ + { + "$ref": "#/definitions/AvailabilitySetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -46,11 +53,25 @@ ] }, "plan": { - "$ref": "#/definitions/Plan", + "oneOf": [ + { + "$ref": "#/definitions/Plan" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the purchase plan when deploying virtual machine from VM Marketplace images." }, "properties": { - "$ref": "#/definitions/VirtualMachineProperties" + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -86,7 +107,14 @@ ] }, "properties": { - "$ref": "#/definitions/VirtualMachineExtensionProperties" + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineExtensionProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -112,11 +140,25 @@ ] }, "sku": { - "$ref": "#/definitions/Sku", + "oneOf": [ + { + "$ref": "#/definitions/Sku" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the virtual machine scale set sku." }, "properties": { - "$ref": "#/definitions/VirtualMachineScaleSetProperties" + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -132,24 +174,45 @@ "type": "object", "properties": { "passName": { - "type": "string", - "enum": [ - "oobeSystem" + "oneOf": [ + { + "type": "string", + "enum": [ + "oobeSystem" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the pass name. Currently, the only allowable value is oobeSystem. Possible values include: 'oobeSystem'" }, "componentName": { - "type": "string", - "enum": [ - "Microsoft-Windows-Shell-Setup" + "oneOf": [ + { + "type": "string", + "enum": [ + "Microsoft-Windows-Shell-Setup" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'Microsoft-Windows-Shell-Setup'" }, "settingName": { - "type": "string", - "enum": [ - "AutoLogon", - "FirstLogonCommands" + "oneOf": [ + { + "type": "string", + "enum": [ + "AutoLogon", + "FirstLogonCommands" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets setting name (e.g. FirstLogonCommands, AutoLogon ). Possible values include: 'AutoLogon', 'FirstLogonCommands'" }, @@ -174,25 +237,53 @@ "type": "object", "properties": { "platformUpdateDomainCount": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Update Domain count." }, "platformFaultDomainCount": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Fault Domain count." }, "virtualMachines": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a list containing reference to all Virtual Machines created under this Availability Set." }, "statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceViewStatus" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceViewStatus" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the resource status information." } }, @@ -202,7 +293,14 @@ "type": "object", "properties": { "enabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether boot diagnostics should be enabled on the Virtual Machine." }, "storageUri": { @@ -216,7 +314,14 @@ "type": "object", "properties": { "lun": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the logical unit number." }, "name": { @@ -224,33 +329,68 @@ "description": "Gets or sets the disk name." }, "vhd": { - "$ref": "#/definitions/VirtualHardDisk", + "oneOf": [ + { + "$ref": "#/definitions/VirtualHardDisk" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Virtual Hard Disk." }, "image": { - "$ref": "#/definitions/VirtualHardDisk", + "oneOf": [ + { + "$ref": "#/definitions/VirtualHardDisk" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine.If SourceImage is provided, the destination VirtualHardDisk should not exist." }, "caching": { - "type": "string", - "enum": [ - "None", - "ReadOnly", - "ReadWrite" + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "ReadOnly", + "ReadWrite" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'" }, "createOption": { - "type": "string", - "enum": [ - "fromImage", - "empty", - "attach" + "oneOf": [ + { + "type": "string", + "enum": [ + "fromImage", + "empty", + "attach" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'" }, "diskSizeGB": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks." } }, @@ -266,7 +406,14 @@ "type": "object", "properties": { "bootDiagnostics": { - "$ref": "#/definitions/BootDiagnostics", + "oneOf": [ + { + "$ref": "#/definitions/BootDiagnostics" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the boot diagnostics." } }, @@ -276,15 +423,36 @@ "type": "object", "properties": { "diskEncryptionKey": { - "$ref": "#/definitions/KeyVaultSecretReference", + "oneOf": [ + { + "$ref": "#/definitions/KeyVaultSecretReference" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the disk encryption key which is a KeyVault Secret." }, "keyEncryptionKey": { - "$ref": "#/definitions/KeyVaultKeyReference", + "oneOf": [ + { + "$ref": "#/definitions/KeyVaultKeyReference" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the key encryption key which is KeyVault Key." }, "enabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether disk encryption should be enabled on the Virtual Machine." } }, @@ -294,71 +462,78 @@ "type": "object", "properties": { "vmSize": { - "type": "string", - "enum": [ - "Basic_A0", - "Basic_A1", - "Basic_A2", - "Basic_A3", - "Basic_A4", - "Standard_A0", - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_A8", - "Standard_A9", - "Standard_A10", - "Standard_A11", - "Standard_D1", - "Standard_D2", - "Standard_D3", - "Standard_D4", - "Standard_D11", - "Standard_D12", - "Standard_D13", - "Standard_D14", - "Standard_D1_v2", - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_D5_v2", - "Standard_D11_v2", - "Standard_D12_v2", - "Standard_D13_v2", - "Standard_D14_v2", - "Standard_D15_v2", - "Standard_DS1", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS11", - "Standard_DS12", - "Standard_DS13", - "Standard_DS14", - "Standard_DS1_v2", - "Standard_DS2_v2", - "Standard_DS3_v2", - "Standard_DS4_v2", - "Standard_DS5_v2", - "Standard_DS11_v2", - "Standard_DS12_v2", - "Standard_DS13_v2", - "Standard_DS14_v2", - "Standard_DS15_v2", - "Standard_G1", - "Standard_G2", - "Standard_G3", - "Standard_G4", - "Standard_G5", - "Standard_GS1", - "Standard_GS2", - "Standard_GS3", - "Standard_GS4", - "Standard_GS5" + "oneOf": [ + { + "type": "string", + "enum": [ + "Basic_A0", + "Basic_A1", + "Basic_A2", + "Basic_A3", + "Basic_A4", + "Standard_A0", + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_G1", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_GS1", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "The virtual machine size name. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'" } @@ -395,11 +570,18 @@ "description": "Gets the status Code." }, "level": { - "type": "string", - "enum": [ - "Info", - "Warning", - "Error" + "oneOf": [ + { + "type": "string", + "enum": [ + "Info", + "Warning", + "Error" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the level Code. Possible values include: 'Info', 'Warning', 'Error'" }, @@ -426,7 +608,14 @@ "description": "Gets or sets the URL referencing a key in a Key Vault." }, "sourceVault": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Relative URL of the Key Vault containing the key" } }, @@ -444,7 +633,14 @@ "description": "Gets or sets the URL referencing a secret in a Key Vault." }, "sourceVault": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Relative URL of the Key Vault containing the secret." } }, @@ -458,11 +654,25 @@ "type": "object", "properties": { "disablePasswordAuthentication": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether Authentication using user name and password is allowed or not" }, "ssh": { - "$ref": "#/definitions/SshConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/SshConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the SSH configuration for linux VMs" } }, @@ -484,7 +694,14 @@ ] }, "properties": { - "$ref": "#/definitions/VirtualMachineExtensionProperties" + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineExtensionProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -502,7 +719,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/NetworkInterfaceReferenceProperties" + "oneOf": [ + { + "$ref": "#/definitions/NetworkInterfaceReferenceProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "description": "Describes a network interface reference." @@ -511,7 +735,14 @@ "type": "object", "properties": { "primary": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether this is a primary NIC on a virtual machine" } }, @@ -521,10 +752,17 @@ "type": "object", "properties": { "networkInterfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInterfaceReference" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInterfaceReference" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the network interfaces." } }, @@ -534,15 +772,29 @@ "type": "object", "properties": { "osType": { - "type": "string", - "enum": [ - "Windows", - "Linux" + "oneOf": [ + { + "type": "string", + "enum": [ + "Windows", + "Linux" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the Operating System type. Possible values include: 'Windows', 'Linux'" }, "encryptionSettings": { - "$ref": "#/definitions/DiskEncryptionSettings", + "oneOf": [ + { + "$ref": "#/definitions/DiskEncryptionSettings" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the disk encryption settings." }, "name": { @@ -550,33 +802,68 @@ "description": "Gets or sets the disk name." }, "vhd": { - "$ref": "#/definitions/VirtualHardDisk", + "oneOf": [ + { + "$ref": "#/definitions/VirtualHardDisk" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Virtual Hard Disk." }, "image": { - "$ref": "#/definitions/VirtualHardDisk", + "oneOf": [ + { + "$ref": "#/definitions/VirtualHardDisk" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine.If SourceImage is provided, the destination VirtualHardDisk should not exist." }, "caching": { - "type": "string", - "enum": [ - "None", - "ReadOnly", - "ReadWrite" + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "ReadOnly", + "ReadWrite" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'" }, "createOption": { - "type": "string", - "enum": [ - "fromImage", - "empty", - "attach" + "oneOf": [ + { + "type": "string", + "enum": [ + "fromImage", + "empty", + "attach" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'" }, "diskSizeGB": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks." } }, @@ -607,18 +894,39 @@ "description": "Gets or sets a base-64 encoded string of custom data." }, "windowsConfiguration": { - "$ref": "#/definitions/WindowsConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/WindowsConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Windows Configuration of the OS profile." }, "linuxConfiguration": { - "$ref": "#/definitions/LinuxConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/LinuxConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Linux Configuration of the OS profile." }, "secrets": { - "type": "array", - "items": { - "$ref": "#/definitions/VaultSecretGroup" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VaultSecretGroup" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the List of certificates for addition to the VM." } }, @@ -658,7 +966,14 @@ "description": "Gets or sets the sku tier." }, "capacity": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the sku capacity." } }, @@ -668,10 +983,17 @@ "type": "object", "properties": { "publicKeys": { - "type": "array", - "items": { - "$ref": "#/definitions/SshPublicKey" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SshPublicKey" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the list of SSH public keys used to authenticate with linux based VMs" } }, @@ -695,18 +1017,39 @@ "type": "object", "properties": { "imageReference": { - "$ref": "#/definitions/ImageReference", + "oneOf": [ + { + "$ref": "#/definitions/ImageReference" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the image reference." }, "osDisk": { - "$ref": "#/definitions/OSDisk", + "oneOf": [ + { + "$ref": "#/definitions/OSDisk" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the OS disk." }, "dataDisks": { - "type": "array", - "items": { - "$ref": "#/definitions/DataDisk" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/DataDisk" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the data disks." } }, @@ -725,10 +1068,17 @@ "type": "object", "properties": { "mode": { - "type": "string", - "enum": [ - "Automatic", - "Manual" + "oneOf": [ + { + "type": "string", + "enum": [ + "Automatic", + "Manual" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the upgrade mode. Possible values include: 'Automatic', 'Manual'" } @@ -753,14 +1103,28 @@ "type": "object", "properties": { "sourceVault": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Relative URL of the Key Vault containing all of the certificates in VaultCertificates." }, "vaultCertificates": { - "type": "array", - "items": { - "$ref": "#/definitions/VaultCertificate" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VaultCertificate" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the list of key vault references in SourceVault which contain certificates" } }, @@ -792,17 +1156,31 @@ "description": "Gets or sets the type version of the extension handler." }, "substatuses": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceViewStatus" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceViewStatus" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the resource status information." }, "statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceViewStatus" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceViewStatus" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the resource status information." } }, @@ -828,15 +1206,36 @@ "description": "Gets or sets the type version of the extension handler." }, "autoUpgradeMinorVersion": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether the extension handler should be automatically upgraded across minor versions." }, "settings": { - "type": "object", + "oneOf": [ + { + "type": "object" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Json formatted public settings for the extension." }, "protectedSettings": { - "type": "object", + "oneOf": [ + { + "type": "object" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Json formatted protected settings for the extension." }, "provisioningState": { @@ -844,7 +1243,14 @@ "description": "Gets or sets the provisioning state, which only appears in the response." }, "instanceView": { - "$ref": "#/definitions/VirtualMachineExtensionInstanceView", + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineExtensionInstanceView" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the virtual machine extension instance view." } }, @@ -854,27 +1260,69 @@ "type": "object", "properties": { "hardwareProfile": { - "$ref": "#/definitions/HardwareProfile", + "oneOf": [ + { + "$ref": "#/definitions/HardwareProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the hardware profile." }, "storageProfile": { - "$ref": "#/definitions/StorageProfile", + "oneOf": [ + { + "$ref": "#/definitions/StorageProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the storage profile." }, "osProfile": { - "$ref": "#/definitions/OSProfile", + "oneOf": [ + { + "$ref": "#/definitions/OSProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the OS profile." }, "networkProfile": { - "$ref": "#/definitions/NetworkProfile", + "oneOf": [ + { + "$ref": "#/definitions/NetworkProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the network profile." }, "diagnosticsProfile": { - "$ref": "#/definitions/DiagnosticsProfile", + "oneOf": [ + { + "$ref": "#/definitions/DiagnosticsProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the diagnostics profile." }, "availabilitySet": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference Id of the availability set to which this virtual machine belongs." }, "provisioningState": { @@ -904,7 +1352,14 @@ "description": "Gets or sets the name of the extension." }, "properties": { - "$ref": "#/definitions/VirtualMachineScaleSetExtensionProperties" + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetExtensionProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "description": "Describes a Virtual Machine Scale Set Extension." @@ -913,10 +1368,17 @@ "type": "object", "properties": { "extensions": { - "type": "array", - "items": { - "$ref": "#/definitions/VirtualMachineScaleSetExtension" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineScaleSetExtension" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets the virtual machine scale set child extension resources." } }, @@ -938,15 +1400,36 @@ "description": "Gets or sets the type version of the extension handler." }, "autoUpgradeMinorVersion": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether the extension handler should be automatically upgraded across minor versions." }, "settings": { - "type": "object", + "oneOf": [ + { + "type": "object" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Json formatted public settings for the extension." }, "protectedSettings": { - "type": "object", + "oneOf": [ + { + "type": "object" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Json formatted protected settings for the extension." } }, @@ -964,7 +1447,14 @@ "description": "Gets or sets the IP configuration name." }, "properties": { - "$ref": "#/definitions/VirtualMachineScaleSetIPConfigurationProperties" + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetIPConfigurationProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -976,28 +1466,56 @@ "type": "object", "properties": { "subnet": { - "$ref": "#/definitions/ApiEntityReference", + "oneOf": [ + { + "$ref": "#/definitions/ApiEntityReference" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the subnet." }, "applicationGatewayBackendAddressPools": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the application gateway backend address pools." }, "loadBalancerBackendAddressPools": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the load balancer backend address pools." }, "loadBalancerInboundNatPools": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the load balancer inbound nat pools." } }, @@ -1018,7 +1536,14 @@ "description": "Gets or sets the network configuration name." }, "properties": { - "$ref": "#/definitions/VirtualMachineScaleSetNetworkConfigurationProperties" + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetNetworkConfigurationProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1030,14 +1555,28 @@ "type": "object", "properties": { "primary": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether this is a primary NIC on a virtual machine." }, "ipConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/VirtualMachineScaleSetIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineScaleSetIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the virtual machine scale set IP Configuration." } }, @@ -1050,10 +1589,17 @@ "type": "object", "properties": { "networkInterfaceConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/VirtualMachineScaleSetNetworkConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineScaleSetNetworkConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the list of network configurations." } }, @@ -1067,40 +1613,75 @@ "description": "Gets or sets the disk name." }, "caching": { - "type": "string", - "enum": [ - "None", - "ReadOnly", - "ReadWrite" + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "ReadOnly", + "ReadWrite" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'" }, "createOption": { - "type": "string", - "enum": [ - "fromImage", - "empty", - "attach" + "oneOf": [ + { + "type": "string", + "enum": [ + "fromImage", + "empty", + "attach" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'" }, "osType": { - "type": "string", - "enum": [ - "Windows", - "Linux" + "oneOf": [ + { + "type": "string", + "enum": [ + "Windows", + "Linux" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the Operating System type. Possible values include: 'Windows', 'Linux'" }, "image": { - "$ref": "#/definitions/VirtualHardDisk", + "oneOf": [ + { + "$ref": "#/definitions/VirtualHardDisk" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine.If SourceImage is provided, the destination VirtualHardDisk should not exist." }, "vhdContainers": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the list of virtual hard disk container uris." } }, @@ -1130,18 +1711,39 @@ "description": "Gets or sets a base-64 encoded string of custom data." }, "windowsConfiguration": { - "$ref": "#/definitions/WindowsConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/WindowsConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Windows Configuration of the OS profile." }, "linuxConfiguration": { - "$ref": "#/definitions/LinuxConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/LinuxConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Linux Configuration of the OS profile." }, "secrets": { - "type": "array", - "items": { - "$ref": "#/definitions/VaultSecretGroup" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VaultSecretGroup" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the List of certificates for addition to the VM." } }, @@ -1151,11 +1753,25 @@ "type": "object", "properties": { "upgradePolicy": { - "$ref": "#/definitions/UpgradePolicy", + "oneOf": [ + { + "$ref": "#/definitions/UpgradePolicy" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the upgrade policy." }, "virtualMachineProfile": { - "$ref": "#/definitions/VirtualMachineScaleSetVMProfile", + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetVMProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the virtual machine profile." }, "provisioningState": { @@ -1163,7 +1779,14 @@ "description": "Gets or sets the provisioning state, which only appears in the response." }, "overProvision": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Specifies whether the Virtual Machine Scale Set should be overprovisioned." } }, @@ -1173,11 +1796,25 @@ "type": "object", "properties": { "imageReference": { - "$ref": "#/definitions/ImageReference", + "oneOf": [ + { + "$ref": "#/definitions/ImageReference" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the image reference." }, "osDisk": { - "$ref": "#/definitions/VirtualMachineScaleSetOSDisk", + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetOSDisk" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the OS disk." } }, @@ -1187,19 +1824,47 @@ "type": "object", "properties": { "osProfile": { - "$ref": "#/definitions/VirtualMachineScaleSetOSProfile", + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetOSProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the virtual machine scale set OS profile." }, "storageProfile": { - "$ref": "#/definitions/VirtualMachineScaleSetStorageProfile", + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetStorageProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the virtual machine scale set storage profile." }, "networkProfile": { - "$ref": "#/definitions/VirtualMachineScaleSetNetworkProfile", + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetNetworkProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the virtual machine scale set network profile." }, "extensionProfile": { - "$ref": "#/definitions/VirtualMachineScaleSetExtensionProfile", + "oneOf": [ + { + "$ref": "#/definitions/VirtualMachineScaleSetExtensionProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets the virtual machine scale set extension profile." } }, @@ -1209,11 +1874,25 @@ "type": "object", "properties": { "provisionVMAgent": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether VM Agent should be provisioned on the Virtual Machine." }, "enableAutomaticUpdates": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether Windows updates are automatically installed on the VM" }, "timeZone": { @@ -1221,14 +1900,28 @@ "description": "Gets or sets the Time Zone of the VM" }, "additionalUnattendContent": { - "type": "array", - "items": { - "$ref": "#/definitions/AdditionalUnattendContent" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/AdditionalUnattendContent" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the additional base-64 encoded XML formatted information that can be included in the Unattend.xml file." }, "winRM": { - "$ref": "#/definitions/WinRMConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/WinRMConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Windows Remote Management configuration of the VM" } }, @@ -1238,10 +1931,17 @@ "type": "object", "properties": { "listeners": { - "type": "array", - "items": { - "$ref": "#/definitions/WinRMListener" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/WinRMListener" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the list of Windows Remote Management listeners" } }, @@ -1251,10 +1951,17 @@ "type": "object", "properties": { "protocol": { - "type": "string", - "enum": [ - "Http", - "Https" + "oneOf": [ + { + "type": "string", + "enum": [ + "Http", + "Https" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the Protocol used by WinRM listener. Currently only Http and Https are supported. Possible values include: 'Http', 'Https'" }, diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json index 30aa8da750..6c740b079a 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json @@ -20,7 +20,14 @@ ] }, "properties": { - "$ref": "#/definitions/ApplicationGatewayPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -50,7 +57,14 @@ ] }, "properties": { - "$ref": "#/definitions/VirtualNetworkGatewayConnectionPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkGatewayConnectionPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -80,11 +94,25 @@ ] }, "sku": { - "$ref": "#/definitions/ExpressRouteCircuitSku", + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitSku" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets sku" }, "properties": { - "$ref": "#/definitions/ExpressRouteCircuitPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -127,7 +155,14 @@ ] }, "properties": { - "$ref": "#/definitions/AuthorizationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/AuthorizationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -161,7 +196,14 @@ ] }, "properties": { - "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -195,7 +237,14 @@ ] }, "properties": { - "$ref": "#/definitions/LoadBalancerPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/LoadBalancerPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -225,7 +274,14 @@ ] }, "properties": { - "$ref": "#/definitions/LocalNetworkGatewayPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/LocalNetworkGatewayPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -255,7 +311,14 @@ ] }, "properties": { - "$ref": "#/definitions/NetworkInterfacePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/NetworkInterfacePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -285,7 +348,14 @@ ] }, "properties": { - "$ref": "#/definitions/NetworkSecurityGroupPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/NetworkSecurityGroupPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -325,7 +395,14 @@ ] }, "properties": { - "$ref": "#/definitions/SecurityRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/SecurityRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -359,7 +436,14 @@ ] }, "properties": { - "$ref": "#/definitions/PublicIPAddressPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/PublicIPAddressPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -389,7 +473,14 @@ ] }, "properties": { - "$ref": "#/definitions/RouteTablePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/RouteTablePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -429,7 +520,14 @@ ] }, "properties": { - "$ref": "#/definitions/RoutePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/RoutePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -463,7 +561,14 @@ ] }, "properties": { - "$ref": "#/definitions/VirtualNetworkGatewayPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkGatewayPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -493,7 +598,14 @@ ] }, "properties": { - "$ref": "#/definitions/VirtualNetworkPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -533,7 +645,14 @@ ] }, "properties": { - "$ref": "#/definitions/SubnetPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/SubnetPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -557,10 +676,17 @@ "type": "object", "properties": { "addressPrefixes": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets List of address blocks reserved for this virtual network in CIDR notation" } }, @@ -588,7 +714,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayBackendAddressPoolPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayBackendAddressPoolPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -605,17 +738,31 @@ "type": "object", "properties": { "backendIPConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInterfaceIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInterfaceIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets collection of references to IPs defined in NICs" }, "backendAddresses": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayBackendAddress" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayBackendAddress" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the backend addresses" }, "provisioningState": { @@ -633,7 +780,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayBackendHttpSettingsPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayBackendHttpSettingsPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -650,31 +804,66 @@ "type": "object", "properties": { "port": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the port" }, "protocol": { - "type": "string", - "enum": [ - "Http", - "Https" + "oneOf": [ + { + "type": "string", + "enum": [ + "Http", + "Https" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'" }, "cookieBasedAffinity": { - "type": "string", - "enum": [ - "Enabled", - "Disabled" + "oneOf": [ + { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the cookie affinity. Possible values include: 'Enabled', 'Disabled'" }, "requestTimeout": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets request timeout" }, "probe": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets probe resource of application gateway " }, "provisioningState": { @@ -692,7 +881,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayFrontendIPConfigurationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayFrontendIPConfigurationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -713,19 +909,40 @@ "description": "Gets or sets the privateIPAddress of the Network Interface IP Configuration" }, "privateIPAllocationMethod": { - "type": "string", - "enum": [ - "Static", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'" }, "subnet": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the subnet resource" }, "publicIPAddress": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the PublicIP resource" }, "provisioningState": { @@ -743,7 +960,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayFrontendPortPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayFrontendPortPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -760,7 +984,14 @@ "type": "object", "properties": { "port": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the frontend port" }, "provisioningState": { @@ -778,7 +1009,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayHttpListenerPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayHttpListenerPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -795,18 +1033,39 @@ "type": "object", "properties": { "frontendIPConfiguration": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets frontend IP configuration resource of application gateway " }, "frontendPort": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets frontend port resource of application gateway " }, "protocol": { - "type": "string", - "enum": [ - "Http", - "Https" + "oneOf": [ + { + "type": "string", + "enum": [ + "Http", + "Https" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'" }, @@ -815,11 +1074,25 @@ "description": "Gets or sets the host name of http listener " }, "sslCertificate": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets ssl certificate resource of application gateway " }, "requireServerNameIndication": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the requireServerNameIndication of http listener " }, "provisioningState": { @@ -837,7 +1110,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayIPConfigurationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayIPConfigurationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -854,7 +1134,14 @@ "type": "object", "properties": { "subnet": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the subnet resource.A subnet from where appliation gateway gets its private address " }, "provisioningState": { @@ -872,7 +1159,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayPathRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayPathRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -889,18 +1183,39 @@ "type": "object", "properties": { "paths": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the path rules of URL path map" }, "backendAddressPool": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets backend address pool resource of URL path map " }, "backendHttpSettings": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets backend http settings resource of URL path map " }, "provisioningState": { @@ -918,7 +1233,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayProbePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayProbePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -935,10 +1257,17 @@ "type": "object", "properties": { "protocol": { - "type": "string", - "enum": [ - "Http", - "Https" + "oneOf": [ + { + "type": "string", + "enum": [ + "Http", + "Https" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'" }, @@ -951,15 +1280,36 @@ "description": "Gets or sets the relative path of probe " }, "interval": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets probing interval in seconds " }, "timeout": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets probing timeout in seconds " }, "unhealthyThreshold": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets probing unhealthy threshold " }, "provisioningState": { @@ -973,77 +1323,154 @@ "type": "object", "properties": { "sku": { - "$ref": "#/definitions/ApplicationGatewaySku", + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewaySku" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets sku of application gateway resource" }, "gatewayIPConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets subnets of application gateway resource" }, "sslCertificates": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewaySslCertificate" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewaySslCertificate" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets ssl certificates of application gateway resource" }, "frontendIPConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayFrontendIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayFrontendIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets frontend IP addresses of application gateway resource" }, "frontendPorts": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayFrontendPort" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayFrontendPort" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets frontend ports of application gateway resource" }, "probes": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayProbe" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayProbe" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets probes of application gateway resource" }, "backendAddressPools": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayBackendAddressPool" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayBackendAddressPool" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets backend address pool of application gateway resource" }, "backendHttpSettingsCollection": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayBackendHttpSettings" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayBackendHttpSettings" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets backend http settings of application gateway resource" }, "httpListeners": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayHttpListener" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayHttpListener" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets HTTP listeners of application gateway resource" }, "urlPathMaps": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayUrlPathMap" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayUrlPathMap" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets URL path map of application gateway resource" }, "requestRoutingRules": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayRequestRoutingRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayRequestRoutingRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets request routing rules of application gateway resource" }, "resourceGuid": { @@ -1065,7 +1492,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayRequestRoutingRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayRequestRoutingRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1082,27 +1516,62 @@ "type": "object", "properties": { "ruleType": { - "type": "string", - "enum": [ - "Basic", - "PathBasedRouting" + "oneOf": [ + { + "type": "string", + "enum": [ + "Basic", + "PathBasedRouting" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the rule type. Possible values include: 'Basic', 'PathBasedRouting'" }, "backendAddressPool": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets backend address pool resource of application gateway " }, "backendHttpSettings": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets frontend port resource of application gateway " }, "httpListener": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets http listener resource of application gateway " }, "urlPathMap": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets url path map resource of application gateway " }, "provisioningState": { @@ -1116,23 +1585,44 @@ "type": "object", "properties": { "name": { - "type": "string", - "enum": [ - "Standard_Small", - "Standard_Medium", - "Standard_Large" + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard_Small", + "Standard_Medium", + "Standard_Large" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets name of application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large'" }, "tier": { - "type": "string", - "enum": [ - "Standard" + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets tier of application gateway. Possible values include: 'Standard'" }, "capacity": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets capacity (instance count) of application gateway" } }, @@ -1146,7 +1636,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewaySslCertificatePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewaySslCertificatePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1189,7 +1686,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ApplicationGatewayUrlPathMapPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ApplicationGatewayUrlPathMapPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1206,18 +1710,39 @@ "type": "object", "properties": { "defaultBackendAddressPool": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets default backend address pool resource of URL path map " }, "defaultBackendHttpSettings": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets default backend http settings resource of URL path map " }, "pathRules": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayPathRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayPathRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets path rule of URL path map resource" }, "provisioningState": { @@ -1235,10 +1760,17 @@ "description": "Gets or sets the authorization key" }, "authorizationUseStatus": { - "type": "string", - "enum": [ - "Available", - "InUse" + "oneOf": [ + { + "type": "string", + "enum": [ + "Available", + "InUse" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets AuthorizationUseStatus. Possible values include: 'Available', 'InUse'" }, @@ -1256,7 +1788,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/BackendAddressPoolPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/BackendAddressPoolPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1273,21 +1812,42 @@ "type": "object", "properties": { "backendIPConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInterfaceIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInterfaceIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets collection of references to IPs defined in NICs" }, "loadBalancingRules": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets Load Balancing rules that use this Backend Address Pool" }, "outboundNatRule": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets outbound rules that use this Backend Address Pool" }, "provisioningState": { @@ -1301,7 +1861,14 @@ "type": "object", "properties": { "asn": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets this BGP speaker's ASN" }, "bgpPeeringAddress": { @@ -1309,7 +1876,14 @@ "description": "Gets or sets the BGP peering address and BGP identifier of this BGP speaker" }, "peerWeight": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the weight added to routes learned from this BGP speaker" } } @@ -1318,10 +1892,17 @@ "type": "object", "properties": { "dnsServers": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of DNS servers IP addresses" } }, @@ -1335,12 +1916,19 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/AuthorizationPropertiesFormat" - }, - "name": { - "type": "string", - "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource" - }, + "oneOf": [ + { + "$ref": "#/definitions/AuthorizationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + }, + "name": { + "type": "string", + "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource" + }, "etag": { "type": "string", "description": "A unique read-only string that changes whenever the resource is updated" @@ -1356,7 +1944,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1373,24 +1968,45 @@ "type": "object", "properties": { "advertisedPublicPrefixes": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of AdvertisedPublicPrefixes" }, "advertisedPublicPrefixesState": { - "type": "string", - "enum": [ - "NotConfigured", - "Configuring", - "Configured", - "ValidationNeeded" + "oneOf": [ + { + "type": "string", + "enum": [ + "NotConfigured", + "Configuring", + "Configured", + "ValidationNeeded" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets AdvertisedPublicPrefixState of the Peering resource . Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'" }, "customerASN": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or Sets CustomerAsn of the peering." }, "routingRegistryName": { @@ -1404,28 +2020,56 @@ "type": "object", "properties": { "peeringType": { - "type": "string", - "enum": [ - "AzurePublicPeering", - "AzurePrivatePeering", - "MicrosoftPeering" + "oneOf": [ + { + "type": "string", + "enum": [ + "AzurePublicPeering", + "AzurePrivatePeering", + "MicrosoftPeering" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PeeringType. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'" }, "state": { - "type": "string", - "enum": [ - "Disabled", - "Enabled" + "oneOf": [ + { + "type": "string", + "enum": [ + "Disabled", + "Enabled" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets state of Peering. Possible values include: 'Disabled', 'Enabled'" }, "azureASN": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the azure ASN" }, "peerASN": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the peer ASN" }, "primaryPeerAddressPrefix": { @@ -1449,15 +2093,36 @@ "description": "Gets or sets the shared key" }, "vlanId": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the vlan id" }, "microsoftPeeringConfig": { - "$ref": "#/definitions/ExpressRouteCircuitPeeringConfig", + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitPeeringConfig" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the mircosoft peering config" }, "stats": { - "$ref": "#/definitions/ExpressRouteCircuitStats", + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitStats" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or peering stats" }, "provisioningState": { @@ -1470,7 +2135,14 @@ "type": "object", "properties": { "allowClassicOperations": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "allow classic operations" }, "circuitProvisioningState": { @@ -1478,27 +2150,48 @@ "description": "Gets or sets CircuitProvisioningState state of the resource " }, "serviceProviderProvisioningState": { - "type": "string", - "enum": [ - "NotProvisioned", - "Provisioning", - "Provisioned", - "Deprovisioning" + "oneOf": [ + { + "type": "string", + "enum": [ + "NotProvisioned", + "Provisioning", + "Provisioned", + "Deprovisioning" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets ServiceProviderProvisioningState state of the resource . Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'" }, "authorizations": { - "type": "array", - "items": { - "$ref": "#/definitions/ExpressRouteCircuitAuthorization" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ExpressRouteCircuitAuthorization" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of authorizations" }, "peerings": { - "type": "array", - "items": { - "$ref": "#/definitions/ExpressRouteCircuitPeering" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ExpressRouteCircuitPeering" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of peerings" }, "serviceKey": { @@ -1510,7 +2203,14 @@ "description": "Gets or sets ServiceProviderNotes" }, "serviceProviderProperties": { - "$ref": "#/definitions/ExpressRouteCircuitServiceProviderProperties", + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitServiceProviderProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets ServiceProviderProperties" }, "provisioningState": { @@ -1532,7 +2232,14 @@ "description": "Gets or sets peering location." }, "bandwidthInMbps": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets BandwidthInMbps." } }, @@ -1546,18 +2253,32 @@ "description": "Gets or sets name of the sku." }, "tier": { - "type": "string", - "enum": [ - "Standard", - "Premium" + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard", + "Premium" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets tier of the sku. Possible values include: 'Standard', 'Premium'" }, "family": { - "type": "string", - "enum": [ - "UnlimitedData", - "MeteredData" + "oneOf": [ + { + "type": "string", + "enum": [ + "UnlimitedData", + "MeteredData" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets family of the sku. Possible values include: 'UnlimitedData', 'MeteredData'" } @@ -1568,19 +2289,47 @@ "type": "object", "properties": { "primarybytesIn": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets BytesIn of the peering." }, "primarybytesOut": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets BytesOut of the peering." }, "secondarybytesIn": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets BytesIn of the peering." }, "secondarybytesOut": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets BytesOut of the peering." } }, @@ -1594,7 +2343,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/FrontendIPConfigurationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/FrontendIPConfigurationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1611,31 +2367,59 @@ "type": "object", "properties": { "inboundNatRules": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Read only.Inbound rules URIs that use this frontend IP" }, "inboundNatPools": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Read only.Inbound pools URIs that use this frontend IP" }, "outboundNatRules": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Read only.Outbound rules URIs that use this frontend IP" }, "loadBalancingRules": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets Load Balancing rules URIs that use this frontend IP" }, "privateIPAddress": { @@ -1643,19 +2427,40 @@ "description": "Gets or sets the privateIPAddress of the IP Configuration" }, "privateIPAllocationMethod": { - "type": "string", - "enum": [ - "Static", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'" }, "subnet": { - "$ref": "#/definitions/Subnet", + "oneOf": [ + { + "$ref": "#/definitions/Subnet" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the subnet resource" }, "publicIPAddress": { - "$ref": "#/definitions/PublicIPAddress", + "oneOf": [ + { + "$ref": "#/definitions/PublicIPAddress" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the PublicIP resource" }, "provisioningState": { @@ -1673,7 +2478,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/InboundNatPoolPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/InboundNatPoolPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1690,27 +2502,62 @@ "type": "object", "properties": { "frontendIPConfiguration": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a reference to frontend IP Addresses" }, "protocol": { - "type": "string", - "enum": [ - "Udp", - "Tcp" + "oneOf": [ + { + "type": "string", + "enum": [ + "Udp", + "Tcp" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'" }, "frontendPortRangeStart": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the starting port range for the NAT pool. You can spcify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive" }, "frontendPortRangeEnd": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the ending port range for the NAT pool. You can spcify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive" }, "backendPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a port used for internal connections on the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal compotnent on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to '*' to automatically assign an unallocated port that is discoverable using the runtime API" }, "provisioningState": { @@ -1734,7 +2581,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/InboundNatRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/InboundNatRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1751,35 +2605,84 @@ "type": "object", "properties": { "frontendIPConfiguration": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a reference to frontend IP Addresses" }, "backendIPConfiguration": { - "$ref": "#/definitions/NetworkInterfaceIPConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/NetworkInterfaceIPConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a reference to a private ip address defined on a NetworkInterface of a VM. Traffic sent to frontendPort of each of the frontendIPConfigurations is forwarded to the backed IP" }, "protocol": { - "type": "string", - "enum": [ - "Udp", - "Tcp" + "oneOf": [ + { + "type": "string", + "enum": [ + "Udp", + "Tcp" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'" + }, + "frontendPort": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], - "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'" - }, - "frontendPort": { - "type": "integer", "description": "Gets or sets the port for the external endpoint. You can spcify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive" }, "backendPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a port used for internal connections on the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal compotnent on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to '*' to automatically assign an unallocated port that is discoverable using the runtime API" }, "idleTimeoutInMinutes": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the timeout for the Tcp idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This emlement is only used when the protocol is set to Tcp" }, "enableFloatingIP": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn availability Group. This setting is required when using the SQL Always ON availability Groups in SQL server. This setting can't be changed after you create the endpoint" }, "provisioningState": { @@ -1797,7 +2700,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/IPConfigurationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/IPConfigurationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1818,19 +2728,40 @@ "description": "Gets or sets the privateIPAddress of the IP Configuration" }, "privateIPAllocationMethod": { - "type": "string", - "enum": [ - "Static", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'" }, "subnet": { - "$ref": "#/definitions/Subnet", + "oneOf": [ + { + "$ref": "#/definitions/Subnet" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the subnet resource" }, "publicIPAddress": { - "$ref": "#/definitions/PublicIPAddress", + "oneOf": [ + { + "$ref": "#/definitions/PublicIPAddress" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the PublicIP resource" }, "provisioningState": { @@ -1844,52 +2775,101 @@ "type": "object", "properties": { "frontendIPConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/FrontendIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/FrontendIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets frontend IP addresses of the load balancer" }, "backendAddressPools": { - "type": "array", - "items": { - "$ref": "#/definitions/BackendAddressPool" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/BackendAddressPool" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Pools of backend IP addresseses" }, "loadBalancingRules": { - "type": "array", - "items": { - "$ref": "#/definitions/LoadBalancingRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/LoadBalancingRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets loadbalancing rules" }, "probes": { - "type": "array", - "items": { - "$ref": "#/definitions/Probe" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Probe" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of Load balancer probes" }, "inboundNatRules": { - "type": "array", - "items": { - "$ref": "#/definitions/InboundNatRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/InboundNatRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of inbound rules" }, "inboundNatPools": { - "type": "array", - "items": { - "$ref": "#/definitions/InboundNatPool" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/InboundNatPool" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets inbound NAT pools" }, "outboundNatRules": { - "type": "array", - "items": { - "$ref": "#/definitions/OutboundNatRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/OutboundNatRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets outbound NAT rules" }, "resourceGuid": { @@ -1911,7 +2891,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/LoadBalancingRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/LoadBalancingRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -1928,48 +2915,111 @@ "type": "object", "properties": { "frontendIPConfiguration": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a reference to frontend IP Addresses" }, "backendAddressPool": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs" }, "probe": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the load balancer probe used by the Load Balancing rule." }, "protocol": { - "type": "string", - "enum": [ - "Udp", - "Tcp" + "oneOf": [ + { + "type": "string", + "enum": [ + "Udp", + "Tcp" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'" }, "loadDistribution": { - "type": "string", - "enum": [ - "Default", - "SourceIP", - "SourceIPProtocol" + "oneOf": [ + { + "type": "string", + "enum": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'" }, "frontendPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the port for the external endpoint. You can specify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive" }, "backendPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a port used for internal connections on the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal compotnent on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to '*' to automatically assign an unallocated port that is discoverable using the runtime API" }, "idleTimeoutInMinutes": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the timeout for the Tcp idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This emlement is only used when the protocol is set to Tcp" }, "enableFloatingIP": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn availability Group. This setting is required when using the SQL Always ON availability Groups in SQL server. This setting can't be changed after you create the endpoint" }, "provisioningState": { @@ -1995,14 +3045,28 @@ "description": "Resource location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/LocalNetworkGatewayPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/LocalNetworkGatewayPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -2015,7 +3079,14 @@ "type": "object", "properties": { "localNetworkAddressSpace": { - "$ref": "#/definitions/AddressSpace", + "oneOf": [ + { + "$ref": "#/definitions/AddressSpace" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Local network site Address space" }, "gatewayIpAddress": { @@ -2023,7 +3094,14 @@ "description": "IP address of local network gateway." }, "bgpSettings": { - "$ref": "#/definitions/BgpSettings", + "oneOf": [ + { + "$ref": "#/definitions/BgpSettings" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Local network gateway's BGP speaker settings" }, "resourceGuid": { @@ -2053,7 +3131,14 @@ ] }, "properties": { - "$ref": "#/definitions/AuthorizationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/AuthorizationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2087,7 +3172,14 @@ ] }, "properties": { - "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2121,7 +3213,14 @@ ] }, "properties": { - "$ref": "#/definitions/SecurityRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/SecurityRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2155,7 +3254,14 @@ ] }, "properties": { - "$ref": "#/definitions/RoutePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/RoutePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2189,7 +3295,14 @@ ] }, "properties": { - "$ref": "#/definitions/SubnetPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/SubnetPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2219,14 +3332,28 @@ "description": "Resource location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/NetworkInterfacePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/NetworkInterfacePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -2239,17 +3366,31 @@ "type": "object", "properties": { "dnsServers": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of DNS servers IP addresses" }, "appliedDnsServers": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of Applied DNS servers IP addresses" }, "internalDnsNameLabel": { @@ -2275,7 +3416,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/NetworkInterfaceIPConfigurationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/NetworkInterfaceIPConfigurationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2292,50 +3440,99 @@ "type": "object", "properties": { "applicationGatewayBackendAddressPools": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGatewayBackendAddressPool" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGatewayBackendAddressPool" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of ApplicationGatewayBackendAddressPool resource" }, "loadBalancerBackendAddressPools": { - "type": "array", - "items": { - "$ref": "#/definitions/BackendAddressPool" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/BackendAddressPool" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of LoadBalancerBackendAddressPool resource" }, "loadBalancerInboundNatRules": { - "type": "array", - "items": { - "$ref": "#/definitions/InboundNatRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/InboundNatRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of references of LoadBalancerInboundNatRules" }, "privateIPAddress": { "type": "string" }, "privateIPAllocationMethod": { - "type": "string", - "enum": [ - "Static", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'" }, "privateIPAddressVersion": { - "type": "string", - "enum": [ - "IPv4", - "IPv6" + "oneOf": [ + { + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PrivateIP address version (IPv4/IPv6). Possible values include: 'IPv4', 'IPv6'" }, "subnet": { - "$ref": "#/definitions/Subnet" + "oneOf": [ + { + "$ref": "#/definitions/Subnet" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "publicIPAddress": { - "$ref": "#/definitions/PublicIPAddress" + "oneOf": [ + { + "$ref": "#/definitions/PublicIPAddress" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "provisioningState": { "type": "string" @@ -2347,22 +3544,50 @@ "type": "object", "properties": { "virtualMachine": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of a VirtualMachine" }, "networkSecurityGroup": { - "$ref": "#/definitions/NetworkSecurityGroup", + "oneOf": [ + { + "$ref": "#/definitions/NetworkSecurityGroup" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the NetworkSecurityGroup resource" }, "ipConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInterfaceIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInterfaceIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets list of IPConfigurations of the NetworkInterface" }, "dnsSettings": { - "$ref": "#/definitions/NetworkInterfaceDnsSettings", + "oneOf": [ + { + "$ref": "#/definitions/NetworkInterfaceDnsSettings" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets DNS Settings in NetworkInterface" }, "macAddress": { @@ -2370,11 +3595,25 @@ "description": "Gets the MAC Address of the network interface" }, "primary": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets whether this is a primary NIC on a virtual machine" }, "enableIPForwarding": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets whether IPForwarding is enabled on the NIC" }, "resourceGuid": { @@ -2400,14 +3639,28 @@ "description": "Resource location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/NetworkSecurityGroupPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/NetworkSecurityGroupPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -2420,31 +3673,59 @@ "type": "object", "properties": { "securityRules": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Security rules of network security group" }, "defaultSecurityRules": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Default security rules of network security group" }, "networkInterfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInterface" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInterface" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets collection of references to Network Interfaces" }, "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets collection of references to subnets" }, "resourceGuid": { @@ -2466,7 +3747,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/OutboundNatRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/OutboundNatRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2483,18 +3771,39 @@ "type": "object", "properties": { "allocatedOutboundPorts": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the number of outbound ports to be used for SNAT" }, "frontendIPConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Frontend IP addresses of the load balancer" }, "backendAddressPool": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs" }, "provisioningState": { @@ -2515,7 +3824,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/ProbePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/ProbePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2532,30 +3848,65 @@ "type": "object", "properties": { "loadBalancingRules": { - "type": "array", - "items": { - "$ref": "#/definitions/SubResource" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets Load balancer rules that use this probe" }, "protocol": { - "type": "string", - "enum": [ - "Http", - "Tcp" + "oneOf": [ + { + "type": "string", + "enum": [ + "Http", + "Tcp" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp'" }, "port": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Port for communicating the probe. Possible values range from 1 to 65535, inclusive." }, "intervalInSeconds": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5" }, "numberOfProbes": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endponints to be taken out of rotation faster or slower than the typical times used in Azure. " }, "requestPath": { @@ -2584,14 +3935,28 @@ "description": "Resource location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/PublicIPAddressPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/PublicIPAddressPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -2622,33 +3987,68 @@ "type": "object", "properties": { "publicIPAllocationMethod": { - "type": "string", - "enum": [ - "Static", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PublicIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'" }, "publicIPAddressVersion": { - "type": "string", - "enum": [ - "IPv4", - "IPv6" + "oneOf": [ + { + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PublicIP address version (IPv4/IPv6). Possible values include: 'IPv4', 'IPv6'" }, "ipConfiguration": { - "$ref": "#/definitions/IPConfiguration" + "oneOf": [ + { + "$ref": "#/definitions/IPConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "dnsSettings": { - "$ref": "#/definitions/PublicIPAddressDnsSettings", + "oneOf": [ + { + "$ref": "#/definitions/PublicIPAddressDnsSettings" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets FQDN of the DNS record associated with the public IP address" }, "ipAddress": { "type": "string" }, "idleTimeoutInMinutes": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the Idletimeout of the public IP address" }, "resourceGuid": { @@ -2670,7 +4070,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/RoutePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/RoutePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2691,13 +4098,20 @@ "description": "Gets or sets the destination CIDR to which the route applies." }, "nextHopType": { - "type": "string", - "enum": [ - "VirtualNetworkGateway", - "VnetLocal", - "Internet", - "VirtualAppliance", - "None" + "oneOf": [ + { + "type": "string", + "enum": [ + "VirtualNetworkGateway", + "VnetLocal", + "Internet", + "VirtualAppliance", + "None" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'" }, @@ -2727,14 +4141,28 @@ "description": "Resource location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/RouteTablePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/RouteTablePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -2747,17 +4175,31 @@ "type": "object", "properties": { "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/Route" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Route" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets Routes in a Route Table" }, "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets collection of references to subnets" }, "provisioningState": { @@ -2775,7 +4217,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/SecurityRulePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/SecurityRulePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2796,11 +4245,18 @@ "description": "Gets or sets a description for this rule. Restricted to 140 chars." }, "protocol": { - "type": "string", - "enum": [ - "Tcp", - "Udp", - "*" + "oneOf": [ + { + "type": "string", + "enum": [ + "Tcp", + "Udp", + "*" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). Possible values include: 'Tcp', 'Udp', '*'" }, @@ -2821,22 +4277,43 @@ "description": "Gets or sets destination address prefix. CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. " }, "access": { - "type": "string", - "enum": [ - "Allow", - "Deny" + "oneOf": [ + { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'" }, "priority": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule." }, "direction": { - "type": "string", - "enum": [ - "Inbound", - "Outbound" + "oneOf": [ + { + "type": "string", + "enum": [ + "Inbound", + "Outbound" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values include: 'Inbound', 'Outbound'" }, @@ -2861,7 +4338,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/SubnetPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/SubnetPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -2882,18 +4366,39 @@ "description": "Gets or sets Address prefix for the subnet." }, "networkSecurityGroup": { - "$ref": "#/definitions/NetworkSecurityGroup", + "oneOf": [ + { + "$ref": "#/definitions/NetworkSecurityGroup" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the NetworkSecurityGroup resource" }, "routeTable": { - "$ref": "#/definitions/RouteTable", + "oneOf": [ + { + "$ref": "#/definitions/RouteTable" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the RouteTable resource" }, "ipConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/IPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/IPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets array of references to the network interface IP configurations using subnet" }, "provisioningState": { @@ -2923,14 +4428,28 @@ "description": "Resource location" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/VirtualNetworkGatewayPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkGatewayPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "etag": { "type": "string", @@ -2947,26 +4466,61 @@ "description": "The authorizationKey." }, "virtualNetworkGateway1": { - "$ref": "#/definitions/VirtualNetworkGateway" + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkGateway" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "virtualNetworkGateway2": { - "$ref": "#/definitions/VirtualNetworkGateway" + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkGateway" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "localNetworkGateway2": { - "$ref": "#/definitions/LocalNetworkGateway" + "oneOf": [ + { + "$ref": "#/definitions/LocalNetworkGateway" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "connectionType": { - "type": "string", - "enum": [ - "IPsec", - "Vnet2Vnet", - "ExpressRoute", - "VPNClient" + "oneOf": [ + { + "type": "string", + "enum": [ + "IPsec", + "Vnet2Vnet", + "ExpressRoute", + "VPNClient" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gateway connection type -Ipsec/Dedicated/VpnClient/Vnet2Vnet. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'" }, "routingWeight": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The Routing weight." }, "sharedKey": { @@ -2974,29 +4528,64 @@ "description": "The Ipsec share key." }, "connectionStatus": { - "type": "string", - "enum": [ - "Unknown", - "Connecting", - "Connected", - "NotConnected" + "oneOf": [ + { + "type": "string", + "enum": [ + "Unknown", + "Connecting", + "Connected", + "NotConnected" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Virtual network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'" }, "egressBytesTransferred": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The Egress Bytes Transferred in this connection" }, "ingressBytesTransferred": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The Ingress Bytes Transferred in this connection" }, "peer": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The reference to peerings resource." }, "enableBgp": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "EnableBgp Flag" }, "resourceGuid": { @@ -3018,7 +4607,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/VirtualNetworkGatewayIPConfigurationPropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkGatewayIPConfigurationPropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -3039,19 +4635,40 @@ "description": "Gets or sets the privateIPAddress of the IP Configuration" }, "privateIPAllocationMethod": { - "type": "string", - "enum": [ - "Static", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'" }, "subnet": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the subnet resource" }, "publicIPAddress": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the PublicIP resource" }, "provisioningState": { @@ -3065,46 +4682,102 @@ "type": "object", "properties": { "ipConfigurations": { - "type": "array", - "items": { - "$ref": "#/definitions/VirtualNetworkGatewayIPConfiguration" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualNetworkGatewayIPConfiguration" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "IpConfigurations for Virtual network gateway." }, "gatewayType": { - "type": "string", - "enum": [ - "Vpn", - "ExpressRoute" + "oneOf": [ + { + "type": "string", + "enum": [ + "Vpn", + "ExpressRoute" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "The type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute'" }, "vpnType": { - "type": "string", - "enum": [ - "PolicyBased", - "RouteBased" + "oneOf": [ + { + "type": "string", + "enum": [ + "PolicyBased", + "RouteBased" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'" }, "enableBgp": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "EnableBgp Flag" }, "gatewayDefaultSite": { - "$ref": "#/definitions/SubResource", + "oneOf": [ + { + "$ref": "#/definitions/SubResource" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the LocalNetworkGateway resource which represents Local network site having default routes. Assign Null value in case of removing existing default site setting." }, "sku": { - "$ref": "#/definitions/VirtualNetworkGatewaySku", + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkGatewaySku" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the VirtualNetworkGatewaySku resource which represents the sku selected for Virtual network gateway." }, "vpnClientConfiguration": { - "$ref": "#/definitions/VpnClientConfiguration", + "oneOf": [ + { + "$ref": "#/definitions/VpnClientConfiguration" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations." }, "bgpSettings": { - "$ref": "#/definitions/BgpSettings", + "oneOf": [ + { + "$ref": "#/definitions/BgpSettings" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Virtual network gateway's BGP speaker settings" }, "resourceGuid": { @@ -3122,25 +4795,46 @@ "type": "object", "properties": { "name": { - "type": "string", - "enum": [ - "Basic", - "HighPerformance", - "Standard" + "oneOf": [ + { + "type": "string", + "enum": [ + "Basic", + "HighPerformance", + "Standard" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gateway sku name -Basic/HighPerformance/Standard. Possible values include: 'Basic', 'HighPerformance', 'Standard'" }, "tier": { - "type": "string", - "enum": [ - "Basic", - "HighPerformance", - "Standard" + "oneOf": [ + { + "type": "string", + "enum": [ + "Basic", + "HighPerformance", + "Standard" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gateway sku tier -Basic/HighPerformance/Standard. Possible values include: 'Basic', 'HighPerformance', 'Standard'" }, "capacity": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The capacity" } }, @@ -3150,18 +4844,39 @@ "type": "object", "properties": { "addressSpace": { - "$ref": "#/definitions/AddressSpace", + "oneOf": [ + { + "$ref": "#/definitions/AddressSpace" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets AddressSpace that contains an array of IP address ranges that can be used by subnets" }, "dhcpOptions": { - "$ref": "#/definitions/DhcpOptions", + "oneOf": [ + { + "$ref": "#/definitions/DhcpOptions" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets DHCPOptions that contains an array of DNS servers available to VMs deployed in the virtual network" }, "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets List of subnets in a VirtualNetwork" }, "resourceGuid": { @@ -3178,21 +4893,42 @@ "type": "object", "properties": { "vpnClientAddressPool": { - "$ref": "#/definitions/AddressSpace", + "oneOf": [ + { + "$ref": "#/definitions/AddressSpace" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the reference of the Address space resource which represents Address space for P2S VpnClient." }, "vpnClientRootCertificates": { - "type": "array", - "items": { - "$ref": "#/definitions/VpnClientRootCertificate" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VpnClientRootCertificate" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "VpnClientRootCertificate for Virtual network gateway." }, "vpnClientRevokedCertificates": { - "type": "array", - "items": { - "$ref": "#/definitions/VpnClientRevokedCertificate" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VpnClientRevokedCertificate" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "VpnClientRevokedCertificate for Virtual network gateway." } }, @@ -3206,7 +4942,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/VpnClientRevokedCertificatePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/VpnClientRevokedCertificatePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", @@ -3241,7 +4984,14 @@ "description": "Resource Id" }, "properties": { - "$ref": "#/definitions/VpnClientRootCertificatePropertiesFormat" + "oneOf": [ + { + "$ref": "#/definitions/VpnClientRootCertificatePropertiesFormat" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "name": { "type": "string", diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json index eb60007435..a98dba664b 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json @@ -20,14 +20,28 @@ ] }, "sku": { - "$ref": "#/definitions/Sku", + "oneOf": [ + { + "$ref": "#/definitions/Sku" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Required. Gets or sets the sku type." }, "kind": { - "type": "string", - "enum": [ - "Storage", - "BlobStorage" + "oneOf": [ + { + "type": "string", + "enum": [ + "Storage", + "BlobStorage" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Required. Indicates the type of storage account. Possible values include: 'Storage', 'BlobStorage'" }, @@ -36,14 +50,28 @@ "description": "Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update the request will succeed." }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters." }, "properties": { - "$ref": "#/definitions/StorageAccountPropertiesCreateParameters" + "oneOf": [ + { + "$ref": "#/definitions/StorageAccountPropertiesCreateParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -66,7 +94,14 @@ "description": "Gets or sets the custom domain name. Name is the CNAME source." }, "useSubDomain": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates" } }, @@ -79,13 +114,27 @@ "type": "object", "properties": { "services": { - "$ref": "#/definitions/EncryptionServices", + "oneOf": [ + { + "$ref": "#/definitions/EncryptionServices" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets the services which are encrypted." }, "keySource": { - "type": "string", - "enum": [ - "Microsoft.Storage" + "oneOf": [ + { + "type": "string", + "enum": [ + "Microsoft.Storage" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets the encryption keySource(provider). Possible values (case-insensitive): Microsoft.Storage" } @@ -99,7 +148,14 @@ "type": "object", "properties": { "enabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "A boolean indicating whether or not the service is encrypted." } }, @@ -109,7 +165,14 @@ "type": "object", "properties": { "blob": { - "$ref": "#/definitions/EncryptionService", + "oneOf": [ + { + "$ref": "#/definitions/EncryptionService" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The blob service." } }, @@ -119,13 +182,20 @@ "type": "object", "properties": { "name": { - "type": "string", - "enum": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS" + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Gets or sets the sku name. Required for account creation, optional for update. Note that in older versions, sku name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS'" } @@ -139,18 +209,39 @@ "type": "object", "properties": { "customDomain": { - "$ref": "#/definitions/CustomDomain", + "oneOf": [ + { + "$ref": "#/definitions/CustomDomain" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property." }, "encryption": { - "$ref": "#/definitions/Encryption", + "oneOf": [ + { + "$ref": "#/definitions/Encryption" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Provides the encryption settings on the account. If left unspecified the account encryption settings will remain. The default setting is unencrypted." }, "accessTier": { - "type": "string", - "enum": [ - "Hot", - "Cool" + "oneOf": [ + { + "type": "string", + "enum": [ + "Hot", + "Cool" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Required for StandardBlob accounts. The access tier used for billing. Access tier cannot be changed more than once every 7 days (168 hours). Access tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types. Possible values include: 'Hot', 'Cool'" } diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json index 827c3149ac..384d6bcb85 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json @@ -20,7 +20,14 @@ ] }, "properties": { - "$ref": "#/definitions/CertificateOrder_properties" + "oneOf": [ + { + "$ref": "#/definitions/CertificateOrder_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -56,7 +63,14 @@ ] }, "properties": { - "$ref": "#/definitions/CertificateOrderCertificate_properties" + "oneOf": [ + { + "$ref": "#/definitions/CertificateOrderCertificate_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -92,14 +106,28 @@ "description": "Resource type" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/CertificateDetails_properties" + "oneOf": [ + { + "$ref": "#/definitions/CertificateDetails_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -111,7 +139,14 @@ "type": "object", "properties": { "version": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Version" }, "serialNumber": { @@ -152,10 +187,17 @@ "type": "object", "properties": { "certificates": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CertificateOrderCertificate" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CertificateOrderCertificate" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "State of the Key Vault secret" }, "distinguishedName": { @@ -167,54 +209,103 @@ "description": "Domain Verification Token" }, "validityInYears": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Duration in years (must be between 1 and 3)" }, "keySize": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Certificate Key Size" }, "productType": { - "type": "string", - "enum": [ - "StandardDomainValidatedSsl", - "StandardDomainValidatedWildCardSsl" + "oneOf": [ + { + "type": "string", + "enum": [ + "StandardDomainValidatedSsl", + "StandardDomainValidatedWildCardSsl" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'" }, "autoRenew": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Auto renew" }, "provisioningState": { - "type": "string", - "enum": [ - "Succeeded", - "Failed", - "Canceled", - "InProgress", - "Deleting" + "oneOf": [ + { + "type": "string", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "InProgress", + "Deleting" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Status of certificate order. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'" }, "status": { - "type": "string", - "enum": [ - "Pendingissuance", - "Issued", - "Revoked", - "Canceled", - "Denied", - "Pendingrevocation", - "PendingRekey", - "Unused", - "Expired", - "NotSubmitted" + "oneOf": [ + { + "type": "string", + "enum": [ + "Pendingissuance", + "Issued", + "Revoked", + "Canceled", + "Denied", + "Pendingrevocation", + "PendingRekey", + "Unused", + "Expired", + "NotSubmitted" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'" }, "signedCertificate": { - "$ref": "#/definitions/CertificateDetails", + "oneOf": [ + { + "$ref": "#/definitions/CertificateDetails" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Signed certificate" }, "csr": { @@ -222,11 +313,25 @@ "description": "Last CSR that was created for this order" }, "intermediate": { - "$ref": "#/definitions/CertificateDetails", + "oneOf": [ + { + "$ref": "#/definitions/CertificateDetails" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Intermediate certificate" }, "root": { - "$ref": "#/definitions/CertificateDetails", + "oneOf": [ + { + "$ref": "#/definitions/CertificateDetails" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Root certificate" }, "serialNumber": { @@ -267,14 +372,28 @@ "description": "Resource type" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/CertificateOrderCertificate_properties" + "oneOf": [ + { + "$ref": "#/definitions/CertificateOrderCertificate_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -294,18 +413,25 @@ "description": "Key Vault secret name" }, "provisioningState": { - "type": "string", - "enum": [ - "Initialized", - "WaitingOnCertificateOrder", - "Succeeded", - "CertificateOrderFailed", - "OperationNotPermittedOnKeyVault", - "AzureServiceUnauthorizedToAccessKeyVault", - "KeyVaultDoesNotExist", - "KeyVaultSecretDoesNotExist", - "UnknownError", - "Unknown" + "oneOf": [ + { + "type": "string", + "enum": [ + "Initialized", + "WaitingOnCertificateOrder", + "Succeeded", + "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", + "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", + "KeyVaultSecretDoesNotExist", + "UnknownError", + "Unknown" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Status of the Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'Unknown'" } @@ -327,7 +453,14 @@ ] }, "properties": { - "$ref": "#/definitions/CertificateOrderCertificate_properties" + "oneOf": [ + { + "$ref": "#/definitions/CertificateOrderCertificate_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json index 1eae99d972..afbd6b95f9 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json @@ -20,7 +20,14 @@ ] }, "properties": { - "$ref": "#/definitions/Domain_properties" + "oneOf": [ + { + "$ref": "#/definitions/Domain_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -66,7 +73,14 @@ "type": "object", "properties": { "addressMailing": { - "$ref": "#/definitions/Address", + "oneOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Mailing address" }, "email": { @@ -108,68 +122,124 @@ "type": "object", "properties": { "contactAdmin": { - "$ref": "#/definitions/Contact", + "oneOf": [ + { + "$ref": "#/definitions/Contact" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Admin contact information" }, "contactBilling": { - "$ref": "#/definitions/Contact", + "oneOf": [ + { + "$ref": "#/definitions/Contact" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Billing contact information" }, "contactRegistrant": { - "$ref": "#/definitions/Contact", + "oneOf": [ + { + "$ref": "#/definitions/Contact" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Registrant contact information" }, "contactTech": { - "$ref": "#/definitions/Contact", + "oneOf": [ + { + "$ref": "#/definitions/Contact" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Technical contact information" }, "registrationStatus": { - "type": "string", - "enum": [ - "Active", - "Awaiting", - "Cancelled", - "Confiscated", - "Disabled", - "Excluded", - "Expired", - "Failed", - "Held", - "Locked", - "Parked", - "Pending", - "Reserved", - "Reverted", - "Suspended", - "Transferred", - "Unknown", - "Unlocked", - "Unparked", - "Updated", - "JsonConverterFailed" + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Awaiting", + "Cancelled", + "Confiscated", + "Disabled", + "Excluded", + "Expired", + "Failed", + "Held", + "Locked", + "Parked", + "Pending", + "Reserved", + "Reverted", + "Suspended", + "Transferred", + "Unknown", + "Unlocked", + "Unparked", + "Updated", + "JsonConverterFailed" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Domain registration status. Possible values include: 'Active', 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown', 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed'" }, "provisioningState": { - "type": "string", - "enum": [ - "Succeeded", - "Failed", - "Canceled", - "InProgress", - "Deleting" + "oneOf": [ + { + "type": "string", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "InProgress", + "Deleting" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Domain provisioning state. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'" }, "nameServers": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Name servers" }, "privacy": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If true then domain privacy is enabled for this domain" }, "createdTime": { @@ -185,30 +255,65 @@ "description": "Timestamp when the domain was renewed last time" }, "autoRenew": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If true then domain will renewed automatically" }, "readyForDnsRecordManagement": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If true then Azure can assign this domain to Web Apps. This value will be true if domain registration status is active and it is hosted on name servers Azure has programmatic access to" }, "managedHostNames": { - "type": "array", - "items": { - "$ref": "#/definitions/HostName" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/HostName" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "All hostnames derived from the domain and assigned to Azure resources" }, "consent": { - "$ref": "#/definitions/DomainPurchaseConsent", + "oneOf": [ + { + "$ref": "#/definitions/DomainPurchaseConsent" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Legal agreement consent" }, "domainNotRenewableReasons": { - "type": "string", - "enum": [ - "RegistrationStatusNotSupportedForRenewal", - "ExpirationNotInRenewalTimeRange", - "SubscriptionNotActive" + "oneOf": [ + { + "type": "string", + "enum": [ + "RegistrationStatusNotSupportedForRenewal", + "ExpirationNotInRenewalTimeRange", + "SubscriptionNotActive" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ] } } @@ -217,10 +322,17 @@ "type": "object", "properties": { "agreementKeys": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements Api under TopLevelDomain resource" }, "agreedBy": { @@ -242,10 +354,17 @@ "description": "Name of the hostname" }, "siteNames": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "List of sites the hostname is assigned to. This list will have more than one site only if the hostname is pointing to a Traffic Manager" }, "azureResourceName": { @@ -253,26 +372,47 @@ "description": "Name of the Azure resource the hostname is assigned to. If it is assigned to a traffic manager then it will be the traffic manager name otherwise it will be the website name" }, "azureResourceType": { - "type": "string", - "enum": [ - "Website", - "TrafficManager" + "oneOf": [ + { + "type": "string", + "enum": [ + "Website", + "TrafficManager" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager'" }, "customHostNameDnsRecordType": { - "type": "string", - "enum": [ - "CName", - "A" + "oneOf": [ + { + "type": "string", + "enum": [ + "CName", + "A" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Type of the Dns record. Possible values include: 'CName', 'A'" }, "hostNameType": { - "type": "string", - "enum": [ - "Verified", - "Managed" + "oneOf": [ + { + "type": "string", + "enum": [ + "Verified", + "Managed" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Type of the hostname. Possible values include: 'Verified', 'Managed'" } diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json index 170afb6aae..9ba73d1303 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json @@ -20,7 +20,14 @@ ] }, "properties": { - "$ref": "#/definitions/Certificate_properties" + "oneOf": [ + { + "$ref": "#/definitions/Certificate_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -46,7 +53,14 @@ ] }, "properties": { - "$ref": "#/definitions/Csr_properties" + "oneOf": [ + { + "$ref": "#/definitions/Csr_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -72,7 +86,14 @@ ] }, "properties": { - "$ref": "#/definitions/HostingEnvironment_properties" + "oneOf": [ + { + "$ref": "#/definitions/HostingEnvironment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -108,10 +129,24 @@ ] }, "properties": { - "$ref": "#/definitions/WorkerPool_properties" + "oneOf": [ + { + "$ref": "#/definitions/WorkerPool_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "sku": { - "$ref": "#/definitions/SkuDescription" + "oneOf": [ + { + "$ref": "#/definitions/SkuDescription" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -137,7 +172,14 @@ ] }, "properties": { - "$ref": "#/definitions/HostingEnvironment_properties" + "oneOf": [ + { + "$ref": "#/definitions/HostingEnvironment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -163,10 +205,24 @@ ] }, "properties": { - "$ref": "#/definitions/ServerFarmWithRichSku_properties" + "oneOf": [ + { + "$ref": "#/definitions/ServerFarmWithRichSku_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "sku": { - "$ref": "#/definitions/SkuDescription" + "oneOf": [ + { + "$ref": "#/definitions/SkuDescription" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -192,7 +248,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetGateway_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetGateway_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -218,7 +281,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetRoute_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetRoute_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -244,7 +314,14 @@ ] }, "properties": { - "$ref": "#/definitions/Site_properties" + "oneOf": [ + { + "$ref": "#/definitions/Site_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -292,7 +369,14 @@ ] }, "properties": { - "$ref": "#/definitions/Deployment_properties" + "oneOf": [ + { + "$ref": "#/definitions/Deployment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -318,7 +402,14 @@ ] }, "properties": { - "$ref": "#/definitions/HostNameBinding_properties" + "oneOf": [ + { + "$ref": "#/definitions/HostNameBinding_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -344,7 +435,14 @@ ] }, "properties": { - "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + "oneOf": [ + { + "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -370,7 +468,14 @@ ] }, "properties": { - "$ref": "#/definitions/Deployment_properties" + "oneOf": [ + { + "$ref": "#/definitions/Deployment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -396,7 +501,14 @@ ] }, "properties": { - "$ref": "#/definitions/Site_properties" + "oneOf": [ + { + "$ref": "#/definitions/Site_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -441,7 +553,14 @@ ] }, "properties": { - "$ref": "#/definitions/Deployment_properties" + "oneOf": [ + { + "$ref": "#/definitions/Deployment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -467,7 +586,14 @@ ] }, "properties": { - "$ref": "#/definitions/HostNameBinding_properties" + "oneOf": [ + { + "$ref": "#/definitions/HostNameBinding_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -493,7 +619,14 @@ ] }, "properties": { - "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + "oneOf": [ + { + "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -519,7 +652,14 @@ ] }, "properties": { - "$ref": "#/definitions/Deployment_properties" + "oneOf": [ + { + "$ref": "#/definitions/Deployment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -545,7 +685,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetInfo_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetInfo_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -581,7 +728,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetGateway_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetGateway_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -607,7 +761,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetInfo_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetInfo_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -643,7 +804,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetGateway_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetGateway_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -669,16 +837,30 @@ "type": "object", "properties": { "actionType": { - "type": "string", - "enum": [ - "Recycle", - "LogEvent", - "CustomAction" + "oneOf": [ + { + "type": "string", + "enum": [ + "Recycle", + "LogEvent", + "CustomAction" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "ActionType - predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'" }, "customAction": { - "$ref": "#/definitions/AutoHealCustomAction", + "oneOf": [ + { + "$ref": "#/definitions/AutoHealCustomAction" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "CustomAction - custom action to be taken" }, "minProcessExecutionTime": { @@ -709,11 +891,25 @@ "type": "object", "properties": { "triggers": { - "$ref": "#/definitions/AutoHealTriggers", + "oneOf": [ + { + "$ref": "#/definitions/AutoHealTriggers" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Triggers - Conditions that describe when to execute the auto-heal actions" }, "actions": { - "$ref": "#/definitions/AutoHealActions", + "oneOf": [ + { + "$ref": "#/definitions/AutoHealActions" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Actions - Actions to be executed when a rule is triggered" } }, @@ -723,22 +919,50 @@ "type": "object", "properties": { "requests": { - "$ref": "#/definitions/RequestsBasedTrigger", + "oneOf": [ + { + "$ref": "#/definitions/RequestsBasedTrigger" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Requests - Defines a rule based on total requests" }, "privateBytesInKB": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "PrivateBytesInKB - Defines a rule based on private bytes" }, "statusCodes": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusCodesBasedTrigger" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/StatusCodesBasedTrigger" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "StatusCodes - Defines a rule based on status codes" }, "slowRequests": { - "$ref": "#/definitions/SlowRequestsBasedTrigger", + "oneOf": [ + { + "$ref": "#/definitions/SlowRequestsBasedTrigger" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "SlowRequests - Defines a rule based on request execution time" } }, @@ -756,10 +980,17 @@ "description": "Subject name of the certificate" }, "hostNames": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Host names the certificate applies to" }, "pfxBlob": { @@ -795,7 +1026,14 @@ "description": "Certificate thumbprint" }, "valid": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Is the certificate valid?" }, "cerBlob": { @@ -807,7 +1045,14 @@ "description": "Public key hash" }, "hostingEnvironmentProfile": { - "$ref": "#/definitions/HostingEnvironmentProfile", + "oneOf": [ + { + "$ref": "#/definitions/HostingEnvironmentProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Specification for the hosting environment (App Service Environment) to use for the certificate" } } @@ -820,15 +1065,36 @@ "description": "Correlation Id of cloning operation. This id ties multiple cloning operations\r\n together to use the same snapshot" }, "overwrite": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Overwrite destination web app" }, "cloneCustomHostNames": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If true, clone custom hostnames from source web app" }, "cloneSourceControl": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Clone source control from source web app" }, "sourceWebAppId": { @@ -840,14 +1106,28 @@ "description": "Hosting environment" }, "appSettingsOverrides": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Application settings overrides for cloned web app. If specified these settings will override the settings cloned \r\n from source web app. If not specified, application settings from source web app are retained." }, "configureLoadBalancing": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If specified configure load balancing for source and clone site" }, "trafficManagerProfileId": { @@ -892,10 +1172,17 @@ "type": "object", "properties": { "allowedOrigins": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Gets or sets the list of origins that should be allowed to make cross-origin\r\n calls (for example: http://example.com:12345). Use \"*\" to allow all." } }, @@ -942,7 +1229,14 @@ "description": "Id" }, "status": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Status" }, "message": { @@ -970,10 +1264,17 @@ "description": "EndTime" }, "active": { - "type": "boolean", - "description": "Active" - }, - "details": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Active" + }, + "details": { "type": "string", "description": "Detail" } @@ -983,10 +1284,17 @@ "type": "object", "properties": { "rampUpRules": { - "type": "array", - "items": { - "$ref": "#/definitions/RampUpRule" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/RampUpRule" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "List of {Microsoft.Web.Hosting.Administration.RampUpRule} objects." } }, @@ -1022,23 +1330,37 @@ "description": "Location of the hostingEnvironment (App Service Environment), e.g. \"West US\"" }, "provisioningState": { - "type": "string", - "enum": [ - "Succeeded", - "Failed", - "Canceled", - "InProgress", - "Deleting" + "oneOf": [ + { + "type": "string", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "InProgress", + "Deleting" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Provisioning state of the hostingEnvironment (App Service Environment). Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'" }, "status": { - "type": "string", - "enum": [ - "Preparing", - "Ready", - "Scaling", - "Deleting" + "oneOf": [ + { + "type": "string", + "enum": [ + "Preparing", + "Ready", + "Scaling", + "Deleting" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Current status of the hostingEnvironment (App Service Environment). Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'" }, @@ -1055,15 +1377,29 @@ "description": "Subnet of the hostingEnvironment's (App Service Environment) virtual network" }, "virtualNetwork": { - "$ref": "#/definitions/VirtualNetworkProfile", + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Description of the hostingEnvironment's (App Service Environment) virtual network" }, "internalLoadBalancingMode": { - "type": "string", - "enum": [ - "None", - "Web", - "Publishing" + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "Web", + "Publishing" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Specifies which endpoints to serve internally in the hostingEnvironment's (App Service Environment) VNET. Possible values include: 'None', 'Web', 'Publishing'" }, @@ -1072,18 +1408,39 @@ "description": "Front-end VM size, e.g. \"Medium\", \"Large\"" }, "multiRoleCount": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Number of front-end instances" }, "workerPools": { - "type": "array", - "items": { - "$ref": "#/definitions/WorkerPool" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/WorkerPool" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Description of worker pools with worker size ids, VM sizes, and number of workers in each pool" }, "ipsslAddressCount": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Number of IP SSL addresses reserved for this hostingEnvironment (App Service Environment)" }, "databaseEdition": { @@ -1095,7 +1452,14 @@ "description": "Service objective of the metadata database for the hostingEnvironment (App Service Environment) e.g. \"S0\"" }, "upgradeDomains": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Number of upgrade domains of this hostingEnvironment (App Service Environment)" }, "subscriptionId": { @@ -1123,32 +1487,67 @@ "description": "List of comma separated strings describing which VM sizes are allowed for workers" }, "maximumNumberOfMachines": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Maximum number of VMs in this hostingEnvironment (App Service Environment)" }, "vipMappings": { - "type": "array", - "items": { - "$ref": "#/definitions/VirtualIPMapping" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualIPMapping" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Description of IP SSL mapping for this hostingEnvironment (App Service Environment)" }, "environmentCapacities": { - "type": "array", - "items": { - "$ref": "#/definitions/StampCapacity" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/StampCapacity" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Current total, used, and available worker capacities" }, "networkAccessControlList": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkAccessControlEntry" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkAccessControlEntry" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Access control list for controlling traffic to the hostingEnvironment (App Service Environment)" }, "environmentIsHealthy": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "True/false indicating whether the hostingEnvironment (App Service Environment) is healthy" }, "environmentStatus": { @@ -1164,14 +1563,28 @@ "description": "Api Management Account associated with this Hosting Environment" }, "suspended": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "True/false indicating whether the hostingEnvironment is suspended. The environment can be suspended e.g. when the management endpoint is no longer available\r\n (most likely because NSG blocked the incoming traffic)" }, "clusterSettings": { - "type": "array", - "items": { - "$ref": "#/definitions/NameValuePair" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NameValuePair" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Custom settings for changing the behavior of the hosting environment" } } @@ -1214,26 +1627,47 @@ "description": "Azure resource name" }, "azureResourceType": { - "type": "string", - "enum": [ - "Website", - "TrafficManager" + "oneOf": [ + { + "type": "string", + "enum": [ + "Website", + "TrafficManager" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Azure resource type. Possible values include: 'Website', 'TrafficManager'" }, "customHostNameDnsRecordType": { - "type": "string", - "enum": [ - "CName", - "A" + "oneOf": [ + { + "type": "string", + "enum": [ + "CName", + "A" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Custom DNS record type. Possible values include: 'CName', 'A'" }, "hostNameType": { - "type": "string", - "enum": [ - "Verified", - "Managed" + "oneOf": [ + { + "type": "string", + "enum": [ + "Verified", + "Managed" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Host name type. Possible values include: 'Verified', 'Managed'" } @@ -1247,11 +1681,18 @@ "description": "Host name" }, "sslState": { - "type": "string", - "enum": [ - "Disabled", - "SniEnabled", - "IpBasedEnabled" + "oneOf": [ + { + "type": "string", + "enum": [ + "Disabled", + "SniEnabled", + "IpBasedEnabled" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled'" }, @@ -1264,7 +1705,14 @@ "description": "SSL cert thumbprint" }, "toUpdate": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Set this flag to update existing host name" } }, @@ -1303,10 +1751,24 @@ ] }, "properties": { - "$ref": "#/definitions/WorkerPool_properties" + "oneOf": [ + { + "$ref": "#/definitions/WorkerPool_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "sku": { - "$ref": "#/definitions/SkuDescription" + "oneOf": [ + { + "$ref": "#/definitions/SkuDescription" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1332,7 +1794,14 @@ ] }, "properties": { - "$ref": "#/definitions/Deployment_properties" + "oneOf": [ + { + "$ref": "#/definitions/Deployment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1358,7 +1827,14 @@ ] }, "properties": { - "$ref": "#/definitions/HostNameBinding_properties" + "oneOf": [ + { + "$ref": "#/definitions/HostNameBinding_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1384,7 +1860,14 @@ ] }, "properties": { - "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + "oneOf": [ + { + "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1410,7 +1893,14 @@ ] }, "properties": { - "$ref": "#/definitions/Site_properties" + "oneOf": [ + { + "$ref": "#/definitions/Site_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -1452,7 +1942,14 @@ ] }, "properties": { - "$ref": "#/definitions/Deployment_properties" + "oneOf": [ + { + "$ref": "#/definitions/Deployment_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1478,7 +1975,14 @@ ] }, "properties": { - "$ref": "#/definitions/HostNameBinding_properties" + "oneOf": [ + { + "$ref": "#/definitions/HostNameBinding_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1504,7 +2008,14 @@ ] }, "properties": { - "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + "oneOf": [ + { + "$ref": "#/definitions/RelayServiceConnectionEntity_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1530,7 +2041,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetInfo_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetInfo_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -1566,7 +2084,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetGateway_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetGateway_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1592,7 +2117,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetInfo_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetInfo_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "resources": { @@ -1628,7 +2160,14 @@ ] }, "properties": { - "$ref": "#/definitions/VnetGateway_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetGateway_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1656,10 +2195,17 @@ "type": "object", "properties": { "action": { - "type": "string", - "enum": [ - "Permit", - "Deny" + "oneOf": [ + { + "type": "string", + "enum": [ + "Permit", + "Deny" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Possible values include: 'Permit', 'Deny'" }, @@ -1667,7 +2213,14 @@ "type": "string" }, "order": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "remoteSubnet": { "type": "string" @@ -1682,25 +2235,60 @@ "description": "Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net" }, "reroutePercentage": { - "type": "number", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName}" }, "changeStep": { - "type": "number", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "[Optional] In auto ramp up scenario this is the step to to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches \r\n {Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage} or {Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage}. Site metrics are checked every N minutes specificed in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes}.\r\n Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl}" }, "changeIntervalInMinutes": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "[Optional] Specifies interval in mimuntes to reevaluate ReroutePercentage" }, "minReroutePercentage": { - "type": "number", - "description": "[Optional] Specifies lower boundary above which ReroutePercentage will stay." - }, - "maxReroutePercentage": { - "type": "number", - "description": "[Optional] Specifies upper boundary below which ReroutePercentage will stay." - }, + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "[Optional] Specifies lower boundary above which ReroutePercentage will stay." + }, + "maxReroutePercentage": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "[Optional] Specifies upper boundary below which ReroutePercentage will stay." + }, "changeDecisionCallbackUrl": { "type": "string", "description": "Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified. See TiPCallback site extension for the scaffold and contracts.\r\n https://www.siteextensions.net/packages/TiPCallback/" @@ -1731,7 +2319,14 @@ "type": "string" }, "port": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "biztalkUri": { "type": "string" @@ -1742,7 +2337,14 @@ "type": "object", "properties": { "count": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Count" }, "timeInterval": { @@ -1768,15 +2370,36 @@ "description": "App Service Plan administration site" }, "hostingEnvironmentProfile": { - "$ref": "#/definitions/HostingEnvironmentProfile", + "oneOf": [ + { + "$ref": "#/definitions/HostingEnvironmentProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Specification for the hosting environment (App Service Environment) to use for the App Service Plan" }, "maximumNumberOfWorkers": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Maximum number of instances that can be assigned to this App Service Plan" }, "perSiteScaling": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If True apps assigned to this App Service Plan can be scaled independently\r\n If False apps assigned to this App Service Plan will scale to all instances of the plan" } } @@ -1789,29 +2412,64 @@ "description": "Name of web app" }, "enabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line)." }, "hostNameSslStates": { - "type": "array", - "items": { - "$ref": "#/definitions/HostNameSslState" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/HostNameSslState" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Hostname SSL states are used to manage the SSL bindings for site's hostnames." }, "serverFarmId": { "type": "string" }, "siteConfig": { - "$ref": "#/definitions/SiteConfig", + "oneOf": [ + { + "$ref": "#/definitions/SiteConfig" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Configuration of web app" }, "scmSiteAlsoStopped": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false." }, "hostingEnvironmentProfile": { - "$ref": "#/definitions/HostingEnvironmentProfile", + "oneOf": [ + { + "$ref": "#/definitions/HostingEnvironmentProfile" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Specification for the hosting environment (App Service Environment) to use for the web app" }, "microService": { @@ -1822,27 +2480,69 @@ "description": "Name of gateway app associated with web app" }, "clientAffinityEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app" }, "clientCertEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Specifies if the client certificate is enabled for the web app" }, "hostNamesDisabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Specifies if the public hostnames are disabled the web app.\r\n If set to true the app is only accessible via API Management process" }, "containerSize": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Size of a function container" }, "maxNumberOfWorkers": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Maximum number of workers\r\n This only applies to function container" }, "cloningInfo": { - "$ref": "#/definitions/CloningInfo", + "oneOf": [ + { + "$ref": "#/definitions/CloningInfo" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "This is only valid for web app creation. If specified, web app is cloned from \r\n a source web app" } } @@ -1871,14 +2571,28 @@ "description": "Resource type" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/SiteConfig_properties" + "oneOf": [ + { + "$ref": "#/definitions/SiteConfig_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -1890,14 +2604,28 @@ "type": "object", "properties": { "numberOfWorkers": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Number of workers" }, "defaultDocuments": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Default documents" }, "netFrameworkVersion": { @@ -1913,7 +2641,14 @@ "description": "Version of Python" }, "requestTracingEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Enable request tracing" }, "requestTracingExpirationTime": { @@ -1921,7 +2656,14 @@ "description": "Request tracing expiration time" }, "remoteDebuggingEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Remote Debugging Enabled" }, "remoteDebuggingVersion": { @@ -1929,15 +2671,36 @@ "description": "Remote Debugging Version" }, "httpLoggingEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "HTTP logging Enabled" }, "logsDirectorySizeLimit": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "HTTP Logs Directory size limit" }, "detailedErrorLoggingEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Detailed error logging enabled" }, "publishingUsername": { @@ -1949,31 +2712,59 @@ "description": "Publishing password" }, "appSettings": { - "type": "array", - "items": { - "$ref": "#/definitions/NameValuePair" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NameValuePair" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Application Settings" }, "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/NameValuePair" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NameValuePair" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Site Metadata" }, "connectionStrings": { - "type": "array", - "items": { - "$ref": "#/definitions/ConnStringInfo" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ConnStringInfo" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Connection strings" }, "handlerMappings": { - "type": "array", - "items": { - "$ref": "#/definitions/HandlerMapping" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/HandlerMapping" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Handler mappings" }, "documentRoot": { @@ -1985,15 +2776,36 @@ "description": "SCM type" }, "use32BitWorkerProcess": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Use 32 bit worker process" }, "webSocketsEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Web socket enabled." }, "alwaysOn": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Always On" }, "javaVersion": { @@ -2009,45 +2821,94 @@ "description": "Java container version" }, "managedPipelineMode": { - "type": "string", - "enum": [ - "Integrated", - "Classic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Integrated", + "Classic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Managed pipeline mode. Possible values include: 'Integrated', 'Classic'" }, "virtualApplications": { - "type": "array", - "items": { - "$ref": "#/definitions/VirtualApplication" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualApplication" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Virtual applications" }, "loadBalancing": { - "type": "string", - "enum": [ - "WeightedRoundRobin", - "LeastRequests", - "LeastResponseTime", - "WeightedTotalTraffic", - "RequestHash" + "oneOf": [ + { + "type": "string", + "enum": [ + "WeightedRoundRobin", + "LeastRequests", + "LeastResponseTime", + "WeightedTotalTraffic", + "RequestHash" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'" }, "experiments": { - "$ref": "#/definitions/Experiments", + "oneOf": [ + { + "$ref": "#/definitions/Experiments" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "This is work around for polymophic types" }, "limits": { - "$ref": "#/definitions/SiteLimits", + "oneOf": [ + { + "$ref": "#/definitions/SiteLimits" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Site limits" }, "autoHealEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Auto heal enabled" }, "autoHealRules": { - "$ref": "#/definitions/AutoHealRules", + "oneOf": [ + { + "$ref": "#/definitions/AutoHealRules" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Auto heal rules" }, "tracingOptions": { @@ -2059,11 +2920,25 @@ "description": "Vnet name" }, "cors": { - "$ref": "#/definitions/CorsSettings", + "oneOf": [ + { + "$ref": "#/definitions/CorsSettings" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Cross-Origin Resource Sharing (CORS) settings." }, "apiDefinition": { - "$ref": "#/definitions/ApiDefinitionInfo", + "oneOf": [ + { + "$ref": "#/definitions/ApiDefinitionInfo" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Information about the formal API definition for the web app." }, "autoSwapSlotName": { @@ -2071,14 +2946,28 @@ "description": "Auto swap slot name" }, "localMySqlEnabled": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Local mysql enabled" }, "ipSecurityRestrictions": { - "type": "array", - "items": { - "$ref": "#/definitions/IpSecurityRestriction" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/IpSecurityRestriction" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Ip Security restrictions" } } @@ -2087,15 +2976,36 @@ "type": "object", "properties": { "maxPercentageCpu": { - "type": "number", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Maximum allowed CPU usage percentage" }, "maxMemoryInMb": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Maximum allowed memory usage in MB" }, "maxDiskSizeInMb": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Maximum allowed disk size usage in MB" } }, @@ -2121,7 +3031,14 @@ "description": "Family code of the resource sku" }, "capacity": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Current number of instances assigned to the resource" } }, @@ -2135,7 +3052,14 @@ "description": "TimeTaken" }, "count": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Count" }, "timeInterval": { @@ -2153,11 +3077,25 @@ "description": "Name of the stamp" }, "availableCapacity": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Available capacity (# of machines, bytes of storage etc...)" }, "totalCapacity": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Total capacity (# of machines, bytes of storage etc...)" }, "unit": { @@ -2165,34 +3103,69 @@ "description": "Name of the unit" }, "computeMode": { - "type": "string", - "enum": [ - "Shared", - "Dedicated", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Shared", + "Dedicated", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Shared/Dedicated workers. Possible values include: 'Shared', 'Dedicated', 'Dynamic'" }, "workerSize": { - "type": "string", - "enum": [ - "Default", - "Small", - "Medium", - "Large" + "oneOf": [ + { + "type": "string", + "enum": [ + "Default", + "Small", + "Medium", + "Large" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Size of the machines. Possible values include: 'Default', 'Small', 'Medium', 'Large'" }, "workerSizeId": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Size Id of machines: \r\n 0 - Small\r\n 1 - Medium\r\n 2 - Large" }, "excludeFromCapacityAllocation": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "If true it includes basic sites\r\n Basic sites are not used for capacity allocation." }, "isApplicableForAllComputeModes": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Is capacity applicable for all sites?" }, "siteMode": { @@ -2206,19 +3179,47 @@ "type": "object", "properties": { "status": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "HTTP status code" }, "subStatus": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "SubStatus" }, "win32Status": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Win32 error code" }, "count": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Count" }, "timeInterval": { @@ -2238,13 +3239,27 @@ "type": "string" }, "preloadEnabled": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "virtualDirectories": { - "type": "array", - "items": { - "$ref": "#/definitions/VirtualDirectory" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualDirectory" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } } }, @@ -2267,15 +3282,36 @@ "description": "Virtual IP address" }, "internalHttpPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Internal HTTP port" }, "internalHttpsPort": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Internal HTTPS port" }, "inUse": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Is VIP mapping in use" } }, @@ -2332,14 +3368,28 @@ "description": "A certificate file (.cer) blob containing the public key of the private key used to authenticate a \r\n Point-To-Site VPN connection." }, "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/VnetRoute" - }, + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VnetRoute" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "The routes that this virtual network connection uses." }, "resyncRequired": { - "type": "boolean", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Flag to determine if a resync is required" }, "dnsServers": { @@ -2372,14 +3422,28 @@ "description": "Resource type" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/VnetRoute_properties" + "oneOf": [ + { + "$ref": "#/definitions/VnetRoute_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -2432,17 +3496,38 @@ "description": "Resource type" }, "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Resource tags" }, "properties": { - "$ref": "#/definitions/WorkerPool_properties" + "oneOf": [ + { + "$ref": "#/definitions/WorkerPool_properties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] }, "sku": { - "$ref": "#/definitions/SkuDescription" + "oneOf": [ + { + "$ref": "#/definitions/SkuDescription" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] } }, "required": [ @@ -2454,15 +3539,29 @@ "type": "object", "properties": { "workerSizeId": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Worker size id for referencing this worker pool" }, "computeMode": { - "type": "string", - "enum": [ - "Shared", - "Dedicated", - "Dynamic" + "oneOf": [ + { + "type": "string", + "enum": [ + "Shared", + "Dedicated", + "Dynamic" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } ], "description": "Shared or dedicated web app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'" }, @@ -2471,14 +3570,28 @@ "description": "VM size of the worker pool instances" }, "workerCount": { - "type": "integer", + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Number of instances in the worker pool" }, "instanceNames": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], "description": "Names of all instances in the worker pool (read only)" } } diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs index 537e468104..9c52439cfd 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs @@ -190,7 +190,7 @@ public void WriteDefinitionWithEnumAndUnrequiredProperty() .AddProperty("mockPropertyName", new JsonSchema()); ResourceSchemaWriter.WriteDefinition(writer, definitionName, definition); - Assert.Equal("'mockDefinition':{'enum':['MockEnum1','MockEnum2'],'properties':{'mockPropertyName':{}}}", stringWriter.ToString()); + Assert.Equal("'mockDefinition':{'enum':['MockEnum1','MockEnum2'],'properties':{'mockPropertyName':{'oneOf':[{},{'$ref':'http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression'}]}}}", stringWriter.ToString()); } [Fact] @@ -206,7 +206,7 @@ public void WriteDefinitionWithEnumAndRequiredProperty() .AddProperty("mockPropertyName", new JsonSchema(), true); ResourceSchemaWriter.WriteDefinition(writer, definitionName, definition); - Assert.Equal("'mockDefinition':{'enum':['MockEnum1','MockEnum2'],'properties':{'mockPropertyName':{}},'required':['mockPropertyName']}", stringWriter.ToString()); + Assert.Equal("'mockDefinition':{'enum':['MockEnum1','MockEnum2'],'properties':{'mockPropertyName':{'oneOf':[{},{'$ref':'http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression'}]}},'required':['mockPropertyName']}", stringWriter.ToString()); } [Fact] @@ -222,15 +222,9 @@ public void WriteDefinitionWithRequiredPropertyAndDescription() definition.Description = "MockDescription"; ResourceSchemaWriter.WriteDefinition(writer, definitionName, definition); - Assert.Equal("'mockDefinition':{'properties':{'mockPropertyName':{}},'required':['mockPropertyName'],'description':'MockDescription'}", stringWriter.ToString()); + Assert.Equal("'mockDefinition':{'properties':{'mockPropertyName':{'oneOf':[{},{'$ref':'http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression'}]}},'required':['mockPropertyName'],'description':'MockDescription'}", stringWriter.ToString()); } - - - - - - [Fact] public void WritePropertyWithNullWriter() { diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs index ad9ae3b4fa..0a36309d0a 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs @@ -58,7 +58,7 @@ internal static void Write(JsonTextWriter writer, ResourceSchema resourceSchema) writer.WriteEndObject(); } - private static void WriteDefinitionMap(JsonTextWriter writer, string definitionMapName, IDictionary definitionMap, bool sortDefinitions = false) + private static void WriteDefinitionMap(JsonTextWriter writer, string definitionMapName, IDictionary definitionMap, bool sortDefinitions = false, bool addExpressionReferences = false) { if (definitionMap != null && definitionMap.Count > 0) { @@ -74,7 +74,47 @@ private static void WriteDefinitionMap(JsonTextWriter writer, string definitionM foreach (string definitionName in definitionNames) { JsonSchema definition = definitionMap[definitionName]; - WriteDefinition(writer, definitionName, definition); + + bool shouldAddExpressionReference = addExpressionReferences && + (definition.JsonType != "string" || + (definition.Enum != null && + definition.Enum.Count() > 0 && + definitionName != "type" && + definitionName != "apiVersion")); + + if (!shouldAddExpressionReference) + { + WriteDefinition(writer, definitionName, definition); + } + else + { + string definitionDescription = null; + + writer.WritePropertyName(definitionName); + writer.WriteStartObject(); + + writer.WritePropertyName("oneOf"); + writer.WriteStartArray(); + + if (definition.Description != null) + { + definitionDescription = definition.Description; + + definition = definition.Clone(); + definition.Description = null; + } + WriteDefinition(writer, definition); + + WriteDefinition(writer, new JsonSchema() + { + Ref = "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + }); + + writer.WriteEndArray(); + + WriteProperty(writer, "description", definitionDescription); + writer.WriteEndObject(); + } } writer.WriteEndObject(); } @@ -103,7 +143,7 @@ private static void WriteDefinition(JsonTextWriter writer, JsonSchema definition WriteProperty(writer, "$ref", definition.Ref); WriteDefinition(writer, "items", definition.Items); WriteDefinition(writer, "additionalProperties", definition.AdditionalProperties); - WriteDefinitionMap(writer, "properties", definition.Properties); + WriteDefinitionMap(writer, "properties", definition.Properties, addExpressionReferences: true); WriteDefinitionArray(writer, "resources", definition.Resources); WriteStringArray(writer, "required", definition.Required); WriteProperty(writer, "description", definition.Description);