diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs index 15400bc596087..b914c4694ea34 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs @@ -24,7 +24,13 @@ public static void Batch() } [Fact] - public static void Cdn() + public static void Cdn_2015_06_01() + { + RunSwaggerTest("CDN", "2015-06-01", "cdn.json"); + } + + [Fact] + public static void Cdn_2016_04_02() { RunSwaggerTest("CDN", "2016-04-02", "cdn.json"); } diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj index 2aef930f9994f..c9afa085b306a 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj @@ -108,6 +108,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -117,7 +120,7 @@ PreserveNewest - + PreserveNewest @@ -135,6 +138,9 @@ PreserveNewest + + PreserveNewest + diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2015-06-01/Microsoft.Cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2015-06-01/Microsoft.Cdn.json new file mode 100644 index 0000000000000..3360b84c0ad49 --- /dev/null +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2015-06-01/Microsoft.Cdn.json @@ -0,0 +1,572 @@ +{ + "id": "http://schema.management.azure.com/schemas/2015-06-01/Microsoft.Cdn.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Cdn", + "description": "Microsoft Cdn Resource Types", + "resourceDefinitions": { + "profiles": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Cdn/profiles" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-06-01" + ] + }, + "location": { + "type": "string", + "description": "Profile location" + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Profile tags" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ProfilePropertiesCreateParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/profiles_endpoints_childResource" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "location", + "properties" + ], + "description": "Microsoft.Cdn/profiles" + }, + "profiles_endpoints": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Cdn/profiles/endpoints" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-06-01" + ] + }, + "location": { + "type": "string", + "description": "Endpoint location" + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Endpoint tags" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/EndpointPropertiesCreateParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/profiles_endpoints_customDomains_childResource" + }, + { + "$ref": "#/definitions/profiles_endpoints_origins_childResource" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "location", + "properties" + ], + "description": "Microsoft.Cdn/profiles/endpoints" + }, + "profiles_endpoints_customDomains": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Cdn/profiles/endpoints/customDomains" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-06-01" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CustomDomainPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Cdn/profiles/endpoints/customDomains" + }, + "profiles_endpoints_origins": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Cdn/profiles/endpoints/origins" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-06-01" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/OriginPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Cdn/profiles/endpoints/origins" + } + }, + "definitions": { + "CustomDomainPropertiesParameters": { + "type": "object", + "properties": { + "hostName": { + "type": "string", + "description": "The host name of the custom domain. Must be a domain name." + } + }, + "required": [ + "hostName" + ] + }, + "DeepCreatedOrigin": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Origin name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/DeepCreatedOriginProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "required": [ + "name" + ], + "description": "Deep created origins within a CDN endpoint." + }, + "DeepCreatedOriginProperties": { + "type": "object", + "properties": { + "hostName": { + "type": "string", + "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported." + }, + "httpPort": { + "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": { + "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" + } + }, + "required": [ + "hostName" + ], + "description": "Properties of deep created origin on a CDN endpoint." + }, + "EndpointPropertiesCreateParameters": { + "type": "object", + "properties": { + "originHostHeader": { + "type": "string", + "description": "The host header CDN provider will send along with content requests to origins. The default value is the host name of the origin." + }, + "originPath": { + "type": "string", + "description": "The path used for origin requests." + }, + "contentTypesToCompress": { + "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": { + "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": { + "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": { + "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": { + "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": { + "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." + } + }, + "required": [ + "origins" + ] + }, + "OriginPropertiesParameters": { + "type": "object", + "properties": { + "hostName": { + "type": "string", + "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported." + }, + "httpPort": { + "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": { + "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." + } + }, + "required": [ + "hostName" + ] + }, + "ProfilePropertiesCreateParameters": { + "type": "object", + "properties": { + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/Sku" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Profile SKU" + } + }, + "required": [ + "sku" + ] + }, + "profiles_endpoints_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "endpoints" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-06-01" + ] + }, + "location": { + "type": "string", + "description": "Endpoint location" + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Endpoint tags" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/EndpointPropertiesCreateParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/profiles_endpoints_customDomains_childResource" + }, + { + "$ref": "#/definitions/profiles_endpoints_origins_childResource" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "location", + "properties" + ], + "description": "Microsoft.Cdn/profiles/endpoints" + }, + "profiles_endpoints_customDomains_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "customDomains" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-06-01" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CustomDomainPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Cdn/profiles/endpoints/customDomains" + }, + "profiles_endpoints_origins_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "origins" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-06-01" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/OriginPropertiesParameters" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Cdn/profiles/endpoints/origins" + }, + "Sku": { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard", + "Premium" + ] + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Name of the pricing tier. Possible values include: 'Standard', 'Premium'" + } + }, + "description": "The SKU (pricing tier) of the CDN profile." + } + } +} diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/CDN/2015-06-01/cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/CDN/2015-06-01/cdn.json new file mode 100644 index 0000000000000..8a00c578c25b6 --- /dev/null +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/CDN/2015-06-01/cdn.json @@ -0,0 +1,2471 @@ +{ + "swagger": "2.0", + "info": { + "version": "2015-06-01", + "title": "CdnManagementClient", + "description": "Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. For more information, see Authenticating Azure Resource Manager requests." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles": { + "get": { + "tags": [ + "Profiles" + ], + "summary": "Lists the CDN profiles within an Azure subscitption.", + "operationId": "Profiles_ListBySubscriptionId", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProfileListResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles": { + "get": { + "tags": [ + "Profiles" + ], + "summary": "Lists the CDN profiles within a resource group.", + "operationId": "Profiles_ListByResourceGroup", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProfileListResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}": { + "get": { + "tags": [ + "Profiles" + ], + "summary": "Gets a CDN profile with the specified parameters.", + "operationId": "Profiles_Get", + "parameters": [ + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Profile" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Profiles" + ], + "summary": "Creates a new CDN profile with the specified parameters.", + "operationId": "Profiles_Create", + "parameters": [ + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "profileProperties", + "in": "body", + "description": "Profile properties needed for creation.", + "required": true, + "schema": { + "$ref": "#/definitions/ProfileCreateParameters" + } + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Profile" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Profile" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Profile" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Profiles" + ], + "summary": "Updates an existing CDN profile with the specified parameters.", + "operationId": "Profiles_Update", + "parameters": [ + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "profileProperties", + "in": "body", + "description": "Profile properties needed for update.", + "required": true, + "schema": { + "$ref": "#/definitions/ProfileUpdateParameters" + } + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Profile" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Profile" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Profiles" + ], + "summary": "Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all subresources including endpoints, origins and custom domains.", + "operationId": "Profiles_DeleteIfExists", + "parameters": [ + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously." + }, + "204": { + "description": "No Content." + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri": { + "post": { + "tags": [ + "Profiles" + ], + "summary": "Generates a dynamic SSO URI used to sign in to the CDN Supplemental Portal used for advanced management tasks, such as Country Filtering, Advanced HTTP Reports, and Real-time Stats and Alerts. The SSO URI changes approximately every 10 minutes.", + "operationId": "Profiles_GenerateSsoUri", + "parameters": [ + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SsoUri" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints": { + "get": { + "tags": [ + "Endpoints" + ], + "summary": "Lists existing CDN endpoints within a profile.", + "operationId": "Endpoints_ListByProfile", + "parameters": [ + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/EndpointListResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}": { + "get": { + "tags": [ + "Endpoints" + ], + "summary": "Gets an existing CDN endpoint with the specified parameters.", + "operationId": "Endpoints_Get", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Endpoints" + ], + "summary": "Creates a new CDN endpoint with the specified parameters.", + "operationId": "Endpoints_Create", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "endpointProperties", + "in": "body", + "description": "Endpoint properties", + "required": true, + "schema": { + "$ref": "#/definitions/EndpointCreateParameters" + } + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Endpoints" + ], + "summary": "Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.", + "operationId": "Endpoints_Update", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "endpointProperties", + "in": "body", + "description": "Endpoint properties", + "required": true, + "schema": { + "$ref": "#/definitions/EndpointUpdateParameters" + } + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "default": { + "description": "CDN error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Endpoints" + ], + "summary": "Deletes an existing CDN endpoint with the specified parameters.", + "operationId": "Endpoints_DeleteIfExists", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "204": { + "description": "No Content" + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start": { + "post": { + "tags": [ + "Endpoints" + ], + "summary": "Starts an existing stopped CDN endpoint.", + "operationId": "Endpoints_Start", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop": { + "post": { + "tags": [ + "Endpoints" + ], + "summary": "Stops an existing running CDN endpoint.", + "operationId": "Endpoints_Stop", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Endpoint" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge": { + "post": { + "tags": [ + "Endpoints" + ], + "summary": "Forcibly purges CDN endpoint content.", + "operationId": "Endpoints_PurgeContent", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "contentFilePaths", + "in": "body", + "description": "The path to the content to be purged. Path can describe a file or directory.", + "required": true, + "schema": { + "$ref": "#/definitions/PurgeParameters" + } + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously." + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load": { + "post": { + "tags": [ + "Endpoints" + ], + "summary": "Forcibly pre-loads CDN endpoint content.", + "operationId": "Endpoints_LoadContent", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "contentFilePaths", + "in": "body", + "description": "The path to the content to be loaded. Path should describe a file.", + "required": true, + "schema": { + "$ref": "#/definitions/LoadParameters" + } + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously." + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain": { + "post": { + "tags": [ + "Endpoints" + ], + "summary": "Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.", + "operationId": "Endpoints_ValidateCustomDomain", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "customDomainProperties", + "in": "body", + "description": "Custom domain to validate.", + "required": true, + "schema": { + "$ref": "#/definitions/ValidateCustomDomainInput" + } + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ValidateCustomDomainOutput" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins": { + "get": { + "tags": [ + "Origins" + ], + "summary": "Lists the existing CDN origins within an endpoint.", + "operationId": "Origins_ListByEndpoint", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/OriginListResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}": { + "get": { + "tags": [ + "Origins" + ], + "summary": "Gets an existing CDN origin within an endpoint.", + "operationId": "Origins_Get", + "parameters": [ + { + "name": "originName", + "in": "path", + "description": "Name of the origin, an arbitrary value but it needs to be unique under endpoint", + "required": true, + "type": "string" + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Origin" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Origins" + ], + "summary": "Creates a new CDN origin within an endpoint.", + "operationId": "Origins_Create", + "parameters": [ + { + "name": "originName", + "in": "path", + "description": "Name of the origin, an arbitrary value but it needs to be unique under endpoint", + "required": true, + "type": "string" + }, + { + "name": "originProperties", + "in": "body", + "description": "Origin properties", + "required": true, + "schema": { + "$ref": "#/definitions/OriginParameters" + } + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Origin" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Origin" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Origin" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Origins" + ], + "summary": "Updates an existing CDN origin within an endpoint.", + "operationId": "Origins_Update", + "parameters": [ + { + "name": "originName", + "in": "path", + "description": "Name of the origin. Must be unique within endpoint.", + "required": true, + "type": "string" + }, + { + "name": "originProperties", + "in": "body", + "description": "Origin properties", + "required": true, + "schema": { + "$ref": "#/definitions/OriginParameters" + } + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Origin" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Origin" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Origins" + ], + "summary": "Deletes an existing CDN origin within an endpoint.", + "operationId": "Origins_DeleteIfExists", + "parameters": [ + { + "name": "originName", + "in": "path", + "description": "Name of the origin. Must be unique within endpoint.", + "required": true, + "type": "string" + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Origin" + } + }, + "204": { + "description": "No Content" + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains": { + "get": { + "tags": [ + "CustomDomains" + ], + "summary": "Lists the existing CDN custom domains within an endpoint.", + "operationId": "CustomDomains_ListByEndpoint", + "parameters": [ + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CustomDomainListResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}": { + "get": { + "tags": [ + "CustomDomains" + ], + "summary": "Gets an existing CDN custom domain within an endpoint.", + "operationId": "CustomDomains_Get", + "parameters": [ + { + "name": "customDomainName", + "in": "path", + "description": "Name of the custom domain within an endpoint.", + "required": true, + "type": "string" + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CustomDomain" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "CustomDomains" + ], + "summary": "Creates a new CDN custom domain within an endpoint.", + "operationId": "CustomDomains_Create", + "parameters": [ + { + "name": "customDomainName", + "in": "path", + "description": "Name of the custom domain within an endpoint.", + "required": true, + "type": "string" + }, + { + "name": "customDomainProperties", + "in": "body", + "description": "Custom domain properties required for creation.", + "required": true, + "schema": { + "$ref": "#/definitions/CustomDomainParameters" + } + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CustomDomain" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/CustomDomain" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/CustomDomain" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "CustomDomains" + ], + "summary": "Updates an existing CDN custom domain within an endpoint.", + "operationId": "CustomDomains_Update", + "parameters": [ + { + "name": "customDomainName", + "in": "path", + "description": "Name of the custom domain within an endpoint.", + "required": true, + "type": "string" + }, + { + "name": "customDomainProperties", + "in": "body", + "description": "Custom domain properties to update.", + "required": true, + "schema": { + "$ref": "#/definitions/CustomDomainParameters" + } + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "CustomDomains" + ], + "summary": "Deletes an existing CDN custom domain within an endpoint.", + "operationId": "CustomDomains_DeleteIfExists", + "parameters": [ + { + "name": "customDomainName", + "in": "path", + "description": "Name of the custom domain within an endpoint.", + "required": true, + "type": "string" + }, + { + "name": "endpointName", + "in": "path", + "description": "Name of the endpoint within the CDN profile.", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile within the resource group.", + "required": true, + "type": "string" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group within the Azure subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/CustomDomain" + } + }, + "204": { + "description": "No Content" + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/providers/Microsoft.Cdn/checkNameAvailability": { + "post": { + "tags": [ + "CheckNameAvailability" + ], + "summary": "Check the availability of a resource name without creating the resource. This is needed for resources where name is globally unique, such as a CDN endpoint.", + "operationId": "NameAvailability_CheckNameAvailability", + "parameters": [ + { + "name": "checkNameAvailabilityInput", + "in": "body", + "description": "Input to check.", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityInput" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityOutput" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Cdn/operations": { + "get": { + "tags": [ + "Operations" + ], + "summary": "Lists all of the available CDN REST API operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "Profile": { + "description": "CDN profile represents the top level resource and the entry point into the CDN API. This allows users to set up a logical grouping of endpoints in addition to creating shared configuration settings and selecting pricing tiers and providers.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ProfileProperties" + } + } + }, + "ProfileProperties": { + "properties": { + "sku": { + "description": "The SKU (pricing tier) of the CDN profile.", + "$ref": "#/definitions/Sku" + }, + "resourceState": { + "description": "Resource status of the profile.", + "readOnly": true, + "enum": [ + "Creating", + "Active", + "Deleting", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ProfileResourceState", + "modelAsString": false + } + }, + "provisioningState": { + "description": "Provisioning status of the profile.", + "$ref": "#/definitions/ProvisioningState" + } + } + }, + "ProfileListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Profile" + }, + "description": "List of CDN profiles within a resource group." + } + } + }, + "ProfileCreateParameters": { + "type": "object", + "description": "Profile properties required for profile creation.", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Profile location", + "type": "string" + }, + "tags": { + "description": "Profile tags", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ProfilePropertiesCreateParameters" + } + }, + "x-ms-azure-resource": true + }, + "ProfilePropertiesCreateParameters": { + "required": [ + "sku" + ], + "properties": { + "sku": { + "description": "Profile SKU", + "$ref": "#/definitions/Sku" + } + } + }, + "ProfileUpdateParameters": { + "type": "object", + "description": "Profile properties required for profile update.", + "required": [ + "tags" + ], + "properties": { + "tags": { + "description": "Profile tags", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "x-ms-azure-resource": true + }, + "SsoUri": { + "description": "SSO URI required to login to third party web portal.", + "type": "object", + "properties": { + "ssoUriValue": { + "description": "The URI used to login to third party web portal.", + "type": "string" + } + } + }, + "Endpoint": { + "description": "CDN endpoint is the entity within a CDN profile containing configuration information regarding caching behaviors and origins. The CDN endpoint is exposed using the URL format .azureedge.net by default, but custom domains can also be created.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/EndpointProperties" + } + } + }, + "EndpointProperties": { + "properties": { + "hostName": { + "description": "The host name of the endpoint {endpointName}.{DNSZone}", + "type": "string", + "readOnly": true + }, + "originHostHeader": { + "description": "The host header the CDN provider will send along with content requests to origins. The default value is the host name of the origin.", + "type": "string" + }, + "originPath": { + "description": "The path used for origin requests.", + "type": "string" + }, + "contentTypesToCompress": { + "description": "List of content types on which compression will be applied. The value for the elements should be a valid MIME type.", + "type": "array", + "items": { + "type": "string" + } + }, + "isCompressionEnabled": { + "description": "Indicates whether the compression is enabled. Default value is false. If compression is enabled, the content transferred from cdn endpoint to end user will be compressed. The requested content must be larger than 1 byte and smaller than 1 MB.", + "type": "boolean" + }, + "isHttpAllowed": { + "description": "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + "type": "boolean" + }, + "isHttpsAllowed": { + "description": "Indicates whether https traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + "type": "boolean" + }, + "queryStringCachingBehavior": { + "description": "Defines the query string caching behavior.", + "$ref": "#/definitions/QueryStringCachingBehavior" + }, + "origins": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/DeepCreatedOrigin" + } + }, + "resourceState": { + "description": "Resource status of the endpoint.", + "readOnly": true, + "enum": [ + "Creating", + "Deleting", + "Running", + "Starting", + "Stopped", + "Stopping" + ], + "type": "string", + "x-ms-enum": { + "name": "EndpointResourceState", + "modelAsString": false + } + }, + "provisioningState": { + "description": "Provisioning status of the endpoint.", + "$ref": "#/definitions/ProvisioningState" + } + } + }, + "EndpointListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Endpoint" + }, + "description": "List of CDN endpoints within a profile" + } + } + }, + "EndpointCreateParameters": { + "type": "object", + "description": "Endpoint properties required for new endpoint creation.", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Endpoint location", + "type": "string" + }, + "tags": { + "description": "Endpoint tags", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/EndpointPropertiesCreateParameters" + } + }, + "x-ms-azure-resource": true + }, + "EndpointUpdateParameters": { + "type": "object", + "description": "Endpoint properties required for new endpoint creation.", + "properties": { + "tags": { + "description": "Endpoint tags", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/EndpointPropertiesUpdateParameters" + } + }, + "x-ms-azure-resource": true + }, + "EndpointPropertiesCreateParameters": { + "required": [ + "origins" + ], + "properties": { + "originHostHeader": { + "description": "The host header CDN provider will send along with content requests to origins. The default value is the host name of the origin.", + "type": "string" + }, + "originPath": { + "description": "The path used for origin requests.", + "type": "string" + }, + "contentTypesToCompress": { + "description": "List of content types on which compression will be applied. The value for the elements should be a valid MIME type.", + "type": "array", + "items": { + "type": "string" + } + }, + "isCompressionEnabled": { + "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.", + "type": "boolean" + }, + "isHttpAllowed": { + "description": "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + "type": "boolean" + }, + "isHttpsAllowed": { + "description": "Indicates whether https traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + "type": "boolean" + }, + "queryStringCachingBehavior": { + "description": "Defines the query string caching behavior.", + "$ref": "#/definitions/QueryStringCachingBehavior" + }, + "origins": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/DeepCreatedOrigin" + } + } + } + }, + "EndpointPropertiesUpdateParameters": { + "properties": { + "originHostHeader": { + "description": "The host header the CDN provider will send along with content requests to origins. The default value is the host name of the origin.", + "type": "string" + }, + "originPath": { + "description": "The path used for origin requests.", + "type": "string" + }, + "contentTypesToCompress": { + "description": "List of content types on which compression will be applied. The value for the elements should be a valid MIME type.", + "type": "array", + "items": { + "type": "string" + } + }, + "isCompressionEnabled": { + "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.", + "type": "boolean" + }, + "isHttpAllowed": { + "description": "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + "type": "boolean" + }, + "isHttpsAllowed": { + "description": "Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + "type": "boolean" + }, + "queryStringCachingBehavior": { + "description": "Defines the query string caching behavior", + "$ref": "#/definitions/QueryStringCachingBehavior" + } + } + }, + "DeepCreatedOrigin": { + "description": "Deep created origins within a CDN endpoint.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Origin name", + "type": "string" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DeepCreatedOriginProperties" + } + }, + "x-ms-azure-resource": true + }, + "DeepCreatedOriginProperties": { + "description": "Properties of deep created origin on a CDN endpoint.", + "type": "object", + "required": [ + "hostName" + ], + "properties": { + "hostName": { + "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.", + "type": "string" + }, + "httpPort": { + "description": "The value of the HTTP port. Must be between 1 and 65535", + "type": "integer" + }, + "httpsPort": { + "description": "The value of the HTTPS port. Must be between 1 and 65535", + "type": "integer" + } + }, + "x-ms-azure-resource": true + }, + "PurgeParameters": { + "type": "object", + "description": "Parameters required for endpoint purge.", + "required": [ + "contentPaths" + ], + "properties": { + "contentPaths": { + "description": "The path to the content to be purged. Can describe a file path or a wild card directory.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "LoadParameters": { + "type": "object", + "description": "Parameters required for endpoint load.", + "required": [ + "contentPaths" + ], + "properties": { + "contentPaths": { + "description": "The path to the content to be loaded. Should describe a file path.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Origin": { + "description": "CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/OriginProperties" + } + } + }, + "OriginProperties": { + "required": [ + "hostName" + ], + "properties": { + "hostName": { + "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.", + "type": "string" + }, + "httpPort": { + "description": "The value of the HTTP port. Must be between 1 and 65535.", + "type": "integer" + }, + "httpsPort": { + "description": "The value of the https port. Must be between 1 and 65535.", + "type": "integer" + }, + "resourceState": { + "description": "Resource status of the origin.", + "readOnly": true, + "enum": [ + "Creating", + "Active", + "Deleting" + ], + "type": "string", + "x-ms-enum": { + "name": "OriginResourceState", + "modelAsString": false + } + }, + "provisioningState": { + "description": "Provisioning status of the origin.", + "$ref": "#/definitions/ProvisioningState" + } + } + }, + "OriginParameters": { + "type": "object", + "description": "Origin properties needed for origin creation or update.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/OriginPropertiesParameters" + } + }, + "x-ms-azure-resource": true + }, + "OriginPropertiesParameters": { + "required": [ + "hostName" + ], + "properties": { + "hostName": { + "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.", + "type": "string" + }, + "httpPort": { + "description": "The value of the HTTP port. Must be between 1 and 65535.", + "type": "integer" + }, + "httpsPort": { + "description": "The value of the HTTPS port. Must be between 1 and 65535.", + "type": "integer" + } + } + }, + "OriginListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Origin" + }, + "description": "List of CDN origins within an endpoint" + } + } + }, + "CustomDomain": { + "description": "CDN CustomDomain represents a mapping between a user specified domain name and a CDN endpoint. This is to use custom domain names to represent the URLs for branding purposes.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/CustomDomainProperties" + } + } + }, + "CustomDomainProperties": { + "required": [ + "hostName" + ], + "properties": { + "hostName": { + "description": "The host name of the custom domain. Must be a domain name.", + "type": "string" + }, + "resourceState": { + "description": "Resource status of the custom domain.", + "readOnly": true, + "enum": [ + "Creating", + "Active", + "Deleting" + ], + "type": "string", + "x-ms-enum": { + "name": "CustomDomainResourceState", + "modelAsString": false + } + }, + "provisioningState": { + "description": "Provisioning status of the custom domain.", + "$ref": "#/definitions/ProvisioningState" + } + } + }, + "CustomDomainParameters": { + "description": "CustomDomain properties required for custom domain creation or update.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/CustomDomainPropertiesParameters" + } + }, + "x-ms-azure-resource": true + }, + "CustomDomainPropertiesParameters": { + "required": [ + "hostName" + ], + "properties": { + "hostName": { + "description": "The host name of the custom domain. Must be a domain name.", + "type": "string" + } + } + }, + "CustomDomainListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/CustomDomain" + }, + "description": "List of CDN CustomDomains within an endpoint." + } + } + }, + "ValidateCustomDomainInput": { + "description": "Input of the custom domain to be validated.", + "type": "object", + "required": [ + "hostName" + ], + "properties": { + "hostName": { + "description": "The host name of the custom domain. Must be a domain name.", + "type": "string" + } + } + }, + "ValidateCustomDomainOutput": { + "description": "Output of custom domain validation.", + "type": "object", + "properties": { + "customDomainValidated": { + "description": "Indicates whether the custom domain is validated or not.", + "type": "boolean" + }, + "reason": { + "description": "The reason why the custom domain is not valid.", + "type": "string" + }, + "message": { + "description": "The message describing why the custom domain is not valid.", + "type": "string" + } + } + }, + "CheckNameAvailabilityInput": { + "description": "Input of CheckNameAvailability API.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "description": "The resource name to validate.", + "type": "string" + }, + "type": { + "description": "The type of the resource whose name is to be validated.", + "$ref": "#/definitions/ResourceType" + } + } + }, + "CheckNameAvailabilityOutput": { + "description": "Output of check name availability API.", + "type": "object", + "properties": { + "NameAvailable": { + "description": "Indicates whether the name is available.", + "type": "boolean" + }, + "Reason": { + "description": "The reason why the name is not available.", + "type": "string" + }, + "Message": { + "description": "The detailed error message describing why the name is not available.", + "type": "string" + } + } + }, + "ResourceType": { + "description": "Type of CDN resource used in CheckNameAvailability.", + "readOnly": true, + "enum": [ + "Microsoft.Cdn/Profiles/Endpoints" + ], + "type": "string", + "x-ms-enum": { + "name": "ResourceType", + "modelAsString": false + } + }, + "Operation": { + "description": "CDN REST API operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "properties": { + "provider": { + "description": "Service provider: Microsoft.Cdn", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: Profile, endpoint, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of CDN operations supported by the CDN resource provider." + } + } + }, + "TrackedResource": { + "description": "ARM tracked resource", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "required": [ + "location", + "tags" + ], + "properties": { + "location": { + "description": "Resource location", + "type": "string" + }, + "tags": { + "description": "Resource tags", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Resource": { + "properties": { + "id": { + "description": "Resource ID", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Resource name", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type", + "readOnly": true, + "type": "string" + } + }, + "x-ms-azure-resource": true + }, + "ProvisioningState": { + "description": "Provisioning status of the resource.", + "readOnly": true, + "enum": [ + "Creating", + "Succeeded", + "Failed" + ], + "type": "string", + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": false + } + }, + "QueryStringCachingBehavior": { + "description": "Defines the query string caching behavior.", + "enum": [ + "IgnoreQueryString", + "BypassCaching", + "UseQueryString", + "NotSet" + ], + "type": "string", + "x-ms-enum": { + "name": "QueryStringCachingBehavior", + "modelAsString": false + } + }, + "Sku": { + "description": "The SKU (pricing tier) of the CDN profile.", + "type": "object", + "properties": { + "name": { + "description": "Name of the pricing tier", + "enum": [ + "Standard", + "Premium" + ], + "type": "string", + "x-ms-enum": { + "name": "SkuName", + "modelAsString": false + } + } + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + } + }, + "parameters": { + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. Current version is 2015-06-01" + } + } +} \ No newline at end of file