diff --git a/sdk/cdn/arm-cdn/README.md b/sdk/cdn/arm-cdn/README.md index b6d871b13f0b..6e652e1e868a 100644 --- a/sdk/cdn/arm-cdn/README.md +++ b/sdk/cdn/arm-cdn/README.md @@ -94,6 +94,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [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/sdk/cdn/arm-cdn/README.png) diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json index c5945226f8ba..3d6257ef9d6a 100644 --- a/sdk/cdn/arm-cdn/package.json +++ b/sdk/cdn/arm-cdn/package.json @@ -5,7 +5,7 @@ "version": "4.2.0", "dependencies": { "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.6.0", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -26,7 +26,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/cdn/arm-cdn", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts index b57e0c53f2be..5e03df79d696 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts @@ -44,7 +44,7 @@ export class CdnManagementClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2017-10-12'; + this.apiVersion = '41234123412341234'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts index 3bd827402303..cf0533908711 100644 --- a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts @@ -22,7 +22,19 @@ export { DeliveryRuleAction, DeliveryRuleCacheExpirationAction, DeliveryRuleCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -30,17 +42,30 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, KeyVaultCertificateSourceParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, 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..b376ccf5f98e 100644 --- a/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts @@ -17,7 +17,19 @@ export { DeliveryRuleAction, DeliveryRuleCacheExpirationAction, DeliveryRuleCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, EdgenodeResult, @@ -26,15 +38,28 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters } 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..231f10ac3b49 100644 --- a/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts @@ -17,7 +17,19 @@ export { DeliveryRuleAction, DeliveryRuleCacheExpirationAction, DeliveryRuleCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -26,21 +38,34 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, LoadParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, PurgeParameters, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, ResourceUsage, ResourceUsageListResult, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, 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..093205e80525 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; } @@ -242,39 +243,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 | 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 | DeliveryRuleRequestHeaderAction | DeliveryRuleResponseHeaderAction | DeliveryRuleCacheExpirationAction; /** - * 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 +287,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[]; } /** @@ -377,22 +382,318 @@ export interface EndpointUpdateParameters extends BaseResource { } /** - * Defines the parameters for the URL path condition. + * Defines the parameters for RemoteAddress match conditions + */ +export interface RemoteAddressMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch' + */ + operator: RemoteAddressOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * Match values to match against. The operator will apply to each value in here with OR + * semantics. If any of them match the variable with the given operator this match condition is + * considered a match. + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RemoteAddress condition for the delivery rule. + */ +export interface DeliveryRuleRemoteAddressCondition { + /** + * Polymorphic Discriminator + */ + name: "RemoteAddress"; + /** + * Defines the parameters for the condition. + */ + parameters: RemoteAddressMatchConditionParameters; +} + +/** + * Defines the parameters for RequestMethod match conditions + */ +export interface RequestMethodMatchConditionParameters { + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; +} + +/** + * Defines the RequestMethod condition for the delivery rule. + */ +export interface DeliveryRuleRequestMethodCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestMethod"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestMethodMatchConditionParameters; +} + +/** + * Defines the parameters for QueryString match conditions + */ +export interface QueryStringMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: QueryStringOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the QueryString condition for the delivery rule. + */ +export interface DeliveryRuleQueryStringCondition { + /** + * Polymorphic Discriminator + */ + name: "QueryString"; + /** + * Defines the parameters for the condition. + */ + parameters: QueryStringMatchConditionParameters; +} + +/** + * Defines the parameters for PostArgs match conditions + */ +export interface PostArgsMatchConditionParameters { + /** + * Name of PostArg to be matched + */ + selector: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: PostArgsOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the PostArgs condition for the delivery rule. + */ +export interface DeliveryRulePostArgsCondition { + /** + * Polymorphic Discriminator + */ + name: "PostArgs"; + /** + * Defines the parameters for the condition. + */ + parameters: PostArgsMatchConditionParameters; +} + +/** + * Defines the parameters for RequestUri match conditions + */ +export interface RequestUriMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: RequestUriOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RequestUri condition for the delivery rule. + */ +export interface DeliveryRuleRequestUriCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestUri"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestUriMatchConditionParameters; +} + +/** + * Defines the parameters for RequestHeader match conditions + */ +export interface RequestHeaderMatchConditionParameters { + /** + * Name of Header to be matched + */ + selector: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: RequestHeaderOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RequestHeader condition for the delivery rule. */ -export interface UrlPathConditionParameters { +export interface DeliveryRuleRequestHeaderCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestHeader"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestHeaderMatchConditionParameters; +} + +/** + * Defines the parameters for RequestBody match conditions + */ +export interface RequestBodyMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: RequestBodyOperator; /** - * A URL path for the condition of the delivery rule + * Describes if this is negate condition or not */ - path: string; + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RequestBody condition for the delivery rule. + */ +export interface DeliveryRuleRequestBodyCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestBody"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestBodyMatchConditionParameters; +} + +/** + * Defines the parameters for RequestScheme match conditions + */ +export interface RequestSchemeMatchConditionParameters { + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; +} + +/** + * Defines the RequestScheme condition for the delivery rule. + */ +export interface DeliveryRuleRequestSchemeCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestScheme"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestSchemeMatchConditionParameters; +} + +/** + * Defines the parameters for UrlPath match conditions + */ +export interface UrlPathMatchConditionParameters { /** - * The match type for the condition of the delivery rule. Possible values include: 'Literal', + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', * 'Wildcard' */ - matchType: MatchType; + operator: UrlPathOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; } /** - * Defines the URL path condition for the delivery rule. + * Defines the UrlPath condition for the delivery rule. */ export interface DeliveryRuleUrlPathCondition { /** @@ -402,21 +703,34 @@ export interface DeliveryRuleUrlPathCondition { /** * Defines the parameters for the condition. */ - parameters: UrlPathConditionParameters; + parameters: UrlPathMatchConditionParameters; } /** - * Defines the parameters for the URL file extension condition. + * Defines the parameters for UrlFileExtension match conditions */ -export interface UrlFileExtensionConditionParameters { +export interface UrlFileExtensionMatchConditionParameters { /** - * A list of extensions for the condition of the delivery rule. + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' */ - extensions: string[]; + operator: UrlFileExtensionOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; } /** - * Defines the URL file extension condition for the delivery rule. + * Defines the UrlFileExtension condition for the delivery rule. */ export interface DeliveryRuleUrlFileExtensionCondition { /** @@ -426,7 +740,172 @@ export interface DeliveryRuleUrlFileExtensionCondition { /** * Defines the parameters for the condition. */ - parameters: UrlFileExtensionConditionParameters; + parameters: UrlFileExtensionMatchConditionParameters; +} + +/** + * Defines the parameters for UrlFilename match conditions + */ +export interface UrlFileNameMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: UrlFileNameOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the UrlFileName condition for the delivery rule. + */ +export interface DeliveryRuleUrlFileNameCondition { + /** + * Polymorphic Discriminator + */ + name: "UrlFileName"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlFileNameMatchConditionParameters; +} + +/** + * Defines the parameters for 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 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 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; } /** @@ -434,8 +913,8 @@ export interface DeliveryRuleUrlFileExtensionCondition { */ export interface CacheExpirationActionParameters { /** - * Caching behavior for the requests that include query strings. Possible values include: - * 'BypassCache', 'Override', 'SetIfMissing' + * Caching behavior for the requests. Possible values include: 'BypassCache', 'Override', + * 'SetIfMissing' */ cacheBehavior: CacheBehavior; /** @@ -1027,11 +1506,11 @@ export interface EdgenodeResult extends Array { /** * Defines values for SkuName. * Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', 'Premium_ChinaCdn' * @readonly * @enum {string} */ -export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft'; +export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft' | 'Premium_ChinaCdn'; /** * Defines values for ProfileResourceState. @@ -1074,6 +1553,126 @@ export type QueryStringCachingBehavior = 'IgnoreQueryString' | 'BypassCaching' | */ export type GeoFilterActions = 'Block' | 'Allow'; +/** + * Defines values for RemoteAddressOperator. + * Possible values include: 'Any', 'IPMatch', 'GeoMatch' + * @readonly + * @enum {string} + */ +export type RemoteAddressOperator = 'Any' | 'IPMatch' | 'GeoMatch'; + +/** + * Defines values for Transform. + * Possible values include: 'Lowercase', 'Uppercase' + * @readonly + * @enum {string} + */ +export type Transform = 'Lowercase' | 'Uppercase'; + +/** + * Defines values for QueryStringOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type QueryStringOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for PostArgsOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type PostArgsOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RequestUriOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type RequestUriOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RequestHeaderOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type RequestHeaderOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RequestBodyOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type RequestBodyOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for UrlPathOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'Wildcard' + * @readonly + * @enum {string} + */ +export type UrlPathOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Wildcard'; + +/** + * Defines values for UrlFileExtensionOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type UrlFileExtensionOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for UrlFileNameOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} + */ +export type UrlFileNameOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; + +/** + * Defines values for RedirectType. + * Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' + * @readonly + * @enum {string} + */ +export type RedirectType = 'Moved' | 'Found' | 'TemporaryRedirect' | 'PermanentRedirect'; + +/** + * Defines values for DestinationProtocol. + * Possible values include: 'MatchRequest', 'Http', 'Https' + * @readonly + * @enum {string} + */ +export type DestinationProtocol = 'MatchRequest' | 'Http' | 'Https'; + +/** + * Defines values for HeaderAction. + * Possible values include: 'Append', 'Overwrite', 'Delete' + * @readonly + * @enum {string} + */ +export type HeaderAction = 'Append' | 'Overwrite' | 'Delete'; + +/** + * Defines values for CacheBehavior. + * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + * @readonly + * @enum {string} + */ +export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; + /** * Defines values for OriginResourceState. * Possible values include: 'Creating', 'Active', 'Deleting' @@ -1134,22 +1733,6 @@ export type CertificateType = 'Shared' | 'Dedicated'; */ export type ResourceType = 'Microsoft.Cdn/Profiles/Endpoints'; -/** - * Defines values for MatchType. - * Possible values include: 'Literal', 'Wildcard' - * @readonly - * @enum {string} - */ -export type MatchType = 'Literal' | 'Wildcard'; - -/** - * Defines values for CacheBehavior. - * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' - * @readonly - * @enum {string} - */ -export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; - /** * Contains response data for the list operation. */ diff --git a/sdk/cdn/arm-cdn/src/models/mappers.ts b/sdk/cdn/arm-cdn/src/models/mappers.ts index 324463c9cddd..de5751d45285 100644 --- a/sdk/cdn/arm-cdn/src/models/mappers.ts +++ b/sdk/cdn/arm-cdn/src/models/mappers.ts @@ -394,16 +394,16 @@ export const GeoFilter: msRest.CompositeMapper = { } }; -export const DeliveryRuleAction: msRest.CompositeMapper = { - serializedName: "DeliveryRuleAction", +export const DeliveryRuleCondition: msRest.CompositeMapper = { + serializedName: "DeliveryRuleCondition", type: { name: "Composite", polymorphicDiscriminator: { serializedName: "name", clientName: "name" }, - uberParent: "DeliveryRuleAction", - className: "DeliveryRuleAction", + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleCondition", modelProperties: { name: { required: true, @@ -416,62 +416,946 @@ 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, + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const DeliveryRule: msRest.CompositeMapper = { + serializedName: "DeliveryRule", + type: { + name: "Composite", + className: "DeliveryRule", modelProperties: { name: { + serializedName: "name", + type: { + name: "String" + } + }, + order: { + required: true, + serializedName: "order", + type: { + name: "Number" + } + }, + conditions: { + serializedName: "conditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRuleCondition" + } + } + } + }, + actions: { + required: true, + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRuleAction" + } + } + } + } + } + } +}; + +export const EndpointPropertiesUpdateParametersDeliveryPolicy: msRest.CompositeMapper = { + serializedName: "EndpointPropertiesUpdateParameters_deliveryPolicy", + type: { + name: "Composite", + className: "EndpointPropertiesUpdateParametersDeliveryPolicy", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String" + } + }, + rules: { + required: true, + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRule" + } + } + } + } + } + } +}; + +export const EndpointUpdateParameters: msRest.CompositeMapper = { + serializedName: "EndpointUpdateParameters", + type: { + name: "Composite", + className: "EndpointUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + originHostHeader: { + serializedName: "properties.originHostHeader", + type: { + name: "String" + } + }, + originPath: { + serializedName: "properties.originPath", + type: { + name: "String" + } + }, + contentTypesToCompress: { + serializedName: "properties.contentTypesToCompress", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isCompressionEnabled: { + serializedName: "properties.isCompressionEnabled", + type: { + name: "Boolean" + } + }, + isHttpAllowed: { + serializedName: "properties.isHttpAllowed", + type: { + name: "Boolean" + } + }, + isHttpsAllowed: { + serializedName: "properties.isHttpsAllowed", + type: { + name: "Boolean" + } + }, + queryStringCachingBehavior: { + serializedName: "properties.queryStringCachingBehavior", + type: { + name: "Enum", + allowedValues: [ + "IgnoreQueryString", + "BypassCaching", + "UseQueryString", + "NotSet" + ] + } + }, + optimizationType: { + serializedName: "properties.optimizationType", + type: { + name: "String" + } + }, + probePath: { + serializedName: "properties.probePath", + type: { + name: "String" + } + }, + geoFilters: { + serializedName: "properties.geoFilters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GeoFilter" + } + } + } + }, + deliveryPolicy: { + serializedName: "properties.deliveryPolicy", + type: { + name: "Composite", + className: "EndpointPropertiesUpdateParametersDeliveryPolicy" + } + } + } + } +}; + +export const RemoteAddressMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RemoteAddressMatchConditionParameters", + type: { + name: "Composite", + className: "RemoteAddressMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRemoteAddressCondition: msRest.CompositeMapper = { + serializedName: "RemoteAddress", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRemoteAddressCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RemoteAddressMatchConditionParameters" + } + } + } + } +}; + +export const RequestMethodMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestMethodMatchConditionParameters", + type: { + name: "Composite", + className: "RequestMethodMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestMethodCondition: msRest.CompositeMapper = { + serializedName: "RequestMethod", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestMethodCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestMethodMatchConditionParameters" + } + } + } + } +}; + +export const QueryStringMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "QueryStringMatchConditionParameters", + type: { + name: "Composite", + className: "QueryStringMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleQueryStringCondition: msRest.CompositeMapper = { + serializedName: "QueryString", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleQueryStringCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "QueryStringMatchConditionParameters" + } + } + } + } +}; + +export const PostArgsMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "PostArgsMatchConditionParameters", + type: { + name: "Composite", + className: "PostArgsMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRulePostArgsCondition: msRest.CompositeMapper = { + serializedName: "PostArgs", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRulePostArgsCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "PostArgsMatchConditionParameters" + } + } + } + } +}; + +export const RequestUriMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestUriMatchConditionParameters", + type: { + name: "Composite", + className: "RequestUriMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestUriCondition: msRest.CompositeMapper = { + serializedName: "RequestUri", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestUriCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestUriMatchConditionParameters" + } + } + } + } +}; + +export const RequestHeaderMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestHeaderMatchConditionParameters", + type: { + name: "Composite", + className: "RequestHeaderMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestHeaderCondition: msRest.CompositeMapper = { + serializedName: "RequestHeader", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestHeaderCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestHeaderMatchConditionParameters" + } + } + } + } +}; + +export const RequestBodyMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestBodyMatchConditionParameters", + type: { + name: "Composite", + className: "RequestBodyMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestBodyCondition: msRest.CompositeMapper = { + serializedName: "RequestBody", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestBodyCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestBodyMatchConditionParameters" + } + } + } + } +}; + +export const RequestSchemeMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestSchemeMatchConditionParameters", + type: { + name: "Composite", + className: "RequestSchemeMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestSchemeCondition: msRest.CompositeMapper = { + serializedName: "RequestScheme", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestSchemeCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestSchemeMatchConditionParameters" + } + } + } + } +}; + +export const UrlPathMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlPathMatchConditionParameters", + type: { + name: "Composite", + className: "UrlPathMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { + serializedName: "UrlPath", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlPathCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { required: true, - serializedName: "name", + serializedName: "parameters", + defaultValue: {}, type: { - name: "String" + name: "Composite", + className: "UrlPathMatchConditionParameters" } } } } }; -export const DeliveryRule: msRest.CompositeMapper = { - serializedName: "DeliveryRule", +export const UrlFileExtensionMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlFileExtensionMatchConditionParameters", type: { name: "Composite", - className: "DeliveryRule", + className: "UrlFileExtensionMatchConditionParameters", modelProperties: { - order: { + odatatype: { required: true, - serializedName: "order", + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters', type: { - name: "Number" + name: "String" } }, - actions: { + operator: { required: true, - serializedName: "actions", + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DeliveryRuleAction" + name: "String" } } } }, - conditions: { - serializedName: "conditions", + transforms: { + serializedName: "transforms", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DeliveryRuleCondition" + name: "String" } } } @@ -480,66 +1364,59 @@ export const DeliveryRule: msRest.CompositeMapper = { } }; -export const EndpointPropertiesUpdateParametersDeliveryPolicy: msRest.CompositeMapper = { - serializedName: "EndpointPropertiesUpdateParameters_deliveryPolicy", +export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { + serializedName: "UrlFileExtension", type: { name: "Composite", - className: "EndpointPropertiesUpdateParametersDeliveryPolicy", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlFileExtensionCondition", modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } - }, - rules: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { required: true, - serializedName: "rules", + serializedName: "parameters", + defaultValue: {}, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeliveryRule" - } - } + name: "Composite", + className: "UrlFileExtensionMatchConditionParameters" } } } } }; -export const EndpointUpdateParameters: msRest.CompositeMapper = { - serializedName: "EndpointUpdateParameters", +export const UrlFileNameMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlFileNameMatchConditionParameters", type: { name: "Composite", - className: "EndpointUpdateParameters", + className: "UrlFileNameMatchConditionParameters", modelProperties: { - tags: { - serializedName: "tags", + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters', type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - originHostHeader: { - serializedName: "properties.originHostHeader", + operator: { + required: true, + serializedName: "operator", type: { name: "String" } }, - originPath: { - serializedName: "properties.originPath", + negateCondition: { + serializedName: "negateCondition", type: { - name: "String" + name: "Boolean" } }, - contentTypesToCompress: { - serializedName: "properties.contentTypesToCompress", + matchValues: { + required: true, + serializedName: "matchValues", type: { name: "Sequence", element: { @@ -549,96 +1426,170 @@ export const EndpointUpdateParameters: msRest.CompositeMapper = { } } }, - isCompressionEnabled: { - serializedName: "properties.isCompressionEnabled", + transforms: { + serializedName: "transforms", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - isHttpAllowed: { - serializedName: "properties.isHttpAllowed", + } + } + } +}; + +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: "Boolean" + name: "Composite", + className: "UrlFileNameMatchConditionParameters" } - }, - isHttpsAllowed: { - serializedName: "properties.isHttpsAllowed", + } + } + } +}; + +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: "Boolean" + name: "String" } }, - queryStringCachingBehavior: { - serializedName: "properties.queryStringCachingBehavior", + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', type: { - name: "Enum", - allowedValues: [ - "IgnoreQueryString", - "BypassCaching", - "UseQueryString", - "NotSet" - ] + name: "String" } }, - optimizationType: { - serializedName: "properties.optimizationType", + negateCondition: { + serializedName: "negateCondition", type: { - name: "String" + name: "Boolean" } }, - probePath: { - serializedName: "properties.probePath", + matchValues: { + required: true, + serializedName: "matchValues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - geoFilters: { - serializedName: "properties.geoFilters", + transforms: { + serializedName: "transforms", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "GeoFilter" + name: "String" } } } - }, - deliveryPolicy: { - serializedName: "properties.deliveryPolicy", + } + } + } +}; + +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: "EndpointPropertiesUpdateParametersDeliveryPolicy" + className: "IsDeviceMatchConditionParameters" } } } } }; -export const UrlPathConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlPathConditionParameters", +export const UrlRedirectActionParameters: msRest.CompositeMapper = { + serializedName: "UrlRedirectActionParameters", type: { name: "Composite", - className: "UrlPathConditionParameters", + className: "UrlRedirectActionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters', type: { name: "String" } }, - path: { + redirectType: { required: true, - serializedName: "path", + serializedName: "redirectType", type: { name: "String" } }, - matchType: { - required: true, - serializedName: "matchType", + 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" } @@ -647,75 +1598,105 @@ export const UrlPathConditionParameters: msRest.CompositeMapper = { } }; -export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { - serializedName: "UrlPath", +export const UrlRedirectAction: msRest.CompositeMapper = { + serializedName: "UrlRedirect", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlPathCondition", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "UrlRedirectAction", modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, + ...DeliveryRuleAction.type.modelProperties, parameters: { required: true, serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "UrlPathConditionParameters" + className: "UrlRedirectActionParameters" } } } } }; -export const UrlFileExtensionConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlFileExtensionConditionParameters", +export const HeaderActionParameters: msRest.CompositeMapper = { + serializedName: "HeaderActionParameters", type: { name: "Composite", - className: "UrlFileExtensionConditionParameters", + className: "HeaderActionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters', type: { name: "String" } }, - extensions: { + headerAction: { required: true, - serializedName: "extensions", + serializedName: "headerAction", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + }, + headerName: { + required: true, + serializedName: "headerName", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" } } } } }; -export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { - serializedName: "UrlFileExtension", +export const DeliveryRuleRequestHeaderAction: msRest.CompositeMapper = { + serializedName: "ModifyRequestHeader", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlFileExtensionCondition", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleRequestHeaderAction", modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, + ...DeliveryRuleAction.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "HeaderActionParameters" + } + } + } + } +}; + +export const DeliveryRuleResponseHeaderAction: msRest.CompositeMapper = { + serializedName: "ModifyResponseHeader", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleResponseHeaderAction", + modelProperties: { + ...DeliveryRuleAction.type.modelProperties, parameters: { required: true, serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "UrlFileExtensionConditionParameters" + className: "HeaderActionParameters" } } } @@ -732,7 +1713,7 @@ export const CacheExpirationActionParameters: msRest.CompositeMapper = { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', type: { name: "String" } @@ -1729,10 +2710,23 @@ export const EdgenodeResult: msRest.CompositeMapper = { }; export const discriminators = { - 'DeliveryRuleAction' : DeliveryRuleAction, 'DeliveryRuleCondition' : DeliveryRuleCondition, + 'DeliveryRuleAction' : DeliveryRuleAction, + 'DeliveryRuleCondition.RemoteAddress' : DeliveryRuleRemoteAddressCondition, + 'DeliveryRuleCondition.RequestMethod' : DeliveryRuleRequestMethodCondition, + 'DeliveryRuleCondition.QueryString' : DeliveryRuleQueryStringCondition, + 'DeliveryRuleCondition.PostArgs' : DeliveryRulePostArgsCondition, + 'DeliveryRuleCondition.RequestUri' : DeliveryRuleRequestUriCondition, + 'DeliveryRuleCondition.RequestHeader' : DeliveryRuleRequestHeaderCondition, + 'DeliveryRuleCondition.RequestBody' : DeliveryRuleRequestBodyCondition, + 'DeliveryRuleCondition.RequestScheme' : DeliveryRuleRequestSchemeCondition, 'DeliveryRuleCondition.UrlPath' : DeliveryRuleUrlPathCondition, 'DeliveryRuleCondition.UrlFileExtension' : DeliveryRuleUrlFileExtensionCondition, + 'DeliveryRuleCondition.UrlFileName' : DeliveryRuleUrlFileNameCondition, + 'DeliveryRuleCondition.IsDevice' : DeliveryRuleIsDeviceCondition, + 'DeliveryRuleAction.UrlRedirect' : UrlRedirectAction, + 'DeliveryRuleAction.ModifyRequestHeader' : DeliveryRuleRequestHeaderAction, + 'DeliveryRuleAction.ModifyResponseHeader' : DeliveryRuleResponseHeaderAction, 'DeliveryRuleAction.CacheExpiration' : DeliveryRuleCacheExpirationAction, 'CustomDomainHttpsParameters' : CustomDomainHttpsParameters, 'CustomDomainHttpsParameters.Cdn' : CdnManagedHttpsParameters, diff --git a/sdk/cdn/arm-cdn/src/models/originsMappers.ts b/sdk/cdn/arm-cdn/src/models/originsMappers.ts index 59b2e1dfddb0..6cc79321f1ce 100644 --- a/sdk/cdn/arm-cdn/src/models/originsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/originsMappers.ts @@ -17,7 +17,19 @@ export { DeliveryRuleAction, DeliveryRuleCacheExpirationAction, DeliveryRuleCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -25,16 +37,29 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, Origin, OriginListResult, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters } 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..6020428e9878 100644 --- a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts @@ -17,7 +17,19 @@ export { DeliveryRuleAction, DeliveryRuleCacheExpirationAction, DeliveryRuleCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -25,13 +37,23 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, Origin, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileListResult, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, ResourceUsage, ResourceUsageListResult, @@ -39,6 +61,9 @@ export { SsoUri, SupportedOptimizationTypesListResult, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters } from "../models/mappers";