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/cdnManagementClient.ts b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts index d0659fd35c4c..8bcaeb7ed4c6 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts @@ -25,15 +25,20 @@ class CdnManagementClient extends CdnManagementClientContext { resourceUsage: operations.ResourceUsageOperations; operations: operations.Operations; edgeNodes: operations.EdgeNodes; + policies: operations.Policies; + managedRuleSets: operations.ManagedRuleSets; /** * Initializes a new instance of the CdnManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. * @param subscriptionId Azure Subscription ID. + * @param subscriptionId1 Azure Subscription ID. + * @param apiVersion1 Version of the API to be used with the client request. Current version is + * 2017-04-02. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CdnManagementClientOptions) { - super(credentials, subscriptionId, options); + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, apiVersion1: string, options?: Models.CdnManagementClientOptions) { + super(credentials, subscriptionId, subscriptionId1, apiVersion1, options); this.profiles = new operations.Profiles(this); this.endpoints = new operations.Endpoints(this); this.origins = new operations.Origins(this); @@ -41,6 +46,8 @@ class CdnManagementClient extends CdnManagementClientContext { this.resourceUsage = new operations.ResourceUsageOperations(this); this.operations = new operations.Operations(this); this.edgeNodes = new operations.EdgeNodes(this); + this.policies = new operations.Policies(this); + this.managedRuleSets = new operations.ManagedRuleSets(this); } /** diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts index b57e0c53f2be..1bbc6b8b580c 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts @@ -19,20 +19,31 @@ export class CdnManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; apiVersion?: string; + subscriptionId1: string; + apiVersion1: string; /** * Initializes a new instance of the CdnManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. * @param subscriptionId Azure Subscription ID. + * @param subscriptionId1 Azure Subscription ID. + * @param apiVersion1 Version of the API to be used with the client request. Current version is + * 2017-04-02. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CdnManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, apiVersion1: string, options?: Models.CdnManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { throw new Error('\'subscriptionId\' cannot be null.'); } + if (subscriptionId1 == undefined) { + throw new Error('\'subscriptionId1\' cannot be null.'); + } + if (apiVersion1 == undefined) { + throw new Error('\'apiVersion1\' cannot be null.'); + } if (!options) { options = {}; @@ -44,13 +55,15 @@ export class CdnManagementClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2017-10-12'; + this.apiVersion = '2019-06-15'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; this.credentials = credentials; this.subscriptionId = subscriptionId; + this.subscriptionId1 = subscriptionId1; + this.apiVersion1 = apiVersion1; if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; diff --git a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts index 3bd827402303..d014e1aa0796 100644 --- a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts @@ -10,37 +10,87 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, CdnCertificateSourceParameters, + CdnEndpoint, CdnManagedHttpsParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, CustomDomainHttpsParameters, CustomDomainListResult, CustomDomainParameters, + CustomRule, + CustomRuleList, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, KeyVaultCertificateSourceParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, Origin, OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + 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..15093bd4ecbe 100644 --- a/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts @@ -10,31 +10,86 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnEndpoint, + CdnManagedHttpsParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, + CustomRule, + CustomRuleList, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, EdgenodeResult, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, Origin, OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + 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..c2ea3c4eb008 100644 --- a/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts @@ -10,37 +10,92 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnEndpoint, + CdnManagedHttpsParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, + CustomRule, + CustomRuleList, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, EndpointListResult, EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, LoadParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, Origin, OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, PurgeParameters, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + 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..dc5954213bf5 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; } @@ -199,6 +200,10 @@ export interface Endpoint extends TrackedResource { * A policy that specifies the delivery rules to be used for an endpoint. */ deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + /** + * Defines the Web Application Firewall policy for the endpoint (if applicable) + */ + webApplicationFirewallPolicyLink?: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink; /** * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. * contoso.azureedge.net @@ -242,39 +247,43 @@ export interface GeoFilter { } /** - * Contains the possible cases for DeliveryRuleAction. + * Contains the possible cases for DeliveryRuleCondition. */ -export type DeliveryRuleActionUnion = DeliveryRuleAction | DeliveryRuleCacheExpirationAction; +export type DeliveryRuleConditionUnion = DeliveryRuleCondition | DeliveryRuleRemoteAddressCondition | DeliveryRuleRequestMethodCondition | DeliveryRuleQueryStringCondition | DeliveryRulePostArgsCondition | DeliveryRuleRequestUriCondition | DeliveryRuleRequestHeaderCondition | DeliveryRuleRequestBodyCondition | DeliveryRuleRequestSchemeCondition | DeliveryRuleUrlPathCondition | DeliveryRuleUrlFileExtensionCondition | DeliveryRuleUrlFileNameCondition | DeliveryRuleHttpVersionCondition | DeliveryRuleCookiesCondition | DeliveryRuleIsDeviceCondition; /** - * An action for the delivery rule. + * A condition for the delivery rule. */ -export interface DeliveryRuleAction { +export interface DeliveryRuleCondition { /** * Polymorphic Discriminator */ - name: "DeliveryRuleAction"; + name: "DeliveryRuleCondition"; } /** - * Contains the possible cases for DeliveryRuleCondition. + * Contains the possible cases for DeliveryRuleAction. */ -export type DeliveryRuleConditionUnion = DeliveryRuleCondition | DeliveryRuleUrlPathCondition | DeliveryRuleUrlFileExtensionCondition; +export type DeliveryRuleActionUnion = DeliveryRuleAction | UrlRedirectAction | UrlRewriteAction | DeliveryRuleRequestHeaderAction | DeliveryRuleResponseHeaderAction | DeliveryRuleCacheExpirationAction | DeliveryRuleCacheKeyQueryStringAction; /** - * A condition for the delivery rule. + * An action for the delivery rule. */ -export interface DeliveryRuleCondition { +export interface DeliveryRuleAction { /** * Polymorphic Discriminator */ - name: "DeliveryRuleCondition"; + name: "DeliveryRuleAction"; } /** * A rule that specifies a set of actions and conditions */ 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 @@ -282,14 +291,14 @@ export interface DeliveryRule { * applied. */ order: number; - /** - * A list of actions that are executed when all the conditions of a rule are satisfied. - */ - actions: DeliveryRuleActionUnion[]; /** * 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[]; } /** @@ -306,6 +315,16 @@ export interface EndpointPropertiesUpdateParametersDeliveryPolicy { rules: DeliveryRule[]; } +/** + * Defines the Web Application Firewall policy for the endpoint (if applicable) + */ +export interface EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink { + /** + * Resource ID. + */ + id?: string; +} + /** * Properties required to create or update an endpoint. */ @@ -374,525 +393,1486 @@ export interface EndpointUpdateParameters extends BaseResource { * A policy that specifies the delivery rules to be used for an endpoint. */ deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + /** + * Defines the Web Application Firewall policy for the endpoint (if applicable) + */ + webApplicationFirewallPolicyLink?: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink; } /** - * Defines the parameters for the URL path condition. + * Defines the parameters for RemoteAddress match conditions */ -export interface UrlPathConditionParameters { +export interface RemoteAddressMatchConditionParameters { /** - * A URL path for the condition of the delivery rule + * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch' */ - path: string; + operator: RemoteAddressOperator; /** - * The match type for the condition of the delivery rule. Possible values include: 'Literal', - * 'Wildcard' + * 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. */ - matchType: MatchType; + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; } /** - * Defines the URL path condition for the delivery rule. + * Defines the RemoteAddress condition for the delivery rule. */ -export interface DeliveryRuleUrlPathCondition { +export interface DeliveryRuleRemoteAddressCondition { /** * Polymorphic Discriminator */ - name: "UrlPath"; + name: "RemoteAddress"; /** * Defines the parameters for the condition. */ - parameters: UrlPathConditionParameters; + parameters: RemoteAddressMatchConditionParameters; } /** - * Defines the parameters for the URL file extension condition. + * Defines the parameters for RequestMethod match conditions */ -export interface UrlFileExtensionConditionParameters { +export interface RequestMethodMatchConditionParameters { /** - * A list of extensions for the condition of the delivery rule. + * Describes if this is negate condition or not */ - extensions: string[]; + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; } /** - * Defines the URL file extension condition for the delivery rule. + * Defines the RequestMethod condition for the delivery rule. */ -export interface DeliveryRuleUrlFileExtensionCondition { +export interface DeliveryRuleRequestMethodCondition { /** * Polymorphic Discriminator */ - name: "UrlFileExtension"; + name: "RequestMethod"; /** * Defines the parameters for the condition. */ - parameters: UrlFileExtensionConditionParameters; + parameters: RequestMethodMatchConditionParameters; } /** - * Defines the parameters for the cache expiration action. + * Defines the parameters for QueryString match conditions */ -export interface CacheExpirationActionParameters { +export interface QueryStringMatchConditionParameters { /** - * Caching behavior for the requests that include query strings. Possible values include: - * 'BypassCache', 'Override', 'SetIfMissing' + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' */ - cacheBehavior: CacheBehavior; + operator: QueryStringOperator; /** - * The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + * Describes if this is negate condition or not */ - cacheDuration?: string; + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; } /** - * Defines the cache expiration action for the delivery rule. + * Defines the QueryString condition for the delivery rule. */ -export interface DeliveryRuleCacheExpirationAction { +export interface DeliveryRuleQueryStringCondition { /** * Polymorphic Discriminator */ - name: "CacheExpiration"; + name: "QueryString"; /** - * Defines the parameters for the action. + * Defines the parameters for the condition. */ - parameters: CacheExpirationActionParameters; + parameters: QueryStringMatchConditionParameters; } /** - * Parameters required for content purge. + * Defines the parameters for PostArgs match conditions */ -export interface PurgeParameters { +export interface PostArgsMatchConditionParameters { /** - * The path to the content to be purged. Can describe a file path or a wild card directory. + * Name of PostArg to be matched */ - contentPaths: string[]; -} - -/** - * Parameters required for content load. - */ -export interface LoadParameters { + selector: string; /** - * The path to the content to be loaded. Path should be a relative file URL of the origin. + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' */ - contentPaths: string[]; -} - -/** - * 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. - */ -export interface Origin extends TrackedResource { + operator: PostArgsOperator; /** - * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. + * Describes if this is negate condition or not */ - hostName: string; + negateCondition?: boolean; /** - * The value of the HTTP port. Must be between 1 and 65535. + * The match value for the condition of the delivery rule */ - httpPort?: number; + matchValues: string[]; /** - * The value of the https port. Must be between 1 and 65535. + * List of transforms */ - httpsPort?: number; + transforms?: Transform[]; +} + +/** + * Defines the PostArgs condition for the delivery rule. + */ +export interface DeliveryRulePostArgsCondition { /** - * Resource status of the origin. Possible values include: 'Creating', 'Active', 'Deleting' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Polymorphic Discriminator */ - readonly resourceState?: OriginResourceState; + name: "PostArgs"; /** - * Provisioning status of the origin. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Defines the parameters for the condition. */ - readonly provisioningState?: string; + parameters: PostArgsMatchConditionParameters; } /** - * Origin properties needed for origin creation or update. + * Defines the parameters for RequestUri match conditions */ -export interface OriginUpdateParameters extends BaseResource { +export interface RequestUriMatchConditionParameters { /** - * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' */ - hostName?: string; + operator: RequestUriOperator; /** - * The value of the HTTP port. Must be between 1 and 65535. + * Describes if this is negate condition or not */ - httpPort?: number; + negateCondition?: boolean; /** - * The value of the HTTPS port. Must be between 1 and 65535. + * The match value for the condition of the delivery rule */ - httpsPort?: number; + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; } /** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags + * Defines the RequestUri condition for the delivery rule. */ -export interface ProxyResource extends Resource { +export interface DeliveryRuleRequestUriCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestUri"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestUriMatchConditionParameters; } /** - * Friendly domain name mapping to the endpoint hostname that the customer provides for branding - * purposes, e.g. www.contoso.com. + * Defines the parameters for RequestHeader match conditions */ -export interface CustomDomain extends ProxyResource { - /** - * The host name of the custom domain. Must be a domain name. - */ - hostName: string; +export interface RequestHeaderMatchConditionParameters { /** - * Resource status of the custom domain. Possible values include: 'Creating', 'Active', - * 'Deleting' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of Header to be matched */ - readonly resourceState?: CustomDomainResourceState; + selector: string; /** - * Provisioning status of Custom Https of the custom domain. Possible values include: 'Enabling', - * 'Enabled', 'Disabling', 'Disabled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' */ - readonly customHttpsProvisioningState?: CustomHttpsProvisioningState; + operator: RequestHeaderOperator; /** - * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by - * step. Possible values include: 'SubmittingDomainControlValidationRequest', - * 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', - * 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', - * 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', - * 'CertificateDeleted' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes if this is negate condition or not */ - readonly customHttpsProvisioningSubstate?: CustomHttpsProvisioningSubstate; + negateCondition?: boolean; /** - * 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 - * in China. + * The match value for the condition of the delivery rule */ - validationData?: string; + matchValues: string[]; /** - * Provisioning status of the custom domain. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of transforms */ - readonly provisioningState?: string; + transforms?: Transform[]; } /** - * The customDomain JSON object required for custom domain creation or update. + * Defines the RequestHeader condition for the delivery rule. */ -export interface CustomDomainParameters { +export interface DeliveryRuleRequestHeaderCondition { /** - * The host name of the custom domain. Must be a domain name. + * Polymorphic Discriminator */ - hostName: string; + name: "RequestHeader"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestHeaderMatchConditionParameters; } /** - * Contains the possible cases for CustomDomainHttpsParameters. + * Defines the parameters for RequestBody match conditions */ -export type CustomDomainHttpsParametersUnion = CustomDomainHttpsParameters | CdnManagedHttpsParameters | UserManagedHttpsParameters; +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[]; +} /** - * The JSON object that contains the properties to secure a custom domain. + * Defines the RequestBody condition for the delivery rule. */ -export interface CustomDomainHttpsParameters { +export interface DeliveryRuleRequestBodyCondition { /** * Polymorphic Discriminator */ - certificateSource: "CustomDomainHttpsParameters"; + name: "RequestBody"; /** - * Defines the TLS extension protocol that is used for secure delivery. Possible values include: - * 'ServerNameIndication', 'IPBased' + * Defines the parameters for the condition. */ - protocolType: ProtocolType; + parameters: RequestBodyMatchConditionParameters; } /** - * Defines the parameters for using CDN managed certificate for securing custom domain. + * Defines the parameters for RequestScheme match conditions */ -export interface CdnCertificateSourceParameters { +export interface RequestSchemeMatchConditionParameters { /** - * Type of certificate used. Possible values include: 'Shared', 'Dedicated' + * Describes if this is negate condition or not */ - certificateType: CertificateType; + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; } /** - * Defines the certificate source parameters using CDN managed certificate for enabling SSL. + * Defines the RequestScheme condition for the delivery rule. */ -export interface CdnManagedHttpsParameters { +export interface DeliveryRuleRequestSchemeCondition { /** * Polymorphic Discriminator */ - certificateSource: "Cdn"; - /** - * Defines the TLS extension protocol that is used for secure delivery. Possible values include: - * 'ServerNameIndication', 'IPBased' - */ - protocolType: ProtocolType; + name: "RequestScheme"; /** - * Defines the certificate source parameters using CDN managed certificate for enabling SSL. + * Defines the parameters for the condition. */ - certificateSourceParameters: CdnCertificateSourceParameters; + parameters: RequestSchemeMatchConditionParameters; } /** - * Describes the parameters for using a user's KeyVault certificate for securing custom domain. + * Defines the parameters for UrlPath match conditions */ -export interface KeyVaultCertificateSourceParameters { - /** - * Subscription Id of the user's Key Vault containing the SSL certificate - */ - subscriptionId: string; +export interface UrlPathMatchConditionParameters { /** - * Resource group of the user's Key Vault containing the SSL certificate + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'Wildcard' */ - resourceGroupName: string; + operator: UrlPathOperator; /** - * The name of the user's Key Vault containing the SSL certificate + * Describes if this is negate condition or not */ - vaultName: string; + negateCondition?: boolean; /** - * The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + * The match value for the condition of the delivery rule */ - secretName: string; + matchValues: string[]; /** - * The version(GUID) of Key Vault Secret in Key Vault. + * List of transforms */ - secretVersion: string; + transforms?: Transform[]; } /** - * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + * Defines the UrlPath condition for the delivery rule. */ -export interface UserManagedHttpsParameters { +export interface DeliveryRuleUrlPathCondition { /** * Polymorphic Discriminator */ - certificateSource: "AzureKeyVault"; - /** - * Defines the TLS extension protocol that is used for secure delivery. Possible values include: - * 'ServerNameIndication', 'IPBased' - */ - protocolType: ProtocolType; + name: "UrlPath"; /** - * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + * Defines the parameters for the condition. */ - certificateSourceParameters: KeyVaultCertificateSourceParameters; + parameters: UrlPathMatchConditionParameters; } /** - * Input of the custom domain to be validated for DNS mapping. + * Defines the parameters for UrlFileExtension match conditions */ -export interface ValidateCustomDomainInput { +export interface UrlFileExtensionMatchConditionParameters { /** - * The host name of the custom domain. Must be a domain name. + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' */ - hostName: string; -} - -/** - * Output of custom domain validation. - */ -export interface ValidateCustomDomainOutput { + operator: UrlFileExtensionOperator; /** - * Indicates whether the custom domain is valid or not. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes if this is negate condition or not */ - readonly customDomainValidated?: boolean; + negateCondition?: boolean; /** - * The reason why the custom domain is not valid. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The match value for the condition of the delivery rule */ - readonly reason?: string; + matchValues: string[]; /** - * Error message describing why the custom domain is not valid. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of transforms */ - readonly message?: string; + transforms?: Transform[]; } /** - * Input of CheckNameAvailability API. + * Defines the UrlFileExtension condition for the delivery rule. */ -export interface CheckNameAvailabilityInput { +export interface DeliveryRuleUrlFileExtensionCondition { /** - * The resource name to validate. + * Polymorphic Discriminator */ - name: string; + name: "UrlFileExtension"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlFileExtensionMatchConditionParameters; } /** - * Output of check name availability API. + * Defines the parameters for UrlFilename match conditions */ -export interface CheckNameAvailabilityOutput { +export interface UrlFileNameMatchConditionParameters { /** - * Indicates whether the name is available. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' */ - readonly nameAvailable?: boolean; + operator: UrlFileNameOperator; /** - * The reason why the name is not available. + * 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 IsDeviceMatchConditionParameters { + /** + * 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 IsDevice condition for the delivery rule. + */ +export interface DeliveryRuleIsDeviceCondition { + /** + * Polymorphic Discriminator + */ + name: "IsDevice"; + /** + * Defines the parameters for the condition. + */ + parameters: IsDeviceMatchConditionParameters; +} + +/** + * Defines the parameters for the url redirect action. + */ +export interface UrlRedirectActionParameters { + /** + * The redirect type the rule will use when redirecting traffic. Possible values include: + * 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' + */ + redirectType: RedirectType; + /** + * Protocol to use for the redirect. The default value is MatchRequest. Possible values include: + * 'MatchRequest', 'Http', 'Https' + */ + destinationProtocol?: DestinationProtocol; + /** + * The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the + * incoming path as destination path. + */ + customPath?: string; + /** + * Host to redirect. Leave empty to use the incoming host as the destination host. + */ + customHostname?: string; + /** + * 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. + */ + customQueryString?: string; + /** + * Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do + * not include the #. + */ + customFragment?: string; +} + +/** + * Defines the url redirect action for the delivery rule. + */ +export interface UrlRedirectAction { + /** + * Polymorphic Discriminator + */ + name: "UrlRedirect"; + /** + * Defines the parameters for the action. + */ + parameters: UrlRedirectActionParameters; +} + +/** + * Defines the parameters for the url rewrite action. + */ +export interface UrlRewriteActionParameters { + /** + * 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 + */ + sourcePattern: string; + /** + * Define the destination path for be used in the rewrite. This will overwrite the source pattern + */ + destination: string; + /** + * If True, the remaining path after the source pattern will be appended to the new destination + * path. + */ + preserveUnmatchedPath?: boolean; +} + +/** + * Defines the url rewrite action for the delivery rule. + */ +export interface UrlRewriteAction { + /** + * Polymorphic Discriminator + */ + name: "UrlRewrite"; + /** + * Defines the parameters for the action. + */ + parameters: UrlRewriteActionParameters; +} + +/** + * Defines the parameters for the request header action. + */ +export interface HeaderActionParameters { + /** + * Action to perform. Possible values include: 'Append', 'Overwrite', 'Delete' + */ + headerAction: HeaderAction; + /** + * Name of the header to modify + */ + headerName: string; + /** + * Value for the specified action + */ + value?: string; +} + +/** + * Defines the request header action for the delivery rule. + */ +export interface DeliveryRuleRequestHeaderAction { + /** + * Polymorphic Discriminator + */ + name: "ModifyRequestHeader"; + /** + * Defines the parameters for the action. + */ + parameters: HeaderActionParameters; +} + +/** + * Defines the response header action for the delivery rule. + */ +export interface DeliveryRuleResponseHeaderAction { + /** + * Polymorphic Discriminator + */ + name: "ModifyResponseHeader"; + /** + * Defines the parameters for the action. + */ + parameters: HeaderActionParameters; +} + +/** + * Defines the parameters for the cache expiration action. + */ +export interface CacheExpirationActionParameters { + /** + * Caching behavior for the requests. Possible values include: 'BypassCache', 'Override', + * 'SetIfMissing' + */ + cacheBehavior: CacheBehavior; + /** + * The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + */ + cacheDuration?: string; +} + +/** + * Defines the cache expiration action for the delivery rule. + */ +export interface DeliveryRuleCacheExpirationAction { + /** + * Polymorphic Discriminator + */ + name: "CacheExpiration"; + /** + * Defines the parameters for the action. + */ + 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. + */ +export interface PurgeParameters { + /** + * The path to the content to be purged. Can describe a file path or a wild card directory. + */ + contentPaths: string[]; +} + +/** + * Parameters required for content load. + */ +export interface LoadParameters { + /** + * The path to the content to be loaded. Path should be a relative file URL of the origin. + */ + contentPaths: string[]; +} + +/** + * 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. + */ +export interface Origin extends TrackedResource { + /** + * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. + */ + hostName: string; + /** + * The value of the HTTP port. Must be between 1 and 65535. + */ + httpPort?: number; + /** + * The value of the https port. Must be between 1 and 65535. + */ + httpsPort?: number; + /** + * Resource status of the origin. Possible values include: 'Creating', 'Active', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceState?: OriginResourceState; + /** + * Provisioning status of the origin. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * Origin properties needed for origin creation or update. + */ +export interface OriginUpdateParameters extends BaseResource { + /** + * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. + */ + hostName?: string; + /** + * The value of the HTTP port. Must be between 1 and 65535. + */ + httpPort?: number; + /** + * The value of the HTTPS port. Must be between 1 and 65535. + */ + 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 + */ +export interface ProxyResource extends Resource { +} + +/** + * Friendly domain name mapping to the endpoint hostname that the customer provides for branding + * purposes, e.g. www.contoso.com. + */ +export interface CustomDomain extends ProxyResource { + /** + * The host name of the custom domain. Must be a domain name. + */ + hostName: string; + /** + * Resource status of the custom domain. Possible values include: 'Creating', 'Active', + * 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceState?: CustomDomainResourceState; + /** + * Provisioning status of Custom Https of the custom domain. Possible values include: 'Enabling', + * 'Enabled', 'Disabling', 'Disabled', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customHttpsProvisioningState?: CustomHttpsProvisioningState; + /** + * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by + * step. Possible values include: 'SubmittingDomainControlValidationRequest', + * 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', + * 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', + * 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', + * 'CertificateDeleted' + * **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 + * in China. + */ + validationData?: string; + /** + * Provisioning status of the custom domain. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * The customDomain JSON object required for custom domain creation or update. + */ +export interface CustomDomainParameters { + /** + * The host name of the custom domain. Must be a domain name. + */ + hostName: string; +} + +/** + * Defines the parameters for using CDN managed certificate for securing custom domain. + */ +export interface CdnCertificateSourceParameters { + /** + * Type of certificate used. Possible values include: 'Shared', 'Dedicated' + */ + certificateType: CertificateType; +} + +/** + * Defines the certificate source parameters using CDN managed certificate for enabling SSL. + */ +export interface CdnManagedHttpsParameters { + /** + * Polymorphic Discriminator + */ + certificateSource: "Cdn"; + /** + * 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; + /** + * Defines the certificate source parameters using CDN managed certificate for enabling SSL. + */ + certificateSourceParameters: CdnCertificateSourceParameters; +} + +/** + * Describes the parameters for using a user's KeyVault certificate for securing custom domain. + */ +export interface KeyVaultCertificateSourceParameters { + /** + * Subscription Id of the user's Key Vault containing the SSL certificate + */ + subscriptionId: string; + /** + * Resource group of the user's Key Vault containing the SSL certificate + */ + resourceGroupName: string; + /** + * The name of the user's Key Vault containing the SSL certificate + */ + vaultName: string; + /** + * The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + */ + secretName: string; + /** + * The version(GUID) of Key Vault Secret in Key Vault. + */ + secretVersion: string; +} + +/** + * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + */ +export interface UserManagedHttpsParameters { + /** + * Polymorphic Discriminator + */ + certificateSource: "AzureKeyVault"; + /** + * 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; + /** + * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + */ + certificateSourceParameters: KeyVaultCertificateSourceParameters; +} + +/** + * Input of the custom domain to be validated for DNS mapping. + */ +export interface ValidateCustomDomainInput { + /** + * The host name of the custom domain. Must be a domain name. + */ + hostName: string; +} + +/** + * Output of custom domain validation. + */ +export interface ValidateCustomDomainOutput { + /** + * Indicates whether the custom domain is valid or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customDomainValidated?: boolean; + /** + * The reason why the custom domain is not valid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reason?: string; + /** + * Error message describing why the custom domain is not valid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; +} + +/** + * Input of CheckNameAvailability API. + */ +export interface CheckNameAvailabilityInput { + /** + * The resource name to validate. + */ + name: string; +} + +/** + * Output of check name availability API. + */ +export interface CheckNameAvailabilityOutput { + /** + * Indicates whether the name is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nameAvailable?: boolean; + /** + * The reason why the name is not available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reason?: string; + /** + * The detailed error message describing why the name is not available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; +} + +/** + * Input of the validate probe API. + */ +export interface ValidateProbeInput { + /** + * The probe URL to validate. + */ + probeURL: string; +} + +/** + * Output of the validate probe API. + */ +export interface ValidateProbeOutput { + /** + * Indicates whether the probe URL is accepted or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isValid?: boolean; + /** + * Specifies the error code when the probe url is not accepted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorCode?: string; + /** + * The detailed error message describing why the probe URL is not accepted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; +} + +/** + * Output of check resource usage API. + */ +export interface ResourceUsage { + /** + * Resource type for which the usage is provided. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceType?: string; + /** + * Unit of the usage. e.g. Count. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unit?: string; + /** + * Actual value of usage on the specified resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentValue?: number; + /** + * Quota of the specified resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly limit?: number; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.Cdn + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * Resource on which the operation is performed: Profile, endpoint, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * Operation type: Read, write, delete, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; +} + +/** + * CDN REST API operation + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} + +/** + * CIDR Ip address + */ +export interface CidrIpAddress { + /** + * Ip address itself. + */ + baseIpAddress?: string; + /** + * The length of the prefix of the ip address. + */ + prefixLength?: number; +} + +/** + * CDN Ip address group + */ +export interface IpAddressGroup { + /** + * The delivery region of the ip address group + */ + deliveryRegion?: string; + /** + * The list of ip v4 addresses. + */ + ipv4Addresses?: CidrIpAddress[]; + /** + * The list of ip v6 addresses. + */ + ipv6Addresses?: CidrIpAddress[]; +} + +/** + * Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + */ +export interface EdgeNode extends ProxyResource { + /** + * List of ip address groups. + */ + ipAddressGroups: IpAddressGroup[]; +} + +/** + * Error response indicates CDN service is not able to process the incoming request. The reason is + * provided in the error message. + */ +export interface ErrorResponse { + /** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Error message indicating why the operation failed. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reason?: string; + readonly message?: string; +} + +/** + * Defines contents of a web application firewall global configuration + */ +export interface PolicySettings { + /** + * describes if the policy is in enabled state or disabled state. Possible values include: + * 'Disabled', 'Enabled' + */ + enabledState?: PolicyEnabledState; + /** + * Describes if it is in detection mode or prevention mode at policy level. Possible values + * include: 'Prevention', 'Detection' + */ + mode?: PolicyMode; + /** + * If action type is redirect, this field represents the default redirect URL for the client. + */ + defaultRedirectUrl?: string; + /** + * If the action type is block, this field defines the default customer overridable http response + * status code. + */ + defaultCustomBlockResponseStatusCode?: number; + /** + * If the action type is block, customer can override the response body. The body must be + * specified in base64 encoding. + */ + defaultCustomBlockResponseBody?: string; +} + +/** + * Defines the common attributes for a custom rule that can be included in a waf policy + */ +export interface CustomRule { + /** + * Defines the name of the custom rule + */ + name: string; + /** + * Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not + * specified. Possible values include: 'Disabled', 'Enabled' + */ + enabledState?: CustomRuleEnabledState; + /** + * Defines in what order this rule be evaluated in the overall list of custom rules + */ + priority: number; + /** + * List of match conditions. + */ + matchConditions: MatchCondition[]; + /** + * Describes what action to be applied when rule matches. Possible values include: 'Allow', + * 'Block', 'Log', 'Redirect' + */ + action: ActionType; +} + +/** + * Defines a rate limiting rule that can be included in a waf policy + */ +export interface RateLimitRule extends CustomRule { + /** + * Defines rate limit threshold. + */ + rateLimitThreshold: number; + /** + * Defines rate limit duration. Default is 1 minute. + */ + rateLimitDurationInMinutes: number; +} + +/** + * Defines contents of rate limit rules + */ +export interface RateLimitRuleList { + /** + * List of rules + */ + rules?: RateLimitRule[]; +} + +/** + * Define match conditions + */ +export interface MatchCondition { + /** + * Match variable to compare against. Possible values include: 'RemoteAddr', 'SocketAddr', + * 'RequestMethod', 'RequestHeader', 'RequestUri', 'QueryString', 'RequestBody', 'Cookies', + * 'PostArgs' + */ + matchVariable: MatchVariable; + /** + * Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. + */ + selector?: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch', + * 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', + * 'BeginsWith', 'EndsWith', 'RegEx' + */ + operator: Operator; + /** + * Describes if the result of this condition should be negated. + */ + negateCondition?: boolean; + /** + * List of possible match values. + */ + matchValue: string[]; + /** + * List of transforms. + */ + transforms?: TransformType[]; +} + +/** + * Defines contents of custom rules + */ +export interface CustomRuleList { + /** + * List of rules + */ + rules?: CustomRule[]; +} + +/** + * Defines a managed rule group override setting. + */ +export interface ManagedRuleOverride { + /** + * Identifier for the managed rule. + */ + ruleId: string; + /** + * Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not + * specified. Possible values include: 'Disabled', 'Enabled' + */ + enabledState?: ManagedRuleEnabledState; + /** + * Describes the override action to be applied when rule matches. Possible values include: + * 'Allow', 'Block', 'Log', 'Redirect' + */ + action?: ActionType; +} + +/** + * Defines a managed rule group override setting. + */ +export interface ManagedRuleGroupOverride { + /** + * Describes the managed rule group within the rule set to override + */ + ruleGroupName: string; /** - * The detailed error message describing why the name is not available. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of rules that will be disabled. If none specified, all rules in the group will be + * disabled. */ - readonly message?: string; + rules?: ManagedRuleOverride[]; } /** - * Input of the validate probe API. + * Defines a managed rule set. */ -export interface ValidateProbeInput { +export interface ManagedRuleSet { /** - * The probe URL to validate. + * Defines the rule set type to use. */ - probeURL: string; + ruleSetType: string; + /** + * Defines the version of the rule set to use. + */ + ruleSetVersion: string; + /** + * Verizon only : If the rule set supports anomaly detection mode, this describes the threshold + * for blocking requests. + */ + anomalyScore?: number; + /** + * Defines the rule overrides to apply to the rule set. + */ + ruleGroupOverrides?: ManagedRuleGroupOverride[]; } /** - * Output of the validate probe API. + * Defines the list of managed rule sets for the policy. */ -export interface ValidateProbeOutput { +export interface ManagedRuleSetList { /** - * Indicates whether the probe URL is accepted or not. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isValid?: boolean; - /** - * Specifies the error code when the probe url is not accepted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of rule sets. */ - readonly errorCode?: string; + managedRuleSets?: ManagedRuleSet[]; +} + +/** + * Defines the ARM Resource ID for the linked endpoints + */ +export interface CdnEndpoint { /** - * The detailed error message describing why the probe URL is not accepted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * ARM Resource ID string. */ - readonly message?: string; + id?: string; } /** - * Output of check resource usage API. + * Defines web application firewall policy for Azure CDN. */ -export interface ResourceUsage { +export interface CdnWebApplicationFirewallPolicy extends TrackedResource { /** - * Resource type for which the usage is provided. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes policySettings for policy */ - readonly resourceType?: string; + policySettings?: PolicySettings; /** - * Unit of the usage. e.g. Count. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes rate limit rules inside the policy. */ - readonly unit?: string; + rateLimitRules?: RateLimitRuleList; /** - * Actual value of usage on the specified resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes custom rules inside the policy. */ - readonly currentValue?: number; + customRules?: CustomRuleList; /** - * Quota of the specified resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes managed rules inside the policy. */ - readonly limit?: number; -} - -/** - * The object that represents the operation. - */ -export interface OperationDisplay { + managedRules?: ManagedRuleSetList; /** - * Service provider: Microsoft.Cdn + * Describes Azure CDN endpoints associated with this Web Application Firewall policy. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly provider?: string; + readonly endpointLinks?: CdnEndpoint[]; /** - * Resource on which the operation is performed: Profile, endpoint, etc. + * Provisioning state of the WebApplicationFirewallPolicy. Possible values include: 'Creating', + * 'Succeeded', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resource?: string; + readonly provisioningState?: ProvisioningState; /** - * Operation type: Read, write, delete, etc. + * Resource status of the policy. Possible values include: 'Creating', 'Enabling', 'Enabled', + * 'Disabling', 'Disabled', 'Deleting' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operation?: string; + readonly resourceState?: PolicyResourceState; + /** + * Gets a unique read-only string that changes whenever the resource is updated. + */ + etag?: string; + /** + * The pricing tier (defines a CDN provider, feature list and rate) of the + * CdnWebApplicationFirewallPolicy. + */ + sku: Sku; } /** - * CDN REST API operation + * Properties required to update a CdnWebApplicationFirewallPolicy. */ -export interface Operation { +export interface CdnWebApplicationFirewallPolicyPatchParameters extends BaseResource { /** - * Operation name: {provider}/{resource}/{operation} - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The object that represents the operation. + * CdnWebApplicationFirewallPolicy tags */ - display?: OperationDisplay; + tags?: { [propertyName: string]: string }; } /** - * CIDR Ip address + * Describes a managed rule definition. */ -export interface CidrIpAddress { +export interface ManagedRuleDefinition { /** - * Ip address itself. + * Identifier for the managed rule. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - baseIpAddress?: string; + readonly ruleId?: string; /** - * The length of the prefix of the ip address. + * Describes the functionality of the managed rule. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - prefixLength?: number; + readonly description?: string; } /** - * CDN Ip address group + * Describes a managed rule group. */ -export interface IpAddressGroup { +export interface ManagedRuleGroupDefinition { /** - * The delivery region of the ip address group + * Name of the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - deliveryRegion?: string; + readonly ruleGroupName?: string; /** - * The list of ip v4 addresses. + * Description of the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - ipv4Addresses?: CidrIpAddress[]; + readonly description?: string; /** - * The list of ip v6 addresses. + * List of rules within the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - ipv6Addresses?: CidrIpAddress[]; + readonly rules?: ManagedRuleDefinition[]; } /** - * Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + * Describes a managed rule set definition. */ -export interface EdgeNode extends ProxyResource { +export interface ManagedRuleSetDefinition extends Resource { /** - * List of ip address groups. + * Provisioning state of the managed rule set. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - ipAddressGroups: IpAddressGroup[]; -} - -/** - * Error response indicates CDN service is not able to process the incoming request. The reason is - * provided in the error message. - */ -export interface ErrorResponse { + readonly provisioningState?: string; /** - * Error code. + * Type of the managed rule set. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly code?: string; + readonly ruleSetType?: string; /** - * Error message indicating why the operation failed. + * Version of the managed rule set type. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly message?: string; + readonly ruleSetVersion?: string; + /** + * Rule groups of the managed rule set. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ruleGroups?: ManagedRuleGroupDefinition[]; + /** + * The pricing tier (defines a CDN provider, feature list and rate) of the + * CdnWebApplicationFirewallPolicy. + */ + sku?: Sku; } /** @@ -927,6 +1907,26 @@ export interface CustomDomainsEnableCustomHttpsOptionalParams extends msRest.Req customDomainHttpsParameters?: CustomDomainHttpsParametersUnion; } +/** + * Optional Parameters. + */ +export interface PoliciesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * CdnWebApplicationFirewallPolicy tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface PoliciesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * CdnWebApplicationFirewallPolicy tags + */ + tags?: { [propertyName: string]: string }; +} + /** * An interface representing CdnManagementClientOptions. */ @@ -999,80 +1999,242 @@ export interface CustomDomainListResult extends Array { } /** - * @interface - * Result of the request to list CDN operations. It contains a list of operations and a URL link to - * get the next set of results. - * @extends Array + * @interface + * Result of the request to list CDN operations. It contains a list of operations and a URL link to + * get the next set of results. + * @extends Array + */ +export interface OperationsListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL + * link to get the next set of results. + * @extends Array + */ +export interface EdgenodeResult extends Array { + /** + * URL to get the next set of edgenode list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of + * WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + * @extends Array + */ +export interface CdnWebApplicationFirewallPolicyList extends Array { + /** + * URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * List of managed rule set definitions available for use in a policy. + * @extends Array + */ +export interface ManagedRuleSetDefinitionList extends Array { + /** + * URL to retrieve next set of managed rule set definitions. + */ + nextLink?: string; +} + +/** + * Defines values for SkuName. + * Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', + * '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' | 'Premium_ChinaCdn'; + +/** + * Defines values for ProfileResourceState. + * Possible values include: 'Creating', 'Active', 'Deleting', 'Disabled' + * @readonly + * @enum {string} + */ +export type ProfileResourceState = 'Creating' | 'Active' | 'Deleting' | 'Disabled'; + +/** + * Defines values for OptimizationType. + * Possible values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', + * 'VideoOnDemandMediaStreaming', 'LargeFileDownload', 'DynamicSiteAcceleration' + * @readonly + * @enum {string} + */ +export type OptimizationType = 'GeneralWebDelivery' | 'GeneralMediaStreaming' | 'VideoOnDemandMediaStreaming' | 'LargeFileDownload' | 'DynamicSiteAcceleration'; + +/** + * Defines values for EndpointResourceState. + * Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', 'Stopping' + * @readonly + * @enum {string} + */ +export type EndpointResourceState = 'Creating' | 'Deleting' | 'Running' | 'Starting' | 'Stopped' | 'Stopping'; + +/** + * Defines values for QueryStringCachingBehavior. + * Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' + * @readonly + * @enum {string} + */ +export type QueryStringCachingBehavior = 'IgnoreQueryString' | 'BypassCaching' | 'UseQueryString' | 'NotSet'; + +/** + * Defines values for GeoFilterActions. + * Possible values include: 'Block', 'Allow' + * @readonly + * @enum {string} + */ +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 interface OperationsListResult extends Array { - /** - * URL to get the next set of operation list results if there are any. - */ - nextLink?: string; -} +export type UrlFileExtensionOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; /** - * @interface - * Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL - * link to get the next set of results. - * @extends Array + * Defines values for UrlFileNameOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} */ -export interface EdgenodeResult extends Array { - /** - * URL to get the next set of edgenode list results if there are any. - */ - nextLink?: string; -} +export type UrlFileNameOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; /** - * Defines values for SkuName. - * Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + * Defines values for CookiesOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' * @readonly * @enum {string} */ -export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft'; +export type CookiesOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; /** - * Defines values for ProfileResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting', 'Disabled' + * Defines values for RedirectType. + * Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' * @readonly * @enum {string} */ -export type ProfileResourceState = 'Creating' | 'Active' | 'Deleting' | 'Disabled'; +export type RedirectType = 'Moved' | 'Found' | 'TemporaryRedirect' | 'PermanentRedirect'; /** - * Defines values for OptimizationType. - * Possible values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', - * 'VideoOnDemandMediaStreaming', 'LargeFileDownload', 'DynamicSiteAcceleration' + * Defines values for DestinationProtocol. + * Possible values include: 'MatchRequest', 'Http', 'Https' * @readonly * @enum {string} */ -export type OptimizationType = 'GeneralWebDelivery' | 'GeneralMediaStreaming' | 'VideoOnDemandMediaStreaming' | 'LargeFileDownload' | 'DynamicSiteAcceleration'; +export type DestinationProtocol = 'MatchRequest' | 'Http' | 'Https'; /** - * Defines values for EndpointResourceState. - * Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', 'Stopping' + * Defines values for HeaderAction. + * Possible values include: 'Append', 'Overwrite', 'Delete' * @readonly * @enum {string} */ -export type EndpointResourceState = 'Creating' | 'Deleting' | 'Running' | 'Starting' | 'Stopped' | 'Stopping'; +export type HeaderAction = 'Append' | 'Overwrite' | 'Delete'; /** - * Defines values for QueryStringCachingBehavior. - * Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' + * Defines values for CacheBehavior. + * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' * @readonly * @enum {string} */ -export type QueryStringCachingBehavior = 'IgnoreQueryString' | 'BypassCaching' | 'UseQueryString' | 'NotSet'; +export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; /** - * Defines values for GeoFilterActions. - * Possible values include: 'Block', 'Allow' + * Defines values for QueryStringBehavior. + * Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' * @readonly * @enum {string} */ -export type GeoFilterActions = 'Block' | 'Allow'; +export type QueryStringBehavior = 'Include' | 'IncludeAll' | 'Exclude' | 'ExcludeAll'; /** * Defines values for OriginResourceState. @@ -1118,6 +2280,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' @@ -1135,20 +2305,87 @@ export type CertificateType = 'Shared' | 'Dedicated'; export type ResourceType = 'Microsoft.Cdn/Profiles/Endpoints'; /** - * Defines values for MatchType. - * Possible values include: 'Literal', 'Wildcard' + * Defines values for PolicyEnabledState. + * Possible values include: 'Disabled', 'Enabled' * @readonly * @enum {string} */ -export type MatchType = 'Literal' | 'Wildcard'; +export type PolicyEnabledState = 'Disabled' | 'Enabled'; /** - * Defines values for CacheBehavior. - * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + * Defines values for PolicyMode. + * Possible values include: 'Prevention', 'Detection' * @readonly * @enum {string} */ -export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; +export type PolicyMode = 'Prevention' | 'Detection'; + +/** + * Defines values for CustomRuleEnabledState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type CustomRuleEnabledState = 'Disabled' | 'Enabled'; + +/** + * Defines values for MatchVariable. + * Possible values include: 'RemoteAddr', 'SocketAddr', 'RequestMethod', 'RequestHeader', + * 'RequestUri', 'QueryString', 'RequestBody', 'Cookies', 'PostArgs' + * @readonly + * @enum {string} + */ +export type MatchVariable = 'RemoteAddr' | 'SocketAddr' | 'RequestMethod' | 'RequestHeader' | 'RequestUri' | 'QueryString' | 'RequestBody' | 'Cookies' | 'PostArgs'; + +/** + * Defines values for Operator. + * Possible values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', 'LessThan', + * 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' + * @readonly + * @enum {string} + */ +export type Operator = 'Any' | 'IPMatch' | 'GeoMatch' | 'Equal' | 'Contains' | 'LessThan' | 'GreaterThan' | 'LessThanOrEqual' | 'GreaterThanOrEqual' | 'BeginsWith' | 'EndsWith' | 'RegEx'; + +/** + * Defines values for TransformType. + * Possible values include: 'Lowercase', 'Uppercase', 'Trim', 'UrlDecode', 'UrlEncode', + * 'RemoveNulls' + * @readonly + * @enum {string} + */ +export type TransformType = 'Lowercase' | 'Uppercase' | 'Trim' | 'UrlDecode' | 'UrlEncode' | 'RemoveNulls'; + +/** + * Defines values for ActionType. + * Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + * @readonly + * @enum {string} + */ +export type ActionType = 'Allow' | 'Block' | 'Log' | 'Redirect'; + +/** + * Defines values for ManagedRuleEnabledState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type ManagedRuleEnabledState = 'Disabled' | 'Enabled'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Creating', 'Succeeded', 'Failed' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Creating' | 'Succeeded' | 'Failed'; + +/** + * Defines values for PolicyResourceState. + * Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' + * @readonly + * @enum {string} + */ +export type PolicyResourceState = 'Creating' | 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Deleting'; /** * Contains response data for the list operation. @@ -2149,3 +3386,183 @@ export type EdgeNodesListNextResponse = EdgenodeResult & { parsedBody: EdgenodeResult; }; }; + +/** + * Contains response data for the list operation. + */ +export type PoliciesListResponse = CdnWebApplicationFirewallPolicyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CdnWebApplicationFirewallPolicyList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PoliciesGetResponse = CdnWebApplicationFirewallPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CdnWebApplicationFirewallPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PoliciesCreateOrUpdateResponse = CdnWebApplicationFirewallPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CdnWebApplicationFirewallPolicy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PoliciesUpdateResponse = CdnWebApplicationFirewallPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CdnWebApplicationFirewallPolicy; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PoliciesBeginCreateOrUpdateResponse = CdnWebApplicationFirewallPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CdnWebApplicationFirewallPolicy; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type PoliciesBeginUpdateResponse = CdnWebApplicationFirewallPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CdnWebApplicationFirewallPolicy; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PoliciesListNextResponse = CdnWebApplicationFirewallPolicyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CdnWebApplicationFirewallPolicyList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagedRuleSetsListResponse = ManagedRuleSetDefinitionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedRuleSetDefinitionList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ManagedRuleSetsListNextResponse = ManagedRuleSetDefinitionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedRuleSetDefinitionList; + }; +}; diff --git a/sdk/cdn/arm-cdn/src/models/managedRuleSetsMappers.ts b/sdk/cdn/arm-cdn/src/models/managedRuleSetsMappers.ts new file mode 100644 index 000000000000..b4b64cd37a66 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/managedRuleSetsMappers.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnEndpoint, + CdnManagedHttpsParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomDomainHttpsParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetDefinitionList, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + Sku, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UserManagedHttpsParameters +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/mappers.ts b/sdk/cdn/arm-cdn/src/models/mappers.ts index 324463c9cddd..5bd8ca5c8186 100644 --- a/sdk/cdn/arm-cdn/src/models/mappers.ts +++ b/sdk/cdn/arm-cdn/src/models/mappers.ts @@ -316,6 +316,13 @@ export const Endpoint: msRest.CompositeMapper = { className: "EndpointPropertiesUpdateParametersDeliveryPolicy" } }, + webApplicationFirewallPolicyLink: { + serializedName: "properties.webApplicationFirewallPolicyLink", + type: { + name: "Composite", + className: "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" + } + }, hostName: { readOnly: true, serializedName: "properties.hostName", @@ -394,16 +401,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 +423,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 +451,12 @@ export const DeliveryRule: msRest.CompositeMapper = { name: "Composite", className: "DeliveryRule", modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, order: { required: true, serializedName: "order", @@ -451,27 +464,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" } } } @@ -509,6 +522,22 @@ export const EndpointPropertiesUpdateParametersDeliveryPolicy: msRest.CompositeM } }; +export const EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink: msRest.CompositeMapper = { + serializedName: "EndpointPropertiesUpdateParameters_webApplicationFirewallPolicyLink", + type: { + name: "Composite", + className: "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + export const EndpointUpdateParameters: msRest.CompositeMapper = { serializedName: "EndpointUpdateParameters", type: { @@ -609,51 +638,80 @@ export const EndpointUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "EndpointPropertiesUpdateParametersDeliveryPolicy" } + }, + webApplicationFirewallPolicyLink: { + serializedName: "properties.webApplicationFirewallPolicyLink", + type: { + name: "Composite", + className: "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" + } } } } }; -export const UrlPathConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlPathConditionParameters", +export const RemoteAddressMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RemoteAddressMatchConditionParameters", type: { name: "Composite", - className: "UrlPathConditionParameters", + className: "RemoteAddressMatchConditionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters', type: { name: "String" } }, - path: { + operator: { required: true, - serializedName: "path", + serializedName: "operator", type: { name: "String" } }, - matchType: { + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { required: true, - serializedName: "matchType", + serializedName: "matchValues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { - serializedName: "UrlPath", +export const DeliveryRuleRemoteAddressCondition: msRest.CompositeMapper = { + serializedName: "RemoteAddress", type: { name: "Composite", polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlPathCondition", + className: "DeliveryRuleRemoteAddressCondition", modelProperties: { ...DeliveryRuleCondition.type.modelProperties, parameters: { @@ -662,31 +720,46 @@ export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { defaultValue: {}, type: { name: "Composite", - className: "UrlPathConditionParameters" + className: "RemoteAddressMatchConditionParameters" } } } } }; -export const UrlFileExtensionConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlFileExtensionConditionParameters", +export const RequestMethodMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestMethodMatchConditionParameters", type: { name: "Composite", - className: "UrlFileExtensionConditionParameters", + className: "RequestMethodMatchConditionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters', type: { name: "String" } }, - extensions: { + operator: { required: true, - serializedName: "extensions", + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", type: { name: "Sequence", element: { @@ -700,13 +773,13 @@ export const UrlFileExtensionConditionParameters: msRest.CompositeMapper = { } }; -export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { - serializedName: "UrlFileExtension", +export const DeliveryRuleRequestMethodCondition: msRest.CompositeMapper = { + serializedName: "RequestMethod", type: { name: "Composite", polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlFileExtensionCondition", + className: "DeliveryRuleRequestMethodCondition", modelProperties: { ...DeliveryRuleCondition.type.modelProperties, parameters: { @@ -715,86 +788,139 @@ export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { defaultValue: {}, type: { name: "Composite", - className: "UrlFileExtensionConditionParameters" + className: "RequestMethodMatchConditionParameters" } } } } }; -export const CacheExpirationActionParameters: msRest.CompositeMapper = { - serializedName: "CacheExpirationActionParameters", +export const QueryStringMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "QueryStringMatchConditionParameters", type: { name: "Composite", - className: "CacheExpirationActionParameters", + className: "QueryStringMatchConditionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters', type: { name: "String" } }, - cacheBehavior: { + operator: { required: true, - serializedName: "cacheBehavior", + serializedName: "operator", type: { name: "String" } }, - cacheType: { + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { required: true, - isConstant: true, - serializedName: "cacheType", - defaultValue: 'All', + serializedName: "matchValues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - cacheDuration: { - nullable: true, - serializedName: "cacheDuration", + transforms: { + serializedName: "transforms", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const DeliveryRuleCacheExpirationAction: msRest.CompositeMapper = { - serializedName: "CacheExpiration", +export const DeliveryRuleQueryStringCondition: msRest.CompositeMapper = { + serializedName: "QueryString", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleAction", - className: "DeliveryRuleCacheExpirationAction", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleQueryStringCondition", modelProperties: { - ...DeliveryRuleAction.type.modelProperties, + ...DeliveryRuleCondition.type.modelProperties, parameters: { required: true, serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "CacheExpirationActionParameters" + className: "QueryStringMatchConditionParameters" } } } } }; -export const PurgeParameters: msRest.CompositeMapper = { - serializedName: "PurgeParameters", +export const PostArgsMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "PostArgsMatchConditionParameters", type: { name: "Composite", - className: "PurgeParameters", + className: "PostArgsMatchConditionParameters", modelProperties: { - contentPaths: { + odatatype: { required: true, - serializedName: "contentPaths", + 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: { @@ -808,407 +934,1929 @@ export const PurgeParameters: msRest.CompositeMapper = { } }; -export const LoadParameters: msRest.CompositeMapper = { - serializedName: "LoadParameters", +export const DeliveryRulePostArgsCondition: msRest.CompositeMapper = { + serializedName: "PostArgs", type: { name: "Composite", - className: "LoadParameters", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRulePostArgsCondition", modelProperties: { - contentPaths: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { required: true, - serializedName: "contentPaths", + serializedName: "parameters", + defaultValue: {}, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "PostArgsMatchConditionParameters" } } } } }; -export const Origin: msRest.CompositeMapper = { - serializedName: "Origin", +export const RequestUriMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestUriMatchConditionParameters", type: { name: "Composite", - className: "Origin", + className: "RequestUriMatchConditionParameters", modelProperties: { - ...TrackedResource.type.modelProperties, - hostName: { + odatatype: { required: true, - serializedName: "properties.hostName", + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters', type: { name: "String" } }, - httpPort: { - serializedName: "properties.httpPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, + operator: { + required: true, + serializedName: "operator", type: { - name: "Number" + name: "String" } }, - httpsPort: { - serializedName: "properties.httpsPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, + negateCondition: { + serializedName: "negateCondition", type: { - name: "Number" + name: "Boolean" } }, - resourceState: { - readOnly: true, - serializedName: "properties.resourceState", + matchValues: { + required: true, + serializedName: "matchValues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + transforms: { + serializedName: "transforms", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const OriginUpdateParameters: msRest.CompositeMapper = { - serializedName: "OriginUpdateParameters", +export const DeliveryRuleRequestUriCondition: msRest.CompositeMapper = { + serializedName: "RequestUri", type: { name: "Composite", - className: "OriginUpdateParameters", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestUriCondition", modelProperties: { - hostName: { - serializedName: "properties.hostName", + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, type: { - name: "String" - } - }, - httpPort: { - serializedName: "properties.httpPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - }, - httpsPort: { - serializedName: "properties.httpsPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - type: { - name: "Number" + name: "Composite", + className: "RequestUriMatchConditionParameters" } } } } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const CustomDomain: msRest.CompositeMapper = { - serializedName: "CustomDomain", +export const RequestHeaderMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestHeaderMatchConditionParameters", type: { name: "Composite", - className: "CustomDomain", + className: "RequestHeaderMatchConditionParameters", modelProperties: { - ...ProxyResource.type.modelProperties, - hostName: { + odatatype: { required: true, - serializedName: "properties.hostName", + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters', type: { name: "String" } }, - resourceState: { - readOnly: true, - serializedName: "properties.resourceState", + selector: { + required: true, + serializedName: "selector", type: { name: "String" } }, - customHttpsProvisioningState: { - readOnly: true, - serializedName: "properties.customHttpsProvisioningState", + operator: { + required: true, + serializedName: "operator", type: { name: "String" } }, - customHttpsProvisioningSubstate: { - readOnly: true, - serializedName: "properties.customHttpsProvisioningSubstate", + negateCondition: { + serializedName: "negateCondition", type: { - name: "String" + name: "Boolean" } }, - validationData: { - serializedName: "properties.validationData", + matchValues: { + required: true, + serializedName: "matchValues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + transforms: { + serializedName: "transforms", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const CustomDomainParameters: msRest.CompositeMapper = { - serializedName: "CustomDomainParameters", +export const DeliveryRuleRequestHeaderCondition: msRest.CompositeMapper = { + serializedName: "RequestHeader", type: { name: "Composite", - className: "CustomDomainParameters", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestHeaderCondition", modelProperties: { - hostName: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { required: true, - serializedName: "properties.hostName", + serializedName: "parameters", + defaultValue: {}, type: { - name: "String" + name: "Composite", + className: "RequestHeaderMatchConditionParameters" } } } } }; -export const CustomDomainHttpsParameters: msRest.CompositeMapper = { - serializedName: "CustomDomainHttpsParameters", +export const RequestBodyMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestBodyMatchConditionParameters", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "certificateSource", - clientName: "certificateSource" - }, - uberParent: "CustomDomainHttpsParameters", - className: "CustomDomainHttpsParameters", + className: "RequestBodyMatchConditionParameters", modelProperties: { - protocolType: { + odatatype: { required: true, - serializedName: "protocolType", + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters', type: { name: "String" } }, - certificateSource: { + operator: { required: true, - serializedName: "certificateSource", + 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 CdnCertificateSourceParameters: msRest.CompositeMapper = { - serializedName: "CdnCertificateSourceParameters", +export const DeliveryRuleRequestBodyCondition: msRest.CompositeMapper = { + serializedName: "RequestBody", type: { name: "Composite", - className: "CdnCertificateSourceParameters", + 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.CdnCertificateSourceParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters', type: { name: "String" } }, - certificateType: { + operator: { required: true, - serializedName: "certificateType", + 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 CdnManagedHttpsParameters: msRest.CompositeMapper = { - serializedName: "Cdn", +export const DeliveryRuleRequestSchemeCondition: msRest.CompositeMapper = { + serializedName: "RequestScheme", type: { name: "Composite", - polymorphicDiscriminator: CustomDomainHttpsParameters.type.polymorphicDiscriminator, - uberParent: "CustomDomainHttpsParameters", - className: "CdnManagedHttpsParameters", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestSchemeCondition", modelProperties: { - ...CustomDomainHttpsParameters.type.modelProperties, - certificateSourceParameters: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { required: true, - serializedName: "certificateSourceParameters", + serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "CdnCertificateSourceParameters" + className: "RequestSchemeMatchConditionParameters" } } } } }; -export const KeyVaultCertificateSourceParameters: msRest.CompositeMapper = { - serializedName: "KeyVaultCertificateSourceParameters", +export const UrlPathMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlPathMatchConditionParameters", type: { name: "Composite", - className: "KeyVaultCertificateSourceParameters", + className: "UrlPathMatchConditionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: '#Microsoft.Azure.Cdn.Models.KeyVaultCertificateSourceParameters', - type: { - name: "String" - } - }, - subscriptionId: { - required: true, - serializedName: "subscriptionId", - type: { - name: "String" - } - }, - resourceGroupName: { - required: true, - serializedName: "resourceGroupName", - type: { - name: "String" - } - }, - vaultName: { - required: true, - serializedName: "vaultName", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters', type: { name: "String" } }, - secretName: { + operator: { required: true, - serializedName: "secretName", + serializedName: "operator", type: { name: "String" } }, - secretVersion: { - required: true, - serializedName: "secretVersion", + negateCondition: { + serializedName: "negateCondition", type: { - name: "String" + name: "Boolean" } }, - updateRule: { + matchValues: { required: true, - isConstant: true, - serializedName: "updateRule", - defaultValue: 'NoAction', + serializedName: "matchValues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - deleteRule: { - required: true, - isConstant: true, - serializedName: "deleteRule", - defaultValue: 'NoAction', + transforms: { + serializedName: "transforms", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const UserManagedHttpsParameters: msRest.CompositeMapper = { - serializedName: "AzureKeyVault", +export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { + serializedName: "UrlPath", type: { name: "Composite", - polymorphicDiscriminator: CustomDomainHttpsParameters.type.polymorphicDiscriminator, - uberParent: "CustomDomainHttpsParameters", - className: "UserManagedHttpsParameters", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlPathCondition", modelProperties: { - ...CustomDomainHttpsParameters.type.modelProperties, - certificateSourceParameters: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { required: true, - serializedName: "certificateSourceParameters", + serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "KeyVaultCertificateSourceParameters" + className: "UrlPathMatchConditionParameters" } } } } }; -export const ValidateCustomDomainInput: msRest.CompositeMapper = { - serializedName: "ValidateCustomDomainInput", +export const UrlFileExtensionMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlFileExtensionMatchConditionParameters", type: { name: "Composite", - className: "ValidateCustomDomainInput", + className: "UrlFileExtensionMatchConditionParameters", modelProperties: { - hostName: { + odatatype: { required: true, - serializedName: "hostName", + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters', type: { name: "String" } - } - } - } -}; - -export const ValidateCustomDomainOutput: msRest.CompositeMapper = { - serializedName: "ValidateCustomDomainOutput", + }, + 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" + } + } + } + } +}; + +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" + } + }, + redirectType: { + required: true, + serializedName: "redirectType", + type: { + name: "String" + } + }, + destinationProtocol: { + serializedName: "destinationProtocol", + type: { + name: "String" + } + }, + customPath: { + serializedName: "customPath", + type: { + name: "String" + } + }, + customHostname: { + serializedName: "customHostname", + type: { + name: "String" + } + }, + customQueryString: { + serializedName: "customQueryString", + type: { + name: "String" + } + }, + customFragment: { + serializedName: "customFragment", + type: { + name: "String" + } + } + } + } +}; + +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: "UrlRedirectActionParameters" + } + } + } + } +}; + +export const UrlRewriteActionParameters: msRest.CompositeMapper = { + serializedName: "UrlRewriteActionParameters", + type: { + name: "Composite", + className: "UrlRewriteActionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters', + type: { + name: "String" + } + }, + sourcePattern: { + required: true, + serializedName: "sourcePattern", + type: { + name: "String" + } + }, + destination: { + required: true, + serializedName: "destination", + type: { + name: "String" + } + }, + preserveUnmatchedPath: { + serializedName: "preserveUnmatchedPath", + type: { + name: "Boolean" + } + } + } + } +}; + +export const UrlRewriteAction: msRest.CompositeMapper = { + serializedName: "UrlRewrite", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "UrlRewriteAction", + modelProperties: { + ...DeliveryRuleAction.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "UrlRewriteActionParameters" + } + } + } + } +}; + +export const HeaderActionParameters: msRest.CompositeMapper = { + serializedName: "HeaderActionParameters", + type: { + name: "Composite", + className: "HeaderActionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters', + type: { + name: "String" + } + }, + headerAction: { + required: true, + serializedName: "headerAction", + type: { + name: "String" + } + }, + headerName: { + required: true, + serializedName: "headerName", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const DeliveryRuleRequestHeaderAction: msRest.CompositeMapper = { + serializedName: "ModifyRequestHeader", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleRequestHeaderAction", + 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: "HeaderActionParameters" + } + } + } + } +}; + +export const CacheExpirationActionParameters: msRest.CompositeMapper = { + serializedName: "CacheExpirationActionParameters", + type: { + name: "Composite", + className: "CacheExpirationActionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', + type: { + name: "String" + } + }, + cacheBehavior: { + required: true, + serializedName: "cacheBehavior", + type: { + name: "String" + } + }, + cacheType: { + required: true, + isConstant: true, + serializedName: "cacheType", + defaultValue: 'All', + type: { + name: "String" + } + }, + cacheDuration: { + nullable: true, + serializedName: "cacheDuration", + type: { + name: "String" + } + } + } + } +}; + +export const DeliveryRuleCacheExpirationAction: msRest.CompositeMapper = { + serializedName: "CacheExpiration", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleCacheExpirationAction", + modelProperties: { + ...DeliveryRuleAction.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "CacheExpirationActionParameters" + } + } + } + } +}; + +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: { + name: "Composite", + className: "PurgeParameters", + modelProperties: { + contentPaths: { + required: true, + serializedName: "contentPaths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const LoadParameters: msRest.CompositeMapper = { + serializedName: "LoadParameters", + type: { + name: "Composite", + className: "LoadParameters", + modelProperties: { + contentPaths: { + required: true, + serializedName: "contentPaths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Origin: msRest.CompositeMapper = { + serializedName: "Origin", + type: { + name: "Composite", + className: "Origin", + modelProperties: { + ...TrackedResource.type.modelProperties, + hostName: { + required: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + httpPort: { + serializedName: "properties.httpPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + httpsPort: { + serializedName: "properties.httpsPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + resourceState: { + readOnly: true, + serializedName: "properties.resourceState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const OriginUpdateParameters: msRest.CompositeMapper = { + serializedName: "OriginUpdateParameters", + type: { + name: "Composite", + className: "OriginUpdateParameters", + modelProperties: { + hostName: { + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + httpPort: { + serializedName: "properties.httpPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + httpsPort: { + serializedName: "properties.httpsPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + +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: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const CustomDomain: msRest.CompositeMapper = { + serializedName: "CustomDomain", + type: { + name: "Composite", + className: "CustomDomain", + modelProperties: { + ...ProxyResource.type.modelProperties, + hostName: { + required: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + resourceState: { + readOnly: true, + serializedName: "properties.resourceState", + type: { + name: "String" + } + }, + customHttpsProvisioningState: { + readOnly: true, + serializedName: "properties.customHttpsProvisioningState", + type: { + name: "String" + } + }, + customHttpsProvisioningSubstate: { + readOnly: true, + serializedName: "properties.customHttpsProvisioningSubstate", + type: { + name: "String" + } + }, + customHttpsParameters: { + serializedName: "properties.customHttpsParameters", + type: { + name: "Composite", + className: "CustomDomainHttpsParameters" + } + }, + validationData: { + serializedName: "properties.validationData", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const CustomDomainParameters: msRest.CompositeMapper = { + serializedName: "CustomDomainParameters", + type: { + name: "Composite", + className: "CustomDomainParameters", + modelProperties: { + hostName: { + required: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + } + } + } +}; + +export const CdnCertificateSourceParameters: msRest.CompositeMapper = { + serializedName: "CdnCertificateSourceParameters", + type: { + name: "Composite", + className: "CdnCertificateSourceParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters', + type: { + name: "String" + } + }, + certificateType: { + required: true, + serializedName: "certificateType", + type: { + name: "String" + } + } + } + } +}; + +export const CdnManagedHttpsParameters: msRest.CompositeMapper = { + serializedName: "Cdn", + type: { + name: "Composite", + polymorphicDiscriminator: CustomDomainHttpsParameters.type.polymorphicDiscriminator, + uberParent: "CustomDomainHttpsParameters", + className: "CdnManagedHttpsParameters", + modelProperties: { + ...CustomDomainHttpsParameters.type.modelProperties, + certificateSourceParameters: { + required: true, + serializedName: "certificateSourceParameters", + defaultValue: {}, + type: { + name: "Composite", + className: "CdnCertificateSourceParameters" + } + } + } + } +}; + +export const KeyVaultCertificateSourceParameters: msRest.CompositeMapper = { + serializedName: "KeyVaultCertificateSourceParameters", + type: { + name: "Composite", + className: "KeyVaultCertificateSourceParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.KeyVaultCertificateSourceParameters', + type: { + name: "String" + } + }, + subscriptionId: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroupName: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + }, + vaultName: { + required: true, + serializedName: "vaultName", + type: { + name: "String" + } + }, + secretName: { + required: true, + serializedName: "secretName", + type: { + name: "String" + } + }, + secretVersion: { + required: true, + serializedName: "secretVersion", + type: { + name: "String" + } + }, + updateRule: { + required: true, + isConstant: true, + serializedName: "updateRule", + defaultValue: 'NoAction', + type: { + name: "String" + } + }, + deleteRule: { + required: true, + isConstant: true, + serializedName: "deleteRule", + defaultValue: 'NoAction', + type: { + name: "String" + } + } + } + } +}; + +export const UserManagedHttpsParameters: msRest.CompositeMapper = { + serializedName: "AzureKeyVault", + type: { + name: "Composite", + polymorphicDiscriminator: CustomDomainHttpsParameters.type.polymorphicDiscriminator, + uberParent: "CustomDomainHttpsParameters", + className: "UserManagedHttpsParameters", + modelProperties: { + ...CustomDomainHttpsParameters.type.modelProperties, + certificateSourceParameters: { + required: true, + serializedName: "certificateSourceParameters", + defaultValue: {}, + type: { + name: "Composite", + className: "KeyVaultCertificateSourceParameters" + } + } + } + } +}; + +export const ValidateCustomDomainInput: msRest.CompositeMapper = { + serializedName: "ValidateCustomDomainInput", + type: { + name: "Composite", + className: "ValidateCustomDomainInput", + modelProperties: { + hostName: { + required: true, + serializedName: "hostName", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateCustomDomainOutput: msRest.CompositeMapper = { + serializedName: "ValidateCustomDomainOutput", + type: { + name: "Composite", + className: "ValidateCustomDomainOutput", + modelProperties: { + customDomainValidated: { + readOnly: true, + serializedName: "customDomainValidated", + type: { + name: "Boolean" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityInput: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityInput", + type: { + name: "Composite", + className: "CheckNameAvailabilityInput", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + required: true, + isConstant: true, + serializedName: "type", + defaultValue: 'Microsoft.Cdn/Profiles/Endpoints', + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityOutput: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityOutput", + type: { + name: "Composite", + className: "CheckNameAvailabilityOutput", + modelProperties: { + nameAvailable: { + readOnly: true, + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateProbeInput: msRest.CompositeMapper = { + serializedName: "ValidateProbeInput", type: { name: "Composite", - className: "ValidateCustomDomainOutput", + className: "ValidateProbeInput", + modelProperties: { + probeURL: { + required: true, + serializedName: "probeURL", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateProbeOutput: msRest.CompositeMapper = { + serializedName: "ValidateProbeOutput", + type: { + name: "Composite", + className: "ValidateProbeOutput", + modelProperties: { + isValid: { + readOnly: true, + serializedName: "isValid", + type: { + name: "Boolean" + } + }, + errorCode: { + readOnly: true, + serializedName: "errorCode", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceUsage: msRest.CompositeMapper = { + serializedName: "ResourceUsage", + type: { + name: "Composite", + className: "ResourceUsage", + modelProperties: { + resourceType: { + readOnly: true, + serializedName: "resourceType", + type: { + name: "String" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + currentValue: { + readOnly: true, + serializedName: "currentValue", + type: { + name: "Number" + } + }, + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const CidrIpAddress: msRest.CompositeMapper = { + serializedName: "cidrIpAddress", + type: { + name: "Composite", + className: "CidrIpAddress", + modelProperties: { + baseIpAddress: { + serializedName: "baseIpAddress", + type: { + name: "String" + } + }, + prefixLength: { + serializedName: "prefixLength", + type: { + name: "Number" + } + } + } + } +}; + +export const IpAddressGroup: msRest.CompositeMapper = { + serializedName: "IpAddressGroup", + type: { + name: "Composite", + className: "IpAddressGroup", + modelProperties: { + deliveryRegion: { + serializedName: "deliveryRegion", + type: { + name: "String" + } + }, + ipv4Addresses: { + serializedName: "ipv4Addresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CidrIpAddress" + } + } + } + }, + ipv6Addresses: { + serializedName: "ipv6Addresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CidrIpAddress" + } + } + } + } + } + } +}; + +export const EdgeNode: msRest.CompositeMapper = { + serializedName: "EdgeNode", + type: { + name: "Composite", + className: "EdgeNode", + modelProperties: { + ...ProxyResource.type.modelProperties, + ipAddressGroups: { + required: true, + serializedName: "properties.ipAddressGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddressGroup" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", modelProperties: { - customDomainValidated: { + code: { readOnly: true, - serializedName: "customDomainValidated", + serializedName: "code", type: { - name: "Boolean" + name: "String" } }, - reason: { + message: { readOnly: true, - serializedName: "reason", + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const PolicySettings: msRest.CompositeMapper = { + serializedName: "policySettings", + type: { + name: "Composite", + className: "PolicySettings", + modelProperties: { + enabledState: { + serializedName: "enabledState", type: { name: "String" } }, - message: { - readOnly: true, - serializedName: "message", + mode: { + serializedName: "mode", + type: { + name: "String" + } + }, + defaultRedirectUrl: { + serializedName: "defaultRedirectUrl", + type: { + name: "String" + } + }, + defaultCustomBlockResponseStatusCode: { + serializedName: "defaultCustomBlockResponseStatusCode", + type: { + name: "Number" + } + }, + defaultCustomBlockResponseBody: { + serializedName: "defaultCustomBlockResponseBody", + constraints: { + Pattern: /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$/ + }, type: { name: "String" } @@ -1217,11 +2865,11 @@ export const ValidateCustomDomainOutput: msRest.CompositeMapper = { } }; -export const CheckNameAvailabilityInput: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityInput", +export const CustomRule: msRest.CompositeMapper = { + serializedName: "CustomRule", type: { name: "Composite", - className: "CheckNameAvailabilityInput", + className: "CustomRule", modelProperties: { name: { required: true, @@ -1230,11 +2878,39 @@ export const CheckNameAvailabilityInput: msRest.CompositeMapper = { name: "String" } }, - type: { + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, + priority: { required: true, - isConstant: true, - serializedName: "type", - defaultValue: 'Microsoft.Cdn/Profiles/Endpoints', + serializedName: "priority", + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + matchConditions: { + required: true, + serializedName: "matchConditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MatchCondition" + } + } + } + }, + action: { + required: true, + serializedName: "action", type: { name: "String" } @@ -1243,46 +2919,275 @@ export const CheckNameAvailabilityInput: msRest.CompositeMapper = { } }; -export const CheckNameAvailabilityOutput: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityOutput", +export const RateLimitRule: msRest.CompositeMapper = { + serializedName: "RateLimitRule", type: { name: "Composite", - className: "CheckNameAvailabilityOutput", + className: "RateLimitRule", modelProperties: { - nameAvailable: { - readOnly: true, - serializedName: "nameAvailable", + ...CustomRule.type.modelProperties, + rateLimitThreshold: { + required: true, + serializedName: "rateLimitThreshold", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + rateLimitDurationInMinutes: { + required: true, + serializedName: "rateLimitDurationInMinutes", + constraints: { + InclusiveMaximum: 60, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const RateLimitRuleList: msRest.CompositeMapper = { + serializedName: "RateLimitRuleList", + type: { + name: "Composite", + className: "RateLimitRuleList", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RateLimitRule" + } + } + } + } + } + } +}; + +export const MatchCondition: msRest.CompositeMapper = { + serializedName: "MatchCondition", + type: { + name: "Composite", + className: "MatchCondition", + modelProperties: { + matchVariable: { + required: true, + serializedName: "matchVariable", + type: { + name: "String" + } + }, + selector: { + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", type: { name: "Boolean" } }, - reason: { - readOnly: true, - serializedName: "reason", + matchValue: { + required: true, + serializedName: "matchValue", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CustomRuleList: msRest.CompositeMapper = { + serializedName: "CustomRuleList", + type: { + name: "Composite", + className: "CustomRuleList", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomRule" + } + } + } + } + } + } +}; + +export const ManagedRuleOverride: msRest.CompositeMapper = { + serializedName: "ManagedRuleOverride", + type: { + name: "Composite", + className: "ManagedRuleOverride", + modelProperties: { + ruleId: { + required: true, + serializedName: "ruleId", type: { name: "String" } }, - message: { - readOnly: true, - serializedName: "message", + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedRuleGroupOverride: msRest.CompositeMapper = { + serializedName: "ManagedRuleGroupOverride", + type: { + name: "Composite", + className: "ManagedRuleGroupOverride", + modelProperties: { + ruleGroupName: { + required: true, + serializedName: "ruleGroupName", + type: { + name: "String" + } + }, + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleOverride" + } + } + } + } + } + } +}; + +export const ManagedRuleSet: msRest.CompositeMapper = { + serializedName: "ManagedRuleSet", + type: { + name: "Composite", + className: "ManagedRuleSet", + modelProperties: { + ruleSetType: { + required: true, + serializedName: "ruleSetType", + type: { + name: "String" + } + }, + ruleSetVersion: { + required: true, + serializedName: "ruleSetVersion", type: { name: "String" } + }, + anomalyScore: { + serializedName: "anomalyScore", + constraints: { + InclusiveMaximum: 20, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + ruleGroupOverrides: { + serializedName: "ruleGroupOverrides", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleGroupOverride" + } + } + } + } + } + } +}; + +export const ManagedRuleSetList: msRest.CompositeMapper = { + serializedName: "ManagedRuleSetList", + type: { + name: "Composite", + className: "ManagedRuleSetList", + modelProperties: { + managedRuleSets: { + serializedName: "managedRuleSets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleSet" + } + } + } } } } }; -export const ValidateProbeInput: msRest.CompositeMapper = { - serializedName: "ValidateProbeInput", +export const CdnEndpoint: msRest.CompositeMapper = { + serializedName: "CdnEndpoint", type: { name: "Composite", - className: "ValidateProbeInput", + className: "CdnEndpoint", modelProperties: { - probeURL: { - required: true, - serializedName: "probeURL", + id: { + serializedName: "id", type: { name: "String" } @@ -1291,184 +3196,160 @@ export const ValidateProbeInput: msRest.CompositeMapper = { } }; -export const ValidateProbeOutput: msRest.CompositeMapper = { - serializedName: "ValidateProbeOutput", +export const CdnWebApplicationFirewallPolicy: msRest.CompositeMapper = { + serializedName: "CdnWebApplicationFirewallPolicy", type: { name: "Composite", - className: "ValidateProbeOutput", + className: "CdnWebApplicationFirewallPolicy", modelProperties: { - isValid: { - readOnly: true, - serializedName: "isValid", + ...TrackedResource.type.modelProperties, + policySettings: { + serializedName: "properties.policySettings", type: { - name: "Boolean" + name: "Composite", + className: "PolicySettings" } }, - errorCode: { - readOnly: true, - serializedName: "errorCode", + rateLimitRules: { + serializedName: "properties.rateLimitRules", type: { - name: "String" + name: "Composite", + className: "RateLimitRuleList" } }, - message: { - readOnly: true, - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const ResourceUsage: msRest.CompositeMapper = { - serializedName: "ResourceUsage", - type: { - name: "Composite", - className: "ResourceUsage", - modelProperties: { - resourceType: { - readOnly: true, - serializedName: "resourceType", + customRules: { + serializedName: "properties.customRules", type: { - name: "String" + name: "Composite", + className: "CustomRuleList" } }, - unit: { - readOnly: true, - serializedName: "unit", + managedRules: { + serializedName: "properties.managedRules", type: { - name: "String" + name: "Composite", + className: "ManagedRuleSetList" } }, - currentValue: { + endpointLinks: { readOnly: true, - serializedName: "currentValue", + serializedName: "properties.endpointLinks", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CdnEndpoint" + } + } } }, - limit: { + provisioningState: { readOnly: true, - serializedName: "limit", + serializedName: "properties.provisioningState", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { + }, + resourceState: { readOnly: true, - serializedName: "provider", + serializedName: "properties.resourceState", type: { name: "String" } }, - resource: { - readOnly: true, - serializedName: "resource", + etag: { + serializedName: "etag", type: { name: "String" } }, - operation: { - readOnly: true, - serializedName: "operation", + sku: { + required: true, + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "Sku" } } } } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const CdnWebApplicationFirewallPolicyPatchParameters: msRest.CompositeMapper = { + serializedName: "CdnWebApplicationFirewallPolicyPatchParameters", type: { name: "Composite", - className: "Operation", + className: "CdnWebApplicationFirewallPolicyPatchParameters", modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "OperationDisplay" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } } }; -export const CidrIpAddress: msRest.CompositeMapper = { - serializedName: "cidrIpAddress", +export const ManagedRuleDefinition: msRest.CompositeMapper = { + serializedName: "ManagedRuleDefinition", type: { name: "Composite", - className: "CidrIpAddress", + className: "ManagedRuleDefinition", modelProperties: { - baseIpAddress: { - serializedName: "baseIpAddress", + ruleId: { + readOnly: true, + serializedName: "ruleId", type: { name: "String" } }, - prefixLength: { - serializedName: "prefixLength", + description: { + readOnly: true, + serializedName: "description", type: { - name: "Number" + name: "String" } } } } }; -export const IpAddressGroup: msRest.CompositeMapper = { - serializedName: "IpAddressGroup", +export const ManagedRuleGroupDefinition: msRest.CompositeMapper = { + serializedName: "ManagedRuleGroupDefinition", type: { name: "Composite", - className: "IpAddressGroup", + className: "ManagedRuleGroupDefinition", modelProperties: { - deliveryRegion: { - serializedName: "deliveryRegion", + ruleGroupName: { + readOnly: true, + serializedName: "ruleGroupName", type: { name: "String" } }, - ipv4Addresses: { - serializedName: "ipv4Addresses", + description: { + readOnly: true, + serializedName: "description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CidrIpAddress" - } - } + name: "String" } }, - ipv6Addresses: { - serializedName: "ipv6Addresses", + rules: { + readOnly: true, + serializedName: "rules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CidrIpAddress" + className: "ManagedRuleDefinition" } } } @@ -1477,49 +3358,53 @@ export const IpAddressGroup: msRest.CompositeMapper = { } }; -export const EdgeNode: msRest.CompositeMapper = { - serializedName: "EdgeNode", +export const ManagedRuleSetDefinition: msRest.CompositeMapper = { + serializedName: "ManagedRuleSetDefinition", type: { name: "Composite", - className: "EdgeNode", + className: "ManagedRuleSetDefinition", modelProperties: { - ...ProxyResource.type.modelProperties, - ipAddressGroups: { - required: true, - serializedName: "properties.ipAddressGroups", + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAddressGroup" - } - } + name: "String" } - } - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { + }, + ruleSetType: { readOnly: true, - serializedName: "code", + serializedName: "properties.ruleSetType", type: { name: "String" } }, - message: { + ruleSetVersion: { readOnly: true, - serializedName: "message", + serializedName: "properties.ruleSetVersion", type: { name: "String" } + }, + ruleGroups: { + readOnly: true, + serializedName: "properties.ruleGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleGroupDefinition" + } + } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } } } } @@ -1728,12 +3613,87 @@ export const EdgenodeResult: msRest.CompositeMapper = { } }; +export const CdnWebApplicationFirewallPolicyList: msRest.CompositeMapper = { + serializedName: "CdnWebApplicationFirewallPolicyList", + type: { + name: "Composite", + className: "CdnWebApplicationFirewallPolicyList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CdnWebApplicationFirewallPolicy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedRuleSetDefinitionList: msRest.CompositeMapper = { + serializedName: "ManagedRuleSetDefinitionList", + type: { + name: "Composite", + className: "ManagedRuleSetDefinitionList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleSetDefinition" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + 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..3df3e481d47b 100644 --- a/sdk/cdn/arm-cdn/src/models/originsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/originsMappers.ts @@ -10,31 +10,86 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnEndpoint, + CdnManagedHttpsParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, + CustomRule, + CustomRuleList, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, Origin, OriginListResult, OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + 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/parameters.ts b/sdk/cdn/arm-cdn/src/models/parameters.ts index dea0816e4379..c756a9e405fb 100644 --- a/sdk/cdn/arm-cdn/src/models/parameters.ts +++ b/sdk/cdn/arm-cdn/src/models/parameters.ts @@ -71,6 +71,19 @@ export const originName: msRest.OperationURLParameter = { } } }; +export const policyName: msRest.OperationURLParameter = { + parameterPath: "policyName", + mapper: { + required: true, + serializedName: "policyName", + constraints: { + MaxLength: 128 + }, + type: { + name: "String" + } + } +}; export const profileName: msRest.OperationURLParameter = { parameterPath: "profileName", mapper: { @@ -81,7 +94,7 @@ export const profileName: msRest.OperationURLParameter = { } } }; -export const resourceGroupName: msRest.OperationURLParameter = { +export const resourceGroupName0: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, @@ -96,6 +109,21 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const resourceGroupName1: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + constraints: { + MaxLength: 80, + MinLength: 1, + Pattern: /^[a-zA-Z0-9_\-\(\)\.]*[^\.]$/ + }, + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/cdn/arm-cdn/src/models/policiesMappers.ts b/sdk/cdn/arm-cdn/src/models/policiesMappers.ts new file mode 100644 index 000000000000..6940e6506522 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/policiesMappers.ts @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnEndpoint, + CdnManagedHttpsParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyList, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CloudError, + CookiesMatchConditionParameters, + CustomDomain, + CustomDomainHttpsParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + Sku, + TrackedResource, + 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..ba17ac78acf8 100644 --- a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts @@ -10,28 +10,77 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnCertificateSourceParameters, + CdnEndpoint, + CdnManagedHttpsParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, + CustomDomainHttpsParameters, + CustomRule, + CustomRuleList, DeepCreatedOrigin, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, Origin, OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, Profile, ProfileListResult, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, ResourceUsage, ResourceUsageListResult, @@ -39,6 +88,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/src/operations/customDomains.ts b/sdk/cdn/arm-cdn/src/operations/customDomains.ts index 83415680c61c..c6745c45add9 100644 --- a/sdk/cdn/arm-cdn/src/operations/customDomains.ts +++ b/sdk/cdn/arm-cdn/src/operations/customDomains.ts @@ -293,7 +293,7 @@ const listByEndpointOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -319,7 +319,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -346,7 +346,7 @@ const disableCustomHttpsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -374,7 +374,7 @@ const enableCustomHttpsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -409,7 +409,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -451,7 +451,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, diff --git a/sdk/cdn/arm-cdn/src/operations/endpoints.ts b/sdk/cdn/arm-cdn/src/operations/endpoints.ts index d5894f45add5..6821f5f698c9 100644 --- a/sdk/cdn/arm-cdn/src/operations/endpoints.ts +++ b/sdk/cdn/arm-cdn/src/operations/endpoints.ts @@ -492,7 +492,7 @@ const listByProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -517,7 +517,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -543,7 +543,7 @@ const validateCustomDomainOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -578,7 +578,7 @@ const listResourceUsageOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -604,7 +604,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -643,7 +643,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -679,7 +679,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -704,7 +704,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -733,7 +733,7 @@ const beginStopOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -762,7 +762,7 @@ const beginPurgeContentOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -796,7 +796,7 @@ const beginLoadContentOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId diff --git a/sdk/cdn/arm-cdn/src/operations/index.ts b/sdk/cdn/arm-cdn/src/operations/index.ts index 36365ff3eca2..f0c49f11b879 100644 --- a/sdk/cdn/arm-cdn/src/operations/index.ts +++ b/sdk/cdn/arm-cdn/src/operations/index.ts @@ -15,3 +15,5 @@ export * from "./customDomains"; export * from "./resourceUsageOperations"; export * from "./operations"; export * from "./edgeNodes"; +export * from "./policies"; +export * from "./managedRuleSets"; diff --git a/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts new file mode 100644 index 000000000000..55a5f62e5faa --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts @@ -0,0 +1,126 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedRuleSetsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a ManagedRuleSets. */ +export class ManagedRuleSets { + private readonly client: CdnManagementClientContext; + + /** + * Create a ManagedRuleSets. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists all available managed rule sets. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all available managed rule sets. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Cdn/CdnWebApplicationFirewallManagedRuleSets", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedRuleSetDefinitionList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedRuleSetDefinitionList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/origins.ts b/sdk/cdn/arm-cdn/src/operations/origins.ts index 88d68f8f92ee..654523c82c29 100644 --- a/sdk/cdn/arm-cdn/src/operations/origins.ts +++ b/sdk/cdn/arm-cdn/src/operations/origins.ts @@ -177,7 +177,7 @@ const listByEndpointOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -203,7 +203,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originName, @@ -230,7 +230,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originName, diff --git a/sdk/cdn/arm-cdn/src/operations/policies.ts b/sdk/cdn/arm-cdn/src/operations/policies.ts new file mode 100644 index 000000000000..6b04506f1517 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/policies.ts @@ -0,0 +1,388 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/policiesMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a Policies. */ +export class Policies { + private readonly client: CdnManagementClientContext; + + /** + * Create a Policies. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the protection policies within a resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param callback The callback + */ + list(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Retrieve protection policy with specified name within a resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param callback The callback + */ + get(resourceGroupName: string, policyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, policyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + policyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update policy with specified rule set name within a resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param cdnWebApplicationFirewallPolicy Policy to be created. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicy: Models.CdnWebApplicationFirewallPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,policyName,cdnWebApplicationFirewallPolicy,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + * specified subscription and resource group + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, policyName: string, options?: Models.PoliciesUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,policyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes Policy + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, policyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, policyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + policyName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Create or update policy with specified rule set name within a resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param cdnWebApplicationFirewallPolicy Policy to be created. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicy: Models.CdnWebApplicationFirewallPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + policyName, + cdnWebApplicationFirewallPolicy, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + * specified subscription and resource group + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the CdnWebApplicationFirewallPolicy. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, policyName: string, options?: Models.PoliciesBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + policyName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Lists all of the protection policies within a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies", + urlParameters: [ + Parameters.resourceGroupName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicyList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName1, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName1, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName1, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "cdnWebApplicationFirewallPolicy", + mapper: { + ...Mappers.CdnWebApplicationFirewallPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicy + }, + 201: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicy + }, + 202: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName1, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: { + ...Mappers.CdnWebApplicationFirewallPolicyPatchParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicy + }, + 202: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CdnWebApplicationFirewallPolicyList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/profiles.ts b/sdk/cdn/arm-cdn/src/operations/profiles.ts index cda521b7a1d0..2df7bbfa3ffa 100644 --- a/sdk/cdn/arm-cdn/src/operations/profiles.ts +++ b/sdk/cdn/arm-cdn/src/operations/profiles.ts @@ -426,7 +426,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.subscriptionId ], queryParameters: [ @@ -450,7 +450,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -475,7 +475,7 @@ const generateSsoUriOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -500,7 +500,7 @@ const listSupportedOptimizationTypesOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -525,7 +525,7 @@ const listResourceUsageOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -550,7 +550,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -588,7 +588,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -628,7 +628,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], 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