diff --git a/sdk/cdn/arm-cdn/README.md b/sdk/cdn/arm-cdn/README.md index b6d871b13f0b..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/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..9af463304860 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts @@ -21,6 +21,7 @@ class CdnManagementClient extends CdnManagementClientContext { profiles: operations.Profiles; endpoints: operations.Endpoints; origins: operations.Origins; + originGroups: operations.OriginGroups; customDomains: operations.CustomDomains; resourceUsage: operations.ResourceUsageOperations; operations: operations.Operations; @@ -37,6 +38,7 @@ class CdnManagementClient extends CdnManagementClientContext { this.profiles = new operations.Profiles(this); this.endpoints = new operations.Endpoints(this); this.origins = new operations.Origins(this); + this.originGroups = new operations.OriginGroups(this); this.customDomains = new operations.CustomDomains(this); this.resourceUsage = new operations.ResourceUsageOperations(this); this.operations = new operations.Operations(this); diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts index b57e0c53f2be..7d255b4cbeed 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts @@ -44,7 +44,7 @@ export class CdnManagementClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2017-10-12'; + this.apiVersion = '2019-12-31'; 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..ccb0bb15344e 100644 --- a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts @@ -10,19 +10,37 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, CdnCertificateSourceParameters, CdnManagedHttpsParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, CustomDomainHttpsParameters, CustomDomainListResult, CustomDomainParameters, DeepCreatedOrigin, + DeepCreatedOriginGroup, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -30,17 +48,39 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, KeyVaultCertificateSourceParameters, Origin, + OriginGroup, + OriginGroupUpdateParameters, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, 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..4a5a1f074bb3 100644 --- a/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts @@ -10,14 +10,32 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, DeepCreatedOrigin, + DeepCreatedOriginGroup, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, EdgenodeResult, @@ -26,15 +44,37 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, Origin, + OriginGroup, + OriginGroupUpdateParameters, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters } 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..9b6c680da3fb 100644 --- a/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts @@ -10,14 +10,32 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, DeepCreatedOrigin, + DeepCreatedOriginGroup, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -26,21 +44,43 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, LoadParameters, Origin, + OriginGroup, + OriginGroupUpdateParameters, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, PurgeParameters, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, + ResourceReference, ResourceUsage, ResourceUsageListResult, + ResponseBasedOriginErrorDetectionParameters, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, 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..a20fe5187775 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; } @@ -116,21 +117,139 @@ export interface SupportedOptimizationTypesListResult { */ export interface DeepCreatedOrigin extends BaseResource { /** - * Origin name + * Origin name which must be unique within the endpoint. */ name: string; /** - * The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. + * The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should + * be unique across all origins in an endpoint. */ hostName: string; /** - * The value of the HTTP port. Must be between 1 and 65535 + * 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 + * The value of the HTTPS port. Must be between 1 and 65535. */ httpsPort?: number; + /** + * The host header value sent to the origin with each request. If you leave this blank, the + * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + * Cloud Services require this host header value to match the origin hostname by default. + */ + originHostHeader?: string; + /** + * Priority of origin in given origin group for load balancing. Higher priorities will not be + * used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + */ + priority?: number; + /** + * Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + */ + weight?: number; + /** + * Origin is enabled for load balancing or not. By default, origin is always enabled. + */ + enabled?: boolean; +} + +/** + * The JSON object that contains the properties to send health probes to origin. + */ +export interface HealthProbeParameters { + /** + * The path relative to the origin that is used to determine the health of the origin. + */ + probePath?: string; + /** + * The type of health probe request that is made. Possible values include: 'NotSet', 'GET', + * 'HEAD' + */ + probeRequestType?: HealthProbeRequestType; + /** + * Protocol to use for health probe. Possible values include: 'NotSet', 'Http', 'Https' + */ + probeProtocol?: ProbeProtocol; + /** + * The number of seconds between health probes.Default is 240sec. + */ + probeIntervalInSeconds?: number; +} + +/** + * Reference to another resource. + */ +export interface ResourceReference extends BaseResource { + /** + * Resource ID. + */ + id?: string; +} + +/** + * The JSON object that represents the range for http status codes + */ +export interface HttpErrorRangeParameters { + /** + * The inclusive start of the http status code range. + */ + begin?: number; + /** + * The inclusive end of the http status code range. + */ + end?: number; +} + +/** + * The JSON object that contains the properties to determine origin health using real + * requests/responses. + */ +export interface ResponseBasedOriginErrorDetectionParameters { + /** + * Type of response errors for real user requests for which origin will be deemed unhealthy. + * Possible values include: 'None', 'TcpErrorsOnly', 'TcpAndHttpErrors' + */ + responseBasedDetectedErrorTypes?: ResponseBasedDetectedErrorTypes; + /** + * The percentage of failed requests in the sample where failover should trigger. + */ + responseBasedFailoverThresholdPercentage?: number; + /** + * The list of Http status code ranges that are considered as server errors for origin and it is + * marked as unhealthy. + */ + httpErrorRanges?: HttpErrorRangeParameters[]; +} + +/** + * The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to + * the origins within the origin group based on origin health. + */ +export interface DeepCreatedOriginGroup extends BaseResource { + /** + * Origin group name which must be unique within the endpoint. + */ + name: string; + /** + * Health probe settings to the origin that is used to determine the health of the origin. + */ + healthProbeSettings?: HealthProbeParameters; + /** + * The source of the content being delivered via CDN within given origin group. + */ + origins: ResourceReference[]; + /** + * Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint + * comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not + * supported. + */ + trafficRestorationTimeToHealedOrNewEndpointsInMinutes?: number; + /** + * The JSON object that contains the properties to determine origin health using real + * requests/responses.This property is currently not supported. + */ + responseBasedOriginErrorDetectionSettings?: ResponseBasedOriginErrorDetectionParameters; } /** @@ -139,12 +258,6 @@ export interface DeepCreatedOrigin extends BaseResource { * .azureedge.net. */ export interface Endpoint extends TrackedResource { - /** - * The host header value sent to the origin with each request. If you leave this blank, the - * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and - * Cloud Services require this host header value to match the origin hostname by default. - */ - originHostHeader?: string; /** * A directory path on the origin that CDN can use to retrieve content from, e.g. * contoso.cloudapp.net/originpath. @@ -154,6 +267,14 @@ export interface Endpoint extends TrackedResource { * List of content types on which compression applies. The value should be a valid MIME type. */ contentTypesToCompress?: string[]; + /** + * The host header value sent to the origin with each request. This property at Endpoint is only + * allowed when endpoint uses single origin and can be overridden by the same property specified + * at origin.If you leave this blank, the request hostname determines this value. Azure CDN + * origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to + * match the origin hostname by default. + */ + originHostHeader?: string; /** * Indicates whether content compression is enabled on CDN. Default value is false. If * compression is enabled, content will be served as compressed if user requests for a compressed @@ -187,7 +308,8 @@ export interface Endpoint extends TrackedResource { optimizationType?: OptimizationType; /** * Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and - * calculate the most optimal routes for the CDN. This is relative to the origin path. + * calculate the most optimal routes for the CDN. This is relative to the origin path. This + * property is only relevant when using a single origin. */ probePath?: string; /** @@ -195,6 +317,10 @@ export interface Endpoint extends TrackedResource { * access rule to a specified path or content, e.g. block APAC for path /pictures/ */ geoFilters?: GeoFilter[]; + /** + * A reference to the origin group. + */ + defaultOriginGroup?: ResourceReference; /** * A policy that specifies the delivery rules to be used for an endpoint. */ @@ -209,6 +335,11 @@ export interface Endpoint extends TrackedResource { * The source of the content being delivered via CDN. */ origins: DeepCreatedOrigin[]; + /** + * The origin groups comprising of origins that are used for load balancing the traffic based on + * availability. + */ + originGroups?: DeepCreatedOriginGroup[]; /** * Resource status of the endpoint. Possible values include: 'Creating', 'Deleting', 'Running', * 'Starting', 'Stopped', 'Stopping' @@ -242,39 +373,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 +417,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[]; } /** @@ -314,12 +449,6 @@ export interface EndpointUpdateParameters extends BaseResource { * Endpoint tags. */ tags?: { [propertyName: string]: string }; - /** - * The host header value sent to the origin with each request. If you leave this blank, the - * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and - * Cloud Services require this host header value to match the origin hostname by default. - */ - originHostHeader?: string; /** * A directory path on the origin that CDN can use to retrieve content from, e.g. * contoso.cloudapp.net/originpath. @@ -329,6 +458,14 @@ export interface EndpointUpdateParameters extends BaseResource { * List of content types on which compression applies. The value should be a valid MIME type. */ contentTypesToCompress?: string[]; + /** + * The host header value sent to the origin with each request. This property at Endpoint is only + * allowed when endpoint uses single origin and can be overridden by the same property specified + * at origin.If you leave this blank, the request hostname determines this value. Azure CDN + * origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to + * match the origin hostname by default. + */ + originHostHeader?: string; /** * Indicates whether content compression is enabled on CDN. Default value is false. If * compression is enabled, content will be served as compressed if user requests for a compressed @@ -361,72 +498,653 @@ export interface EndpointUpdateParameters extends BaseResource { */ optimizationType?: OptimizationType; /** - * Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and - * calculate the most optimal routes for the CDN. This is relative to the origin path. + * Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and + * calculate the most optimal routes for the CDN. This is relative to the origin path. This + * property is only relevant when using a single origin. + */ + probePath?: string; + /** + * List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an + * access rule to a specified path or content, e.g. block APAC for path /pictures/ + */ + geoFilters?: GeoFilter[]; + /** + * A reference to the origin group. + */ + defaultOriginGroup?: ResourceReference; + /** + * A policy that specifies the delivery rules to be used for an endpoint. + */ + deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; +} + +/** + * Defines the parameters for RemoteAddress match conditions + */ +export interface RemoteAddressMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch' + */ + operator: RemoteAddressOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * Match values to match against. The operator will apply to each value in here with OR + * semantics. If any of them match the variable with the given operator this match condition is + * considered a match. + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RemoteAddress condition for the delivery rule. + */ +export interface DeliveryRuleRemoteAddressCondition { + /** + * Polymorphic Discriminator + */ + name: "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 DeliveryRuleRequestHeaderCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestHeader"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestHeaderMatchConditionParameters; +} + +/** + * Defines the parameters for RequestBody match conditions + */ +export interface RequestBodyMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: RequestBodyOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the RequestBody condition for the delivery rule. + */ +export interface DeliveryRuleRequestBodyCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestBody"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestBodyMatchConditionParameters; +} + +/** + * Defines the parameters for RequestScheme match conditions + */ +export interface RequestSchemeMatchConditionParameters { + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; +} + +/** + * Defines the RequestScheme condition for the delivery rule. + */ +export interface DeliveryRuleRequestSchemeCondition { + /** + * Polymorphic Discriminator + */ + name: "RequestScheme"; + /** + * Defines the parameters for the condition. + */ + parameters: RequestSchemeMatchConditionParameters; +} + +/** + * Defines the parameters for UrlPath match conditions + */ +export interface UrlPathMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'Wildcard' + */ + operator: UrlPathOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the UrlPath condition for the delivery rule. + */ +export interface DeliveryRuleUrlPathCondition { + /** + * Polymorphic Discriminator + */ + name: "UrlPath"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlPathMatchConditionParameters; +} + +/** + * Defines the parameters for UrlFileExtension match conditions + */ +export interface UrlFileExtensionMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: UrlFileExtensionOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the UrlFileExtension condition for the delivery rule. + */ +export interface DeliveryRuleUrlFileExtensionCondition { + /** + * Polymorphic Discriminator + */ + name: "UrlFileExtension"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlFileExtensionMatchConditionParameters; +} + +/** + * Defines the parameters for UrlFilename match conditions + */ +export interface UrlFileNameMatchConditionParameters { + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: UrlFileNameOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the UrlFileName condition for the delivery rule. + */ +export interface DeliveryRuleUrlFileNameCondition { + /** + * Polymorphic Discriminator + */ + name: "UrlFileName"; + /** + * Defines the parameters for the condition. + */ + parameters: UrlFileNameMatchConditionParameters; +} + +/** + * Defines the parameters for HttpVersion match conditions + */ +export interface HttpVersionMatchConditionParameters { + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; +} + +/** + * Defines the HttpVersion condition for the delivery rule. + */ +export interface DeliveryRuleHttpVersionCondition { + /** + * Polymorphic Discriminator + */ + name: "HttpVersion"; + /** + * Defines the parameters for the condition. + */ + parameters: HttpVersionMatchConditionParameters; +} + +/** + * Defines the parameters for Cookies match conditions + */ +export interface CookiesMatchConditionParameters { + /** + * Name of Cookies to be matched + */ + selector: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + */ + operator: CookiesOperator; + /** + * Describes if this is negate condition or not + */ + negateCondition?: boolean; + /** + * The match value for the condition of the delivery rule + */ + matchValues: string[]; + /** + * List of transforms + */ + transforms?: Transform[]; +} + +/** + * Defines the Cookies condition for the delivery rule. + */ +export interface DeliveryRuleCookiesCondition { + /** + * Polymorphic Discriminator + */ + name: "Cookies"; + /** + * Defines the parameters for the condition. + */ + parameters: CookiesMatchConditionParameters; +} + +/** + * Defines the parameters for IsDevice match conditions + */ +export interface 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. If + * value is blank, all strings are matched. */ - probePath?: string; + sourcePattern: string; /** - * List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an - * access rule to a specified path or content, e.g. block APAC for path /pictures/ + * Define the relative URL to which the above requests will be rewritten by. */ - geoFilters?: GeoFilter[]; + destination: string; /** - * A policy that specifies the delivery rules to be used for an endpoint. + * Whether to preserve unmatched path. Default value is true. */ - deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + preserveUnmatchedPath?: boolean; } /** - * Defines the parameters for the URL path condition. + * Defines the url rewrite action for the delivery rule. */ -export interface UrlPathConditionParameters { +export interface UrlRewriteAction { /** - * A URL path for the condition of the delivery rule + * Polymorphic Discriminator */ - path: string; + name: "UrlRewrite"; /** - * The match type for the condition of the delivery rule. Possible values include: 'Literal', - * 'Wildcard' + * Defines the parameters for the action. */ - matchType: MatchType; + parameters: UrlRewriteActionParameters; } /** - * Defines the URL path condition for the delivery rule. + * Defines the parameters for the request header action. */ -export interface DeliveryRuleUrlPathCondition { +export interface HeaderActionParameters { /** - * Polymorphic Discriminator + * Action to perform. Possible values include: 'Append', 'Overwrite', 'Delete' */ - name: "UrlPath"; + headerAction: HeaderAction; /** - * Defines the parameters for the condition. + * Name of the header to modify + */ + headerName: string; + /** + * Value for the specified action */ - parameters: UrlPathConditionParameters; + value?: string; } /** - * Defines the parameters for the URL file extension condition. + * Defines the request header action for the delivery rule. */ -export interface UrlFileExtensionConditionParameters { +export interface DeliveryRuleRequestHeaderAction { + /** + * Polymorphic Discriminator + */ + name: "ModifyRequestHeader"; /** - * A list of extensions for the condition of the delivery rule. + * Defines the parameters for the action. */ - extensions: string[]; + parameters: HeaderActionParameters; } /** - * Defines the URL file extension condition for the delivery rule. + * Defines the response header action for the delivery rule. */ -export interface DeliveryRuleUrlFileExtensionCondition { +export interface DeliveryRuleResponseHeaderAction { /** * Polymorphic Discriminator */ - name: "UrlFileExtension"; + name: "ModifyResponseHeader"; /** - * Defines the parameters for the condition. + * Defines the parameters for the action. */ - parameters: UrlFileExtensionConditionParameters; + parameters: HeaderActionParameters; } /** @@ -434,8 +1152,8 @@ export interface DeliveryRuleUrlFileExtensionCondition { */ export interface CacheExpirationActionParameters { /** - * Caching behavior for the requests that include query strings. Possible values include: - * 'BypassCache', 'Override', 'SetIfMissing' + * Caching behavior for the requests. Possible values include: 'BypassCache', 'Override', + * 'SetIfMissing' */ cacheBehavior: CacheBehavior; /** @@ -458,6 +1176,35 @@ export interface DeliveryRuleCacheExpirationAction { parameters: CacheExpirationActionParameters; } +/** + * Defines the parameters for the cache-key query string action. + */ +export interface CacheKeyQueryStringActionParameters { + /** + * Caching behavior for the requests. Possible values include: 'Include', 'IncludeAll', + * 'Exclude', 'ExcludeAll' + */ + queryStringBehavior: QueryStringBehavior; + /** + * query parameters to include or exclude (comma separated). + */ + queryParameters?: string; +} + +/** + * Defines the cache-key query string action for the delivery rule. + */ +export interface DeliveryRuleCacheKeyQueryStringAction { + /** + * Polymorphic Discriminator + */ + name: "CacheKeyQueryString"; + /** + * Defines the parameters for the action. + */ + parameters: CacheKeyQueryStringActionParameters; +} + /** * Parameters required for content purge. */ @@ -485,17 +1232,38 @@ export interface LoadParameters { */ export interface Origin extends TrackedResource { /** - * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. + * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This + * should be unique across all origins in an endpoint. */ - hostName: string; + 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. + * The value of the HTTPS port. Must be between 1 and 65535. */ httpsPort?: number; + /** + * The host header value sent to the origin with each request. If you leave this blank, the + * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + * Cloud Services require this host header value to match the origin hostname by default. This + * overrides the host header defined at Endpoint + */ + originHostHeader?: string; + /** + * Priority of origin in given origin group for load balancing. Higher priorities will not be + * used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + */ + priority?: number; + /** + * Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + */ + weight?: number; + /** + * Origin is enabled for load balancing or not + */ + enabled?: boolean; /** * 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.** @@ -509,11 +1277,16 @@ export interface Origin extends TrackedResource { } /** - * Origin properties needed for origin creation or update. + * Origin properties needed for origin update. */ export interface OriginUpdateParameters extends BaseResource { /** - * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. + * Origin tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This + * should be unique across all origins in an endpoint. */ hostName?: string; /** @@ -524,6 +1297,26 @@ export interface OriginUpdateParameters extends BaseResource { * The value of the HTTPS port. Must be between 1 and 65535. */ httpsPort?: number; + /** + * The host header value sent to the origin with each request. If you leave this blank, the + * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + * Cloud Services require this host header value to match the origin hostname by default. This + * overrides the host header defined at Endpoint + */ + originHostHeader?: string; + /** + * Priority of origin in given origin group for load balancing. Higher priorities will not be + * used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + */ + priority?: number; + /** + * Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + */ + weight?: number; + /** + * Origin is enabled for load balancing or not + */ + enabled?: boolean; } /** @@ -533,6 +1326,67 @@ export interface OriginUpdateParameters extends BaseResource { export interface ProxyResource extends Resource { } +/** + * Origin group comprising of origins is used for load balancing to origins when the content cannot + * be served from CDN. + */ +export interface OriginGroup extends ProxyResource { + /** + * Health probe settings to the origin that is used to determine the health of the origin. + */ + healthProbeSettings?: HealthProbeParameters; + /** + * The source of the content being delivered via CDN within given origin group. + */ + origins?: ResourceReference[]; + /** + * Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint + * comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not + * supported. + */ + trafficRestorationTimeToHealedOrNewEndpointsInMinutes?: number; + /** + * The JSON object that contains the properties to determine origin health using real + * requests/responses. This property is currently not supported. + */ + responseBasedOriginErrorDetectionSettings?: ResponseBasedOriginErrorDetectionParameters; + /** + * Resource status of the origin group. Possible values include: 'Creating', 'Active', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceState?: OriginGroupResourceState; + /** + * Provisioning status of the origin group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * Origin group properties needed for origin group creation or update. + */ +export interface OriginGroupUpdateParameters extends BaseResource { + /** + * Health probe settings to the origin that is used to determine the health of the origin. + */ + healthProbeSettings?: HealthProbeParameters; + /** + * The source of the content being delivered via CDN within given origin group. + */ + origins?: ResourceReference[]; + /** + * Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint + * comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not + * supported. + */ + trafficRestorationTimeToHealedOrNewEndpointsInMinutes?: number; + /** + * The JSON object that contains the properties to determine origin health using real + * requests/responses. This property is currently not supported. + */ + responseBasedOriginErrorDetectionSettings?: ResponseBasedOriginErrorDetectionParameters; +} + /** * Friendly domain name mapping to the endpoint hostname that the customer provides for branding * purposes, e.g. www.contoso.com. @@ -605,6 +1459,11 @@ export interface CustomDomainHttpsParameters { * 'ServerNameIndication', 'IPBased' */ protocolType: ProtocolType; + /** + * TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', + * 'TLS12' + */ + minimumTlsVersion?: MinimumTlsVersion; } /** @@ -630,6 +1489,11 @@ export interface CdnManagedHttpsParameters { * 'ServerNameIndication', 'IPBased' */ protocolType: ProtocolType; + /** + * TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', + * 'TLS12' + */ + minimumTlsVersion?: MinimumTlsVersion; /** * Defines the certificate source parameters using CDN managed certificate for enabling SSL. */ @@ -675,6 +1539,11 @@ export interface UserManagedHttpsParameters { * 'ServerNameIndication', 'IPBased' */ protocolType: ProtocolType; + /** + * TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', + * 'TLS12' + */ + minimumTlsVersion?: MinimumTlsVersion; /** * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. */ @@ -978,101 +1847,275 @@ export interface EndpointListResult extends Array { * get the next set of results. * @extends Array */ -export interface OriginListResult extends Array { - /** - * URL to get the next set of origin objects if there are any. - */ - nextLink?: string; -} +export interface OriginListResult extends Array { + /** + * URL to get the next set of origin objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list origin groups. It contains a list of origin groups objects and a + * URL link to get the next set of results. + * @extends Array + */ +export interface OriginGroupListResult extends Array { + /** + * URL to get the next set of origin objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list custom domains. It contains a list of custom domain objects and a + * URL link to get the next set of results. + * @extends Array + */ +export interface CustomDomainListResult extends Array { + /** + * URL to get the next set of custom domain objects if there are any. + */ + nextLink?: string; +} + +/** + * @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; +} + +/** + * 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 HealthProbeRequestType. + * Possible values include: 'NotSet', 'GET', 'HEAD' + * @readonly + * @enum {string} + */ +export type HealthProbeRequestType = 'NotSet' | 'GET' | 'HEAD'; + +/** + * Defines values for ProbeProtocol. + * Possible values include: 'NotSet', 'Http', 'Https' + * @readonly + * @enum {string} + */ +export type ProbeProtocol = 'NotSet' | 'Http' | 'Https'; + +/** + * Defines values for ResponseBasedDetectedErrorTypes. + * Possible values include: 'None', 'TcpErrorsOnly', 'TcpAndHttpErrors' + * @readonly + * @enum {string} + */ +export type ResponseBasedDetectedErrorTypes = 'None' | 'TcpErrorsOnly' | 'TcpAndHttpErrors'; + +/** + * 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'; /** - * @interface - * Result of the request to list custom domains. It contains a list of custom domain objects and a - * URL link to get the next set of results. - * @extends Array + * Defines values for RequestBodyOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * @readonly + * @enum {string} */ -export interface CustomDomainListResult extends Array { - /** - * URL to get the next set of custom domain objects if there are any. - */ - nextLink?: string; -} +export type RequestBodyOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; /** - * @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 + * Defines values for UrlPathOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'Wildcard' + * @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 UrlPathOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Wildcard'; /** - * @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 UrlFileExtensionOperator. + * 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 UrlFileExtensionOperator = '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 UrlFileNameOperator. + * 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 UrlFileNameOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; /** - * Defines values for ProfileResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting', 'Disabled' + * Defines values for CookiesOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' * @readonly * @enum {string} */ -export type ProfileResourceState = 'Creating' | 'Active' | 'Deleting' | 'Disabled'; +export type CookiesOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; /** - * Defines values for OptimizationType. - * Possible values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', - * 'VideoOnDemandMediaStreaming', 'LargeFileDownload', 'DynamicSiteAcceleration' + * Defines values for RedirectType. + * Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' * @readonly * @enum {string} */ -export type OptimizationType = 'GeneralWebDelivery' | 'GeneralMediaStreaming' | 'VideoOnDemandMediaStreaming' | 'LargeFileDownload' | 'DynamicSiteAcceleration'; +export type RedirectType = 'Moved' | 'Found' | 'TemporaryRedirect' | 'PermanentRedirect'; /** - * Defines values for EndpointResourceState. - * Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', 'Stopping' + * Defines values for DestinationProtocol. + * Possible values include: 'MatchRequest', 'Http', 'Https' * @readonly * @enum {string} */ -export type EndpointResourceState = 'Creating' | 'Deleting' | 'Running' | 'Starting' | 'Stopped' | 'Stopping'; +export type DestinationProtocol = 'MatchRequest' | 'Http' | 'Https'; /** - * Defines values for QueryStringCachingBehavior. - * Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' + * Defines values for HeaderAction. + * Possible values include: 'Append', 'Overwrite', 'Delete' * @readonly * @enum {string} */ -export type QueryStringCachingBehavior = 'IgnoreQueryString' | 'BypassCaching' | 'UseQueryString' | 'NotSet'; +export type HeaderAction = 'Append' | 'Overwrite' | 'Delete'; /** - * Defines values for GeoFilterActions. - * Possible values include: 'Block', 'Allow' + * Defines values for CacheBehavior. + * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' * @readonly * @enum {string} */ -export type GeoFilterActions = 'Block' | 'Allow'; +export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; + +/** + * Defines values for QueryStringBehavior. + * Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + * @readonly + * @enum {string} + */ +export type QueryStringBehavior = 'Include' | 'IncludeAll' | 'Exclude' | 'ExcludeAll'; /** * Defines values for OriginResourceState. @@ -1082,6 +2125,14 @@ export type GeoFilterActions = 'Block' | 'Allow'; */ export type OriginResourceState = 'Creating' | 'Active' | 'Deleting'; +/** + * Defines values for OriginGroupResourceState. + * Possible values include: 'Creating', 'Active', 'Deleting' + * @readonly + * @enum {string} + */ +export type OriginGroupResourceState = 'Creating' | 'Active' | 'Deleting'; + /** * Defines values for CustomDomainResourceState. * Possible values include: 'Creating', 'Active', 'Deleting' @@ -1118,6 +2169,14 @@ export type CustomHttpsProvisioningSubstate = 'SubmittingDomainControlValidation */ export type ProtocolType = 'ServerNameIndication' | 'IPBased'; +/** + * Defines values for MinimumTlsVersion. + * Possible values include: 'None', 'TLS10', 'TLS12' + * @readonly + * @enum {string} + */ +export type MinimumTlsVersion = 'None' | 'TLS10' | 'TLS12'; + /** * Defines values for CertificateType. * Possible values include: 'Shared', 'Dedicated' @@ -1134,22 +2193,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. */ @@ -1730,6 +2773,26 @@ export type OriginsGetResponse = Origin & { }; }; +/** + * Contains response data for the create operation. + */ +export type OriginsCreateResponse = Origin & { + /** + * 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: Origin; + }; +}; + /** * Contains response data for the update operation. */ @@ -1750,6 +2813,26 @@ export type OriginsUpdateResponse = Origin & { }; }; +/** + * Contains response data for the beginCreate operation. + */ +export type OriginsBeginCreateResponse = Origin & { + /** + * 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: Origin; + }; +}; + /** * Contains response data for the beginUpdate operation. */ @@ -1790,6 +2873,146 @@ export type OriginsListByEndpointNextResponse = OriginListResult & { }; }; +/** + * Contains response data for the listByEndpoint operation. + */ +export type OriginGroupsListByEndpointResponse = OriginGroupListResult & { + /** + * 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: OriginGroupListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OriginGroupsGetResponse = OriginGroup & { + /** + * 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: OriginGroup; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type OriginGroupsCreateResponse = OriginGroup & { + /** + * 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: OriginGroup; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type OriginGroupsUpdateResponse = OriginGroup & { + /** + * 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: OriginGroup; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type OriginGroupsBeginCreateResponse = OriginGroup & { + /** + * 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: OriginGroup; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type OriginGroupsBeginUpdateResponse = OriginGroup & { + /** + * 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: OriginGroup; + }; +}; + +/** + * Contains response data for the listByEndpointNext operation. + */ +export type OriginGroupsListByEndpointNextResponse = OriginGroupListResult & { + /** + * 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: OriginGroupListResult; + }; +}; + /** * Contains response data for the listByEndpoint operation. */ diff --git a/sdk/cdn/arm-cdn/src/models/mappers.ts b/sdk/cdn/arm-cdn/src/models/mappers.ts index 324463c9cddd..717baf5e5268 100644 --- a/sdk/cdn/arm-cdn/src/models/mappers.ts +++ b/sdk/cdn/arm-cdn/src/models/mappers.ts @@ -220,24 +220,241 @@ export const DeepCreatedOrigin: msRest.CompositeMapper = { type: { name: "Number" } + }, + originHostHeader: { + serializedName: "properties.originHostHeader", + type: { + name: "String" + } + }, + priority: { + serializedName: "properties.priority", + constraints: { + InclusiveMaximum: 5, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + weight: { + serializedName: "properties.weight", + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } } } } }; -export const Endpoint: msRest.CompositeMapper = { - serializedName: "Endpoint", +export const HealthProbeParameters: msRest.CompositeMapper = { + serializedName: "HealthProbeParameters", type: { name: "Composite", - className: "Endpoint", + className: "HealthProbeParameters", modelProperties: { - ...TrackedResource.type.modelProperties, - originHostHeader: { - serializedName: "properties.originHostHeader", + probePath: { + serializedName: "probePath", + type: { + name: "String" + } + }, + probeRequestType: { + serializedName: "probeRequestType", + type: { + name: "Enum", + allowedValues: [ + "NotSet", + "GET", + "HEAD" + ] + } + }, + probeProtocol: { + serializedName: "probeProtocol", + type: { + name: "Enum", + allowedValues: [ + "NotSet", + "Http", + "Https" + ] + } + }, + probeIntervalInSeconds: { + serializedName: "probeIntervalInSeconds", + constraints: { + InclusiveMaximum: 255, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const ResourceReference: msRest.CompositeMapper = { + serializedName: "ResourceReference", + type: { + name: "Composite", + className: "ResourceReference", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const HttpErrorRangeParameters: msRest.CompositeMapper = { + serializedName: "HttpErrorRangeParameters", + type: { + name: "Composite", + className: "HttpErrorRangeParameters", + modelProperties: { + begin: { + serializedName: "begin", + constraints: { + InclusiveMaximum: 999, + InclusiveMinimum: 100 + }, + type: { + name: "Number" + } + }, + end: { + serializedName: "end", + constraints: { + InclusiveMaximum: 999, + InclusiveMinimum: 100 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const ResponseBasedOriginErrorDetectionParameters: msRest.CompositeMapper = { + serializedName: "ResponseBasedOriginErrorDetectionParameters", + type: { + name: "Composite", + className: "ResponseBasedOriginErrorDetectionParameters", + modelProperties: { + responseBasedDetectedErrorTypes: { + serializedName: "responseBasedDetectedErrorTypes", + type: { + name: "Enum", + allowedValues: [ + "None", + "TcpErrorsOnly", + "TcpAndHttpErrors" + ] + } + }, + responseBasedFailoverThresholdPercentage: { + serializedName: "responseBasedFailoverThresholdPercentage", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + httpErrorRanges: { + serializedName: "httpErrorRanges", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HttpErrorRangeParameters" + } + } + } + } + } + } +}; + +export const DeepCreatedOriginGroup: msRest.CompositeMapper = { + serializedName: "DeepCreatedOriginGroup", + type: { + name: "Composite", + className: "DeepCreatedOriginGroup", + modelProperties: { + name: { + required: true, + serializedName: "name", type: { name: "String" } }, + healthProbeSettings: { + serializedName: "properties.healthProbeSettings", + type: { + name: "Composite", + className: "HealthProbeParameters" + } + }, + origins: { + required: true, + serializedName: "properties.origins", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { + serializedName: "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + constraints: { + InclusiveMaximum: 50, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + responseBasedOriginErrorDetectionSettings: { + serializedName: "properties.responseBasedOriginErrorDetectionSettings", + type: { + name: "Composite", + className: "ResponseBasedOriginErrorDetectionParameters" + } + } + } + } +}; + +export const Endpoint: msRest.CompositeMapper = { + serializedName: "Endpoint", + type: { + name: "Composite", + className: "Endpoint", + modelProperties: { + ...TrackedResource.type.modelProperties, originPath: { serializedName: "properties.originPath", type: { @@ -255,6 +472,12 @@ export const Endpoint: msRest.CompositeMapper = { } } }, + originHostHeader: { + serializedName: "properties.originHostHeader", + type: { + name: "String" + } + }, isCompressionEnabled: { serializedName: "properties.isCompressionEnabled", type: { @@ -309,6 +532,13 @@ export const Endpoint: msRest.CompositeMapper = { } } }, + defaultOriginGroup: { + serializedName: "properties.defaultOriginGroup", + type: { + name: "Composite", + className: "ResourceReference" + } + }, deliveryPolicy: { serializedName: "properties.deliveryPolicy", type: { @@ -336,6 +566,18 @@ export const Endpoint: msRest.CompositeMapper = { } } }, + originGroups: { + serializedName: "properties.originGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeepCreatedOriginGroup" + } + } + } + }, resourceState: { readOnly: true, serializedName: "properties.resourceState", @@ -394,16 +636,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 +658,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 +686,12 @@ export const DeliveryRule: msRest.CompositeMapper = { name: "Composite", className: "DeliveryRule", modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, order: { required: true, serializedName: "order", @@ -451,27 +699,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" } } } @@ -526,12 +774,6 @@ export const EndpointUpdateParameters: msRest.CompositeMapper = { } } }, - originHostHeader: { - serializedName: "properties.originHostHeader", - type: { - name: "String" - } - }, originPath: { serializedName: "properties.originPath", type: { @@ -549,6 +791,12 @@ export const EndpointUpdateParameters: msRest.CompositeMapper = { } } }, + originHostHeader: { + serializedName: "properties.originHostHeader", + type: { + name: "String" + } + }, isCompressionEnabled: { serializedName: "properties.isCompressionEnabled", type: { @@ -603,6 +851,13 @@ export const EndpointUpdateParameters: msRest.CompositeMapper = { } } }, + defaultOriginGroup: { + serializedName: "properties.defaultOriginGroup", + type: { + name: "Composite", + className: "ResourceReference" + } + }, deliveryPolicy: { serializedName: "properties.deliveryPolicy", type: { @@ -614,148 +869,1391 @@ export const EndpointUpdateParameters: msRest.CompositeMapper = { } }; -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: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRemoteAddressCondition: msRest.CompositeMapper = { + serializedName: "RemoteAddress", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRemoteAddressCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RemoteAddressMatchConditionParameters" + } + } + } + } +}; + +export const RequestMethodMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestMethodMatchConditionParameters", + type: { + name: "Composite", + className: "RequestMethodMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestMethodCondition: msRest.CompositeMapper = { + serializedName: "RequestMethod", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestMethodCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestMethodMatchConditionParameters" + } + } + } + } +}; + +export const QueryStringMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "QueryStringMatchConditionParameters", + type: { + name: "Composite", + className: "QueryStringMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleQueryStringCondition: msRest.CompositeMapper = { + serializedName: "QueryString", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleQueryStringCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "QueryStringMatchConditionParameters" + } + } + } + } +}; + +export const PostArgsMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "PostArgsMatchConditionParameters", + type: { + name: "Composite", + className: "PostArgsMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRulePostArgsCondition: msRest.CompositeMapper = { + serializedName: "PostArgs", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRulePostArgsCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "PostArgsMatchConditionParameters" + } + } + } + } +}; + +export const RequestUriMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestUriMatchConditionParameters", + type: { + name: "Composite", + className: "RequestUriMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestUriCondition: msRest.CompositeMapper = { + serializedName: "RequestUri", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestUriCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestUriMatchConditionParameters" + } + } + } + } +}; + +export const RequestHeaderMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestHeaderMatchConditionParameters", + type: { + name: "Composite", + className: "RequestHeaderMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestHeaderCondition: msRest.CompositeMapper = { + serializedName: "RequestHeader", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestHeaderCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestHeaderMatchConditionParameters" + } + } + } + } +}; + +export const RequestBodyMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestBodyMatchConditionParameters", + type: { + name: "Composite", + className: "RequestBodyMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestBodyCondition: msRest.CompositeMapper = { + serializedName: "RequestBody", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestBodyCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestBodyMatchConditionParameters" + } + } + } + } +}; + +export const RequestSchemeMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "RequestSchemeMatchConditionParameters", + type: { + name: "Composite", + className: "RequestSchemeMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleRequestSchemeCondition: msRest.CompositeMapper = { + serializedName: "RequestScheme", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleRequestSchemeCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "RequestSchemeMatchConditionParameters" + } + } + } + } +}; + +export const UrlPathMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlPathMatchConditionParameters", + type: { + name: "Composite", + className: "UrlPathMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { + serializedName: "UrlPath", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlPathCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "UrlPathMatchConditionParameters" + } + } + } + } +}; + +export const UrlFileExtensionMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlFileExtensionMatchConditionParameters", + type: { + name: "Composite", + className: "UrlFileExtensionMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { + serializedName: "UrlFileExtension", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlFileExtensionCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "UrlFileExtensionMatchConditionParameters" + } + } + } + } +}; + +export const UrlFileNameMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "UrlFileNameMatchConditionParameters", + type: { + name: "Composite", + className: "UrlFileNameMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleUrlFileNameCondition: msRest.CompositeMapper = { + serializedName: "UrlFileName", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleUrlFileNameCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "UrlFileNameMatchConditionParameters" + } + } + } + } +}; + +export const HttpVersionMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "HttpVersionMatchConditionParameters", + type: { + name: "Composite", + className: "HttpVersionMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleHttpVersionCondition: msRest.CompositeMapper = { + serializedName: "HttpVersion", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleHttpVersionCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "HttpVersionMatchConditionParameters" + } + } + } + } +}; + +export const CookiesMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "CookiesMatchConditionParameters", + type: { + name: "Composite", + className: "CookiesMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters', + type: { + name: "String" + } + }, + selector: { + required: true, + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleCookiesCondition: msRest.CompositeMapper = { + serializedName: "Cookies", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleCookiesCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "CookiesMatchConditionParameters" + } + } + } + } +}; + +export const IsDeviceMatchConditionParameters: msRest.CompositeMapper = { + serializedName: "IsDeviceMatchConditionParameters", + type: { + name: "Composite", + className: "IsDeviceMatchConditionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters', + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'Equal', + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValues: { + required: true, + serializedName: "matchValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeliveryRuleIsDeviceCondition: msRest.CompositeMapper = { + serializedName: "IsDevice", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleCondition", + className: "DeliveryRuleIsDeviceCondition", + modelProperties: { + ...DeliveryRuleCondition.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "IsDeviceMatchConditionParameters" + } + } + } + } +}; + +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: "matchType", + serializedName: "parameters", + defaultValue: {}, type: { - name: "String" + name: "Composite", + className: "HeaderActionParameters" } } } } }; -export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { - serializedName: "UrlPath", +export const DeliveryRuleResponseHeaderAction: msRest.CompositeMapper = { + serializedName: "ModifyResponseHeader", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlPathCondition", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleResponseHeaderAction", modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, + ...DeliveryRuleAction.type.modelProperties, parameters: { required: true, serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "UrlPathConditionParameters" + className: "HeaderActionParameters" } } } } }; -export const UrlFileExtensionConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlFileExtensionConditionParameters", +export const CacheExpirationActionParameters: msRest.CompositeMapper = { + serializedName: "CacheExpirationActionParameters", type: { name: "Composite", - className: "UrlFileExtensionConditionParameters", + className: "CacheExpirationActionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters', + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', type: { name: "String" } }, - extensions: { + cacheBehavior: { required: true, - serializedName: "extensions", + serializedName: "cacheBehavior", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + }, + cacheType: { + required: true, + isConstant: true, + serializedName: "cacheType", + defaultValue: 'All', + type: { + name: "String" + } + }, + cacheDuration: { + nullable: true, + serializedName: "cacheDuration", + type: { + name: "String" } } } } }; -export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { - serializedName: "UrlFileExtension", +export const DeliveryRuleCacheExpirationAction: msRest.CompositeMapper = { + serializedName: "CacheExpiration", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlFileExtensionCondition", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "DeliveryRuleCacheExpirationAction", modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, + ...DeliveryRuleAction.type.modelProperties, parameters: { required: true, serializedName: "parameters", defaultValue: {}, type: { name: "Composite", - className: "UrlFileExtensionConditionParameters" + className: "CacheExpirationActionParameters" } } } } }; -export const CacheExpirationActionParameters: msRest.CompositeMapper = { - serializedName: "CacheExpirationActionParameters", +export const CacheKeyQueryStringActionParameters: msRest.CompositeMapper = { + serializedName: "CacheKeyQueryStringActionParameters", type: { name: "Composite", - className: "CacheExpirationActionParameters", + className: "CacheKeyQueryStringActionParameters", modelProperties: { odatatype: { required: true, isConstant: true, serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', - type: { - name: "String" - } - }, - cacheBehavior: { - required: true, - serializedName: "cacheBehavior", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters', type: { name: "String" } }, - cacheType: { + queryStringBehavior: { required: true, - isConstant: true, - serializedName: "cacheType", - defaultValue: 'All', + serializedName: "queryStringBehavior", type: { name: "String" } }, - cacheDuration: { + queryParameters: { nullable: true, - serializedName: "cacheDuration", + serializedName: "queryParameters", type: { name: "String" } @@ -764,13 +2262,13 @@ export const CacheExpirationActionParameters: msRest.CompositeMapper = { } }; -export const DeliveryRuleCacheExpirationAction: msRest.CompositeMapper = { - serializedName: "CacheExpiration", +export const DeliveryRuleCacheKeyQueryStringAction: msRest.CompositeMapper = { + serializedName: "CacheKeyQueryString", type: { name: "Composite", polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, uberParent: "DeliveryRuleAction", - className: "DeliveryRuleCacheExpirationAction", + className: "DeliveryRuleCacheKeyQueryStringAction", modelProperties: { ...DeliveryRuleAction.type.modelProperties, parameters: { @@ -779,7 +2277,7 @@ export const DeliveryRuleCacheExpirationAction: msRest.CompositeMapper = { defaultValue: {}, type: { name: "Composite", - className: "CacheExpirationActionParameters" + className: "CacheKeyQueryStringActionParameters" } } } @@ -838,7 +2336,6 @@ export const Origin: msRest.CompositeMapper = { modelProperties: { ...TrackedResource.type.modelProperties, hostName: { - required: true, serializedName: "properties.hostName", type: { name: "String" @@ -864,6 +2361,38 @@ export const Origin: msRest.CompositeMapper = { name: "Number" } }, + originHostHeader: { + serializedName: "properties.originHostHeader", + type: { + name: "String" + } + }, + priority: { + serializedName: "properties.priority", + constraints: { + InclusiveMaximum: 5, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + weight: { + serializedName: "properties.weight", + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + }, resourceState: { readOnly: true, serializedName: "properties.resourceState", @@ -888,6 +2417,17 @@ export const OriginUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "OriginUpdateParameters", modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, hostName: { serializedName: "properties.hostName", type: { @@ -913,6 +2453,38 @@ export const OriginUpdateParameters: msRest.CompositeMapper = { type: { name: "Number" } + }, + originHostHeader: { + serializedName: "properties.originHostHeader", + type: { + name: "String" + } + }, + priority: { + serializedName: "properties.priority", + constraints: { + InclusiveMaximum: 5, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + weight: { + serializedName: "properties.weight", + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } } } } @@ -929,6 +2501,113 @@ export const ProxyResource: msRest.CompositeMapper = { } }; +export const OriginGroup: msRest.CompositeMapper = { + serializedName: "OriginGroup", + type: { + name: "Composite", + className: "OriginGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + healthProbeSettings: { + serializedName: "properties.healthProbeSettings", + type: { + name: "Composite", + className: "HealthProbeParameters" + } + }, + origins: { + serializedName: "properties.origins", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { + serializedName: "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + constraints: { + InclusiveMaximum: 50, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + responseBasedOriginErrorDetectionSettings: { + serializedName: "properties.responseBasedOriginErrorDetectionSettings", + type: { + name: "Composite", + className: "ResponseBasedOriginErrorDetectionParameters" + } + }, + resourceState: { + readOnly: true, + serializedName: "properties.resourceState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const OriginGroupUpdateParameters: msRest.CompositeMapper = { + serializedName: "OriginGroupUpdateParameters", + type: { + name: "Composite", + className: "OriginGroupUpdateParameters", + modelProperties: { + healthProbeSettings: { + serializedName: "properties.healthProbeSettings", + type: { + name: "Composite", + className: "HealthProbeParameters" + } + }, + origins: { + serializedName: "properties.origins", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { + serializedName: "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + constraints: { + InclusiveMaximum: 50, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + responseBasedOriginErrorDetectionSettings: { + serializedName: "properties.responseBasedOriginErrorDetectionSettings", + type: { + name: "Composite", + className: "ResponseBasedOriginErrorDetectionParameters" + } + } + } + } +}; + export const CustomDomain: msRest.CompositeMapper = { serializedName: "CustomDomain", type: { @@ -1016,6 +2695,17 @@ export const CustomDomainHttpsParameters: msRest.CompositeMapper = { name: "String" } }, + minimumTlsVersion: { + serializedName: "minimumTlsVersion", + type: { + name: "Enum", + allowedValues: [ + "None", + "TLS10", + "TLS12" + ] + } + }, certificateSource: { required: true, serializedName: "certificateSource", @@ -1641,6 +3331,35 @@ export const OriginListResult: msRest.CompositeMapper = { } }; +export const OriginGroupListResult: msRest.CompositeMapper = { + serializedName: "OriginGroupListResult", + type: { + name: "Composite", + className: "OriginGroupListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OriginGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const CustomDomainListResult: msRest.CompositeMapper = { serializedName: "CustomDomainListResult", type: { @@ -1729,11 +3448,28 @@ export const EdgenodeResult: msRest.CompositeMapper = { }; export const discriminators = { - 'DeliveryRuleAction' : DeliveryRuleAction, 'DeliveryRuleCondition' : DeliveryRuleCondition, + 'DeliveryRuleAction' : DeliveryRuleAction, + 'DeliveryRuleCondition.RemoteAddress' : DeliveryRuleRemoteAddressCondition, + 'DeliveryRuleCondition.RequestMethod' : DeliveryRuleRequestMethodCondition, + 'DeliveryRuleCondition.QueryString' : DeliveryRuleQueryStringCondition, + 'DeliveryRuleCondition.PostArgs' : DeliveryRulePostArgsCondition, + 'DeliveryRuleCondition.RequestUri' : DeliveryRuleRequestUriCondition, + 'DeliveryRuleCondition.RequestHeader' : DeliveryRuleRequestHeaderCondition, + 'DeliveryRuleCondition.RequestBody' : DeliveryRuleRequestBodyCondition, + 'DeliveryRuleCondition.RequestScheme' : DeliveryRuleRequestSchemeCondition, 'DeliveryRuleCondition.UrlPath' : DeliveryRuleUrlPathCondition, 'DeliveryRuleCondition.UrlFileExtension' : DeliveryRuleUrlFileExtensionCondition, + 'DeliveryRuleCondition.UrlFileName' : DeliveryRuleUrlFileNameCondition, + 'DeliveryRuleCondition.HttpVersion' : DeliveryRuleHttpVersionCondition, + 'DeliveryRuleCondition.Cookies' : DeliveryRuleCookiesCondition, + 'DeliveryRuleCondition.IsDevice' : DeliveryRuleIsDeviceCondition, + 'DeliveryRuleAction.UrlRedirect' : UrlRedirectAction, + 'DeliveryRuleAction.UrlRewrite' : UrlRewriteAction, + 'DeliveryRuleAction.ModifyRequestHeader' : DeliveryRuleRequestHeaderAction, + 'DeliveryRuleAction.ModifyResponseHeader' : DeliveryRuleResponseHeaderAction, 'DeliveryRuleAction.CacheExpiration' : DeliveryRuleCacheExpirationAction, + 'DeliveryRuleAction.CacheKeyQueryString' : DeliveryRuleCacheKeyQueryStringAction, 'CustomDomainHttpsParameters' : CustomDomainHttpsParameters, 'CustomDomainHttpsParameters.Cdn' : CdnManagedHttpsParameters, 'CustomDomainHttpsParameters.AzureKeyVault' : UserManagedHttpsParameters diff --git a/sdk/cdn/arm-cdn/src/models/originGroupsMappers.ts b/sdk/cdn/arm-cdn/src/models/originGroupsMappers.ts new file mode 100644 index 000000000000..e43816cde29f --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/originGroupsMappers.ts @@ -0,0 +1,80 @@ +/* + * 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, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + Origin, + OriginGroup, + OriginGroupListResult, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Sku, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/originsMappers.ts b/sdk/cdn/arm-cdn/src/models/originsMappers.ts index 59b2e1dfddb0..30ce75242ee1 100644 --- a/sdk/cdn/arm-cdn/src/models/originsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/originsMappers.ts @@ -10,14 +10,32 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, DeepCreatedOrigin, + DeepCreatedOriginGroup, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -25,16 +43,38 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, Origin, + OriginGroup, + OriginGroupUpdateParameters, OriginListResult, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, Sku, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters } 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..e60bd49a4fba 100644 --- a/sdk/cdn/arm-cdn/src/models/parameters.ts +++ b/sdk/cdn/arm-cdn/src/models/parameters.ts @@ -61,6 +61,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const originGroupName: msRest.OperationURLParameter = { + parameterPath: "originGroupName", + mapper: { + required: true, + serializedName: "originGroupName", + type: { + name: "String" + } + } +}; export const originName: msRest.OperationURLParameter = { parameterPath: "originName", mapper: { diff --git a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts index 5c6b8d00a9cb..9c1e130040ac 100644 --- a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts @@ -10,14 +10,32 @@ export { discriminators, BaseResource, CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, CidrIpAddress, + CookiesMatchConditionParameters, CustomDomain, DeepCreatedOrigin, + DeepCreatedOriginGroup, DeliveryRule, DeliveryRuleAction, DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, EdgeNode, Endpoint, @@ -25,20 +43,42 @@ export { EndpointUpdateParameters, ErrorResponse, GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, IpAddressGroup, + IsDeviceMatchConditionParameters, Origin, + OriginGroup, + OriginGroupUpdateParameters, OriginUpdateParameters, + PostArgsMatchConditionParameters, Profile, ProfileListResult, ProfileUpdateParameters, ProxyResource, + QueryStringMatchConditionParameters, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, Resource, + ResourceReference, ResourceUsage, ResourceUsageListResult, + ResponseBasedOriginErrorDetectionParameters, Sku, SsoUri, SupportedOptimizationTypesListResult, TrackedResource, - UrlFileExtensionConditionParameters, - UrlPathConditionParameters + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/operations/endpoints.ts b/sdk/cdn/arm-cdn/src/operations/endpoints.ts index d5894f45add5..fc412606a7d3 100644 --- a/sdk/cdn/arm-cdn/src/operations/endpoints.ts +++ b/sdk/cdn/arm-cdn/src/operations/endpoints.ts @@ -113,9 +113,9 @@ export class Endpoints { /** * Updates an existing CDN endpoint with the specified endpoint name under the specified - * subscription, resource group and profile. Only tags and Origin HostHeader can be updated after - * creating an endpoint. To update origins, use the Update Origin operation. To update custom - * domains, use the Update Custom Domain operation. + * subscription, resource group and profile. Only tags can be updated after creating an endpoint. + * To update origins, use the Update Origin operation. To update origin groups, use the Update + * Origin group operation. To update custom domains, use the Update Custom Domain operation. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. @@ -299,9 +299,9 @@ export class Endpoints { /** * Updates an existing CDN endpoint with the specified endpoint name under the specified - * subscription, resource group and profile. Only tags and Origin HostHeader can be updated after - * creating an endpoint. To update origins, use the Update Origin operation. To update custom - * domains, use the Update Custom Domain operation. + * subscription, resource group and profile. Only tags can be updated after creating an endpoint. + * To update origins, use the Update Origin operation. To update origin groups, use the Update + * Origin group operation. To update custom domains, use the Update Custom Domain operation. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. diff --git a/sdk/cdn/arm-cdn/src/operations/index.ts b/sdk/cdn/arm-cdn/src/operations/index.ts index 36365ff3eca2..9124643df423 100644 --- a/sdk/cdn/arm-cdn/src/operations/index.ts +++ b/sdk/cdn/arm-cdn/src/operations/index.ts @@ -11,6 +11,7 @@ export * from "./profiles"; export * from "./endpoints"; export * from "./origins"; +export * from "./originGroups"; export * from "./customDomains"; export * from "./resourceUsageOperations"; export * from "./operations"; diff --git a/sdk/cdn/arm-cdn/src/operations/originGroups.ts b/sdk/cdn/arm-cdn/src/operations/originGroups.ts new file mode 100644 index 000000000000..8592b28f1712 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/originGroups.ts @@ -0,0 +1,426 @@ +/* + * 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/originGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a OriginGroups. */ +export class OriginGroups { + private readonly client: CdnManagementClientContext; + + /** + * Create a OriginGroups. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the existing origin groups within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param callback The callback + */ + listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param options The optional parameters + * @param callback The callback + */ + listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + options + }, + listByEndpointOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing origin group within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + originGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new origin group within the specified endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originGroup Origin group properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroup: Models.OriginGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,endpointName,originGroupName,originGroup,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing origin group within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originGroupUpdateProperties Origin group properties + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroupUpdateProperties: Models.OriginGroupUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,profileName,endpointName,originGroupName,originGroupUpdateProperties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing origin group within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,endpointName,originGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new origin group within the specified endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originGroup Origin group properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroup: Models.OriginGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + originGroupName, + originGroup, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing origin group within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originGroupUpdateProperties Origin group properties + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroupUpdateProperties: Models.OriginGroupUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + originGroupName, + originGroupUpdateProperties, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing origin group within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + originGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all of the existing origin groups within an endpoint. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByEndpointNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByEndpointNext(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 + */ + listByEndpointNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByEndpointNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByEndpointNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByEndpointOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OriginGroupListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.profileName, + Parameters.endpointName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OriginGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.profileName, + Parameters.endpointName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "originGroup", + mapper: { + ...Mappers.OriginGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OriginGroup + }, + 201: { + bodyMapper: Mappers.OriginGroup + }, + 202: { + bodyMapper: Mappers.OriginGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.profileName, + Parameters.endpointName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "originGroupUpdateProperties", + mapper: { + ...Mappers.OriginGroupUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OriginGroup + }, + 202: { + bodyMapper: Mappers.OriginGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.profileName, + Parameters.endpointName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByEndpointNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OriginGroupListResult + }, + 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..340e6e88b3a4 100644 --- a/sdk/cdn/arm-cdn/src/operations/origins.ts +++ b/sdk/cdn/arm-cdn/src/operations/origins.ts @@ -103,6 +103,21 @@ export class Origins { callback) as Promise; } + /** + * Creates a new origin within the specified endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originName Name of the origin that is unique within the endpoint. + * @param origin Origin properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, endpointName: string, originName: string, origin: Models.Origin, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,endpointName,originName,origin,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Updates an existing origin within an endpoint. * @param resourceGroupName Name of the Resource group within the Azure subscription. @@ -118,6 +133,44 @@ export class Origins { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Deletes an existing origin within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originName Name of the origin which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, endpointName: string, originName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,endpointName,originName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new origin within the specified endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originName Name of the origin that is unique within the endpoint. + * @param origin Origin properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, originName: string, origin: Models.Origin, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + originName, + origin, + options + }, + beginCreateOperationSpec, + options); + } + /** * Updates an existing origin within an endpoint. * @param resourceGroupName Name of the Resource group within the Azure subscription. @@ -142,6 +195,28 @@ export class Origins { options); } + /** + * Deletes an existing origin within an endpoint. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param originName Name of the origin which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, endpointName: string, originName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + originName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** * Lists all of the existing origins within an endpoint. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -226,6 +301,46 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.profileName, + Parameters.endpointName, + Parameters.originName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "origin", + mapper: { + ...Mappers.Origin, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Origin + }, + 201: { + bodyMapper: Mappers.Origin + }, + 202: { + bodyMapper: Mappers.Origin + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", @@ -263,6 +378,32 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { serializer }; +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.profileName, + Parameters.endpointName, + Parameters.originName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listByEndpointNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", 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