diff --git a/sdk/cdn/arm-cdn/LICENSE.txt b/sdk/cdn/arm-cdn/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/cdn/arm-cdn/LICENSE.txt +++ b/sdk/cdn/arm-cdn/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cdn/arm-cdn/README.md b/sdk/cdn/arm-cdn/README.md index 405a439062b5..403572708c34 100644 --- a/sdk/cdn/arm-cdn/README.md +++ b/sdk/cdn/arm-cdn/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-cdn ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -95,5 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcdn%2Farm-cdn%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/cdn/arm-cdn/README.png) diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json index c5945226f8ba..2ea143f8776f 100644 --- a/sdk/cdn/arm-cdn/package.json +++ b/sdk/cdn/arm-cdn/package.json @@ -4,9 +4,9 @@ "description": "CdnManagementClient Library with typescript type definitions for node.js and browser.", "version": "4.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.6.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/cdnManagementClient.js", "types": "./esm/cdnManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/cdn/arm-cdn", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cdn/arm-cdn", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/cdn/arm-cdn/rollup.config.js b/sdk/cdn/arm-cdn/rollup.config.js index 98d4b544f35f..66576ced5732 100644 --- a/sdk/cdn/arm-cdn/rollup.config.js +++ b/sdk/cdn/arm-cdn/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts index b57e0c53f2be..bc4e5e9d61fc 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts @@ -44,7 +44,7 @@ export class CdnManagementClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2017-10-12'; + this.apiVersion = '2019-04-15'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts index 3bd827402303..66df7864bff4 100644 --- a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts @@ -10,9 +10,11 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, CdnCertificateSourceParameters, CdnManagedHttpsParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, CustomDomainHttpsParameters, CustomDomainListResult, @@ -21,8 +23,23 @@ export { DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -30,17 +47,33 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, KeyVaultCertificateSourceParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, UserManagedHttpsParameters } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts b/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts index 59b6f89e96de..3505f75a3bd5 100644 --- a/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts @@ -10,14 +10,34 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnManagedHttpsParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, EdgenodeResult, @@ -26,15 +46,33 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UserManagedHttpsParameters } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts b/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts index 547872122332..12948f80741a 100644 --- a/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts @@ -10,14 +10,34 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnManagedHttpsParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -26,21 +46,39 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, LoadParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, PurgeParameters, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, ResourceUsage, ResourceUsageListResult, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UserManagedHttpsParameters, ValidateCustomDomainInput, ValidateCustomDomainOutput } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/index.ts b/sdk/cdn/arm-cdn/src/models/index.ts index 951ca9b6e44c..e174d78597d3 100644 --- a/sdk/cdn/arm-cdn/src/models/index.ts +++ b/sdk/cdn/arm-cdn/src/models/index.ts @@ -17,7 +17,8 @@ export { BaseResource, CloudError }; export interface Sku { /** * Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', - * 'Custom_Verizon', 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + * 'Custom_Verizon', 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', + * 'Premium_ChinaCdn' */ name?: SkuName; } @@ -241,10 +242,25 @@ export interface GeoFilter { countryCodes: string[]; } +/** + * Contains the possible cases for DeliveryRuleCondition. + */ +export type DeliveryRuleConditionUnion = DeliveryRuleCondition | DeliveryRuleRemoteAddressCondition | DeliveryRuleRequestMethodCondition | DeliveryRuleQueryStringCondition | DeliveryRulePostArgsCondition | DeliveryRuleRequestUriCondition | DeliveryRuleRequestHeaderCondition | DeliveryRuleRequestBodyCondition | DeliveryRuleRequestSchemeCondition | DeliveryRuleUrlPathCondition | DeliveryRuleUrlFileExtensionCondition | DeliveryRuleUrlFileNameCondition | DeliveryRuleHttpVersionCondition | DeliveryRuleCookiesCondition | DeliveryRuleIsDeviceCondition; + +/** + * A condition for the delivery rule. + */ +export interface DeliveryRuleCondition { + /** + * Polymorphic Discriminator + */ + name: "DeliveryRuleCondition"; +} + /** * Contains the possible cases for DeliveryRuleAction. */ -export type DeliveryRuleActionUnion = DeliveryRuleAction | DeliveryRuleCacheExpirationAction; +export type DeliveryRuleActionUnion = DeliveryRuleAction | UrlRedirectAction | UrlRewriteAction | DeliveryRuleRequestHeaderAction | DeliveryRuleResponseHeaderAction | DeliveryRuleCacheExpirationAction | DeliveryRuleCacheKeyQueryStringAction; /** * An action for the delivery rule. @@ -257,176 +273,744 @@ export interface DeliveryRuleAction { } /** - * Contains the possible cases for DeliveryRuleCondition. + * A rule that specifies a set of actions and conditions */ -export type DeliveryRuleConditionUnion = DeliveryRuleCondition | DeliveryRuleUrlPathCondition | DeliveryRuleUrlFileExtensionCondition; +export interface DeliveryRule { + /** + * Name of the rule + */ + name?: string; + /** + * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A + * rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 + * is a special rule. It does not require any condition and actions listed in it will always be + * applied. + */ + order: number; + /** + * A list of conditions that must be matched for the actions to be executed + */ + conditions?: DeliveryRuleConditionUnion[]; + /** + * A list of actions that are executed when all the conditions of a rule are satisfied. + */ + actions: DeliveryRuleActionUnion[]; +} /** - * A condition for the delivery rule. + * A policy that specifies the delivery rules to be used for an endpoint. */ -export interface DeliveryRuleCondition { +export interface EndpointPropertiesUpdateParametersDeliveryPolicy { + /** + * User-friendly description of the policy. + */ + description?: string; + /** + * A list of the delivery rules. + */ + rules: DeliveryRule[]; +} + +/** + * Properties required to create or update an endpoint. + */ +export interface EndpointUpdateParameters extends BaseResource { + /** + * Endpoint tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The host header value sent to the origin with each request. If you leave this blank, the + * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + * Cloud Services require this host header value to match the origin hostname by default. + */ + originHostHeader?: string; + /** + * A directory path on the origin that CDN can use to retrieve content from, e.g. + * contoso.cloudapp.net/originpath. + */ + originPath?: string; + /** + * List of content types on which compression applies. The value should be a valid MIME type. + */ + contentTypesToCompress?: string[]; + /** + * Indicates whether content compression is enabled on CDN. Default value is false. If + * compression is enabled, content will be served as compressed if user requests for a compressed + * version. Content won't be compressed on CDN when requested content is smaller than 1 byte or + * larger than 1 MB. + */ + isCompressionEnabled?: boolean; + /** + * Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one + * protocol (HTTP or HTTPS) must be allowed. + */ + isHttpAllowed?: boolean; + /** + * Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least + * one protocol (HTTP or HTTPS) must be allowed. + */ + isHttpsAllowed?: boolean; + /** + * Defines how CDN caches requests that include query strings. You can ignore any query strings + * when caching, bypass caching to prevent requests that contain query strings from being cached, + * or cache every request with a unique URL. Possible values include: 'IgnoreQueryString', + * 'BypassCaching', 'UseQueryString', 'NotSet' + */ + queryStringCachingBehavior?: QueryStringCachingBehavior; + /** + * Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, + * Media services. With this information, CDN can apply scenario driven optimization. Possible + * values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', 'VideoOnDemandMediaStreaming', + * 'LargeFileDownload', 'DynamicSiteAcceleration' + */ + optimizationType?: OptimizationType; + /** + * Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and + * calculate the most optimal routes for the CDN. This is relative to the origin path. + */ + probePath?: string; + /** + * List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an + * access rule to a specified path or content, e.g. block APAC for path /pictures/ + */ + geoFilters?: GeoFilter[]; + /** + * A policy that specifies the delivery rules to be used for an endpoint. + */ + deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; +} + +/** + * Defines the parameters for RemoteAddress match conditions + */ +export interface RemoteAddressMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch' + */ + operator: RemoteAddressOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * Match values to match against. The operator will apply to each value in here with OR + * semantics. If any of them match the variable with the given operator this match condition is + * considered a match. + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RemoteAddress condition for the delivery rule. + */ +export interface DeliveryRuleRemoteAddressCondition { /** * Polymorphic Discriminator */ - name: "DeliveryRuleCondition"; + name: "RemoteAddress"; + /** + * Defines the parameters for the condition. + */ + parameters: RemoteAddressMatchConditionParameters; } /** - * A rule that specifies a set of actions and conditions + * Defines the parameters for RequestMethod match conditions + */ +export interface RequestMethodMatchConditionParameters { + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; +} + +/** + * Defines the RequestMethod condition for the delivery rule. + */ +export interface DeliveryRuleRequestMethodCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestMethod"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestMethodMatchConditionParameters; +} + +/** + * Defines the parameters for QueryString match conditions + */ +export interface QueryStringMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: QueryStringOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the QueryString condition for the delivery rule. + */ +export interface DeliveryRuleQueryStringCondition { + /** + * Polymorphic Discriminator + */ + name: "QueryString"; + /** + * Defines the parameters for the condition. + */ + parameters: QueryStringMatchConditionParameters; +} + +/** + * Defines the parameters for PostArgs match conditions + */ +export interface PostArgsMatchConditionParameters { + /** + * Name of PostArg to be matched + */ + selector: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: PostArgsOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the PostArgs condition for the delivery rule. + */ +export interface DeliveryRulePostArgsCondition { + /** + * Polymorphic Discriminator + */ + name: "PostArgs"; + /** + * Defines the parameters for the condition. + */ + parameters: PostArgsMatchConditionParameters; +} + +/** + * Defines the parameters for RequestUri match conditions + */ +export interface RequestUriMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: RequestUriOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RequestUri condition for the delivery rule. + */ +export interface DeliveryRuleRequestUriCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestUri"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestUriMatchConditionParameters; +} + +/** + * Defines the parameters for RequestHeader match conditions + */ +export interface RequestHeaderMatchConditionParameters { + /** + * Name of Header to be matched + */ + selector: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: RequestHeaderOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RequestHeader condition for the delivery rule. + */ +export interface DeliveryRuleRequestHeaderCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestHeader"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestHeaderMatchConditionParameters; +} + +/** + * Defines the parameters for RequestBody match conditions + */ +export interface RequestBodyMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: RequestBodyOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RequestBody condition for the delivery rule. + */ +export interface DeliveryRuleRequestBodyCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestBody"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestBodyMatchConditionParameters; +} + +/** + * Defines the parameters for RequestScheme match conditions + */ +export interface RequestSchemeMatchConditionParameters { + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; +} + +/** + * Defines the RequestScheme condition for the delivery rule. + */ +export interface DeliveryRuleRequestSchemeCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestScheme"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestSchemeMatchConditionParameters; +} + +/** + * Defines the parameters for UrlPath match conditions + */ +export interface UrlPathMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'Wildcard' + */ + operator: UrlPathOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the UrlPath condition for the delivery rule. + */ +export interface DeliveryRuleUrlPathCondition { + /** + * Polymorphic Discriminator + */ + name: "UrlPath"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlPathMatchConditionParameters; +} + +/** + * Defines the parameters for UrlFileExtension match conditions + */ +export interface UrlFileExtensionMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: UrlFileExtensionOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the UrlFileExtension condition for the delivery rule. + */ +export interface DeliveryRuleUrlFileExtensionCondition { + /** + * Polymorphic Discriminator + */ + name: "UrlFileExtension"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlFileExtensionMatchConditionParameters; +} + +/** + * Defines the parameters for UrlFilename match conditions + */ +export interface UrlFileNameMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: UrlFileNameOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the UrlFileName condition for the delivery rule. + */ +export interface DeliveryRuleUrlFileNameCondition { + /** + * Polymorphic Discriminator + */ + name: "UrlFileName"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlFileNameMatchConditionParameters; +} + +/** + * Defines the parameters for HttpVersion match conditions + */ +export interface HttpVersionMatchConditionParameters { + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; +} + +/** + * Defines the HttpVersion condition for the delivery rule. + */ +export interface DeliveryRuleHttpVersionCondition { + /** + * Polymorphic Discriminator + */ + name: "HttpVersion"; + /** + * Defines the parameters for the condition. + */ + parameters: HttpVersionMatchConditionParameters; +} + +/** + * Defines the parameters for Cookies match conditions + */ +export interface CookiesMatchConditionParameters { + /** + * Name of Cookies to be matched + */ + selector: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: CookiesOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the Cookies condition for the delivery rule. + */ +export interface DeliveryRuleCookiesCondition { + /** + * Polymorphic Discriminator + */ + name: "Cookies"; + /** + * Defines the parameters for the condition. + */ + parameters: CookiesMatchConditionParameters; +} + +/** + * Defines the parameters for IsDevice match conditions */ -export interface DeliveryRule { +export interface IsDeviceMatchConditionParameters { /** - * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A - * rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 - * is a special rule. It does not require any condition and actions listed in it will always be - * applied. + * Describes if this is negate condition or not */ - order: number; + negateCondition?: boolean; /** - * A list of actions that are executed when all the conditions of a rule are satisfied. + * The match value for the condition of the delivery rule */ - actions: DeliveryRuleActionUnion[]; + matchValues: string[]; /** - * A list of conditions that must be matched for the actions to be executed + * List of transforms */ - conditions?: DeliveryRuleConditionUnion[]; + transforms?: Transform[]; } /** - * A policy that specifies the delivery rules to be used for an endpoint. + * Defines the IsDevice condition for the delivery rule. */ -export interface EndpointPropertiesUpdateParametersDeliveryPolicy { +export interface DeliveryRuleIsDeviceCondition { /** - * User-friendly description of the policy. + * Polymorphic Discriminator */ - description?: string; + name: "IsDevice"; /** - * A list of the delivery rules. + * Defines the parameters for the condition. */ - rules: DeliveryRule[]; + parameters: IsDeviceMatchConditionParameters; } /** - * Properties required to create or update an endpoint. + * Defines the parameters for the url redirect action. */ -export interface EndpointUpdateParameters extends BaseResource { - /** - * Endpoint tags. - */ - tags?: { [propertyName: string]: string }; +export interface UrlRedirectActionParameters { /** - * The host header value sent to the origin with each request. If you leave this blank, the - * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and - * Cloud Services require this host header value to match the origin hostname by default. + * The redirect type the rule will use when redirecting traffic. Possible values include: + * 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' */ - originHostHeader?: string; + redirectType: RedirectType; /** - * A directory path on the origin that CDN can use to retrieve content from, e.g. - * contoso.cloudapp.net/originpath. + * Protocol to use for the redirect. The default value is MatchRequest. Possible values include: + * 'MatchRequest', 'Http', 'Https' */ - originPath?: string; + destinationProtocol?: DestinationProtocol; /** - * List of content types on which compression applies. The value should be a valid MIME type. + * The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the + * incoming path as destination path. */ - contentTypesToCompress?: string[]; + customPath?: string; /** - * Indicates whether content compression is enabled on CDN. Default value is false. If - * compression is enabled, content will be served as compressed if user requests for a compressed - * version. Content won't be compressed on CDN when requested content is smaller than 1 byte or - * larger than 1 MB. + * Host to redirect. Leave empty to use the incoming host as the destination host. */ - isCompressionEnabled?: boolean; + customHostname?: string; /** - * Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one - * protocol (HTTP or HTTPS) must be allowed. + * The set of query strings to be placed in the redirect URL. Setting this value would replace + * any existing query string; leave empty to preserve the incoming query string. Query string + * must be in = format. ? and & will be added automatically so do not include them. */ - isHttpAllowed?: boolean; + customQueryString?: string; /** - * Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least - * one protocol (HTTP or HTTPS) must be allowed. + * Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do + * not include the #. */ - isHttpsAllowed?: boolean; + customFragment?: string; +} + +/** + * Defines the url redirect action for the delivery rule. + */ +export interface UrlRedirectAction { /** - * Defines how CDN caches requests that include query strings. You can ignore any query strings - * when caching, bypass caching to prevent requests that contain query strings from being cached, - * or cache every request with a unique URL. Possible values include: 'IgnoreQueryString', - * 'BypassCaching', 'UseQueryString', 'NotSet' + * Polymorphic Discriminator */ - queryStringCachingBehavior?: QueryStringCachingBehavior; + name: "UrlRedirect"; /** - * Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, - * Media services. With this information, CDN can apply scenario driven optimization. Possible - * values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', 'VideoOnDemandMediaStreaming', - * 'LargeFileDownload', 'DynamicSiteAcceleration' + * Defines the parameters for the action. */ - optimizationType?: OptimizationType; + parameters: UrlRedirectActionParameters; +} + +/** + * Defines the parameters for the url rewrite action. + */ +export interface UrlRewriteActionParameters { /** - * Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and - * calculate the most optimal routes for the CDN. This is relative to the origin path. + * define a request URI pattern that identifies the type of requests that may be rewritten. + * Currently, source pattern uses a prefix-based match. To match all URL paths, use "/" as the + * source pattern value. To match only the root directory and re-write this path, use the origin + * path field */ - probePath?: string; + sourcePattern: string; /** - * List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an - * access rule to a specified path or content, e.g. block APAC for path /pictures/ + * Define the destination path for be used in the rewrite. This will overwrite the source pattern */ - geoFilters?: GeoFilter[]; + destination: string; /** - * A policy that specifies the delivery rules to be used for an endpoint. + * If True, the remaining path after the source pattern will be appended to the new destination + * path. */ - deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + preserveUnmatchedPath?: boolean; } /** - * Defines the parameters for the URL path condition. + * Defines the url rewrite action for the delivery rule. */ -export interface UrlPathConditionParameters { +export interface UrlRewriteAction { /** - * A URL path for the condition of the delivery rule + * Polymorphic Discriminator */ - path: string; + name: "UrlRewrite"; /** - * The match type for the condition of the delivery rule. Possible values include: 'Literal', - * 'Wildcard' + * Defines the parameters for the action. */ - matchType: MatchType; + parameters: UrlRewriteActionParameters; } /** - * Defines the URL path condition for the delivery rule. + * Defines the parameters for the request header action. */ -export interface DeliveryRuleUrlPathCondition { +export interface HeaderActionParameters { /** - * Polymorphic Discriminator + * Action to perform. Possible values include: 'Append', 'Overwrite', 'Delete' */ - name: "UrlPath"; + headerAction: HeaderAction; /** - * Defines the parameters for the condition. + * Name of the header to modify + */ + headerName: string; + /** + * Value for the specified action */ - parameters: UrlPathConditionParameters; + value?: string; } /** - * Defines the parameters for the URL file extension condition. + * Defines the request header action for the delivery rule. */ -export interface UrlFileExtensionConditionParameters { +export interface DeliveryRuleRequestHeaderAction { + /** + * Polymorphic Discriminator + */ + name: "ModifyRequestHeader"; /** - * A list of extensions for the condition of the delivery rule. + * Defines the parameters for the action. */ - extensions: string[]; + parameters: HeaderActionParameters; } /** - * Defines the URL file extension condition for the delivery rule. + * Defines the response header action for the delivery rule. */ -export interface DeliveryRuleUrlFileExtensionCondition { +export interface DeliveryRuleResponseHeaderAction { /** * Polymorphic Discriminator */ - name: "UrlFileExtension"; + name: "ModifyResponseHeader"; /** - * Defines the parameters for the condition. + * Defines the parameters for the action. */ - parameters: UrlFileExtensionConditionParameters; + parameters: HeaderActionParameters; } /** @@ -434,8 +1018,8 @@ export interface DeliveryRuleUrlFileExtensionCondition { */ export interface CacheExpirationActionParameters { /** - * Caching behavior for the requests that include query strings. Possible values include: - * 'BypassCache', 'Override', 'SetIfMissing' + * Caching behavior for the requests. Possible values include: 'BypassCache', 'Override', + * 'SetIfMissing' */ cacheBehavior: CacheBehavior; /** @@ -458,6 +1042,35 @@ export interface DeliveryRuleCacheExpirationAction { parameters: CacheExpirationActionParameters; } +/** + * Defines the parameters for the cache-key query string action. + */ +export interface CacheKeyQueryStringActionParameters { + /** + * Caching behavior for the requests. Possible values include: 'Include', 'IncludeAll', + * 'Exclude', 'ExcludeAll' + */ + queryStringBehavior: QueryStringBehavior; + /** + * query parameters to include or exclude (comma separated). + */ + queryParameters?: string; +} + +/** + * Defines the cache-key query string action for the delivery rule. + */ +export interface DeliveryRuleCacheKeyQueryStringAction { + /** + * Polymorphic Discriminator + */ + name: "CacheKeyQueryString"; + /** + * Defines the parameters for the action. + */ + parameters: CacheKeyQueryStringActionParameters; +} + /** * Parameters required for content purge. */ @@ -526,6 +1139,31 @@ export interface OriginUpdateParameters extends BaseResource { httpsPort?: number; } +/** + * Contains the possible cases for CustomDomainHttpsParameters. + */ +export type CustomDomainHttpsParametersUnion = CustomDomainHttpsParameters | CdnManagedHttpsParameters | UserManagedHttpsParameters; + +/** + * The JSON object that contains the properties to secure a custom domain. + */ +export interface CustomDomainHttpsParameters { + /** + * Polymorphic Discriminator + */ + certificateSource: "CustomDomainHttpsParameters"; + /** + * Defines the TLS extension protocol that is used for secure delivery. Possible values include: + * 'ServerNameIndication', 'IPBased' + */ + protocolType: ProtocolType; + /** + * TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', + * 'TLS12' + */ + minimumTlsVersion?: MinimumTlsVersion; +} + /** * The resource model definition for a ARM proxy resource. It will have everything other than * required location and tags @@ -564,6 +1202,10 @@ export interface CustomDomain extends ProxyResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly customHttpsProvisioningSubstate?: CustomHttpsProvisioningSubstate; + /** + * Certificate parameters for securing custom HTTPS + */ + customHttpsParameters?: CustomDomainHttpsParametersUnion; /** * Special validation or data may be required when delivering CDN to some regions due to local * compliance reasons. E.g. ICP license number of a custom domain is required to deliver content @@ -587,26 +1229,6 @@ export interface CustomDomainParameters { hostName: string; } -/** - * Contains the possible cases for CustomDomainHttpsParameters. - */ -export type CustomDomainHttpsParametersUnion = CustomDomainHttpsParameters | CdnManagedHttpsParameters | UserManagedHttpsParameters; - -/** - * The JSON object that contains the properties to secure a custom domain. - */ -export interface CustomDomainHttpsParameters { - /** - * Polymorphic Discriminator - */ - certificateSource: "CustomDomainHttpsParameters"; - /** - * Defines the TLS extension protocol that is used for secure delivery. Possible values include: - * 'ServerNameIndication', 'IPBased' - */ - protocolType: ProtocolType; -} - /** * Defines the parameters for using CDN managed certificate for securing custom domain. */ @@ -630,6 +1252,11 @@ export interface CdnManagedHttpsParameters { * 'ServerNameIndication', 'IPBased' */ protocolType: ProtocolType; + /** + * TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', + * 'TLS12' + */ + minimumTlsVersion?: MinimumTlsVersion; /** * Defines the certificate source parameters using CDN managed certificate for enabling SSL. */ @@ -675,6 +1302,11 @@ export interface UserManagedHttpsParameters { * 'ServerNameIndication', 'IPBased' */ protocolType: ProtocolType; + /** + * TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', + * 'TLS12' + */ + minimumTlsVersion?: MinimumTlsVersion; /** * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. */ @@ -1027,11 +1659,11 @@ export interface EdgenodeResult extends Array { /** * Defines values for SkuName. * Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', 'Premium_ChinaCdn' * @readonly * @enum {string} */ -export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft'; +export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft' | 'Premium_ChinaCdn'; /** * Defines values for ProfileResourceState. @@ -1074,6 +1706,143 @@ export type QueryStringCachingBehavior = 'IgnoreQueryString' | 'BypassCaching' | */ export type GeoFilterActions = 'Block' | 'Allow'; +/** + * Defines values for RemoteAddressOperator. + * Possible values include: 'Any', 'IPMatch', 'GeoMatch' + * @readonly + * @enum {string} + */ +export type RemoteAddressOperator = 'Any' | 'IPMatch' | 'GeoMatch'; + +/** + * Defines values for Transform. + * Possible values include: 'Lowercase', 'Uppercase' + * @readonly + * @enum {string} + */ +export type Transform = 'Lowercase' | 'Uppercase'; + +/** + * Defines values for QueryStringOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type QueryStringOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for PostArgsOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type PostArgsOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RequestUriOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type RequestUriOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RequestHeaderOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type RequestHeaderOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RequestBodyOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type RequestBodyOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for UrlPathOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'Wildcard' + * @readonly + * @enum {string} + */ +export type UrlPathOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Wildcard'; + +/** + * Defines values for UrlFileExtensionOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type UrlFileExtensionOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for UrlFileNameOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type UrlFileNameOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for CookiesOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type CookiesOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RedirectType. + * Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' + * @readonly + * @enum {string} + */ +export type RedirectType = 'Moved' | 'Found' | 'TemporaryRedirect' | 'PermanentRedirect'; + +/** + * Defines values for DestinationProtocol. + * Possible values include: 'MatchRequest', 'Http', 'Https' + * @readonly + * @enum {string} + */ +export type DestinationProtocol = 'MatchRequest' | 'Http' | 'Https'; + +/** + * Defines values for HeaderAction. + * Possible values include: 'Append', 'Overwrite', 'Delete' + * @readonly + * @enum {string} + */ +export type HeaderAction = 'Append' | 'Overwrite' | 'Delete'; + +/** + * Defines values for CacheBehavior. + * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + * @readonly + * @enum {string} + */ +export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; + +/** + * Defines values for QueryStringBehavior. + * Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + * @readonly + * @enum {string} + */ +export type QueryStringBehavior = 'Include' | 'IncludeAll' | 'Exclude' | 'ExcludeAll'; + /** * Defines values for OriginResourceState. * Possible values include: 'Creating', 'Active', 'Deleting' @@ -1118,6 +1887,14 @@ export type CustomHttpsProvisioningSubstate = 'SubmittingDomainControlValidation */ export type ProtocolType = 'ServerNameIndication' | 'IPBased'; +/** + * Defines values for MinimumTlsVersion. + * Possible values include: 'None', 'TLS10', 'TLS12' + * @readonly + * @enum {string} + */ +export type MinimumTlsVersion = 'None' | 'TLS10' | 'TLS12'; + /** * Defines values for CertificateType. * Possible values include: 'Shared', 'Dedicated' @@ -1134,22 +1911,6 @@ export type CertificateType = 'Shared' | 'Dedicated'; */ export type ResourceType = 'Microsoft.Cdn/Profiles/Endpoints'; -/** - * Defines values for MatchType. - * Possible values include: 'Literal', 'Wildcard' - * @readonly - * @enum {string} - */ -export type MatchType = 'Literal' | 'Wildcard'; - -/** - * Defines values for CacheBehavior. - * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' - * @readonly - * @enum {string} - */ -export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; - /** * Contains response data for the list operation. */ diff --git a/sdk/cdn/arm-cdn/src/models/mappers.ts b/sdk/cdn/arm-cdn/src/models/mappers.ts index 324463c9cddd..366c89a0f2c8 100644 --- a/sdk/cdn/arm-cdn/src/models/mappers.ts +++ b/sdk/cdn/arm-cdn/src/models/mappers.ts @@ -394,16 +394,16 @@ export const GeoFilter: msRest.CompositeMapper = { } }; -export const DeliveryRuleAction: msRest.CompositeMapper = { - serializedName: "DeliveryRuleAction", +export const DeliveryRuleCondition: msRest.CompositeMapper = { + serializedName: "DeliveryRuleCondition", type: { name: "Composite", polymorphicDiscriminator: { serializedName: "name", clientName: "name" }, - uberParent: "DeliveryRuleAction", - className: "DeliveryRuleAction", + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleCondition", modelProperties: { name: { required: true, @@ -416,16 +416,16 @@ export const DeliveryRuleAction: msRest.CompositeMapper = { } }; -export const DeliveryRuleCondition: msRest.CompositeMapper = { - serializedName: "DeliveryRuleCondition", +export const DeliveryRuleAction: msRest.CompositeMapper = { + serializedName: "DeliveryRuleAction", type: { name: "Composite", polymorphicDiscriminator: { serializedName: "name", clientName: "name" }, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleCondition", + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleAction", modelProperties: { name: { required: true, @@ -444,6 +444,12 @@ export const DeliveryRule: msRest.CompositeMapper = { name: "Composite", className: "DeliveryRule", modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, order: { required: true, serializedName: "order", @@ -451,27 +457,27 @@ export const DeliveryRule: msRest.CompositeMapper = { name: "Number" } }, - actions: { - required: true, - serializedName: "actions", + conditions: { + serializedName: "conditions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DeliveryRuleAction" + className: "DeliveryRuleCondition" } } } }, - conditions: { - serializedName: "conditions", + actions: { + required: true, + serializedName: "actions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DeliveryRuleCondition" + className: "DeliveryRuleAction" } } } @@ -529,193 +535,1381 @@ export const EndpointUpdateParameters: msRest.CompositeMapper = { originHostHeader: { serializedName: "properties.originHostHeader", type: { - name: "String" + name: "String" + } + }, + originPath: { + serializedName: "properties.originPath", + type: { + name: "String" + } + }, + contentTypesToCompress: { + serializedName: "properties.contentTypesToCompress", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isCompressionEnabled: { + serializedName: "properties.isCompressionEnabled", + type: { + name: "Boolean" + } + }, + isHttpAllowed: { + serializedName: "properties.isHttpAllowed", + type: { + name: "Boolean" + } + }, + isHttpsAllowed: { + serializedName: "properties.isHttpsAllowed", + type: { + name: "Boolean" + } + }, + queryStringCachingBehavior: { + serializedName: "properties.queryStringCachingBehavior", + type: { + name: "Enum", + allowedValues: [ + "IgnoreQueryString", + "BypassCaching", + "UseQueryString", + "NotSet" + ] + } + }, + optimizationType: { + serializedName: "properties.optimizationType", + type: { + name: "String" + } + }, + probePath: { + serializedName: "properties.probePath", + type: { + name: "String" + } + }, + geoFilters: { + serializedName: "properties.geoFilters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GeoFilter" + } + } + } + }, + deliveryPolicy: { + serializedName: "properties.deliveryPolicy", + type: { + name: "Composite", + className: "EndpointPropertiesUpdateParametersDeliveryPolicy" + } + } + } + } +}; + +export const RemoteAddressMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RemoteAddressMatchConditionParameters", + type: { + name: "Composite", + className: "RemoteAddressMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRemoteAddressCondition: msRest.CompositeMapper = { + serializedName: "RemoteAddress", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRemoteAddressCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RemoteAddressMatchConditionParameters" + } + } + } + } +}; + +export const RequestMethodMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestMethodMatchConditionParameters", + type: { + name: "Composite", + className: "RequestMethodMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestMethodCondition: msRest.CompositeMapper = { + serializedName: "RequestMethod", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestMethodCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestMethodMatchConditionParameters" + } + } + } + } +}; + +export const QueryStringMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "QueryStringMatchConditionParameters", + type: { + name: "Composite", + className: "QueryStringMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleQueryStringCondition: msRest.CompositeMapper = { + serializedName: "QueryString", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleQueryStringCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "QueryStringMatchConditionParameters" + } + } + } + } +}; + +export const PostArgsMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "PostArgsMatchConditionParameters", + type: { + name: "Composite", + className: "PostArgsMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRulePostArgsCondition: msRest.CompositeMapper = { + serializedName: "PostArgs", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRulePostArgsCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "PostArgsMatchConditionParameters" + } + } + } + } +}; + +export const RequestUriMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestUriMatchConditionParameters", + type: { + name: "Composite", + className: "RequestUriMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestUriCondition: msRest.CompositeMapper = { + serializedName: "RequestUri", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestUriCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestUriMatchConditionParameters" + } + } + } + } +}; + +export const RequestHeaderMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestHeaderMatchConditionParameters", + type: { + name: "Composite", + className: "RequestHeaderMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestHeaderCondition: msRest.CompositeMapper = { + serializedName: "RequestHeader", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestHeaderCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestHeaderMatchConditionParameters" + } + } + } + } +}; + +export const RequestBodyMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestBodyMatchConditionParameters", + type: { + name: "Composite", + className: "RequestBodyMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestBodyCondition: msRest.CompositeMapper = { + serializedName: "RequestBody", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestBodyCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestBodyMatchConditionParameters" + } + } + } + } +}; + +export const RequestSchemeMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestSchemeMatchConditionParameters", + type: { + name: "Composite", + className: "RequestSchemeMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestSchemeCondition: msRest.CompositeMapper = { + serializedName: "RequestScheme", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestSchemeCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestSchemeMatchConditionParameters" + } + } + } + } +}; + +export const UrlPathMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlPathMatchConditionParameters", + type: { + name: "Composite", + className: "UrlPathMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { + serializedName: "UrlPath", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlPathCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "UrlPathMatchConditionParameters" + } + } + } + } +}; + +export const UrlFileExtensionMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlFileExtensionMatchConditionParameters", + type: { + name: "Composite", + className: "UrlFileExtensionMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { + serializedName: "UrlFileExtension", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlFileExtensionCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "UrlFileExtensionMatchConditionParameters" + } + } + } + } +}; + +export const UrlFileNameMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlFileNameMatchConditionParameters", + type: { + name: "Composite", + className: "UrlFileNameMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleUrlFileNameCondition: msRest.CompositeMapper = { + serializedName: "UrlFileName", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlFileNameCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "UrlFileNameMatchConditionParameters" + } + } + } + } +}; + +export const HttpVersionMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "HttpVersionMatchConditionParameters", + type: { + name: "Composite", + className: "HttpVersionMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleHttpVersionCondition: msRest.CompositeMapper = { + serializedName: "HttpVersion", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleHttpVersionCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "HttpVersionMatchConditionParameters" + } + } + } + } +}; + +export const CookiesMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "CookiesMatchConditionParameters", + type: { + name: "Composite", + className: "CookiesMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleCookiesCondition: msRest.CompositeMapper = { + serializedName: "Cookies", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleCookiesCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "CookiesMatchConditionParameters" + } + } + } + } +}; + +export const IsDeviceMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "IsDeviceMatchConditionParameters", + type: { + name: "Composite", + className: "IsDeviceMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleIsDeviceCondition: msRest.CompositeMapper = { + serializedName: "IsDevice", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleIsDeviceCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "IsDeviceMatchConditionParameters" } - }, - originPath: { - serializedName: "properties.originPath", + } + } + } +}; + +export const UrlRedirectActionParameters: msRest.CompositeMapper = { + serializedName: "UrlRedirectActionParameters", + type: { + name: "Composite", + className: "UrlRedirectActionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters', type: { name: "String" } }, - contentTypesToCompress: { - serializedName: "properties.contentTypesToCompress", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - isCompressionEnabled: { - serializedName: "properties.isCompressionEnabled", - type: { - name: "Boolean" - } - }, - isHttpAllowed: { - serializedName: "properties.isHttpAllowed", + redirectType: { + required: true, + serializedName: "redirectType", type: { - name: "Boolean" + name: "String" } }, - isHttpsAllowed: { - serializedName: "properties.isHttpsAllowed", + destinationProtocol: { + serializedName: "destinationProtocol", type: { - name: "Boolean" + name: "String" } }, - queryStringCachingBehavior: { - serializedName: "properties.queryStringCachingBehavior", + customPath: { + serializedName: "customPath", type: { - name: "Enum", - allowedValues: [ - "IgnoreQueryString", - "BypassCaching", - "UseQueryString", - "NotSet" - ] + name: "String" } }, - optimizationType: { - serializedName: "properties.optimizationType", + customHostname: { + serializedName: "customHostname", type: { name: "String" } }, - probePath: { - serializedName: "properties.probePath", + customQueryString: { + serializedName: "customQueryString", type: { name: "String" } }, - geoFilters: { - serializedName: "properties.geoFilters", + customFragment: { + serializedName: "customFragment", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GeoFilter" - } - } + name: "String" } - }, - deliveryPolicy: { - serializedName: "properties.deliveryPolicy", + } + } + } +}; + +export const UrlRedirectAction: msRest.CompositeMapper = { + serializedName: "UrlRedirect", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "UrlRedirectAction", + modelProperties: { + ...DeliveryRuleAction.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, type: { name: "Composite", - className: "EndpointPropertiesUpdateParametersDeliveryPolicy" + className: "UrlRedirectActionParameters" } } } } }; -export const UrlPathConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlPathConditionParameters", +export const UrlRewriteActionParameters: msRest.CompositeMapper = { + serializedName: "UrlRewriteActionParameters", type: { name: "Composite", - className: "UrlPathConditionParameters", + className: "UrlRewriteActionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters', type: { name: "String" } }, - path: { + sourcePattern: { required: true, - serializedName: "path", + serializedName: "sourcePattern", type: { name: "String" } }, - matchType: { + destination: { required: true, - serializedName: "matchType", + serializedName: "destination", type: { name: "String" } + }, + preserveUnmatchedPath: { + serializedName: "preserveUnmatchedPath", + type: { + name: "Boolean" + } } } } }; -export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { - serializedName: "UrlPath", +export const UrlRewriteAction: msRest.CompositeMapper = { + serializedName: "UrlRewrite", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlPathCondition", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "UrlRewriteAction", modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, + ...DeliveryRuleAction.type.modelProperties, parameters: { required: true, serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "UrlPathConditionParameters" + className: "UrlRewriteActionParameters" } } } } }; -export const UrlFileExtensionConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlFileExtensionConditionParameters", +export const HeaderActionParameters: msRest.CompositeMapper = { + serializedName: "HeaderActionParameters", type: { name: "Composite", - className: "UrlFileExtensionConditionParameters", + className: "HeaderActionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters', type: { name: "String" } }, - extensions: { + headerAction: { required: true, - serializedName: "extensions", + serializedName: "headerAction", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + }, + headerName: { + required: true, + serializedName: "headerName", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" } } } } }; -export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { - serializedName: "UrlFileExtension", +export const DeliveryRuleRequestHeaderAction: msRest.CompositeMapper = { + serializedName: "ModifyRequestHeader", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlFileExtensionCondition", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleRequestHeaderAction", modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, + ...DeliveryRuleAction.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "HeaderActionParameters" + } + } + } + } +}; + +export const DeliveryRuleResponseHeaderAction: msRest.CompositeMapper = { + serializedName: "ModifyResponseHeader", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleResponseHeaderAction", + modelProperties: { + ...DeliveryRuleAction.type.modelProperties, parameters: { required: true, serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "UrlFileExtensionConditionParameters" + className: "HeaderActionParameters" } } } @@ -732,7 +1926,7 @@ export const CacheExpirationActionParameters: msRest.CompositeMapper = { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', type: { name: "String" } @@ -786,6 +1980,61 @@ export const DeliveryRuleCacheExpirationAction: msRest.CompositeMapper = { } }; +export const CacheKeyQueryStringActionParameters: msRest.CompositeMapper = { + serializedName: "CacheKeyQueryStringActionParameters", + type: { + name: "Composite", + className: "CacheKeyQueryStringActionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters', + type: { + name: "String" + } + }, + queryStringBehavior: { + required: true, + serializedName: "queryStringBehavior", + type: { + name: "String" + } + }, + queryParameters: { + nullable: true, + serializedName: "queryParameters", + type: { + name: "String" + } + } + } + } +}; + +export const DeliveryRuleCacheKeyQueryStringAction: msRest.CompositeMapper = { + serializedName: "CacheKeyQueryString", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleCacheKeyQueryStringAction", + modelProperties: { + ...DeliveryRuleAction.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "CacheKeyQueryStringActionParameters" + } + } + } + } +}; + export const PurgeParameters: msRest.CompositeMapper = { serializedName: "PurgeParameters", type: { @@ -918,6 +2167,46 @@ export const OriginUpdateParameters: msRest.CompositeMapper = { } }; +export const CustomDomainHttpsParameters: msRest.CompositeMapper = { + serializedName: "CustomDomainHttpsParameters", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "certificateSource", + clientName: "certificateSource" + }, + uberParent: "CustomDomainHttpsParameters", + className: "CustomDomainHttpsParameters", + modelProperties: { + protocolType: { + required: true, + serializedName: "protocolType", + type: { + name: "String" + } + }, + minimumTlsVersion: { + serializedName: "minimumTlsVersion", + type: { + name: "Enum", + allowedValues: [ + "None", + "TLS10", + "TLS12" + ] + } + }, + certificateSource: { + required: true, + serializedName: "certificateSource", + type: { + name: "String" + } + } + } + } +}; + export const ProxyResource: msRest.CompositeMapper = { serializedName: "ProxyResource", type: { @@ -964,6 +2253,13 @@ export const CustomDomain: msRest.CompositeMapper = { name: "String" } }, + customHttpsParameters: { + serializedName: "properties.customHttpsParameters", + type: { + name: "Composite", + className: "CustomDomainHttpsParameters" + } + }, validationData: { serializedName: "properties.validationData", type: { @@ -998,35 +2294,6 @@ export const CustomDomainParameters: msRest.CompositeMapper = { } }; -export const CustomDomainHttpsParameters: msRest.CompositeMapper = { - serializedName: "CustomDomainHttpsParameters", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "certificateSource", - clientName: "certificateSource" - }, - uberParent: "CustomDomainHttpsParameters", - className: "CustomDomainHttpsParameters", - modelProperties: { - protocolType: { - required: true, - serializedName: "protocolType", - type: { - name: "String" - } - }, - certificateSource: { - required: true, - serializedName: "certificateSource", - type: { - name: "String" - } - } - } - } -}; - export const CdnCertificateSourceParameters: msRest.CompositeMapper = { serializedName: "CdnCertificateSourceParameters", type: { @@ -1729,11 +2996,28 @@ export const EdgenodeResult: msRest.CompositeMapper = { }; export const discriminators = { - 'DeliveryRuleAction' : DeliveryRuleAction, 'DeliveryRuleCondition' : DeliveryRuleCondition, + 'DeliveryRuleAction' : DeliveryRuleAction, + 'DeliveryRuleCondition.RemoteAddress' : DeliveryRuleRemoteAddressCondition, + 'DeliveryRuleCondition.RequestMethod' : DeliveryRuleRequestMethodCondition, + 'DeliveryRuleCondition.QueryString' : DeliveryRuleQueryStringCondition, + 'DeliveryRuleCondition.PostArgs' : DeliveryRulePostArgsCondition, + 'DeliveryRuleCondition.RequestUri' : DeliveryRuleRequestUriCondition, + 'DeliveryRuleCondition.RequestHeader' : DeliveryRuleRequestHeaderCondition, + 'DeliveryRuleCondition.RequestBody' : DeliveryRuleRequestBodyCondition, + 'DeliveryRuleCondition.RequestScheme' : DeliveryRuleRequestSchemeCondition, 'DeliveryRuleCondition.UrlPath' : DeliveryRuleUrlPathCondition, 'DeliveryRuleCondition.UrlFileExtension' : DeliveryRuleUrlFileExtensionCondition, + 'DeliveryRuleCondition.UrlFileName' : DeliveryRuleUrlFileNameCondition, + 'DeliveryRuleCondition.HttpVersion' : DeliveryRuleHttpVersionCondition, + 'DeliveryRuleCondition.Cookies' : DeliveryRuleCookiesCondition, + 'DeliveryRuleCondition.IsDevice' : DeliveryRuleIsDeviceCondition, + 'DeliveryRuleAction.UrlRedirect' : UrlRedirectAction, + 'DeliveryRuleAction.UrlRewrite' : UrlRewriteAction, + 'DeliveryRuleAction.ModifyRequestHeader' : DeliveryRuleRequestHeaderAction, + 'DeliveryRuleAction.ModifyResponseHeader' : DeliveryRuleResponseHeaderAction, 'DeliveryRuleAction.CacheExpiration' : DeliveryRuleCacheExpirationAction, + 'DeliveryRuleAction.CacheKeyQueryString' : DeliveryRuleCacheKeyQueryStringAction, 'CustomDomainHttpsParameters' : CustomDomainHttpsParameters, 'CustomDomainHttpsParameters.Cdn' : CdnManagedHttpsParameters, 'CustomDomainHttpsParameters.AzureKeyVault' : UserManagedHttpsParameters diff --git a/sdk/cdn/arm-cdn/src/models/originsMappers.ts b/sdk/cdn/arm-cdn/src/models/originsMappers.ts index 59b2e1dfddb0..3ac30d04caad 100644 --- a/sdk/cdn/arm-cdn/src/models/originsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/originsMappers.ts @@ -10,14 +10,34 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnManagedHttpsParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -25,16 +45,34 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, Origin, OriginListResult, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UserManagedHttpsParameters } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts index 5c6b8d00a9cb..4f19f42d0579 100644 --- a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts @@ -10,14 +10,34 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnManagedHttpsParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -25,13 +45,25 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileListResult, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, ResourceUsage, ResourceUsageListResult, @@ -39,6 +71,12 @@ export { SsoUri, SupportedOptimizationTypesListResult, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UserManagedHttpsParameters } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/tsconfig.json b/sdk/cdn/arm-cdn/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/cdn/arm-cdn/tsconfig.json +++ b/sdk/cdn/arm-cdn/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true