diff --git a/sdk/cdn/arm-cdn/LICENSE.txt b/sdk/cdn/arm-cdn/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/cdn/arm-cdn/LICENSE.txt +++ b/sdk/cdn/arm-cdn/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cdn/arm-cdn/README.md b/sdk/cdn/arm-cdn/README.md index 403572708c34..632d7e317ef2 100644 --- a/sdk/cdn/arm-cdn/README.md +++ b/sdk/cdn/arm-cdn/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-cdn ### How to use -#### nodejs - Authentication, client creation and list profiles as an example written in TypeScript. +#### nodejs - client creation and list profiles as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { CdnManagementClient, CdnManagementModels, CdnManagementMappers } from "@azure/arm-cdn"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { CdnManagementClient } = require("@azure/arm-cdn"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/cdn/arm-cdn/rollup.config.js b/sdk/cdn/arm-cdn/rollup.config.js index 66576ced5732..d328a5b38b8e 100644 --- a/sdk/cdn/arm-cdn/rollup.config.js +++ b/sdk/cdn/arm-cdn/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts index d2eb2d60b2d4..5ff7caebc09b 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -26,6 +25,18 @@ class CdnManagementClient extends CdnManagementClientContext { resourceUsage: operations.ResourceUsageOperations; operations: operations.Operations; edgeNodes: operations.EdgeNodes; + aFDProfiles: operations.AFDProfiles; + aFDCustomDomains: operations.AFDCustomDomains; + aFDEndpoints: operations.AFDEndpoints; + aFDOriginGroups: operations.AFDOriginGroups; + aFDOrigins: operations.AFDOrigins; + routes: operations.Routes; + ruleSets: operations.RuleSets; + rules: operations.Rules; + securityPolicies: operations.SecurityPolicies; + secrets: operations.Secrets; + validate: operations.Validate; + logAnalytics: operations.LogAnalytics; policies: operations.Policies; managedRuleSets: operations.ManagedRuleSets; @@ -45,6 +56,18 @@ class CdnManagementClient extends CdnManagementClientContext { this.resourceUsage = new operations.ResourceUsageOperations(this); this.operations = new operations.Operations(this); this.edgeNodes = new operations.EdgeNodes(this); + this.aFDProfiles = new operations.AFDProfiles(this); + this.aFDCustomDomains = new operations.AFDCustomDomains(this); + this.aFDEndpoints = new operations.AFDEndpoints(this); + this.aFDOriginGroups = new operations.AFDOriginGroups(this); + this.aFDOrigins = new operations.AFDOrigins(this); + this.routes = new operations.Routes(this); + this.ruleSets = new operations.RuleSets(this); + this.rules = new operations.Rules(this); + this.securityPolicies = new operations.SecurityPolicies(this); + this.secrets = new operations.Secrets(this); + this.validate = new operations.Validate(this); + this.logAnalytics = new operations.LogAnalytics(this); this.policies = new operations.Policies(this); this.managedRuleSets = new operations.ManagedRuleSets(this); } diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts index 9caddabff417..9449c0b81c25 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -44,7 +43,7 @@ export class CdnManagementClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2020-04-15'; + this.apiVersion = '2020-09-01'; 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/aFDCustomDomainsMappers.ts b/sdk/cdn/arm-cdn/src/models/aFDCustomDomainsMappers.ts new file mode 100644 index 000000000000..0854ae6f35fd --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/aFDCustomDomainsMappers.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDDomainListResult, + AFDDomainUpdateParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier, + ValidationToken +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/aFDEndpointsMappers.ts b/sdk/cdn/arm-cdn/src/models/aFDEndpointsMappers.ts new file mode 100644 index 000000000000..cdea47d99fd1 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/aFDEndpointsMappers.ts @@ -0,0 +1,134 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointListResult, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + AfdPurgeParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier, + Usage, + UsageName, + UsagesListResult, + ValidateCustomDomainInput, + ValidateCustomDomainOutput +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/aFDOriginGroupsMappers.ts b/sdk/cdn/arm-cdn/src/models/aFDOriginGroupsMappers.ts new file mode 100644 index 000000000000..a62eb055db5b --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/aFDOriginGroupsMappers.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupListResult, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier, + Usage, + UsageName, + UsagesListResult +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/aFDOriginsMappers.ts b/sdk/cdn/arm-cdn/src/models/aFDOriginsMappers.ts new file mode 100644 index 000000000000..2ac009307efb --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/aFDOriginsMappers.ts @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginListResult, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/aFDProfilesMappers.ts b/sdk/cdn/arm-cdn/src/models/aFDProfilesMappers.ts new file mode 100644 index 000000000000..1ea386178149 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/aFDProfilesMappers.ts @@ -0,0 +1,18 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AfdErrorResponse, + ErrorResponse, + Usage, + UsageName, + UsagesListResult, + ValidateCustomDomainInput, + ValidateCustomDomainOutput +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts index 257a7be53000..22ef91a41fa9 100644 --- a/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/customDomainsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -22,6 +30,7 @@ export { CustomDomainHttpsParameters, CustomDomainListResult, CustomDomainParameters, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -47,6 +56,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, @@ -62,6 +72,8 @@ export { IsDeviceMatchConditionParameters, KeyVaultCertificateSourceParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -72,6 +84,8 @@ export { MatchCondition, Origin, OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginUpdateParameters, PolicySettings, @@ -91,7 +105,17 @@ export { Resource, ResourceReference, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -103,6 +127,7 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier, 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 0f3b03a53381..0a06e7fddd36 100644 --- a/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/edgeNodesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -17,6 +25,7 @@ export { CidrIpAddress, CookiesMatchConditionParameters, CustomDomain, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -42,6 +51,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, EdgenodeResult, Endpoint, @@ -57,6 +67,8 @@ export { IpAddressGroup, IsDeviceMatchConditionParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -67,6 +79,8 @@ export { MatchCondition, Origin, OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginUpdateParameters, PolicySettings, @@ -86,7 +100,17 @@ export { Resource, ResourceReference, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -98,5 +122,6 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts b/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts index 4119b833703b..500e11e477c1 100644 --- a/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/endpointsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -17,6 +25,7 @@ export { CidrIpAddress, CookiesMatchConditionParameters, CustomDomain, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -42,6 +51,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, Endpoint, EndpointListResult, @@ -57,7 +67,9 @@ export { IpAddressGroup, IsDeviceMatchConditionParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, LoadParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -68,6 +80,8 @@ export { MatchCondition, Origin, OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginUpdateParameters, PolicySettings, @@ -90,7 +104,17 @@ export { ResourceUsage, ResourceUsageListResult, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -102,6 +126,7 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier, ValidateCustomDomainInput, ValidateCustomDomainOutput diff --git a/sdk/cdn/arm-cdn/src/models/index.ts b/sdk/cdn/arm-cdn/src/models/index.ts index b37a0f1f4808..94ea0ca9318b 100644 --- a/sdk/cdn/arm-cdn/src/models/index.ts +++ b/sdk/cdn/arm-cdn/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -18,7 +18,9 @@ export interface Sku { /** * Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', * 'Custom_Verizon', 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', - * 'Premium_ChinaCdn' + * 'Premium_ChinaCdn', 'Standard_AzureFrontDoor', 'Premium_AzureFrontDoor', + * 'Standard_955BandWidth_ChinaCdn', 'Standard_AvgBandWidth_ChinaCdn', 'StandardPlus_ChinaCdn', + * 'StandardPlus_955BandWidth_ChinaCdn', 'StandardPlus_AvgBandWidth_ChinaCdn' */ name?: SkuName; } @@ -56,6 +58,10 @@ export interface TrackedResource extends Resource { * Resource tags. */ tags?: { [propertyName: string]: string }; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -78,6 +84,11 @@ export interface Profile extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * The Id of the frontdoor. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly frontdoorId?: string; } /** @@ -458,7 +469,7 @@ export interface DeliveryRuleCondition { /** * Contains the possible cases for DeliveryRuleAction. */ -export type DeliveryRuleActionUnion = DeliveryRuleAction | UrlRedirectAction | UrlSigningAction | UrlRewriteAction | DeliveryRuleRequestHeaderAction | DeliveryRuleResponseHeaderAction | DeliveryRuleCacheExpirationAction | DeliveryRuleCacheKeyQueryStringAction; +export type DeliveryRuleActionUnion = DeliveryRuleAction | UrlRedirectAction | UrlSigningAction | OriginGroupOverrideAction | UrlRewriteAction | DeliveryRuleRequestHeaderAction | DeliveryRuleResponseHeaderAction | DeliveryRuleCacheExpirationAction | DeliveryRuleCacheKeyQueryStringAction; /** * An action for the delivery rule. @@ -676,7 +687,8 @@ export interface DeliveryRuleRequestMethodCondition { export interface QueryStringMatchConditionParameters { /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: QueryStringOperator; /** @@ -717,7 +729,8 @@ export interface PostArgsMatchConditionParameters { selector?: string; /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: PostArgsOperator; /** @@ -754,7 +767,8 @@ export interface DeliveryRulePostArgsCondition { export interface RequestUriMatchConditionParameters { /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: RequestUriOperator; /** @@ -795,7 +809,8 @@ export interface RequestHeaderMatchConditionParameters { selector?: string; /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: RequestHeaderOperator; /** @@ -832,7 +847,8 @@ export interface DeliveryRuleRequestHeaderCondition { export interface RequestBodyMatchConditionParameters { /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: RequestBodyOperator; /** @@ -898,7 +914,7 @@ export interface UrlPathMatchConditionParameters { /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', - * 'Wildcard' + * 'Wildcard', 'RegEx' */ operator: UrlPathOperator; /** @@ -935,7 +951,8 @@ export interface DeliveryRuleUrlPathCondition { export interface UrlFileExtensionMatchConditionParameters { /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: UrlFileExtensionOperator; /** @@ -972,7 +989,8 @@ export interface DeliveryRuleUrlFileExtensionCondition { export interface UrlFileNameMatchConditionParameters { /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: UrlFileNameOperator; /** @@ -1041,7 +1059,8 @@ export interface CookiesMatchConditionParameters { selector?: string; /** * Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', - * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + * 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + * 'RegEx' */ operator: CookiesOperator; /** @@ -1173,14 +1192,6 @@ export interface UrlSigningParamIdentifier { * Defines the parameters for the Url Signing action. */ export interface UrlSigningActionParameters { - /** - * Possible values include: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters' - */ - odatatype?: Odatatype; - /** - * Id reference of the key to be used to verify the hash and should be defined in UrlSigningKeys - */ - keyId: string; /** * Algorithm to use for URL signing. Possible values include: 'SHA256' */ @@ -1189,10 +1200,6 @@ export interface UrlSigningActionParameters { * Defines which query string parameters in the url to be considered for expires, key id etc. */ parameterNameOverride?: UrlSigningParamIdentifier[]; - /** - * Match values to match against. Supports CIDR ranges (both IPv4 and IPv6). - */ - ipSubnets?: string[]; } /** @@ -1209,6 +1216,30 @@ export interface UrlSigningAction { parameters: UrlSigningActionParameters; } +/** + * Defines the parameters for the origin group override action. + */ +export interface OriginGroupOverrideActionParameters { + /** + * defines the OriginGroup that would override the DefaultOriginGroup. + */ + originGroup: ResourceReference; +} + +/** + * Defines the origin group override action for the delivery rule. + */ +export interface OriginGroupOverrideAction { + /** + * Polymorphic Discriminator + */ + name: "OriginGroupOverride"; + /** + * Defines the parameters for the action. + */ + parameters: OriginGroupOverrideActionParameters; +} + /** * Defines the parameters for the url rewrite action. */ @@ -1371,6 +1402,10 @@ export interface LoadParameters { * required location and tags */ export interface ProxyResource extends Resource { + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -1928,6 +1963,38 @@ export interface EdgeNode extends ProxyResource { ipAddressGroups: IpAddressGroup[]; } +/** + * Read only system data + */ +export interface SystemData { + /** + * An identifier for the identity that created the resource + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'user', + * 'application', 'managedIdentity', 'key' + */ + createdByType?: IdentityType; + /** + * The timestamp of resource creation (UTC) + */ + createdAt?: Date; + /** + * An identifier for the identity that last modified the resource + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'user', + * 'application', 'managedIdentity', 'key' + */ + lastModifiedByType?: IdentityType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + /** * Error response indicates CDN service is not able to process the incoming request. The reason is * provided in the error message. @@ -1946,928 +2013,4083 @@ export interface ErrorResponse { } /** - * Defines contents of a web application firewall global configuration + * Parameters required for content purge. */ -export interface PolicySettings { +export interface AfdPurgeParameters { /** - * describes if the policy is in enabled state or disabled state. Possible values include: - * 'Disabled', 'Enabled' + * The path to the content to be purged. Can describe a file path or a wild card directory. */ - enabledState?: PolicyEnabledState; + contentPaths: string[]; /** - * Describes if it is in detection mode or prevention mode at policy level. Possible values - * include: 'Prevention', 'Detection' + * List of domains. */ - mode?: PolicyMode; + domains?: string[]; +} + +/** + * Certificate used for https + */ +export interface Certificate { /** - * If action type is redirect, this field represents the default redirect URL for the client. + * Subject name in the certificate. */ - defaultRedirectUrl?: string; + subject?: string; /** - * If the action type is block, this field defines the default customer overridable http response - * status code. + * Certificate expiration date. */ - defaultCustomBlockResponseStatusCode?: number; + expirationDate?: string; /** - * If the action type is block, customer can override the response body. The body must be - * specified in base64 encoding. + * Certificate thumbprint. */ - defaultCustomBlockResponseBody?: string; + thumbprint?: string; } /** - * Defines the common attributes for a custom rule that can be included in a waf policy + * Managed Certificate used for https */ -export interface CustomRule { +export interface ManagedCertificate extends Certificate { +} + +/** + * Customer Certificate used for https + */ +export interface CustomerCertificate extends Certificate { /** - * Defines the name of the custom rule + * Certificate version. */ - name: string; + version?: string; /** - * Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not - * specified. Possible values include: 'Disabled', 'Enabled' + * Certificate issuing authority. */ - enabledState?: CustomRuleEnabledState; + certificateAuthority?: string; /** - * Defines in what order this rule be evaluated in the overall list of custom rules + * Complete Url to the certificate */ - priority: number; + certificateUrl: string; /** - * List of match conditions. + * Whether to use the latest version for the certificate */ - matchConditions: MatchCondition[]; + useLatestVersion?: boolean; /** - * Describes what action to be applied when rule matches. Possible values include: 'Allow', - * 'Block', 'Log', 'Redirect' + * The list of SANs. */ - action: ActionType; + subjectAlternativeNames?: string[]; } /** - * Defines a rate limiting rule that can be included in a waf policy + * Input of the secret to be validated. */ -export interface RateLimitRule extends CustomRule { +export interface ValidateSecretInput { /** - * Defines rate limit threshold. + * The secret source. */ - rateLimitThreshold: number; + secretSource: ResourceReference; /** - * Defines rate limit duration. Default is 1 minute. + * The secret type. Possible values include: 'UrlSigningKey', 'ManagedCertificate', + * 'CustomerCertificate' */ - rateLimitDurationInMinutes: number; + secretType: ValidateSecretType; } /** - * Defines contents of rate limit rules + * Output of the validated secret. */ -export interface RateLimitRuleList { +export interface ValidateSecretOutput { /** - * List of rules + * The validation status. Possible values include: 'Valid', 'Invalid', 'AccessDenied', + * 'CertificateExpired' */ - rules?: RateLimitRule[]; + status?: Status; + /** + * Detailed error message + */ + message?: string; } /** - * Define match conditions + * The JSON object that contains the properties to secure a domain. */ -export interface MatchCondition { - /** - * Match variable to compare against. Possible values include: 'RemoteAddr', 'SocketAddr', - * 'RequestMethod', 'RequestHeader', 'RequestUri', 'QueryString', 'RequestBody', 'Cookies', - * 'PostArgs' - */ - matchVariable: MatchVariable; - /** - * Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. - */ - selector?: string; - /** - * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch', - * 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', - * 'BeginsWith', 'EndsWith', 'RegEx' - */ - operator: Operator; +export interface AFDDomainHttpsParameters { /** - * Describes if the result of this condition should be negated. + * Defines the source of the SSL certificate. Possible values include: 'CustomerCertificate', + * 'ManagedCertificate' */ - negateCondition?: boolean; + certificateType: AfdCertificateType; /** - * List of possible match values. + * TLS protocol version that will be used for Https. Possible values include: 'TLS10', 'TLS12' */ - matchValue: string[]; + minimumTlsVersion?: AfdMinimumTlsVersion; /** - * List of transforms. + * Resource reference to the secret. ie. subs/rg/profile/secret */ - transforms?: TransformType[]; + secret?: ResourceReference; } /** - * Defines contents of custom rules + * The JSON object that contains the properties to validate a domain. */ -export interface CustomRuleList { +export interface DomainValidationProperties { /** - * List of rules + * Challenge used for DNS TXT record or file based validation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - rules?: CustomRule[]; + readonly validationToken?: string; + /** + * The date time that the token expires + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationDate?: string; } /** - * Defines a managed rule group override setting. + * Friendly domain name mapping to the endpoint hostname that the customer provides for branding + * purposes, e.g. www.contoso.com. */ -export interface ManagedRuleOverride { +export interface AFDDomain extends ProxyResource { /** - * Identifier for the managed rule. + * The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed + * certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. */ - ruleId: string; + tlsSettings?: AFDDomainHttpsParameters; /** - * Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not - * specified. Possible values include: 'Disabled', 'Enabled' + * Resource reference to the Azure DNS zone */ - enabledState?: ManagedRuleEnabledState; + azureDnsZone?: ResourceReference; /** - * Describes the override action to be applied when rule matches. Possible values include: - * 'Allow', 'Block', 'Log', 'Redirect' + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - action?: ActionType; -} - -/** - * Defines a managed rule group override setting. - */ -export interface ManagedRuleGroupOverride { + readonly provisioningState?: AfdProvisioningState; /** - * Describes the managed rule group within the rule set to override + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - ruleGroupName: string; + readonly deploymentStatus?: DeploymentStatus; /** - * List of rules that will be disabled. If none specified, all rules in the group will be - * disabled. + * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by + * step. DCV stands for DomainControlValidation. Possible values include: 'Unknown', + * 'Submitting', 'Pending', 'TimedOut', 'PendingRevalidation', 'Approved' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - rules?: ManagedRuleOverride[]; + readonly domainValidationState?: DomainValidationState; + /** + * The host name of the domain. Must be a domain name. + */ + hostName: string; + /** + * Values the customer needs to validate domain ownership + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly validationProperties?: DomainValidationProperties; } /** - * Defines a managed rule set. + * The domain JSON object required for domain creation or update. */ -export interface ManagedRuleSet { +export interface AFDDomainUpdateParameters { /** - * Defines the rule set type to use. + * The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed + * certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. */ - ruleSetType: string; + tlsSettings?: AFDDomainHttpsParameters; /** - * Defines the version of the rule set to use. + * Resource reference to the Azure DNS zone */ - ruleSetVersion: string; + azureDnsZone?: ResourceReference; +} + +/** + * settings for security policy patterns to match + */ +export interface SecurityPolicyWebApplicationFirewallAssociation { /** - * Verizon only : If the rule set supports anomaly detection mode, this describes the threshold - * for blocking requests. + * List of domains. */ - anomalyScore?: number; + domains?: ResourceReference[]; /** - * Defines the rule overrides to apply to the rule set. + * List of paths */ - ruleGroupOverrides?: ManagedRuleGroupOverride[]; + patternsToMatch?: string[]; } /** - * Defines the list of managed rule sets for the policy. + * Contains the possible cases for SecurityPolicyParameters. */ -export interface ManagedRuleSetList { +export type SecurityPolicyParametersUnion = SecurityPolicyParameters | SecurityPolicyWebApplicationFirewallParameters; + +/** + * The json object containing security policy parameters + */ +export interface SecurityPolicyParameters { /** - * List of rule sets. + * Polymorphic Discriminator */ - managedRuleSets?: ManagedRuleSet[]; + type: "SecurityPolicyParameters"; } /** - * Defines the ARM Resource ID for the linked endpoints + * The json object containing security policy waf parameters */ -export interface CdnEndpoint { +export interface SecurityPolicyWebApplicationFirewallParameters { /** - * ARM Resource ID string. + * Polymorphic Discriminator */ - id?: string; + type: "WebApplicationFirewall"; + /** + * Resource ID. + */ + wafPolicy?: ResourceReference; + /** + * Waf associations + */ + associations?: SecurityPolicyWebApplicationFirewallAssociation[]; } /** - * Defines web application firewall policy for Azure CDN. + * SecurityPolicy association for AzureFrontDoor profile */ -export interface CdnWebApplicationFirewallPolicy extends TrackedResource { +export interface SecurityPolicy extends ProxyResource { /** - * Describes policySettings for policy + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - policySettings?: PolicySettings; + readonly provisioningState?: AfdProvisioningState; /** - * Describes rate limit rules inside the policy. + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - rateLimitRules?: RateLimitRuleList; + readonly deploymentStatus?: DeploymentStatus; /** - * Describes custom rules inside the policy. + * object which contains security policy parameters */ - customRules?: CustomRuleList; + parameters?: SecurityPolicyWebApplicationFirewallParameters; +} + +/** + * CDN endpoint is the entity within a CDN profile containing configuration information such as + * origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the + * URL format .azureedge.net. + */ +export interface AFDEndpoint extends TrackedResource { /** - * Describes managed rules inside the policy. + * Send and receive timeout on forwarding request to the origin. When timeout is reached, the + * request fails and returns. */ - managedRules?: ManagedRuleSetList; + originResponseTimeoutSeconds?: number; /** - * Describes Azure CDN endpoints associated with this Web Application Firewall policy. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible + * values include: 'Enabled', 'Disabled' */ - readonly endpointLinks?: CdnEndpoint[]; + enabledState?: EnabledState; /** - * Provisioning state of the WebApplicationFirewallPolicy. Possible values include: 'Creating', - * 'Succeeded', 'Failed' + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly provisioningState?: ProvisioningState; + readonly provisioningState?: AfdProvisioningState; /** - * Resource status of the policy. Possible values include: 'Creating', 'Enabling', 'Enabled', - * 'Disabling', 'Disabled', 'Deleting' + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resourceState?: PolicyResourceState; - /** - * Gets a unique read-only string that changes whenever the resource is updated. - */ - etag?: string; + readonly deploymentStatus?: DeploymentStatus; /** - * The pricing tier (defines a CDN provider, feature list and rate) of the - * CdnWebApplicationFirewallPolicy. + * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. + * contoso.azureedge.net + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sku: Sku; + readonly hostName?: string; } /** - * Properties required to update a CdnWebApplicationFirewallPolicy. + * Properties required to create or update an endpoint. */ -export interface CdnWebApplicationFirewallPolicyPatchParameters extends BaseResource { +export interface AFDEndpointUpdateParameters extends BaseResource { /** - * CdnWebApplicationFirewallPolicy tags + * Endpoint tags. */ tags?: { [propertyName: string]: string }; + /** + * Send and receive timeout on forwarding request to the origin. When timeout is reached, the + * request fails and returns. + */ + originResponseTimeoutSeconds?: number; + /** + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible + * values include: 'Enabled', 'Disabled' + */ + enabledState?: EnabledState; } /** - * Describes a managed rule definition. + * settings for compression. */ -export interface ManagedRuleDefinition { +export interface CompressionSettings { /** - * Identifier for the managed rule. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of content types on which compression applies. The value should be a valid MIME type. */ - readonly ruleId?: string; + contentTypesToCompress?: string[]; /** - * Describes the functionality of the managed rule. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If + * compression is enabled, content will be served as compressed if user requests for a compressed + * version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + * 1 byte or larger than 1 MB. */ - readonly description?: string; + isCompressionEnabled?: boolean; } /** - * Describes a managed rule group. + * Contains the possible cases for SecretParameters. */ -export interface ManagedRuleGroupDefinition { +export type SecretParametersUnion = SecretParameters | UrlSigningKeyParameters | ManagedCertificateParameters | CustomerCertificateParameters; + +/** + * The json object containing secret parameters + */ +export interface SecretParameters { /** - * Name of the managed rule group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Polymorphic Discriminator */ - readonly ruleGroupName?: string; + type: "SecretParameters"; +} + +/** + * The tracking states for afd resources. + */ +export interface AFDStateProperties { /** - * Description of the managed rule group. + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly description?: string; + readonly provisioningState?: AfdProvisioningState; /** - * List of rules within the managed rule group. + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly rules?: ManagedRuleDefinition[]; + readonly deploymentStatus?: DeploymentStatus; } /** - * Describes a managed rule set definition. + * The JSON object that contains the properties of the Secret to create. */ -export interface ManagedRuleSetDefinition extends Resource { - /** - * Provisioning state of the managed rule set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; +export interface SecretProperties extends AFDStateProperties { /** - * Type of the managed rule set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * object which contains secret parameters */ - readonly ruleSetType?: string; + parameters?: SecretParametersUnion; +} + +/** + * Friendly Secret name mapping to the any Secret or secret related information. + */ +export interface Secret extends ProxyResource { /** - * Version of the managed rule set type. + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly ruleSetVersion?: string; + readonly provisioningState?: AfdProvisioningState; /** - * Rule groups of the managed rule set. + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly ruleGroups?: ManagedRuleGroupDefinition[]; + readonly deploymentStatus?: DeploymentStatus; /** - * The pricing tier (defines a CDN provider, feature list and rate) of the - * CdnWebApplicationFirewallPolicy. + * object which contains secret parameters */ - sku?: Sku; + parameters?: SecretParametersUnion; } /** - * Optional Parameters. + * Url signing key parameters */ -export interface ProfilesUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface UrlSigningKeyParameters { /** - * Profile tags + * Polymorphic Discriminator */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface ProfilesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + type: "UrlSigningKey"; /** - * Profile tags + * Defines the customer defined key Id. This id will exist in the incoming request to indicate + * the key used to form the hash. */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface CustomDomainsEnableCustomHttpsOptionalParams extends msRest.RequestOptionsBase { + keyId: string; /** - * The configuration specifying how to enable HTTPS for the custom domain - using CDN managed - * certificate or user's own certificate. If not specified, enabling ssl uses CDN managed - * certificate by default. + * Resource reference to the KV secret */ - customDomainHttpsParameters?: CustomDomainHttpsParametersUnion; -} - -/** - * Optional Parameters. - */ -export interface PoliciesUpdateOptionalParams extends msRest.RequestOptionsBase { + secretSource: ResourceReference; /** - * CdnWebApplicationFirewallPolicy tags + * Version of the secret to be used */ - tags?: { [propertyName: string]: string }; + secretVersion?: string; } /** - * Optional Parameters. + * Managed Certificate used for https */ -export interface PoliciesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface ManagedCertificateParameters { /** - * CdnWebApplicationFirewallPolicy tags + * Polymorphic Discriminator */ - tags?: { [propertyName: string]: string }; -} - -/** - * An interface representing CdnManagementClientOptions. - */ -export interface CdnManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; + type: "ManagedCertificate"; } /** - * @interface - * Result of the request to list profiles. It contains a list of profile objects and a URL link to - * get the next set of results. - * @extends Array + * Customer Certificate used for https */ -export interface ProfileListResult extends Array { +export interface CustomerCertificateParameters { /** - * URL to get the next set of profile objects if there are any. + * Polymorphic Discriminator */ - nextLink?: string; -} - -/** - * @interface - * Output of check resource usage API. - * @extends Array - */ -export interface ResourceUsageListResult extends Array { + type: "CustomerCertificate"; /** - * URL to get the next set of custom domain objects if there are any. + * Resource reference to the KV secret */ - nextLink?: string; + secretSource: ResourceReference; + /** + * Version of the secret to be used + */ + secretVersion?: string; + /** + * Certificate issuing authority. + */ + certificateAuthority?: string; + /** + * Whether to use the latest version for the certificate + */ + useLatestVersion?: boolean; + /** + * The list of SANs. + */ + subjectAlternativeNames?: string[]; } /** - * @interface - * Result of the request to list endpoints. It contains a list of endpoint objects and a URL link - * to get the next set of results. - * @extends Array + * Friendly RuleSet name mapping to the any RuleSet or secret related information. */ -export interface EndpointListResult extends Array { +export interface RuleSet extends ProxyResource { /** - * URL to get the next set of endpoint objects if there is any. + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly provisioningState?: AfdProvisioningState; + /** + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deploymentStatus?: DeploymentStatus; } /** - * @interface - * Result of the request to list origins. It contains a list of origin objects and a URL link to - * get the next set of results. - * @extends Array + * CDN origin is the source of the content being delivered via CDN. When the edge nodes represented + * by an endpoint do not have the requested content cached, they attempt to fetch it from one or + * more of the configured origins. */ -export interface OriginListResult extends Array { +export interface AFDOrigin extends ProxyResource { /** - * URL to get the next set of origin objects if there are any. + * Resource reference to the Azure origin resource. */ - nextLink?: string; + azureOrigin?: ResourceReference; + /** + * 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; + /** + * The value of the HTTP port. Must be between 1 and 65535. + */ + httpPort?: number; + /** + * The value of the HTTPS port. Must be between 1 and 65535. + */ + httpsPort?: number; + /** + * 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; + /** + * The properties of the private link resource for private origin. + */ + sharedPrivateLinkResource?: any; + /** + * Whether to enable health probes to be made against backends defined under backendPools. Health + * probes can only be disabled if there is a single enabled backend in single enabled backend + * pool. Possible values include: 'Enabled', 'Disabled' + */ + enabledState?: EnabledState; + /** + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AfdProvisioningState; + /** + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deploymentStatus?: DeploymentStatus; } /** - * @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 + * AFDOrigin properties needed for origin update. */ -export interface OriginGroupListResult extends Array { +export interface AFDOriginUpdateParameters extends BaseResource { /** - * URL to get the next set of origin objects if there are any. + * Resource reference to the Azure origin resource. */ - nextLink?: string; + azureOrigin?: ResourceReference; + /** + * 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; + /** + * The value of the HTTP port. Must be between 1 and 65535. + */ + httpPort?: number; + /** + * The value of the HTTPS port. Must be between 1 and 65535. + */ + httpsPort?: number; + /** + * 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; + /** + * The properties of the private link resource for private origin. + */ + sharedPrivateLinkResource?: any; + /** + * Whether to enable health probes to be made against backends defined under backendPools. Health + * probes can only be disabled if there is a single enabled backend in single enabled backend + * pool. Possible values include: 'Enabled', 'Disabled' + */ + enabledState?: EnabledState; } /** - * @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 + * Describes the properties of an existing Shared Private Link Resource to use when connecting to a + * private origin. */ -export interface CustomDomainListResult extends Array { +export interface SharedPrivateLinkResourceProperties { /** - * URL to get the next set of custom domain objects if there are any. + * The resource id of the resource the shared private link resource is for. */ - nextLink?: string; + privateLink?: ResourceReference; + /** + * The location of the shared private link resource + */ + privateLinkLocation?: string; + /** + * The group id from the provider of resource the shared private link resource is for. + */ + groupId?: string; + /** + * The request message for requesting approval of the shared private link resource. + */ + requestMessage?: string; + /** + * Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, + * or Timeout. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', + * 'Timeout' + */ + status?: SharedPrivateLinkResourceStatus; } /** - * @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 + * Round-Robin load balancing settings for a backend pool */ -export interface OperationsListResult extends Array { +export interface LoadBalancingSettingsParameters { /** - * URL to get the next set of operation list results if there are any. + * The number of samples to consider for load balancing decisions */ - nextLink?: string; + sampleSize?: number; + /** + * The number of samples within the sample period that must succeed + */ + successfulSamplesRequired?: number; + /** + * The additional latency in milliseconds for probes to fall into the lowest latency bucket + */ + additionalLatencyInMilliseconds?: number; } /** - * @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 + * AFDOrigin group comprising of origins is used for load balancing to origins when the content + * cannot be served from CDN. */ -export interface EdgenodeResult extends Array { +export interface AFDOriginGroup extends ProxyResource { /** - * URL to get the next set of edgenode list results if there are any. + * Load balancing settings for a backend pool */ - nextLink?: string; -} + loadBalancingSettings?: LoadBalancingSettingsParameters; + /** + * Health probe settings to the origin that is used to determine the health of the origin. + */ + healthProbeSettings?: HealthProbeParameters; + /** + * 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. + */ + responseBasedAfdOriginErrorDetectionSettings?: ResponseBasedOriginErrorDetectionParameters; + /** + * Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + * Possible values include: 'Enabled', 'Disabled' + */ + sessionAffinityState?: EnabledState; + /** + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AfdProvisioningState; + /** + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deploymentStatus?: DeploymentStatus; +} /** - * @interface - * Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of - * WebApplicationFirewallPolicy objects and a URL link to get the next set of results. - * @extends Array + * AFDOrigin group properties needed for origin group creation or update. */ -export interface CdnWebApplicationFirewallPolicyList extends Array { +export interface AFDOriginGroupUpdateParameters extends BaseResource { /** - * URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + * Load balancing settings for a backend pool */ - nextLink?: string; + loadBalancingSettings?: LoadBalancingSettingsParameters; + /** + * Health probe settings to the origin that is used to determine the health of the origin. + */ + healthProbeSettings?: HealthProbeParameters; + /** + * 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. + */ + responseBasedAfdOriginErrorDetectionSettings?: ResponseBasedOriginErrorDetectionParameters; + /** + * Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + * Possible values include: 'Enabled', 'Disabled' + */ + sessionAffinityState?: EnabledState; } /** - * @interface - * List of managed rule set definitions available for use in a policy. - * @extends Array + * Friendly Routes name mapping to the any Routes or secret related information. */ -export interface ManagedRuleSetDefinitionList extends Array { +export interface Route extends ProxyResource { /** - * URL to retrieve next set of managed rule set definitions. + * Domains referenced by this endpoint. */ - nextLink?: string; + customDomains?: ResourceReference[]; + /** + * A reference to the origin group. + */ + originGroup: ResourceReference; + /** + * A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + * contoso.cloudapp.net/originpath. + */ + originPath?: string; + /** + * rule sets referenced by this endpoint. + */ + ruleSets?: ResourceReference[]; + /** + * List of supported protocols for this route. + */ + supportedProtocols?: AFDEndpointProtocols[]; + /** + * The route patterns of the rule. + */ + patternsToMatch?: string[]; + /** + * compression settings. + */ + compressionSettings?: any; + /** + * Defines how CDN caches requests that include query strings. You can ignore any query strings + * when caching, bypass caching to prevent requests that contain query strings from being cached, + * or cache every request with a unique URL. Possible values include: 'IgnoreQueryString', + * 'UseQueryString', 'NotSet' + */ + queryStringCachingBehavior?: AfdQueryStringCachingBehavior; + /** + * Protocol this rule will use when forwarding traffic to backends. Possible values include: + * 'HttpOnly', 'HttpsOnly', 'MatchRequest' + */ + forwardingProtocol?: ForwardingProtocol; + /** + * whether this route will be linked to the default endpoint domain. Possible values include: + * 'Enabled', 'Disabled' + */ + linkToDefaultDomain?: LinkToDefaultDomain; + /** + * Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way + * to set up this rule and it will be the first rule that gets executed. Possible values include: + * 'Enabled', 'Disabled' + */ + httpsRedirect?: HttpsRedirect; + /** + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible + * values include: 'Enabled', 'Disabled' + */ + enabledState?: EnabledState; + /** + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AfdProvisioningState; + /** + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deploymentStatus?: DeploymentStatus; } /** - * Defines values for SkuName. - * Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', 'Premium_ChinaCdn' - * @readonly - * @enum {string} + * The domain JSON object required for domain creation or update. */ -export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft' | 'Premium_ChinaCdn'; +export interface RouteUpdateParameters { + /** + * Domains referenced by this endpoint. + */ + customDomains?: ResourceReference[]; + /** + * A reference to the origin group. + */ + originGroup?: ResourceReference; + /** + * A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + * contoso.cloudapp.net/originpath. + */ + originPath?: string; + /** + * rule sets referenced by this endpoint. + */ + ruleSets?: ResourceReference[]; + /** + * List of supported protocols for this route. + */ + supportedProtocols?: AFDEndpointProtocols[]; + /** + * The route patterns of the rule. + */ + patternsToMatch?: string[]; + /** + * compression settings. + */ + compressionSettings?: any; + /** + * Defines how CDN caches requests that include query strings. You can ignore any query strings + * when caching, bypass caching to prevent requests that contain query strings from being cached, + * or cache every request with a unique URL. Possible values include: 'IgnoreQueryString', + * 'UseQueryString', 'NotSet' + */ + queryStringCachingBehavior?: AfdQueryStringCachingBehavior; + /** + * Protocol this rule will use when forwarding traffic to backends. Possible values include: + * 'HttpOnly', 'HttpsOnly', 'MatchRequest' + */ + forwardingProtocol?: ForwardingProtocol; + /** + * whether this route will be linked to the default endpoint domain. Possible values include: + * 'Enabled', 'Disabled' + */ + linkToDefaultDomain?: LinkToDefaultDomain; + /** + * Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way + * to set up this rule and it will be the first rule that gets executed. Possible values include: + * 'Enabled', 'Disabled' + */ + httpsRedirect?: HttpsRedirect; + /** + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible + * values include: 'Enabled', 'Disabled' + */ + enabledState?: EnabledState; +} /** - * Defines values for ProfileResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting', 'Disabled' - * @readonly - * @enum {string} + * Friendly Rules name mapping to the any Rules or secret related information. */ -export type ProfileResourceState = 'Creating' | 'Active' | 'Deleting' | 'Disabled'; +export interface Rule extends ProxyResource { + /** + * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A + * rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 + * is a special rule. It does not require any condition and actions listed in it will always be + * applied. + */ + order: number; + /** + * A list of conditions that must be matched for the actions to be executed + */ + conditions?: DeliveryRuleConditionUnion[]; + /** + * A list of actions that are executed when all the conditions of a rule are satisfied. + */ + actions: DeliveryRuleActionUnion[]; + /** + * If this rule is a match should the rules engine continue running the remaining rules or stop. + * If not present, defaults to Continue. Possible values include: 'Continue', 'Stop' + */ + matchProcessingBehavior?: MatchProcessingBehavior; + /** + * Provisioning status. Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', + * 'Creating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: AfdProvisioningState; + /** + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deploymentStatus?: DeploymentStatus; +} /** - * Defines values for OptimizationType. - * Possible values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', - * 'VideoOnDemandMediaStreaming', 'LargeFileDownload', 'DynamicSiteAcceleration' - * @readonly - * @enum {string} + * The domain JSON object required for domain creation or update. */ -export type OptimizationType = 'GeneralWebDelivery' | 'GeneralMediaStreaming' | 'VideoOnDemandMediaStreaming' | 'LargeFileDownload' | 'DynamicSiteAcceleration'; +export interface RuleUpdateParameters { + /** + * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A + * rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 + * is a special rule. It does not require any condition and actions listed in it will always be + * applied. + */ + order?: number; + /** + * A list of conditions that must be matched for the actions to be executed + */ + conditions?: DeliveryRuleConditionUnion[]; + /** + * A list of actions that are executed when all the conditions of a rule are satisfied. + */ + actions?: DeliveryRuleActionUnion[]; + /** + * If this rule is a match should the rules engine continue running the remaining rules or stop. + * If not present, defaults to Continue. Possible values include: 'Continue', 'Stop' + */ + matchProcessingBehavior?: MatchProcessingBehavior; +} /** - * Defines values for HealthProbeRequestType. - * Possible values include: 'NotSet', 'GET', 'HEAD' - * @readonly - * @enum {string} + * The validation token. */ -export type HealthProbeRequestType = 'NotSet' | 'GET' | 'HEAD'; +export interface ValidationToken { + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly token?: string; +} /** - * Defines values for ProbeProtocol. - * Possible values include: 'NotSet', 'Http', 'Https' - * @readonly - * @enum {string} + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response */ -export type ProbeProtocol = 'NotSet' | 'Http' | 'Https'; +export interface AfdErrorResponse { + /** + * The error object. + */ + error?: ErrorResponse; +} /** - * Defines values for ResponseBasedDetectedErrorTypes. - * Possible values include: 'None', 'TcpErrorsOnly', 'TcpAndHttpErrors' - * @readonly - * @enum {string} + * An interface representing MetricsResponseSeriesItemGroupsItem. */ -export type ResponseBasedDetectedErrorTypes = 'None' | 'TcpErrorsOnly' | 'TcpAndHttpErrors'; +export interface MetricsResponseSeriesItemGroupsItem { + name?: string; + value?: string; +} /** - * Defines values for EndpointResourceState. - * Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', 'Stopping' - * @readonly - * @enum {string} + * An interface representing MetricsResponseSeriesItemDataItem. */ -export type EndpointResourceState = 'Creating' | 'Deleting' | 'Running' | 'Starting' | 'Stopped' | 'Stopping'; +export interface MetricsResponseSeriesItemDataItem { + dateTime?: Date; + value?: number; +} /** - * Defines values for QueryStringCachingBehavior. - * Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' - * @readonly - * @enum {string} + * An interface representing MetricsResponseSeriesItem. */ -export type QueryStringCachingBehavior = 'IgnoreQueryString' | 'BypassCaching' | 'UseQueryString' | 'NotSet'; +export interface MetricsResponseSeriesItem { + metric?: string; + /** + * Possible values include: 'count', 'bytes', 'bitsPerSecond' + */ + unit?: Unit; + groups?: MetricsResponseSeriesItemGroupsItem[]; + data?: MetricsResponseSeriesItemDataItem[]; +} /** - * Defines values for GeoFilterActions. - * Possible values include: 'Block', 'Allow' - * @readonly - * @enum {string} + * Metrics Response */ -export type GeoFilterActions = 'Block' | 'Allow'; +export interface MetricsResponse { + dateTimeBegin?: Date; + dateTimeEnd?: Date; + /** + * Possible values include: 'PT5M', 'PT1H', 'P1D' + */ + granularity?: Granularity; + series?: MetricsResponseSeriesItem[]; +} /** - * Defines values for RemoteAddressOperator. - * Possible values include: 'Any', 'IPMatch', 'GeoMatch' - * @readonly - * @enum {string} + * An interface representing RankingsResponseTablesItemDataItemMetricsItem. */ -export type RemoteAddressOperator = 'Any' | 'IPMatch' | 'GeoMatch'; +export interface RankingsResponseTablesItemDataItemMetricsItem { + metric?: string; + value?: number; + percentage?: number; +} /** - * Defines values for Transform. - * Possible values include: 'Lowercase', 'Uppercase' - * @readonly - * @enum {string} + * An interface representing RankingsResponseTablesItemDataItem. */ -export type Transform = 'Lowercase' | 'Uppercase'; +export interface RankingsResponseTablesItemDataItem { + name?: string; + metrics?: RankingsResponseTablesItemDataItemMetricsItem[]; +} /** - * Defines values for QueryStringOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * An interface representing RankingsResponseTablesItem. */ -export type QueryStringOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface RankingsResponseTablesItem { + ranking?: string; + data?: RankingsResponseTablesItemDataItem[]; +} /** - * Defines values for PostArgsOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * Rankings Response */ -export type PostArgsOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface RankingsResponse { + dateTimeBegin?: Date; + dateTimeEnd?: Date; + tables?: RankingsResponseTablesItem[]; +} /** - * Defines values for RequestUriOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * An interface representing ContinentsResponseContinentsItem. */ -export type RequestUriOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface ContinentsResponseContinentsItem { + id?: string; +} /** - * Defines values for RequestHeaderOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * An interface representing ContinentsResponseCountryOrRegionsItem. */ -export type RequestHeaderOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface ContinentsResponseCountryOrRegionsItem { + id?: string; + continentId?: string; +} /** - * Defines values for RequestBodyOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * Continents Response */ -export type RequestBodyOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface ContinentsResponse { + continents?: ContinentsResponseContinentsItem[]; + countryOrRegions?: ContinentsResponseCountryOrRegionsItem[]; +} /** - * Defines values for UrlPathOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'Wildcard' - * @readonly - * @enum {string} + * An interface representing ResourcesResponseEndpointsItemCustomDomainsItem. */ -export type UrlPathOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Wildcard'; +export interface ResourcesResponseEndpointsItemCustomDomainsItem { + id?: string; + name?: string; + endpointId?: string; + history?: boolean; +} /** - * Defines values for UrlFileExtensionOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * An interface representing ResourcesResponseEndpointsItem. */ -export type UrlFileExtensionOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface ResourcesResponseEndpointsItem { + id?: string; + name?: string; + history?: boolean; + customDomains?: ResourcesResponseEndpointsItemCustomDomainsItem[]; +} /** - * Defines values for UrlFileNameOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * An interface representing ResourcesResponseCustomDomainsItem. */ -export type UrlFileNameOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface ResourcesResponseCustomDomainsItem { + id?: string; + name?: string; + endpointId?: string; + history?: boolean; +} /** - * Defines values for CookiesOperator. - * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', - * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' - * @readonly - * @enum {string} + * Resources Response */ -export type CookiesOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual'; +export interface ResourcesResponse { + endpoints?: ResourcesResponseEndpointsItem[]; + customDomains?: ResourcesResponseCustomDomainsItem[]; +} /** - * Defines values for RedirectType. - * Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' - * @readonly - * @enum {string} + * An interface representing WafMetricsResponseSeriesItemGroupsItem. */ -export type RedirectType = 'Moved' | 'Found' | 'TemporaryRedirect' | 'PermanentRedirect'; +export interface WafMetricsResponseSeriesItemGroupsItem { + name?: string; + value?: string; +} /** - * Defines values for DestinationProtocol. - * Possible values include: 'MatchRequest', 'Http', 'Https' - * @readonly - * @enum {string} + * An interface representing WafMetricsResponseSeriesItemDataItem. */ -export type DestinationProtocol = 'MatchRequest' | 'Http' | 'Https'; +export interface WafMetricsResponseSeriesItemDataItem { + dateTime?: Date; + value?: number; +} /** - * Defines values for Algorithm. - * Possible values include: 'SHA256' - * @readonly - * @enum {string} + * An interface representing WafMetricsResponseSeriesItem. */ -export type Algorithm = 'SHA256'; +export interface WafMetricsResponseSeriesItem { + metric?: string; + /** + * Possible values include: 'count' + */ + unit?: Unit1; + groups?: WafMetricsResponseSeriesItemGroupsItem[]; + data?: WafMetricsResponseSeriesItemDataItem[]; +} /** - * Defines values for ParamIndicator. - * Possible values include: 'Expires', 'KeyId', 'Signature' - * @readonly - * @enum {string} + * Waf Metrics Response */ -export type ParamIndicator = 'Expires' | 'KeyId' | 'Signature'; +export interface WafMetricsResponse { + dateTimeBegin?: Date; + dateTimeEnd?: Date; + /** + * Possible values include: 'PT5M', 'PT1H', 'P1D' + */ + granularity?: Granularity1; + series?: WafMetricsResponseSeriesItem[]; +} /** - * Defines values for HeaderAction. - * Possible values include: 'Append', 'Overwrite', 'Delete' - * @readonly - * @enum {string} + * An interface representing WafRankingsResponseDataItemMetricsItem. */ -export type HeaderAction = 'Append' | 'Overwrite' | 'Delete'; +export interface WafRankingsResponseDataItemMetricsItem { + metric?: string; + value?: number; + percentage?: number; +} /** - * Defines values for CacheBehavior. - * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' - * @readonly - * @enum {string} + * An interface representing WafRankingsResponseDataItem. */ -export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; +export interface WafRankingsResponseDataItem { + groupValues?: string[]; + metrics?: WafRankingsResponseDataItemMetricsItem[]; +} /** - * Defines values for QueryStringBehavior. - * Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' - * @readonly - * @enum {string} + * Waf Rankings Response */ -export type QueryStringBehavior = 'Include' | 'IncludeAll' | 'Exclude' | 'ExcludeAll'; +export interface WafRankingsResponse { + dateTimeBegin?: Date; + dateTimeEnd?: Date; + groups?: string[]; + data?: WafRankingsResponseDataItem[]; +} /** - * Defines values for OriginResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting' - * @readonly - * @enum {string} + * The usage names. */ -export type OriginResourceState = 'Creating' | 'Active' | 'Deleting'; +export interface UsageName { + /** + * A string describing the resource name. + */ + value?: string; + /** + * A localized string describing the resource name. + */ + localizedValue?: string; +} /** - * Defines values for PrivateEndpointStatus. - * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' - * @readonly - * @enum {string} + * Describes resource usage. */ -export type PrivateEndpointStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected' | 'Timeout'; +export interface Usage { + /** + * Resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The current value of the usage. + */ + currentValue: number; + /** + * The limit of usage. + */ + limit: number; + /** + * The name of the type of usage. + */ + name: UsageName; +} /** - * Defines values for OriginGroupResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting' - * @readonly - * @enum {string} + * Defines contents of a web application firewall global configuration */ -export type OriginGroupResourceState = 'Creating' | 'Active' | 'Deleting'; +export interface PolicySettings { + /** + * describes if the policy is in enabled state or disabled state. Possible values include: + * 'Disabled', 'Enabled' + */ + enabledState?: PolicyEnabledState; + /** + * Describes if it is in detection mode or prevention mode at policy level. Possible values + * include: 'Prevention', 'Detection' + */ + mode?: PolicyMode; + /** + * If action type is redirect, this field represents the default redirect URL for the client. + */ + defaultRedirectUrl?: string; + /** + * If the action type is block, this field defines the default customer overridable http response + * status code. + */ + defaultCustomBlockResponseStatusCode?: number; + /** + * If the action type is block, customer can override the response body. The body must be + * specified in base64 encoding. + */ + defaultCustomBlockResponseBody?: string; +} /** - * Defines values for CustomDomainResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting' - * @readonly - * @enum {string} + * Defines the common attributes for a custom rule that can be included in a waf policy */ -export type CustomDomainResourceState = 'Creating' | 'Active' | 'Deleting'; +export interface CustomRule { + /** + * Defines the name of the custom rule + */ + name: string; + /** + * Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not + * specified. Possible values include: 'Disabled', 'Enabled' + */ + enabledState?: CustomRuleEnabledState; + /** + * Defines in what order this rule be evaluated in the overall list of custom rules + */ + priority: number; + /** + * List of match conditions. + */ + matchConditions: MatchCondition[]; + /** + * Describes what action to be applied when rule matches. Possible values include: 'Allow', + * 'Block', 'Log', 'Redirect' + */ + action: ActionType; +} /** - * Defines values for CustomHttpsProvisioningState. - * Possible values include: 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Failed' - * @readonly - * @enum {string} + * Defines a rate limiting rule that can be included in a waf policy */ -export type CustomHttpsProvisioningState = 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Failed'; +export interface RateLimitRule extends CustomRule { + /** + * Defines rate limit threshold. + */ + rateLimitThreshold: number; + /** + * Defines rate limit duration. Default is 1 minute. + */ + rateLimitDurationInMinutes: number; +} /** - * Defines values for CustomHttpsProvisioningSubstate. - * Possible values include: 'SubmittingDomainControlValidationRequest', - * 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', - * 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', - * 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', - * 'CertificateDeleted' - * @readonly - * @enum {string} + * Defines contents of rate limit rules */ -export type CustomHttpsProvisioningSubstate = 'SubmittingDomainControlValidationRequest' | 'PendingDomainControlValidationREquestApproval' | 'DomainControlValidationRequestApproved' | 'DomainControlValidationRequestRejected' | 'DomainControlValidationRequestTimedOut' | 'IssuingCertificate' | 'DeployingCertificate' | 'CertificateDeployed' | 'DeletingCertificate' | 'CertificateDeleted'; +export interface RateLimitRuleList { + /** + * List of rules + */ + rules?: RateLimitRule[]; +} /** - * Defines values for ProtocolType. - * Possible values include: 'ServerNameIndication', 'IPBased' - * @readonly - * @enum {string} + * Define match conditions */ -export type ProtocolType = 'ServerNameIndication' | 'IPBased'; +export interface MatchCondition { + /** + * Match variable to compare against. Possible values include: 'RemoteAddr', 'SocketAddr', + * 'RequestMethod', 'RequestHeader', 'RequestUri', 'QueryString', 'RequestBody', 'Cookies', + * 'PostArgs' + */ + matchVariable: MatchVariable; + /** + * Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. + */ + selector?: string; + /** + * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch', + * 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', + * 'BeginsWith', 'EndsWith', 'RegEx' + */ + operator: Operator; + /** + * Describes if the result of this condition should be negated. + */ + negateCondition?: boolean; + /** + * List of possible match values. + */ + matchValue: string[]; + /** + * List of transforms. + */ + transforms?: TransformType[]; +} /** - * Defines values for MinimumTlsVersion. - * Possible values include: 'None', 'TLS10', 'TLS12' - * @readonly - * @enum {string} + * Defines contents of custom rules */ -export type MinimumTlsVersion = 'None' | 'TLS10' | 'TLS12'; +export interface CustomRuleList { + /** + * List of rules + */ + rules?: CustomRule[]; +} /** - * Defines values for CertificateType. - * Possible values include: 'Shared', 'Dedicated' - * @readonly - * @enum {string} + * Defines a managed rule group override setting. */ -export type CertificateType = 'Shared' | 'Dedicated'; - -/** - * Defines values for ResourceType. - * Possible values include: 'Microsoft.Cdn/Profiles/Endpoints' +export interface ManagedRuleOverride { + /** + * Identifier for the managed rule. + */ + ruleId: string; + /** + * Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not + * specified. Possible values include: 'Disabled', 'Enabled' + */ + enabledState?: ManagedRuleEnabledState; + /** + * Describes the override action to be applied when rule matches. Possible values include: + * 'Allow', 'Block', 'Log', 'Redirect' + */ + action?: ActionType; +} + +/** + * Defines a managed rule group override setting. + */ +export interface ManagedRuleGroupOverride { + /** + * Describes the managed rule group within the rule set to override + */ + ruleGroupName: string; + /** + * List of rules that will be disabled. If none specified, all rules in the group will be + * disabled. + */ + rules?: ManagedRuleOverride[]; +} + +/** + * Defines a managed rule set. + */ +export interface ManagedRuleSet { + /** + * Defines the rule set type to use. + */ + ruleSetType: string; + /** + * Defines the version of the rule set to use. + */ + ruleSetVersion: string; + /** + * Verizon only : If the rule set supports anomaly detection mode, this describes the threshold + * for blocking requests. + */ + anomalyScore?: number; + /** + * Defines the rule overrides to apply to the rule set. + */ + ruleGroupOverrides?: ManagedRuleGroupOverride[]; +} + +/** + * Defines the list of managed rule sets for the policy. + */ +export interface ManagedRuleSetList { + /** + * List of rule sets. + */ + managedRuleSets?: ManagedRuleSet[]; +} + +/** + * Defines the ARM Resource ID for the linked endpoints + */ +export interface CdnEndpoint { + /** + * ARM Resource ID string. + */ + id?: string; +} + +/** + * Defines web application firewall policy for Azure CDN. + */ +export interface CdnWebApplicationFirewallPolicy extends TrackedResource { + /** + * Describes policySettings for policy + */ + policySettings?: PolicySettings; + /** + * Describes rate limit rules inside the policy. + */ + rateLimitRules?: RateLimitRuleList; + /** + * Describes custom rules inside the policy. + */ + customRules?: CustomRuleList; + /** + * Describes managed rules inside the policy. + */ + managedRules?: ManagedRuleSetList; + /** + * Describes Azure CDN endpoints associated with this Web Application Firewall policy. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endpointLinks?: CdnEndpoint[]; + /** + * Provisioning state of the WebApplicationFirewallPolicy. Possible values include: 'Creating', + * 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Resource status of the policy. Possible values include: 'Creating', 'Enabling', 'Enabled', + * 'Disabling', 'Disabled', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceState?: PolicyResourceState; + /** + * Gets a unique read-only string that changes whenever the resource is updated. + */ + etag?: string; + /** + * The pricing tier (defines a CDN provider, feature list and rate) of the + * CdnWebApplicationFirewallPolicy. + */ + sku: Sku; +} + +/** + * Properties required to update a CdnWebApplicationFirewallPolicy. + */ +export interface CdnWebApplicationFirewallPolicyPatchParameters extends BaseResource { + /** + * CdnWebApplicationFirewallPolicy tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Describes a managed rule definition. + */ +export interface ManagedRuleDefinition { + /** + * Identifier for the managed rule. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ruleId?: string; + /** + * Describes the functionality of the managed rule. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} + +/** + * Describes a managed rule group. + */ +export interface ManagedRuleGroupDefinition { + /** + * Name of the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ruleGroupName?: string; + /** + * Description of the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * List of rules within the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly rules?: ManagedRuleDefinition[]; +} + +/** + * Describes a managed rule set definition. + */ +export interface ManagedRuleSetDefinition extends Resource { + /** + * Provisioning state of the managed rule set. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * Type of the managed rule set. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ruleSetType?: string; + /** + * Version of the managed rule set type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ruleSetVersion?: string; + /** + * Rule groups of the managed rule set. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ruleGroups?: ManagedRuleGroupDefinition[]; + /** + * The pricing tier (defines a CDN provider, feature list and rate) of the + * CdnWebApplicationFirewallPolicy. + */ + sku?: Sku; +} + +/** + * Optional Parameters. + */ +export interface ProfilesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Profile tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface ProfilesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Profile tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface CustomDomainsEnableCustomHttpsOptionalParams extends msRest.RequestOptionsBase { + /** + * The configuration specifying how to enable HTTPS for the custom domain - using CDN managed + * certificate or user's own certificate. If not specified, enabling ssl uses CDN managed + * certificate by default. + */ + customDomainHttpsParameters?: CustomDomainHttpsParametersUnion; +} + +/** + * Optional Parameters. + */ +export interface AFDCustomDomainsUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed + * certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. + */ + tlsSettings?: AFDDomainHttpsParameters; + /** + * Resource reference to the Azure DNS zone + */ + azureDnsZone?: ResourceReference; +} + +/** + * Optional Parameters. + */ +export interface AFDCustomDomainsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed + * certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. + */ + tlsSettings?: AFDDomainHttpsParameters; + /** + * Resource reference to the Azure DNS zone + */ + azureDnsZone?: ResourceReference; +} + +/** + * Optional Parameters. + */ +export interface AFDEndpointsPurgeContentOptionalParams extends msRest.RequestOptionsBase { + /** + * List of domains. + */ + domains?: string[]; +} + +/** + * Optional Parameters. + */ +export interface AFDEndpointsBeginPurgeContentOptionalParams extends msRest.RequestOptionsBase { + /** + * List of domains. + */ + domains?: string[]; +} + +/** + * Optional Parameters. + */ +export interface SecurityPoliciesCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * object which contains security policy parameters + */ + parameters?: SecurityPolicyWebApplicationFirewallParameters; +} + +/** + * Optional Parameters. + */ +export interface SecurityPoliciesBeginCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * object which contains security policy parameters + */ + parameters?: SecurityPolicyWebApplicationFirewallParameters; +} + +/** + * Optional Parameters. + */ +export interface SecretsCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * object which contains secret parameters + */ + parameters?: SecretParametersUnion; +} + +/** + * Optional Parameters. + */ +export interface SecretsUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * object which contains secret parameters + */ + parameters?: SecretParametersUnion; +} + +/** + * Optional Parameters. + */ +export interface SecretsBeginCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * object which contains secret parameters + */ + parameters?: SecretParametersUnion; +} + +/** + * Optional Parameters. + */ +export interface SecretsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * object which contains secret parameters + */ + parameters?: SecretParametersUnion; +} + +/** + * Optional Parameters. + */ +export interface LogAnalyticsGetLogAnalyticsMetricsOptionalParams extends msRest.RequestOptionsBase { + groupBy?: string[]; + continents?: string[]; + countryOrRegions?: string[]; + customDomains?: string[]; + protocols?: string[]; +} + +/** + * Optional Parameters. + */ +export interface LogAnalyticsGetLogAnalyticsRankingsOptionalParams extends msRest.RequestOptionsBase { + customDomains?: string[]; +} + +/** + * Optional Parameters. + */ +export interface LogAnalyticsGetWafLogAnalyticsMetricsOptionalParams extends msRest.RequestOptionsBase { + actions?: string[]; + groupBy?: string[]; + ruleTypes?: string[]; +} + +/** + * Optional Parameters. + */ +export interface LogAnalyticsGetWafLogAnalyticsRankingsOptionalParams extends msRest.RequestOptionsBase { + actions?: string[]; + ruleTypes?: string[]; +} + +/** + * Optional Parameters. + */ +export interface PoliciesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * CdnWebApplicationFirewallPolicy tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface PoliciesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * CdnWebApplicationFirewallPolicy tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * An interface representing CdnManagementClientOptions. + */ +export interface CdnManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * Result of the request to list profiles. It contains a list of profile objects and a URL link to + * get the next set of results. + * @extends Array + */ +export interface ProfileListResult extends Array { + /** + * URL to get the next set of profile objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Output of check resource usage API. + * @extends Array + */ +export interface ResourceUsageListResult 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 endpoints. It contains a list of endpoint objects and a URL link + * to get the next set of results. + * @extends Array + */ +export interface EndpointListResult extends Array { + /** + * URL to get the next set of endpoint objects if there is any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list origins. It contains a list of origin objects and a URL link to + * 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; +} + +/** + * @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; +} + +/** + * @interface + * The list usages operation response. + * @extends Array + */ +export interface UsagesListResult extends Array { + /** + * URL to get the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list domains. It contains a list of domain objects and a URL link to + * get the next set of results. + * @extends Array + */ +export interface AFDDomainListResult extends Array { + /** + * URL to get the next set of domain objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list endpoints. It contains a list of endpoint objects and a URL link + * to get the next set of results. + * @extends Array + */ +export interface AFDEndpointListResult extends Array { + /** + * URL to get the next set of endpoint objects if there is 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 AFDOriginGroupListResult extends Array { + /** + * URL to get the next set of origin objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list origins. It contains a list of origin objects and a URL link to + * get the next set of results. + * @extends Array + */ +export interface AFDOriginListResult extends Array { + /** + * URL to get the next set of origin objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list routes. It contains a list of route objects and a URL link to get + * the next set of results. + * @extends Array + */ +export interface RouteListResult extends Array { + /** + * URL to get the next set of route objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list rule sets. It contains a list of rule set objects and a URL link + * to get the next set of results. + * @extends Array + */ +export interface RuleSetListResult extends Array { + /** + * URL to get the next set of rule set objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list rules. It contains a list of rule objects and a URL link to get + * the next set of results. + * @extends Array + */ +export interface RuleListResult extends Array { + /** + * URL to get the next set of rule objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list security policies. It contains a list of security policy objects + * and a URL link to get the next set of results. + * @extends Array + */ +export interface SecurityPolicyListResult extends Array { + /** + * URL to get the next set of security policy objects if there is any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list secrets. It contains a list of Secret objects and a URL link to + * get the next set of results. + * @extends Array + */ +export interface SecretListResult extends Array { + /** + * URL to get the next set of Secret objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of + * WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + * @extends Array + */ +export interface CdnWebApplicationFirewallPolicyList extends Array { + /** + * URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * List of managed rule set definitions available for use in a policy. + * @extends Array + */ +export interface ManagedRuleSetDefinitionList extends Array { + /** + * URL to retrieve next set of managed rule set definitions. + */ + nextLink?: string; +} + +/** + * Defines values for SkuName. + * Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', + * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', 'Premium_ChinaCdn', + * 'Standard_AzureFrontDoor', 'Premium_AzureFrontDoor', 'Standard_955BandWidth_ChinaCdn', + * 'Standard_AvgBandWidth_ChinaCdn', 'StandardPlus_ChinaCdn', 'StandardPlus_955BandWidth_ChinaCdn', + * 'StandardPlus_AvgBandWidth_ChinaCdn' + * @readonly + * @enum {string} + */ +export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft' | 'Premium_ChinaCdn' | 'Standard_AzureFrontDoor' | 'Premium_AzureFrontDoor' | 'Standard_955BandWidth_ChinaCdn' | 'Standard_AvgBandWidth_ChinaCdn' | 'StandardPlus_ChinaCdn' | 'StandardPlus_955BandWidth_ChinaCdn' | 'StandardPlus_AvgBandWidth_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', 'RegEx' + * @readonly + * @enum {string} + */ +export type QueryStringOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for PostArgsOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'RegEx' + * @readonly + * @enum {string} + */ +export type PostArgsOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for RequestUriOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'RegEx' + * @readonly + * @enum {string} + */ +export type RequestUriOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for RequestHeaderOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'RegEx' + * @readonly + * @enum {string} + */ +export type RequestHeaderOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for RequestBodyOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'RegEx' + * @readonly + * @enum {string} + */ +export type RequestBodyOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for UrlPathOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'Wildcard', 'RegEx' + * @readonly + * @enum {string} + */ +export type UrlPathOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Wildcard' | 'RegEx'; + +/** + * Defines values for UrlFileExtensionOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'RegEx' + * @readonly + * @enum {string} + */ +export type UrlFileExtensionOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for UrlFileNameOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'RegEx' + * @readonly + * @enum {string} + */ +export type UrlFileNameOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for CookiesOperator. + * Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', + * 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', 'RegEx' + * @readonly + * @enum {string} + */ +export type CookiesOperator = 'Any' | 'Equal' | 'Contains' | 'BeginsWith' | 'EndsWith' | 'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'RegEx'; + +/** + * Defines values for RedirectType. + * Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' + * @readonly + * @enum {string} + */ +export type RedirectType = 'Moved' | 'Found' | 'TemporaryRedirect' | 'PermanentRedirect'; + +/** + * Defines values for DestinationProtocol. + * Possible values include: 'MatchRequest', 'Http', 'Https' + * @readonly + * @enum {string} + */ +export type DestinationProtocol = 'MatchRequest' | 'Http' | 'Https'; + +/** + * Defines values for Algorithm. + * Possible values include: 'SHA256' + * @readonly + * @enum {string} + */ +export type Algorithm = 'SHA256'; + +/** + * Defines values for ParamIndicator. + * Possible values include: 'Expires', 'KeyId', 'Signature' + * @readonly + * @enum {string} + */ +export type ParamIndicator = 'Expires' | 'KeyId' | 'Signature'; + +/** + * Defines values for HeaderAction. + * Possible values include: 'Append', 'Overwrite', 'Delete' + * @readonly + * @enum {string} + */ +export type HeaderAction = 'Append' | 'Overwrite' | 'Delete'; + +/** + * Defines values for CacheBehavior. + * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + * @readonly + * @enum {string} + */ +export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; + +/** + * Defines values for QueryStringBehavior. + * Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + * @readonly + * @enum {string} + */ +export type QueryStringBehavior = 'Include' | 'IncludeAll' | 'Exclude' | 'ExcludeAll'; + +/** + * Defines values for OriginResourceState. + * Possible values include: 'Creating', 'Active', 'Deleting' + * @readonly + * @enum {string} + */ +export type OriginResourceState = 'Creating' | 'Active' | 'Deleting'; + +/** + * Defines values for PrivateEndpointStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + * @readonly + * @enum {string} + */ +export type PrivateEndpointStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected' | 'Timeout'; + +/** + * 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' + * @readonly + * @enum {string} + */ +export type CustomDomainResourceState = 'Creating' | 'Active' | 'Deleting'; + +/** + * Defines values for CustomHttpsProvisioningState. + * Possible values include: 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Failed' + * @readonly + * @enum {string} + */ +export type CustomHttpsProvisioningState = 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Failed'; + +/** + * Defines values for CustomHttpsProvisioningSubstate. + * Possible values include: 'SubmittingDomainControlValidationRequest', + * 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', + * 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', + * 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', + * 'CertificateDeleted' + * @readonly + * @enum {string} + */ +export type CustomHttpsProvisioningSubstate = 'SubmittingDomainControlValidationRequest' | 'PendingDomainControlValidationREquestApproval' | 'DomainControlValidationRequestApproved' | 'DomainControlValidationRequestRejected' | 'DomainControlValidationRequestTimedOut' | 'IssuingCertificate' | 'DeployingCertificate' | 'CertificateDeployed' | 'DeletingCertificate' | 'CertificateDeleted'; + +/** + * Defines values for ProtocolType. + * Possible values include: 'ServerNameIndication', 'IPBased' + * @readonly + * @enum {string} + */ +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' + * @readonly + * @enum {string} + */ +export type CertificateType = 'Shared' | 'Dedicated'; + +/** + * Defines values for ResourceType. + * Possible values include: 'Microsoft.Cdn/Profiles/Endpoints' + * @readonly + * @enum {string} + */ +export type ResourceType = 'Microsoft.Cdn/Profiles/Endpoints'; + +/** + * Defines values for IdentityType. + * Possible values include: 'user', 'application', 'managedIdentity', 'key' + * @readonly + * @enum {string} + */ +export type IdentityType = 'user' | 'application' | 'managedIdentity' | 'key'; + +/** + * Defines values for ValidateSecretType. + * Possible values include: 'UrlSigningKey', 'ManagedCertificate', 'CustomerCertificate' + * @readonly + * @enum {string} + */ +export type ValidateSecretType = 'UrlSigningKey' | 'ManagedCertificate' | 'CustomerCertificate'; + +/** + * Defines values for Status. + * Possible values include: 'Valid', 'Invalid', 'AccessDenied', 'CertificateExpired' + * @readonly + * @enum {string} + */ +export type Status = 'Valid' | 'Invalid' | 'AccessDenied' | 'CertificateExpired'; + +/** + * Defines values for AfdCertificateType. + * Possible values include: 'CustomerCertificate', 'ManagedCertificate' + * @readonly + * @enum {string} + */ +export type AfdCertificateType = 'CustomerCertificate' | 'ManagedCertificate'; + +/** + * Defines values for AfdMinimumTlsVersion. + * Possible values include: 'TLS10', 'TLS12' + * @readonly + * @enum {string} + */ +export type AfdMinimumTlsVersion = 'TLS10' | 'TLS12'; + +/** + * Defines values for AfdProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Updating', 'Deleting', 'Creating' + * @readonly + * @enum {string} + */ +export type AfdProvisioningState = 'Succeeded' | 'Failed' | 'Updating' | 'Deleting' | 'Creating'; + +/** + * Defines values for DeploymentStatus. + * Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Failed' + * @readonly + * @enum {string} + */ +export type DeploymentStatus = 'NotStarted' | 'InProgress' | 'Succeeded' | 'Failed'; + +/** + * Defines values for DomainValidationState. + * Possible values include: 'Unknown', 'Submitting', 'Pending', 'TimedOut', 'PendingRevalidation', + * 'Approved' + * @readonly + * @enum {string} + */ +export type DomainValidationState = 'Unknown' | 'Submitting' | 'Pending' | 'TimedOut' | 'PendingRevalidation' | 'Approved'; + +/** + * Defines values for EnabledState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type EnabledState = 'Enabled' | 'Disabled'; + +/** + * Defines values for AFDEndpointProtocols. + * Possible values include: 'Http', 'Https' + * @readonly + * @enum {string} + */ +export type AFDEndpointProtocols = 'Http' | 'Https'; + +/** + * Defines values for SharedPrivateLinkResourceStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + * @readonly + * @enum {string} + */ +export type SharedPrivateLinkResourceStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected' | 'Timeout'; + +/** + * Defines values for AfdQueryStringCachingBehavior. + * Possible values include: 'IgnoreQueryString', 'UseQueryString', 'NotSet' + * @readonly + * @enum {string} + */ +export type AfdQueryStringCachingBehavior = 'IgnoreQueryString' | 'UseQueryString' | 'NotSet'; + +/** + * Defines values for ForwardingProtocol. + * Possible values include: 'HttpOnly', 'HttpsOnly', 'MatchRequest' + * @readonly + * @enum {string} + */ +export type ForwardingProtocol = 'HttpOnly' | 'HttpsOnly' | 'MatchRequest'; + +/** + * Defines values for LinkToDefaultDomain. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type LinkToDefaultDomain = 'Enabled' | 'Disabled'; + +/** + * Defines values for HttpsRedirect. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type HttpsRedirect = 'Enabled' | 'Disabled'; + +/** + * Defines values for MatchProcessingBehavior. + * Possible values include: 'Continue', 'Stop' + * @readonly + * @enum {string} + */ +export type MatchProcessingBehavior = 'Continue' | 'Stop'; + +/** + * Defines values for PolicyEnabledState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type PolicyEnabledState = 'Disabled' | 'Enabled'; + +/** + * Defines values for PolicyMode. + * Possible values include: 'Prevention', 'Detection' + * @readonly + * @enum {string} + */ +export type PolicyMode = 'Prevention' | 'Detection'; + +/** + * Defines values for CustomRuleEnabledState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type CustomRuleEnabledState = 'Disabled' | 'Enabled'; + +/** + * Defines values for MatchVariable. + * Possible values include: 'RemoteAddr', 'SocketAddr', 'RequestMethod', 'RequestHeader', + * 'RequestUri', 'QueryString', 'RequestBody', 'Cookies', 'PostArgs' + * @readonly + * @enum {string} + */ +export type MatchVariable = 'RemoteAddr' | 'SocketAddr' | 'RequestMethod' | 'RequestHeader' | 'RequestUri' | 'QueryString' | 'RequestBody' | 'Cookies' | 'PostArgs'; + +/** + * Defines values for Operator. + * Possible values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', 'LessThan', + * 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' + * @readonly + * @enum {string} + */ +export type Operator = 'Any' | 'IPMatch' | 'GeoMatch' | 'Equal' | 'Contains' | 'LessThan' | 'GreaterThan' | 'LessThanOrEqual' | 'GreaterThanOrEqual' | 'BeginsWith' | 'EndsWith' | 'RegEx'; + +/** + * Defines values for TransformType. + * Possible values include: 'Lowercase', 'Uppercase', 'Trim', 'UrlDecode', 'UrlEncode', + * 'RemoveNulls' + * @readonly + * @enum {string} + */ +export type TransformType = 'Lowercase' | 'Uppercase' | 'Trim' | 'UrlDecode' | 'UrlEncode' | 'RemoveNulls'; + +/** + * Defines values for ActionType. + * Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + * @readonly + * @enum {string} + */ +export type ActionType = 'Allow' | 'Block' | 'Log' | 'Redirect'; + +/** + * Defines values for ManagedRuleEnabledState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type ManagedRuleEnabledState = 'Disabled' | 'Enabled'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Creating', 'Succeeded', 'Failed' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Creating' | 'Succeeded' | 'Failed'; + +/** + * Defines values for PolicyResourceState. + * Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' + * @readonly + * @enum {string} + */ +export type PolicyResourceState = 'Creating' | 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Deleting'; + +/** + * Defines values for Unit. + * Possible values include: 'count', 'bytes', 'bitsPerSecond' + * @readonly + * @enum {string} + */ +export type Unit = 'count' | 'bytes' | 'bitsPerSecond'; + +/** + * Defines values for Granularity. + * Possible values include: 'PT5M', 'PT1H', 'P1D' + * @readonly + * @enum {string} + */ +export type Granularity = 'PT5M' | 'PT1H' | 'P1D'; + +/** + * Defines values for Unit1. + * Possible values include: 'count' + * @readonly + * @enum {string} + */ +export type Unit1 = 'count'; + +/** + * Defines values for Granularity1. + * Possible values include: 'PT5M', 'PT1H', 'P1D' + * @readonly + * @enum {string} + */ +export type Granularity1 = 'PT5M' | 'PT1H' | 'P1D'; + +/** + * Defines values for Granularity2. + * Possible values include: 'PT5M', 'PT1H', 'P1D' + * @readonly + * @enum {string} + */ +export type Granularity2 = 'PT5M' | 'PT1H' | 'P1D'; + +/** + * Defines values for Granularity3. + * Possible values include: 'PT5M', 'PT1H', 'P1D' * @readonly * @enum {string} */ -export type ResourceType = 'Microsoft.Cdn/Profiles/Endpoints'; +export type Granularity3 = 'PT5M' | 'PT1H' | 'P1D'; + +/** + * Contains response data for the list operation. + */ +export type ProfilesListResponse = ProfileListResult & { + /** + * 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: ProfileListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ProfilesListByResourceGroupResponse = ProfileListResult & { + /** + * 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: ProfileListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ProfilesGetResponse = Profile & { + /** + * 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: Profile; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type ProfilesCreateResponse = Profile & { + /** + * 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: Profile; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ProfilesUpdateResponse = Profile & { + /** + * 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: Profile; + }; +}; + +/** + * Contains response data for the generateSsoUri operation. + */ +export type ProfilesGenerateSsoUriResponse = SsoUri & { + /** + * 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: SsoUri; + }; +}; + +/** + * Contains response data for the listSupportedOptimizationTypes operation. + */ +export type ProfilesListSupportedOptimizationTypesResponse = SupportedOptimizationTypesListResult & { + /** + * 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: SupportedOptimizationTypesListResult; + }; +}; + +/** + * Contains response data for the listResourceUsage operation. + */ +export type ProfilesListResourceUsageResponse = ResourceUsageListResult & { + /** + * 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: ResourceUsageListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type ProfilesBeginCreateResponse = Profile & { + /** + * 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: Profile; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ProfilesBeginUpdateResponse = Profile & { + /** + * 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: Profile; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ProfilesListNextResponse = ProfileListResult & { + /** + * 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: ProfileListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ProfilesListByResourceGroupNextResponse = ProfileListResult & { + /** + * 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: ProfileListResult; + }; +}; + +/** + * Contains response data for the listResourceUsageNext operation. + */ +export type ProfilesListResourceUsageNextResponse = ResourceUsageListResult & { + /** + * 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: ResourceUsageListResult; + }; +}; + +/** + * Contains response data for the listByProfile operation. + */ +export type EndpointsListByProfileResponse = EndpointListResult & { + /** + * 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: EndpointListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type EndpointsGetResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type EndpointsCreateResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type EndpointsUpdateResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the start operation. + */ +export type EndpointsStartResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the stop operation. + */ +export type EndpointsStopResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the validateCustomDomain operation. + */ +export type EndpointsValidateCustomDomainResponse = ValidateCustomDomainOutput & { + /** + * 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: ValidateCustomDomainOutput; + }; +}; + +/** + * Contains response data for the listResourceUsage operation. + */ +export type EndpointsListResourceUsageResponse = ResourceUsageListResult & { + /** + * 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: ResourceUsageListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type EndpointsBeginCreateResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type EndpointsBeginUpdateResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the beginStart operation. + */ +export type EndpointsBeginStartResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the beginStop operation. + */ +export type EndpointsBeginStopResponse = Endpoint & { + /** + * 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: Endpoint; + }; +}; + +/** + * Contains response data for the listByProfileNext operation. + */ +export type EndpointsListByProfileNextResponse = EndpointListResult & { + /** + * 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: EndpointListResult; + }; +}; + +/** + * Contains response data for the listResourceUsageNext operation. + */ +export type EndpointsListResourceUsageNextResponse = ResourceUsageListResult & { + /** + * 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: ResourceUsageListResult; + }; +}; + +/** + * Contains response data for the listByEndpoint operation. + */ +export type OriginsListByEndpointResponse = OriginListResult & { + /** + * 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: OriginListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OriginsGetResponse = 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 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. + */ +export type OriginsUpdateResponse = 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 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. + */ +export type OriginsBeginUpdateResponse = 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 listByEndpointNext operation. + */ +export type OriginsListByEndpointNextResponse = OriginListResult & { + /** + * 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: 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. + */ +export type CustomDomainsListByEndpointResponse = CustomDomainListResult & { + /** + * 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: CustomDomainListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CustomDomainsGetResponse = CustomDomain & { + /** + * 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: CustomDomain; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type CustomDomainsCreateResponse = CustomDomain & { + /** + * 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: CustomDomain; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type CustomDomainsDeleteMethodResponse = CustomDomain & { + /** + * 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: CustomDomain; + }; +}; + +/** + * Contains response data for the disableCustomHttps operation. + */ +export type CustomDomainsDisableCustomHttpsResponse = CustomDomain & { + /** + * 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: CustomDomain; + }; +}; + +/** + * Contains response data for the enableCustomHttps operation. + */ +export type CustomDomainsEnableCustomHttpsResponse = CustomDomain & { + /** + * 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: CustomDomain; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type CustomDomainsBeginCreateResponse = CustomDomain & { + /** + * 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: CustomDomain; + }; +}; + +/** + * Contains response data for the beginDeleteMethod operation. + */ +export type CustomDomainsBeginDeleteMethodResponse = CustomDomain & { + /** + * 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: CustomDomain; + }; +}; + +/** + * Contains response data for the listByEndpointNext operation. + */ +export type CustomDomainsListByEndpointNextResponse = CustomDomainListResult & { + /** + * 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: CustomDomainListResult; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type CheckNameAvailabilityResponse = CheckNameAvailabilityOutput & { + /** + * 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: CheckNameAvailabilityOutput; + }; +}; + +/** + * Contains response data for the checkNameAvailabilityWithSubscription operation. + */ +export type CheckNameAvailabilityWithSubscriptionResponse = CheckNameAvailabilityOutput & { + /** + * 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: CheckNameAvailabilityOutput; + }; +}; + +/** + * Contains response data for the validateProbe operation. + */ +export type ValidateProbeResponse = ValidateProbeOutput & { + /** + * 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: ValidateProbeOutput; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ResourceUsageListResponse = ResourceUsageListResult & { + /** + * 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: ResourceUsageListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ResourceUsageListNextResponse = ResourceUsageListResult & { + /** + * 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: ResourceUsageListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationsListResult & { + /** + * 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: OperationsListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationsListResult & { + /** + * 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: OperationsListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type EdgeNodesListResponse = EdgenodeResult & { + /** + * 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: EdgenodeResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type EdgeNodesListNextResponse = EdgenodeResult & { + /** + * 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: EdgenodeResult; + }; +}; + +/** + * Contains response data for the listResourceUsage operation. + */ +export type AFDProfilesListResourceUsageResponse = UsagesListResult & { + /** + * 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: UsagesListResult; + }; +}; + +/** + * Contains response data for the checkHostNameAvailability operation. + */ +export type AFDProfilesCheckHostNameAvailabilityResponse = ValidateCustomDomainOutput & { + /** + * 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: ValidateCustomDomainOutput; + }; +}; + +/** + * Contains response data for the listResourceUsageNext operation. + */ +export type AFDProfilesListResourceUsageNextResponse = UsagesListResult & { + /** + * 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: UsagesListResult; + }; +}; + +/** + * Contains response data for the listByProfile operation. + */ +export type AFDCustomDomainsListByProfileResponse = AFDDomainListResult & { + /** + * 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: AFDDomainListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AFDCustomDomainsGetResponse = AFDDomain & { + /** + * 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: AFDDomain; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type AFDCustomDomainsCreateResponse = AFDDomain & { + /** + * 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: AFDDomain; + }; +}; /** - * Defines values for PolicyEnabledState. - * Possible values include: 'Disabled', 'Enabled' - * @readonly - * @enum {string} + * Contains response data for the update operation. */ -export type PolicyEnabledState = 'Disabled' | 'Enabled'; +export type AFDCustomDomainsUpdateResponse = AFDDomain & { + /** + * 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: AFDDomain; + }; +}; /** - * Defines values for PolicyMode. - * Possible values include: 'Prevention', 'Detection' - * @readonly - * @enum {string} + * Contains response data for the refreshValidationToken operation. */ -export type PolicyMode = 'Prevention' | 'Detection'; +export type AFDCustomDomainsRefreshValidationTokenResponse = ValidationToken & { + /** + * 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: ValidationToken; + }; +}; /** - * Defines values for CustomRuleEnabledState. - * Possible values include: 'Disabled', 'Enabled' - * @readonly - * @enum {string} + * Contains response data for the beginCreate operation. */ -export type CustomRuleEnabledState = 'Disabled' | 'Enabled'; +export type AFDCustomDomainsBeginCreateResponse = AFDDomain & { + /** + * 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: AFDDomain; + }; +}; /** - * Defines values for MatchVariable. - * Possible values include: 'RemoteAddr', 'SocketAddr', 'RequestMethod', 'RequestHeader', - * 'RequestUri', 'QueryString', 'RequestBody', 'Cookies', 'PostArgs' - * @readonly - * @enum {string} + * Contains response data for the beginUpdate operation. */ -export type MatchVariable = 'RemoteAddr' | 'SocketAddr' | 'RequestMethod' | 'RequestHeader' | 'RequestUri' | 'QueryString' | 'RequestBody' | 'Cookies' | 'PostArgs'; +export type AFDCustomDomainsBeginUpdateResponse = AFDDomain & { + /** + * 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: AFDDomain; + }; +}; /** - * Defines values for Operator. - * Possible values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', 'LessThan', - * 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' - * @readonly - * @enum {string} + * Contains response data for the beginRefreshValidationToken operation. */ -export type Operator = 'Any' | 'IPMatch' | 'GeoMatch' | 'Equal' | 'Contains' | 'LessThan' | 'GreaterThan' | 'LessThanOrEqual' | 'GreaterThanOrEqual' | 'BeginsWith' | 'EndsWith' | 'RegEx'; +export type AFDCustomDomainsBeginRefreshValidationTokenResponse = ValidationToken & { + /** + * 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: ValidationToken; + }; +}; /** - * Defines values for TransformType. - * Possible values include: 'Lowercase', 'Uppercase', 'Trim', 'UrlDecode', 'UrlEncode', - * 'RemoveNulls' - * @readonly - * @enum {string} + * Contains response data for the listByProfileNext operation. */ -export type TransformType = 'Lowercase' | 'Uppercase' | 'Trim' | 'UrlDecode' | 'UrlEncode' | 'RemoveNulls'; +export type AFDCustomDomainsListByProfileNextResponse = AFDDomainListResult & { + /** + * 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: AFDDomainListResult; + }; +}; /** - * Defines values for ActionType. - * Possible values include: 'Allow', 'Block', 'Log', 'Redirect' - * @readonly - * @enum {string} + * Contains response data for the listByProfile operation. */ -export type ActionType = 'Allow' | 'Block' | 'Log' | 'Redirect'; +export type AFDEndpointsListByProfileResponse = AFDEndpointListResult & { + /** + * 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: AFDEndpointListResult; + }; +}; /** - * Defines values for ManagedRuleEnabledState. - * Possible values include: 'Disabled', 'Enabled' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type ManagedRuleEnabledState = 'Disabled' | 'Enabled'; +export type AFDEndpointsGetResponse = AFDEndpoint & { + /** + * 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: AFDEndpoint; + }; +}; /** - * Defines values for ProvisioningState. - * Possible values include: 'Creating', 'Succeeded', 'Failed' - * @readonly - * @enum {string} + * Contains response data for the create operation. */ -export type ProvisioningState = 'Creating' | 'Succeeded' | 'Failed'; +export type AFDEndpointsCreateResponse = AFDEndpoint & { + /** + * 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: AFDEndpoint; + }; +}; /** - * Defines values for PolicyResourceState. - * Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - * @readonly - * @enum {string} + * Contains response data for the update operation. */ -export type PolicyResourceState = 'Creating' | 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Deleting'; +export type AFDEndpointsUpdateResponse = AFDEndpoint & { + /** + * 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: AFDEndpoint; + }; +}; /** - * Defines values for Odatatype. - * Possible values include: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters' - * @readonly - * @enum {string} + * Contains response data for the listResourceUsage operation. + */ +export type AFDEndpointsListResourceUsageResponse = UsagesListResult & { + /** + * 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: UsagesListResult; + }; +}; + +/** + * Contains response data for the validateCustomDomain operation. */ -export type Odatatype = '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters'; +export type AFDEndpointsValidateCustomDomainResponse = ValidateCustomDomainOutput & { + /** + * 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: ValidateCustomDomainOutput; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the beginCreate operation. */ -export type ProfilesListResponse = ProfileListResult & { +export type AFDEndpointsBeginCreateResponse = AFDEndpoint & { /** * The underlying HTTP response. */ @@ -2880,14 +6102,14 @@ export type ProfilesListResponse = ProfileListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ProfileListResult; + parsedBody: AFDEndpoint; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the beginUpdate operation. */ -export type ProfilesListByResourceGroupResponse = ProfileListResult & { +export type AFDEndpointsBeginUpdateResponse = AFDEndpoint & { /** * The underlying HTTP response. */ @@ -2900,14 +6122,14 @@ export type ProfilesListByResourceGroupResponse = ProfileListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ProfileListResult; + parsedBody: AFDEndpoint; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByProfileNext operation. */ -export type ProfilesGetResponse = Profile & { +export type AFDEndpointsListByProfileNextResponse = AFDEndpointListResult & { /** * The underlying HTTP response. */ @@ -2920,14 +6142,14 @@ export type ProfilesGetResponse = Profile & { /** * The response body as parsed JSON or XML */ - parsedBody: Profile; + parsedBody: AFDEndpointListResult; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listResourceUsageNext operation. */ -export type ProfilesCreateResponse = Profile & { +export type AFDEndpointsListResourceUsageNextResponse = UsagesListResult & { /** * The underlying HTTP response. */ @@ -2940,14 +6162,14 @@ export type ProfilesCreateResponse = Profile & { /** * The response body as parsed JSON or XML */ - parsedBody: Profile; + parsedBody: UsagesListResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByProfile operation. */ -export type ProfilesUpdateResponse = Profile & { +export type AFDOriginGroupsListByProfileResponse = AFDOriginGroupListResult & { /** * The underlying HTTP response. */ @@ -2960,14 +6182,14 @@ export type ProfilesUpdateResponse = Profile & { /** * The response body as parsed JSON or XML */ - parsedBody: Profile; + parsedBody: AFDOriginGroupListResult; }; }; /** - * Contains response data for the generateSsoUri operation. + * Contains response data for the get operation. */ -export type ProfilesGenerateSsoUriResponse = SsoUri & { +export type AFDOriginGroupsGetResponse = AFDOriginGroup & { /** * The underlying HTTP response. */ @@ -2980,14 +6202,14 @@ export type ProfilesGenerateSsoUriResponse = SsoUri & { /** * The response body as parsed JSON or XML */ - parsedBody: SsoUri; + parsedBody: AFDOriginGroup; }; }; /** - * Contains response data for the listSupportedOptimizationTypes operation. + * Contains response data for the create operation. */ -export type ProfilesListSupportedOptimizationTypesResponse = SupportedOptimizationTypesListResult & { +export type AFDOriginGroupsCreateResponse = AFDOriginGroup & { /** * The underlying HTTP response. */ @@ -3000,14 +6222,14 @@ export type ProfilesListSupportedOptimizationTypesResponse = SupportedOptimizati /** * The response body as parsed JSON or XML */ - parsedBody: SupportedOptimizationTypesListResult; + parsedBody: AFDOriginGroup; }; }; /** - * Contains response data for the listResourceUsage operation. + * Contains response data for the update operation. */ -export type ProfilesListResourceUsageResponse = ResourceUsageListResult & { +export type AFDOriginGroupsUpdateResponse = AFDOriginGroup & { /** * The underlying HTTP response. */ @@ -3020,14 +6242,14 @@ export type ProfilesListResourceUsageResponse = ResourceUsageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: AFDOriginGroup; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the listResourceUsage operation. */ -export type ProfilesBeginCreateResponse = Profile & { +export type AFDOriginGroupsListResourceUsageResponse = UsagesListResult & { /** * The underlying HTTP response. */ @@ -3040,14 +6262,14 @@ export type ProfilesBeginCreateResponse = Profile & { /** * The response body as parsed JSON or XML */ - parsedBody: Profile; + parsedBody: UsagesListResult; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the beginCreate operation. */ -export type ProfilesBeginUpdateResponse = Profile & { +export type AFDOriginGroupsBeginCreateResponse = AFDOriginGroup & { /** * The underlying HTTP response. */ @@ -3060,14 +6282,14 @@ export type ProfilesBeginUpdateResponse = Profile & { /** * The response body as parsed JSON or XML */ - parsedBody: Profile; + parsedBody: AFDOriginGroup; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the beginUpdate operation. */ -export type ProfilesListNextResponse = ProfileListResult & { +export type AFDOriginGroupsBeginUpdateResponse = AFDOriginGroup & { /** * The underlying HTTP response. */ @@ -3080,14 +6302,14 @@ export type ProfilesListNextResponse = ProfileListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ProfileListResult; + parsedBody: AFDOriginGroup; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listByProfileNext operation. */ -export type ProfilesListByResourceGroupNextResponse = ProfileListResult & { +export type AFDOriginGroupsListByProfileNextResponse = AFDOriginGroupListResult & { /** * The underlying HTTP response. */ @@ -3100,14 +6322,14 @@ export type ProfilesListByResourceGroupNextResponse = ProfileListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ProfileListResult; + parsedBody: AFDOriginGroupListResult; }; }; /** * Contains response data for the listResourceUsageNext operation. */ -export type ProfilesListResourceUsageNextResponse = ResourceUsageListResult & { +export type AFDOriginGroupsListResourceUsageNextResponse = UsagesListResult & { /** * The underlying HTTP response. */ @@ -3120,14 +6342,14 @@ export type ProfilesListResourceUsageNextResponse = ResourceUsageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: UsagesListResult; }; }; /** - * Contains response data for the listByProfile operation. + * Contains response data for the listByOriginGroup operation. */ -export type EndpointsListByProfileResponse = EndpointListResult & { +export type AFDOriginsListByOriginGroupResponse = AFDOriginListResult & { /** * The underlying HTTP response. */ @@ -3140,14 +6362,14 @@ export type EndpointsListByProfileResponse = EndpointListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EndpointListResult; + parsedBody: AFDOriginListResult; }; }; /** * Contains response data for the get operation. */ -export type EndpointsGetResponse = Endpoint & { +export type AFDOriginsGetResponse = AFDOrigin & { /** * The underlying HTTP response. */ @@ -3160,14 +6382,14 @@ export type EndpointsGetResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: AFDOrigin; }; }; /** * Contains response data for the create operation. */ -export type EndpointsCreateResponse = Endpoint & { +export type AFDOriginsCreateResponse = AFDOrigin & { /** * The underlying HTTP response. */ @@ -3180,14 +6402,14 @@ export type EndpointsCreateResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: AFDOrigin; }; }; /** * Contains response data for the update operation. */ -export type EndpointsUpdateResponse = Endpoint & { +export type AFDOriginsUpdateResponse = AFDOrigin & { /** * The underlying HTTP response. */ @@ -3200,14 +6422,14 @@ export type EndpointsUpdateResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: AFDOrigin; }; }; /** - * Contains response data for the start operation. + * Contains response data for the beginCreate operation. */ -export type EndpointsStartResponse = Endpoint & { +export type AFDOriginsBeginCreateResponse = AFDOrigin & { /** * The underlying HTTP response. */ @@ -3220,14 +6442,14 @@ export type EndpointsStartResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: AFDOrigin; }; }; /** - * Contains response data for the stop operation. + * Contains response data for the beginUpdate operation. */ -export type EndpointsStopResponse = Endpoint & { +export type AFDOriginsBeginUpdateResponse = AFDOrigin & { /** * The underlying HTTP response. */ @@ -3240,14 +6462,14 @@ export type EndpointsStopResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: AFDOrigin; }; }; /** - * Contains response data for the validateCustomDomain operation. + * Contains response data for the listByOriginGroupNext operation. */ -export type EndpointsValidateCustomDomainResponse = ValidateCustomDomainOutput & { +export type AFDOriginsListByOriginGroupNextResponse = AFDOriginListResult & { /** * The underlying HTTP response. */ @@ -3260,14 +6482,14 @@ export type EndpointsValidateCustomDomainResponse = ValidateCustomDomainOutput & /** * The response body as parsed JSON or XML */ - parsedBody: ValidateCustomDomainOutput; + parsedBody: AFDOriginListResult; }; }; /** - * Contains response data for the listResourceUsage operation. + * Contains response data for the listByEndpoint operation. */ -export type EndpointsListResourceUsageResponse = ResourceUsageListResult & { +export type RoutesListByEndpointResponse = RouteListResult & { /** * The underlying HTTP response. */ @@ -3280,14 +6502,14 @@ export type EndpointsListResourceUsageResponse = ResourceUsageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: RouteListResult; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the get operation. */ -export type EndpointsBeginCreateResponse = Endpoint & { +export type RoutesGetResponse = Route & { /** * The underlying HTTP response. */ @@ -3300,14 +6522,14 @@ export type EndpointsBeginCreateResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: Route; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the create operation. */ -export type EndpointsBeginUpdateResponse = Endpoint & { +export type RoutesCreateResponse = Route & { /** * The underlying HTTP response. */ @@ -3320,14 +6542,14 @@ export type EndpointsBeginUpdateResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: Route; }; }; /** - * Contains response data for the beginStart operation. + * Contains response data for the update operation. */ -export type EndpointsBeginStartResponse = Endpoint & { +export type RoutesUpdateResponse = Route & { /** * The underlying HTTP response. */ @@ -3340,14 +6562,14 @@ export type EndpointsBeginStartResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: Route; }; }; /** - * Contains response data for the beginStop operation. + * Contains response data for the beginCreate operation. */ -export type EndpointsBeginStopResponse = Endpoint & { +export type RoutesBeginCreateResponse = Route & { /** * The underlying HTTP response. */ @@ -3360,14 +6582,14 @@ export type EndpointsBeginStopResponse = Endpoint & { /** * The response body as parsed JSON or XML */ - parsedBody: Endpoint; + parsedBody: Route; }; }; /** - * Contains response data for the listByProfileNext operation. + * Contains response data for the beginUpdate operation. */ -export type EndpointsListByProfileNextResponse = EndpointListResult & { +export type RoutesBeginUpdateResponse = Route & { /** * The underlying HTTP response. */ @@ -3380,14 +6602,14 @@ export type EndpointsListByProfileNextResponse = EndpointListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EndpointListResult; + parsedBody: Route; }; }; /** - * Contains response data for the listResourceUsageNext operation. + * Contains response data for the listByEndpointNext operation. */ -export type EndpointsListResourceUsageNextResponse = ResourceUsageListResult & { +export type RoutesListByEndpointNextResponse = RouteListResult & { /** * The underlying HTTP response. */ @@ -3400,14 +6622,14 @@ export type EndpointsListResourceUsageNextResponse = ResourceUsageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: RouteListResult; }; }; /** - * Contains response data for the listByEndpoint operation. + * Contains response data for the listByProfile operation. */ -export type OriginsListByEndpointResponse = OriginListResult & { +export type RuleSetsListByProfileResponse = RuleSetListResult & { /** * The underlying HTTP response. */ @@ -3420,14 +6642,14 @@ export type OriginsListByEndpointResponse = OriginListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginListResult; + parsedBody: RuleSetListResult; }; }; /** * Contains response data for the get operation. */ -export type OriginsGetResponse = Origin & { +export type RuleSetsGetResponse = RuleSet & { /** * The underlying HTTP response. */ @@ -3440,14 +6662,14 @@ export type OriginsGetResponse = Origin & { /** * The response body as parsed JSON or XML */ - parsedBody: Origin; + parsedBody: RuleSet; }; }; /** * Contains response data for the create operation. */ -export type OriginsCreateResponse = Origin & { +export type RuleSetsCreateResponse = RuleSet & { /** * The underlying HTTP response. */ @@ -3460,14 +6682,14 @@ export type OriginsCreateResponse = Origin & { /** * The response body as parsed JSON or XML */ - parsedBody: Origin; + parsedBody: RuleSet; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listResourceUsage operation. */ -export type OriginsUpdateResponse = Origin & { +export type RuleSetsListResourceUsageResponse = UsagesListResult & { /** * The underlying HTTP response. */ @@ -3480,14 +6702,14 @@ export type OriginsUpdateResponse = Origin & { /** * The response body as parsed JSON or XML */ - parsedBody: Origin; + parsedBody: UsagesListResult; }; }; /** * Contains response data for the beginCreate operation. */ -export type OriginsBeginCreateResponse = Origin & { +export type RuleSetsBeginCreateResponse = RuleSet & { /** * The underlying HTTP response. */ @@ -3500,14 +6722,14 @@ export type OriginsBeginCreateResponse = Origin & { /** * The response body as parsed JSON or XML */ - parsedBody: Origin; + parsedBody: RuleSet; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listByProfileNext operation. */ -export type OriginsBeginUpdateResponse = Origin & { +export type RuleSetsListByProfileNextResponse = RuleSetListResult & { /** * The underlying HTTP response. */ @@ -3520,14 +6742,14 @@ export type OriginsBeginUpdateResponse = Origin & { /** * The response body as parsed JSON or XML */ - parsedBody: Origin; + parsedBody: RuleSetListResult; }; }; /** - * Contains response data for the listByEndpointNext operation. + * Contains response data for the listResourceUsageNext operation. */ -export type OriginsListByEndpointNextResponse = OriginListResult & { +export type RuleSetsListResourceUsageNextResponse = UsagesListResult & { /** * The underlying HTTP response. */ @@ -3540,14 +6762,14 @@ export type OriginsListByEndpointNextResponse = OriginListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginListResult; + parsedBody: UsagesListResult; }; }; /** - * Contains response data for the listByEndpoint operation. + * Contains response data for the listByRuleSet operation. */ -export type OriginGroupsListByEndpointResponse = OriginGroupListResult & { +export type RulesListByRuleSetResponse = RuleListResult & { /** * The underlying HTTP response. */ @@ -3560,14 +6782,14 @@ export type OriginGroupsListByEndpointResponse = OriginGroupListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginGroupListResult; + parsedBody: RuleListResult; }; }; /** * Contains response data for the get operation. */ -export type OriginGroupsGetResponse = OriginGroup & { +export type RulesGetResponse = Rule & { /** * The underlying HTTP response. */ @@ -3580,14 +6802,14 @@ export type OriginGroupsGetResponse = OriginGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginGroup; + parsedBody: Rule; }; }; /** * Contains response data for the create operation. */ -export type OriginGroupsCreateResponse = OriginGroup & { +export type RulesCreateResponse = Rule & { /** * The underlying HTTP response. */ @@ -3600,14 +6822,14 @@ export type OriginGroupsCreateResponse = OriginGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginGroup; + parsedBody: Rule; }; }; /** * Contains response data for the update operation. */ -export type OriginGroupsUpdateResponse = OriginGroup & { +export type RulesUpdateResponse = Rule & { /** * The underlying HTTP response. */ @@ -3620,14 +6842,14 @@ export type OriginGroupsUpdateResponse = OriginGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginGroup; + parsedBody: Rule; }; }; /** * Contains response data for the beginCreate operation. */ -export type OriginGroupsBeginCreateResponse = OriginGroup & { +export type RulesBeginCreateResponse = Rule & { /** * The underlying HTTP response. */ @@ -3640,14 +6862,14 @@ export type OriginGroupsBeginCreateResponse = OriginGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginGroup; + parsedBody: Rule; }; }; /** * Contains response data for the beginUpdate operation. */ -export type OriginGroupsBeginUpdateResponse = OriginGroup & { +export type RulesBeginUpdateResponse = Rule & { /** * The underlying HTTP response. */ @@ -3660,14 +6882,14 @@ export type OriginGroupsBeginUpdateResponse = OriginGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginGroup; + parsedBody: Rule; }; }; /** - * Contains response data for the listByEndpointNext operation. + * Contains response data for the listByRuleSetNext operation. */ -export type OriginGroupsListByEndpointNextResponse = OriginGroupListResult & { +export type RulesListByRuleSetNextResponse = RuleListResult & { /** * The underlying HTTP response. */ @@ -3680,14 +6902,14 @@ export type OriginGroupsListByEndpointNextResponse = OriginGroupListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OriginGroupListResult; + parsedBody: RuleListResult; }; }; /** - * Contains response data for the listByEndpoint operation. + * Contains response data for the listByProfile operation. */ -export type CustomDomainsListByEndpointResponse = CustomDomainListResult & { +export type SecurityPoliciesListByProfileResponse = SecurityPolicyListResult & { /** * The underlying HTTP response. */ @@ -3700,14 +6922,14 @@ export type CustomDomainsListByEndpointResponse = CustomDomainListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomainListResult; + parsedBody: SecurityPolicyListResult; }; }; /** * Contains response data for the get operation. */ -export type CustomDomainsGetResponse = CustomDomain & { +export type SecurityPoliciesGetResponse = SecurityPolicy & { /** * The underlying HTTP response. */ @@ -3720,14 +6942,14 @@ export type CustomDomainsGetResponse = CustomDomain & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: SecurityPolicy; }; }; /** * Contains response data for the create operation. */ -export type CustomDomainsCreateResponse = CustomDomain & { +export type SecurityPoliciesCreateResponse = SecurityPolicy & { /** * The underlying HTTP response. */ @@ -3740,14 +6962,14 @@ export type CustomDomainsCreateResponse = CustomDomain & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: SecurityPolicy; }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the patch operation. */ -export type CustomDomainsDeleteMethodResponse = CustomDomain & { +export type SecurityPoliciesPatchResponse = SecurityPolicy & { /** * The underlying HTTP response. */ @@ -3760,14 +6982,14 @@ export type CustomDomainsDeleteMethodResponse = CustomDomain & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: SecurityPolicy; }; }; /** - * Contains response data for the disableCustomHttps operation. + * Contains response data for the beginCreate operation. */ -export type CustomDomainsDisableCustomHttpsResponse = CustomDomain & { +export type SecurityPoliciesBeginCreateResponse = SecurityPolicy & { /** * The underlying HTTP response. */ @@ -3780,14 +7002,14 @@ export type CustomDomainsDisableCustomHttpsResponse = CustomDomain & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: SecurityPolicy; }; }; /** - * Contains response data for the enableCustomHttps operation. + * Contains response data for the beginPatch operation. */ -export type CustomDomainsEnableCustomHttpsResponse = CustomDomain & { +export type SecurityPoliciesBeginPatchResponse = SecurityPolicy & { /** * The underlying HTTP response. */ @@ -3800,14 +7022,14 @@ export type CustomDomainsEnableCustomHttpsResponse = CustomDomain & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: SecurityPolicy; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the listByProfileNext operation. */ -export type CustomDomainsBeginCreateResponse = CustomDomain & { +export type SecurityPoliciesListByProfileNextResponse = SecurityPolicyListResult & { /** * The underlying HTTP response. */ @@ -3820,14 +7042,14 @@ export type CustomDomainsBeginCreateResponse = CustomDomain & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: SecurityPolicyListResult; }; }; /** - * Contains response data for the beginDeleteMethod operation. + * Contains response data for the listByProfile operation. */ -export type CustomDomainsBeginDeleteMethodResponse = CustomDomain & { +export type SecretsListByProfileResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -3840,14 +7062,14 @@ export type CustomDomainsBeginDeleteMethodResponse = CustomDomain & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: SecretListResult; }; }; /** - * Contains response data for the listByEndpointNext operation. + * Contains response data for the get operation. */ -export type CustomDomainsListByEndpointNextResponse = CustomDomainListResult & { +export type SecretsGetResponse = Secret & { /** * The underlying HTTP response. */ @@ -3860,14 +7082,14 @@ export type CustomDomainsListByEndpointNextResponse = CustomDomainListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomainListResult; + parsedBody: Secret; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the create operation. */ -export type CheckNameAvailabilityResponse = CheckNameAvailabilityOutput & { +export type SecretsCreateResponse = Secret & { /** * The underlying HTTP response. */ @@ -3880,14 +7102,14 @@ export type CheckNameAvailabilityResponse = CheckNameAvailabilityOutput & { /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityOutput; + parsedBody: Secret; }; }; /** - * Contains response data for the checkNameAvailabilityWithSubscription operation. + * Contains response data for the update operation. */ -export type CheckNameAvailabilityWithSubscriptionResponse = CheckNameAvailabilityOutput & { +export type SecretsUpdateResponse = Secret & { /** * The underlying HTTP response. */ @@ -3900,14 +7122,14 @@ export type CheckNameAvailabilityWithSubscriptionResponse = CheckNameAvailabilit /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityOutput; + parsedBody: Secret; }; }; /** - * Contains response data for the validateProbe operation. + * Contains response data for the beginCreate operation. */ -export type ValidateProbeResponse = ValidateProbeOutput & { +export type SecretsBeginCreateResponse = Secret & { /** * The underlying HTTP response. */ @@ -3920,14 +7142,14 @@ export type ValidateProbeResponse = ValidateProbeOutput & { /** * The response body as parsed JSON or XML */ - parsedBody: ValidateProbeOutput; + parsedBody: Secret; }; }; /** - * Contains response data for the list operation. + * Contains response data for the beginUpdate operation. */ -export type ResourceUsageListResponse = ResourceUsageListResult & { +export type SecretsBeginUpdateResponse = Secret & { /** * The underlying HTTP response. */ @@ -3940,14 +7162,14 @@ export type ResourceUsageListResponse = ResourceUsageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: Secret; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByProfileNext operation. */ -export type ResourceUsageListNextResponse = ResourceUsageListResult & { +export type SecretsListByProfileNextResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -3960,14 +7182,14 @@ export type ResourceUsageListNextResponse = ResourceUsageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: SecretListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the secretMethod operation. */ -export type OperationsListResponse = OperationsListResult & { +export type ValidateSecretMethodResponse = ValidateSecretOutput & { /** * The underlying HTTP response. */ @@ -3980,14 +7202,14 @@ export type OperationsListResponse = OperationsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationsListResult; + parsedBody: ValidateSecretOutput; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the getLogAnalyticsMetrics operation. */ -export type OperationsListNextResponse = OperationsListResult & { +export type LogAnalyticsGetLogAnalyticsMetricsResponse = MetricsResponse & { /** * The underlying HTTP response. */ @@ -4000,14 +7222,14 @@ export type OperationsListNextResponse = OperationsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationsListResult; + parsedBody: MetricsResponse; }; }; /** - * Contains response data for the list operation. + * Contains response data for the getLogAnalyticsRankings operation. */ -export type EdgeNodesListResponse = EdgenodeResult & { +export type LogAnalyticsGetLogAnalyticsRankingsResponse = RankingsResponse & { /** * The underlying HTTP response. */ @@ -4020,14 +7242,14 @@ export type EdgeNodesListResponse = EdgenodeResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EdgenodeResult; + parsedBody: RankingsResponse; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the getLogAnalyticsLocations operation. */ -export type EdgeNodesListNextResponse = EdgenodeResult & { +export type LogAnalyticsGetLogAnalyticsLocationsResponse = ContinentsResponse & { /** * The underlying HTTP response. */ @@ -4040,7 +7262,67 @@ export type EdgeNodesListNextResponse = EdgenodeResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EdgenodeResult; + parsedBody: ContinentsResponse; + }; +}; + +/** + * Contains response data for the getLogAnalyticsResources operation. + */ +export type LogAnalyticsGetLogAnalyticsResourcesResponse = ResourcesResponse & { + /** + * 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: ResourcesResponse; + }; +}; + +/** + * Contains response data for the getWafLogAnalyticsMetrics operation. + */ +export type LogAnalyticsGetWafLogAnalyticsMetricsResponse = WafMetricsResponse & { + /** + * 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: WafMetricsResponse; + }; +}; + +/** + * Contains response data for the getWafLogAnalyticsRankings operation. + */ +export type LogAnalyticsGetWafLogAnalyticsRankingsResponse = WafRankingsResponse & { + /** + * 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: WafRankingsResponse; }; }; diff --git a/sdk/cdn/arm-cdn/src/models/logAnalyticsMappers.ts b/sdk/cdn/arm-cdn/src/models/logAnalyticsMappers.ts new file mode 100644 index 000000000000..71e84e2bb7b5 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/logAnalyticsMappers.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AfdErrorResponse, + ContinentsResponse, + ContinentsResponseContinentsItem, + ContinentsResponseCountryOrRegionsItem, + ErrorResponse, + MetricsResponse, + MetricsResponseSeriesItem, + MetricsResponseSeriesItemDataItem, + MetricsResponseSeriesItemGroupsItem, + RankingsResponse, + RankingsResponseTablesItem, + RankingsResponseTablesItemDataItem, + RankingsResponseTablesItemDataItemMetricsItem, + ResourcesResponse, + ResourcesResponseCustomDomainsItem, + ResourcesResponseEndpointsItem, + ResourcesResponseEndpointsItemCustomDomainsItem, + WafMetricsResponse, + WafMetricsResponseSeriesItem, + WafMetricsResponseSeriesItemDataItem, + WafMetricsResponseSeriesItemGroupsItem, + WafRankingsResponse, + WafRankingsResponseDataItem, + WafRankingsResponseDataItemMetricsItem +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/managedRuleSetsMappers.ts b/sdk/cdn/arm-cdn/src/models/managedRuleSetsMappers.ts index 26e75df89001..4f30edf781ef 100644 --- a/sdk/cdn/arm-cdn/src/models/managedRuleSetsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/managedRuleSetsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -17,6 +25,7 @@ export { CidrIpAddress, CookiesMatchConditionParameters, CustomDomain, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -42,6 +51,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, @@ -56,6 +66,8 @@ export { IpAddressGroup, IsDeviceMatchConditionParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -67,6 +79,8 @@ export { MatchCondition, Origin, OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginUpdateParameters, PolicySettings, @@ -86,7 +100,17 @@ export { Resource, ResourceReference, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -98,5 +122,6 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/mappers.ts b/sdk/cdn/arm-cdn/src/models/mappers.ts index 7a8abf0ac0e1..102aa588f3fb 100644 --- a/sdk/cdn/arm-cdn/src/models/mappers.ts +++ b/sdk/cdn/arm-cdn/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -83,6 +83,14 @@ export const TrackedResource: msRest.CompositeMapper = { } } } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -116,6 +124,13 @@ export const Profile: msRest.CompositeMapper = { type: { name: "String" } + }, + frontdoorId: { + readOnly: true, + serializedName: "properties.frontdoorId", + type: { + name: "String" + } } } } @@ -2193,14 +2208,10 @@ export const UrlSigningActionParameters: msRest.CompositeMapper = { className: "UrlSigningActionParameters", modelProperties: { odatatype: { - serializedName: "@odata\\.type", - type: { - name: "String" - } - }, - keyId: { required: true, - serializedName: "keyId", + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters', type: { name: "String" } @@ -2222,17 +2233,6 @@ export const UrlSigningActionParameters: msRest.CompositeMapper = { } } } - }, - ipSubnets: { - serializedName: "ipSubnets", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } } } } @@ -2250,6 +2250,7 @@ export const UrlSigningAction: msRest.CompositeMapper = { parameters: { required: true, serializedName: "parameters", + defaultValue: {}, type: { name: "Composite", className: "UrlSigningActionParameters" @@ -2259,6 +2260,55 @@ export const UrlSigningAction: msRest.CompositeMapper = { } }; +export const OriginGroupOverrideActionParameters: msRest.CompositeMapper = { + serializedName: "OriginGroupOverrideActionParameters", + type: { + name: "Composite", + className: "OriginGroupOverrideActionParameters", + modelProperties: { + odatatype: { + required: true, + isConstant: true, + serializedName: "@odata\\.type", + defaultValue: '#Microsoft.Azure.Cdn.Models.DeliveryRuleOriginGroupOverrideActionParameters', + type: { + name: "String" + } + }, + originGroup: { + required: true, + serializedName: "originGroup", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const OriginGroupOverrideAction: msRest.CompositeMapper = { + serializedName: "OriginGroupOverride", + type: { + name: "Composite", + polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, + uberParent: "DeliveryRuleAction", + className: "OriginGroupOverrideAction", + modelProperties: { + ...DeliveryRuleAction.type.modelProperties, + parameters: { + required: true, + serializedName: "parameters", + defaultValue: {}, + type: { + name: "Composite", + className: "OriginGroupOverrideActionParameters" + } + } + } + } +}; + export const UrlRewriteActionParameters: msRest.CompositeMapper = { serializedName: "UrlRewriteActionParameters", type: { @@ -2572,7 +2622,15 @@ export const ProxyResource: msRest.CompositeMapper = { name: "Composite", className: "ProxyResource", modelProperties: { - ...Resource.type.modelProperties + ...Resource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } } } }; @@ -3472,227 +3530,182 @@ export const EdgeNode: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const SystemData: msRest.CompositeMapper = { + serializedName: "SystemData", type: { name: "Composite", - className: "ErrorResponse", + className: "SystemData", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - message: { - readOnly: true, - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const PolicySettings: msRest.CompositeMapper = { - serializedName: "policySettings", - type: { - name: "Composite", - className: "PolicySettings", - modelProperties: { - enabledState: { - serializedName: "enabledState", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - mode: { - serializedName: "mode", + createdAt: { + serializedName: "createdAt", type: { - name: "String" + name: "DateTime" } }, - defaultRedirectUrl: { - serializedName: "defaultRedirectUrl", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - defaultCustomBlockResponseStatusCode: { - serializedName: "defaultCustomBlockResponseStatusCode", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { - name: "Number" + name: "String" } }, - defaultCustomBlockResponseBody: { - serializedName: "defaultCustomBlockResponseBody", - constraints: { - Pattern: /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$/ - }, + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "String" + name: "DateTime" } } } } }; -export const CustomRule: msRest.CompositeMapper = { - serializedName: "CustomRule", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "CustomRule", + className: "ErrorResponse", modelProperties: { - name: { - required: true, - serializedName: "name", + code: { + readOnly: true, + serializedName: "code", type: { name: "String" } }, - enabledState: { - serializedName: "enabledState", + message: { + readOnly: true, + serializedName: "message", type: { name: "String" } - }, - priority: { - required: true, - serializedName: "priority", - constraints: { - InclusiveMaximum: 1000, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - matchConditions: { + } + } + } +}; + +export const AfdPurgeParameters: msRest.CompositeMapper = { + serializedName: "AfdPurgeParameters", + type: { + name: "Composite", + className: "AfdPurgeParameters", + modelProperties: { + contentPaths: { required: true, - serializedName: "matchConditions", + serializedName: "contentPaths", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "MatchCondition" + name: "String" } } } }, - action: { - required: true, - serializedName: "action", + domains: { + serializedName: "domains", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const RateLimitRule: msRest.CompositeMapper = { - serializedName: "RateLimitRule", +export const Certificate: msRest.CompositeMapper = { + serializedName: "Certificate", type: { name: "Composite", - className: "RateLimitRule", + className: "Certificate", modelProperties: { - ...CustomRule.type.modelProperties, - rateLimitThreshold: { - required: true, - serializedName: "rateLimitThreshold", - constraints: { - InclusiveMinimum: 0 - }, + subject: { + serializedName: "subject", type: { - name: "Number" + name: "String" } }, - rateLimitDurationInMinutes: { - required: true, - serializedName: "rateLimitDurationInMinutes", - constraints: { - InclusiveMaximum: 60, - InclusiveMinimum: 0 - }, + expirationDate: { + serializedName: "expirationDate", type: { - name: "Number" + name: "String" + } + }, + thumbprint: { + serializedName: "thumbprint", + type: { + name: "String" } } } } }; -export const RateLimitRuleList: msRest.CompositeMapper = { - serializedName: "RateLimitRuleList", +export const ManagedCertificate: msRest.CompositeMapper = { + serializedName: "ManagedCertificate", type: { name: "Composite", - className: "RateLimitRuleList", + className: "ManagedCertificate", modelProperties: { - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RateLimitRule" - } - } - } - } + ...Certificate.type.modelProperties } } }; -export const MatchCondition: msRest.CompositeMapper = { - serializedName: "MatchCondition", +export const CustomerCertificate: msRest.CompositeMapper = { + serializedName: "CustomerCertificate", type: { name: "Composite", - className: "MatchCondition", + className: "CustomerCertificate", modelProperties: { - matchVariable: { - required: true, - serializedName: "matchVariable", + ...Certificate.type.modelProperties, + version: { + serializedName: "version", type: { name: "String" } }, - selector: { - serializedName: "selector", + certificateAuthority: { + serializedName: "certificateAuthority", type: { name: "String" } }, - operator: { + certificateUrl: { required: true, - serializedName: "operator", + serializedName: "certificateUrl", type: { name: "String" } }, - negateCondition: { - serializedName: "negateCondition", + useLatestVersion: { + serializedName: "useLatestVersion", type: { name: "Boolean" } }, - matchValue: { - required: true, - serializedName: "matchValue", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - transforms: { - serializedName: "transforms", + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", type: { name: "Sequence", element: { @@ -3706,30 +3719,2387 @@ export const MatchCondition: msRest.CompositeMapper = { } }; -export const CustomRuleList: msRest.CompositeMapper = { - serializedName: "CustomRuleList", +export const ValidateSecretInput: msRest.CompositeMapper = { + serializedName: "ValidateSecretInput", type: { name: "Composite", - className: "CustomRuleList", + className: "ValidateSecretInput", modelProperties: { - rules: { - serializedName: "rules", + secretSource: { + required: true, + serializedName: "secretSource", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CustomRule" - } - } + name: "Composite", + className: "ResourceReference" + } + }, + secretType: { + required: true, + serializedName: "secretType", + type: { + name: "String" } } } } }; -export const ManagedRuleOverride: msRest.CompositeMapper = { - serializedName: "ManagedRuleOverride", +export const ValidateSecretOutput: msRest.CompositeMapper = { + serializedName: "ValidateSecretOutput", + type: { + name: "Composite", + className: "ValidateSecretOutput", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const AFDDomainHttpsParameters: msRest.CompositeMapper = { + serializedName: "AFDDomainHttpsParameters", + type: { + name: "Composite", + className: "AFDDomainHttpsParameters", + modelProperties: { + certificateType: { + required: true, + serializedName: "certificateType", + type: { + name: "String" + } + }, + minimumTlsVersion: { + serializedName: "minimumTlsVersion", + type: { + name: "Enum", + allowedValues: [ + "TLS10", + "TLS12" + ] + } + }, + secret: { + serializedName: "secret", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const DomainValidationProperties: msRest.CompositeMapper = { + serializedName: "DomainValidationProperties", + type: { + name: "Composite", + className: "DomainValidationProperties", + modelProperties: { + validationToken: { + readOnly: true, + serializedName: "validationToken", + type: { + name: "String" + } + }, + expirationDate: { + readOnly: true, + serializedName: "expirationDate", + type: { + name: "String" + } + } + } + } +}; + +export const AFDDomain: msRest.CompositeMapper = { + serializedName: "AFDDomain", + type: { + name: "Composite", + className: "AFDDomain", + modelProperties: { + ...ProxyResource.type.modelProperties, + tlsSettings: { + serializedName: "properties.tlsSettings", + type: { + name: "Composite", + className: "AFDDomainHttpsParameters" + } + }, + azureDnsZone: { + serializedName: "properties.azureDnsZone", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + }, + domainValidationState: { + readOnly: true, + serializedName: "properties.domainValidationState", + type: { + name: "String" + } + }, + hostName: { + required: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + validationProperties: { + readOnly: true, + serializedName: "properties.validationProperties", + type: { + name: "Composite", + className: "DomainValidationProperties" + } + } + } + } +}; + +export const AFDDomainUpdateParameters: msRest.CompositeMapper = { + serializedName: "AFDDomainUpdateParameters", + type: { + name: "Composite", + className: "AFDDomainUpdateParameters", + modelProperties: { + tlsSettings: { + serializedName: "properties.tlsSettings", + type: { + name: "Composite", + className: "AFDDomainHttpsParameters" + } + }, + azureDnsZone: { + serializedName: "properties.azureDnsZone", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const SecurityPolicyWebApplicationFirewallAssociation: msRest.CompositeMapper = { + serializedName: "SecurityPolicyWebApplicationFirewallAssociation", + type: { + name: "Composite", + className: "SecurityPolicyWebApplicationFirewallAssociation", + modelProperties: { + domains: { + serializedName: "domains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + patternsToMatch: { + serializedName: "patternsToMatch", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SecurityPolicyParameters: msRest.CompositeMapper = { + serializedName: "SecurityPolicyParameters", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "SecurityPolicyParameters", + className: "SecurityPolicyParameters", + modelProperties: { + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityPolicyWebApplicationFirewallParameters: msRest.CompositeMapper = { + serializedName: "WebApplicationFirewall", + type: { + name: "Composite", + polymorphicDiscriminator: SecurityPolicyParameters.type.polymorphicDiscriminator, + uberParent: "SecurityPolicyParameters", + className: "SecurityPolicyWebApplicationFirewallParameters", + modelProperties: { + ...SecurityPolicyParameters.type.modelProperties, + wafPolicy: { + serializedName: "wafPolicy", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + associations: { + serializedName: "associations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityPolicyWebApplicationFirewallAssociation" + } + } + } + } + } + } +}; + +export const SecurityPolicy: msRest.CompositeMapper = { + serializedName: "SecurityPolicy", + type: { + name: "Composite", + className: "SecurityPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + }, + parameters: { + serializedName: "properties.parameters", + type: { + name: "Composite", + className: "SecurityPolicyWebApplicationFirewallParameters" + } + } + } + } +}; + +export const AFDEndpoint: msRest.CompositeMapper = { + serializedName: "AFDEndpoint", + type: { + name: "Composite", + className: "AFDEndpoint", + modelProperties: { + ...TrackedResource.type.modelProperties, + originResponseTimeoutSeconds: { + serializedName: "properties.originResponseTimeoutSeconds", + constraints: { + InclusiveMinimum: 16 + }, + type: { + name: "Number" + } + }, + enabledState: { + serializedName: "properties.enabledState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + }, + hostName: { + readOnly: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + } + } + } +}; + +export const AFDEndpointUpdateParameters: msRest.CompositeMapper = { + serializedName: "AFDEndpointUpdateParameters", + type: { + name: "Composite", + className: "AFDEndpointUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + originResponseTimeoutSeconds: { + serializedName: "properties.originResponseTimeoutSeconds", + constraints: { + InclusiveMinimum: 16 + }, + type: { + name: "Number" + } + }, + enabledState: { + serializedName: "properties.enabledState", + type: { + name: "String" + } + } + } + } +}; + +export const CompressionSettings: msRest.CompositeMapper = { + serializedName: "CompressionSettings", + type: { + name: "Composite", + className: "CompressionSettings", + modelProperties: { + contentTypesToCompress: { + serializedName: "contentTypesToCompress", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isCompressionEnabled: { + serializedName: "isCompressionEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SecretParameters: msRest.CompositeMapper = { + serializedName: "SecretParameters", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "SecretParameters", + className: "SecretParameters", + modelProperties: { + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const AFDStateProperties: msRest.CompositeMapper = { + serializedName: "AFDStateProperties", + type: { + name: "Composite", + className: "AFDStateProperties", + modelProperties: { + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "deploymentStatus", + type: { + name: "String" + } + } + } + } +}; + +export const SecretProperties: msRest.CompositeMapper = { + serializedName: "SecretProperties", + type: { + name: "Composite", + className: "SecretProperties", + modelProperties: { + ...AFDStateProperties.type.modelProperties, + parameters: { + serializedName: "parameters", + type: { + name: "Composite", + className: "SecretParameters" + } + } + } + } +}; + +export const Secret: msRest.CompositeMapper = { + serializedName: "Secret", + type: { + name: "Composite", + className: "Secret", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + }, + parameters: { + serializedName: "properties.parameters", + type: { + name: "Composite", + className: "SecretParameters" + } + } + } + } +}; + +export const UrlSigningKeyParameters: msRest.CompositeMapper = { + serializedName: "UrlSigningKey", + type: { + name: "Composite", + polymorphicDiscriminator: SecretParameters.type.polymorphicDiscriminator, + uberParent: "SecretParameters", + className: "UrlSigningKeyParameters", + modelProperties: { + ...SecretParameters.type.modelProperties, + keyId: { + required: true, + serializedName: "keyId", + type: { + name: "String" + } + }, + secretSource: { + required: true, + serializedName: "secretSource", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + secretVersion: { + serializedName: "secretVersion", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCertificateParameters: msRest.CompositeMapper = { + serializedName: "ManagedCertificate", + type: { + name: "Composite", + polymorphicDiscriminator: SecretParameters.type.polymorphicDiscriminator, + uberParent: "SecretParameters", + className: "ManagedCertificateParameters", + modelProperties: { + ...SecretParameters.type.modelProperties + } + } +}; + +export const CustomerCertificateParameters: msRest.CompositeMapper = { + serializedName: "CustomerCertificate", + type: { + name: "Composite", + polymorphicDiscriminator: SecretParameters.type.polymorphicDiscriminator, + uberParent: "SecretParameters", + className: "CustomerCertificateParameters", + modelProperties: { + ...SecretParameters.type.modelProperties, + secretSource: { + required: true, + serializedName: "secretSource", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + secretVersion: { + serializedName: "secretVersion", + type: { + name: "String" + } + }, + certificateAuthority: { + serializedName: "certificateAuthority", + type: { + name: "String" + } + }, + useLatestVersion: { + serializedName: "useLatestVersion", + type: { + name: "Boolean" + } + }, + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RuleSet: msRest.CompositeMapper = { + serializedName: "RuleSet", + type: { + name: "Composite", + className: "RuleSet", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + } + } + } +}; + +export const AFDOrigin: msRest.CompositeMapper = { + serializedName: "AFDOrigin", + type: { + name: "Composite", + className: "AFDOrigin", + modelProperties: { + ...ProxyResource.type.modelProperties, + azureOrigin: { + serializedName: "properties.azureOrigin", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + hostName: { + required: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + httpPort: { + serializedName: "properties.httpPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + httpsPort: { + serializedName: "properties.httpsPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + 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" + } + }, + sharedPrivateLinkResource: { + serializedName: "properties.sharedPrivateLinkResource", + type: { + name: "Object" + } + }, + enabledState: { + serializedName: "properties.enabledState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + } + } + } +}; + +export const AFDOriginUpdateParameters: msRest.CompositeMapper = { + serializedName: "AFDOriginUpdateParameters", + type: { + name: "Composite", + className: "AFDOriginUpdateParameters", + modelProperties: { + azureOrigin: { + serializedName: "properties.azureOrigin", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + hostName: { + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + httpPort: { + serializedName: "properties.httpPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + httpsPort: { + serializedName: "properties.httpsPort", + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + 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" + } + }, + sharedPrivateLinkResource: { + serializedName: "properties.sharedPrivateLinkResource", + type: { + name: "Object" + } + }, + enabledState: { + serializedName: "properties.enabledState", + type: { + name: "String" + } + } + } + } +}; + +export const SharedPrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "SharedPrivateLinkResourceProperties", + type: { + name: "Composite", + className: "SharedPrivateLinkResourceProperties", + modelProperties: { + privateLink: { + serializedName: "privateLink", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + privateLinkLocation: { + serializedName: "privateLinkLocation", + type: { + name: "String" + } + }, + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + requestMessage: { + serializedName: "requestMessage", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Pending", + "Approved", + "Rejected", + "Disconnected", + "Timeout" + ] + } + } + } + } +}; + +export const LoadBalancingSettingsParameters: msRest.CompositeMapper = { + serializedName: "LoadBalancingSettingsParameters", + type: { + name: "Composite", + className: "LoadBalancingSettingsParameters", + modelProperties: { + sampleSize: { + serializedName: "sampleSize", + type: { + name: "Number" + } + }, + successfulSamplesRequired: { + serializedName: "successfulSamplesRequired", + type: { + name: "Number" + } + }, + additionalLatencyInMilliseconds: { + serializedName: "additionalLatencyInMilliseconds", + type: { + name: "Number" + } + } + } + } +}; + +export const AFDOriginGroup: msRest.CompositeMapper = { + serializedName: "AFDOriginGroup", + type: { + name: "Composite", + className: "AFDOriginGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + loadBalancingSettings: { + serializedName: "properties.loadBalancingSettings", + type: { + name: "Composite", + className: "LoadBalancingSettingsParameters" + } + }, + healthProbeSettings: { + serializedName: "properties.healthProbeSettings", + type: { + name: "Composite", + className: "HealthProbeParameters" + } + }, + trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { + serializedName: "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + constraints: { + InclusiveMaximum: 50, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + responseBasedAfdOriginErrorDetectionSettings: { + serializedName: "properties.responseBasedAfdOriginErrorDetectionSettings", + type: { + name: "Composite", + className: "ResponseBasedOriginErrorDetectionParameters" + } + }, + sessionAffinityState: { + serializedName: "properties.sessionAffinityState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + } + } + } +}; + +export const AFDOriginGroupUpdateParameters: msRest.CompositeMapper = { + serializedName: "AFDOriginGroupUpdateParameters", + type: { + name: "Composite", + className: "AFDOriginGroupUpdateParameters", + modelProperties: { + loadBalancingSettings: { + serializedName: "properties.loadBalancingSettings", + type: { + name: "Composite", + className: "LoadBalancingSettingsParameters" + } + }, + healthProbeSettings: { + serializedName: "properties.healthProbeSettings", + type: { + name: "Composite", + className: "HealthProbeParameters" + } + }, + trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { + serializedName: "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + constraints: { + InclusiveMaximum: 50, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + responseBasedAfdOriginErrorDetectionSettings: { + serializedName: "properties.responseBasedAfdOriginErrorDetectionSettings", + type: { + name: "Composite", + className: "ResponseBasedOriginErrorDetectionParameters" + } + }, + sessionAffinityState: { + serializedName: "properties.sessionAffinityState", + type: { + name: "String" + } + } + } + } +}; + +export const Route: msRest.CompositeMapper = { + serializedName: "Route", + type: { + name: "Composite", + className: "Route", + modelProperties: { + ...ProxyResource.type.modelProperties, + customDomains: { + serializedName: "properties.customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + originGroup: { + required: true, + serializedName: "properties.originGroup", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + originPath: { + serializedName: "properties.originPath", + type: { + name: "String" + } + }, + ruleSets: { + serializedName: "properties.ruleSets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + supportedProtocols: { + serializedName: "properties.supportedProtocols", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + patternsToMatch: { + serializedName: "properties.patternsToMatch", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + compressionSettings: { + serializedName: "properties.compressionSettings", + type: { + name: "Object" + } + }, + queryStringCachingBehavior: { + serializedName: "properties.queryStringCachingBehavior", + type: { + name: "Enum", + allowedValues: [ + "IgnoreQueryString", + "UseQueryString", + "NotSet" + ] + } + }, + forwardingProtocol: { + serializedName: "properties.forwardingProtocol", + type: { + name: "String" + } + }, + linkToDefaultDomain: { + serializedName: "properties.linkToDefaultDomain", + type: { + name: "String" + } + }, + httpsRedirect: { + serializedName: "properties.httpsRedirect", + type: { + name: "String" + } + }, + enabledState: { + serializedName: "properties.enabledState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + } + } + } +}; + +export const RouteUpdateParameters: msRest.CompositeMapper = { + serializedName: "RouteUpdateParameters", + type: { + name: "Composite", + className: "RouteUpdateParameters", + modelProperties: { + customDomains: { + serializedName: "properties.customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + originGroup: { + serializedName: "properties.originGroup", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + originPath: { + serializedName: "properties.originPath", + type: { + name: "String" + } + }, + ruleSets: { + serializedName: "properties.ruleSets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + supportedProtocols: { + serializedName: "properties.supportedProtocols", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + patternsToMatch: { + serializedName: "properties.patternsToMatch", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + compressionSettings: { + serializedName: "properties.compressionSettings", + type: { + name: "Object" + } + }, + queryStringCachingBehavior: { + serializedName: "properties.queryStringCachingBehavior", + type: { + name: "Enum", + allowedValues: [ + "IgnoreQueryString", + "UseQueryString", + "NotSet" + ] + } + }, + forwardingProtocol: { + serializedName: "properties.forwardingProtocol", + type: { + name: "String" + } + }, + linkToDefaultDomain: { + serializedName: "properties.linkToDefaultDomain", + type: { + name: "String" + } + }, + httpsRedirect: { + serializedName: "properties.httpsRedirect", + type: { + name: "String" + } + }, + enabledState: { + serializedName: "properties.enabledState", + type: { + name: "String" + } + } + } + } +}; + +export const Rule: msRest.CompositeMapper = { + serializedName: "Rule", + type: { + name: "Composite", + className: "Rule", + modelProperties: { + ...ProxyResource.type.modelProperties, + order: { + required: true, + serializedName: "properties.order", + type: { + name: "Number" + } + }, + conditions: { + serializedName: "properties.conditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRuleCondition" + } + } + } + }, + actions: { + required: true, + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRuleAction" + } + } + } + }, + matchProcessingBehavior: { + serializedName: "properties.matchProcessingBehavior", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + deploymentStatus: { + readOnly: true, + serializedName: "properties.deploymentStatus", + type: { + name: "String" + } + } + } + } +}; + +export const RuleUpdateParameters: msRest.CompositeMapper = { + serializedName: "RuleUpdateParameters", + type: { + name: "Composite", + className: "RuleUpdateParameters", + modelProperties: { + order: { + serializedName: "properties.order", + type: { + name: "Number" + } + }, + conditions: { + serializedName: "properties.conditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRuleCondition" + } + } + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRuleAction" + } + } + } + }, + matchProcessingBehavior: { + serializedName: "properties.matchProcessingBehavior", + type: { + name: "String" + } + } + } + } +}; + +export const ValidationToken: msRest.CompositeMapper = { + serializedName: "ValidationToken", + type: { + name: "Composite", + className: "ValidationToken", + modelProperties: { + token: { + readOnly: true, + serializedName: "token", + type: { + name: "String" + } + } + } + } +}; + +export const AfdErrorResponse: msRest.CompositeMapper = { + serializedName: "AfdErrorResponse", + type: { + name: "Composite", + className: "AfdErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const MetricsResponseSeriesItemGroupsItem: msRest.CompositeMapper = { + serializedName: "MetricsResponse_seriesItem_groupsItem", + type: { + name: "Composite", + className: "MetricsResponseSeriesItemGroupsItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const MetricsResponseSeriesItemDataItem: msRest.CompositeMapper = { + serializedName: "MetricsResponse_seriesItem_dataItem", + type: { + name: "Composite", + className: "MetricsResponseSeriesItemDataItem", + modelProperties: { + dateTime: { + serializedName: "dateTime", + type: { + name: "DateTime" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const MetricsResponseSeriesItem: msRest.CompositeMapper = { + serializedName: "MetricsResponse_seriesItem", + type: { + name: "Composite", + className: "MetricsResponseSeriesItem", + modelProperties: { + metric: { + serializedName: "metric", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + groups: { + serializedName: "groups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricsResponseSeriesItemGroupsItem" + } + } + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricsResponseSeriesItemDataItem" + } + } + } + } + } + } +}; + +export const MetricsResponse: msRest.CompositeMapper = { + serializedName: "MetricsResponse", + type: { + name: "Composite", + className: "MetricsResponse", + modelProperties: { + dateTimeBegin: { + serializedName: "dateTimeBegin", + type: { + name: "DateTime" + } + }, + dateTimeEnd: { + serializedName: "dateTimeEnd", + type: { + name: "DateTime" + } + }, + granularity: { + serializedName: "granularity", + type: { + name: "String" + } + }, + series: { + serializedName: "series", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricsResponseSeriesItem" + } + } + } + } + } + } +}; + +export const RankingsResponseTablesItemDataItemMetricsItem: msRest.CompositeMapper = { + serializedName: "RankingsResponse_tablesItem_dataItem_metricsItem", + type: { + name: "Composite", + className: "RankingsResponseTablesItemDataItemMetricsItem", + modelProperties: { + metric: { + serializedName: "metric", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + }, + percentage: { + serializedName: "percentage", + type: { + name: "Number" + } + } + } + } +}; + +export const RankingsResponseTablesItemDataItem: msRest.CompositeMapper = { + serializedName: "RankingsResponse_tablesItem_dataItem", + type: { + name: "Composite", + className: "RankingsResponseTablesItemDataItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + metrics: { + serializedName: "metrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RankingsResponseTablesItemDataItemMetricsItem" + } + } + } + } + } + } +}; + +export const RankingsResponseTablesItem: msRest.CompositeMapper = { + serializedName: "RankingsResponse_tablesItem", + type: { + name: "Composite", + className: "RankingsResponseTablesItem", + modelProperties: { + ranking: { + serializedName: "ranking", + type: { + name: "String" + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RankingsResponseTablesItemDataItem" + } + } + } + } + } + } +}; + +export const RankingsResponse: msRest.CompositeMapper = { + serializedName: "RankingsResponse", + type: { + name: "Composite", + className: "RankingsResponse", + modelProperties: { + dateTimeBegin: { + serializedName: "dateTimeBegin", + type: { + name: "DateTime" + } + }, + dateTimeEnd: { + serializedName: "dateTimeEnd", + type: { + name: "DateTime" + } + }, + tables: { + serializedName: "tables", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RankingsResponseTablesItem" + } + } + } + } + } + } +}; + +export const ContinentsResponseContinentsItem: msRest.CompositeMapper = { + serializedName: "ContinentsResponse_continentsItem", + type: { + name: "Composite", + className: "ContinentsResponseContinentsItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const ContinentsResponseCountryOrRegionsItem: msRest.CompositeMapper = { + serializedName: "ContinentsResponse_countryOrRegionsItem", + type: { + name: "Composite", + className: "ContinentsResponseCountryOrRegionsItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + continentId: { + serializedName: "continentId", + type: { + name: "String" + } + } + } + } +}; + +export const ContinentsResponse: msRest.CompositeMapper = { + serializedName: "ContinentsResponse", + type: { + name: "Composite", + className: "ContinentsResponse", + modelProperties: { + continents: { + serializedName: "continents", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContinentsResponseContinentsItem" + } + } + } + }, + countryOrRegions: { + serializedName: "countryOrRegions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContinentsResponseCountryOrRegionsItem" + } + } + } + } + } + } +}; + +export const ResourcesResponseEndpointsItemCustomDomainsItem: msRest.CompositeMapper = { + serializedName: "ResourcesResponse_endpointsItem_customDomainsItem", + type: { + name: "Composite", + className: "ResourcesResponseEndpointsItemCustomDomainsItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + endpointId: { + serializedName: "endpointId", + type: { + name: "String" + } + }, + history: { + serializedName: "history", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ResourcesResponseEndpointsItem: msRest.CompositeMapper = { + serializedName: "ResourcesResponse_endpointsItem", + type: { + name: "Composite", + className: "ResourcesResponseEndpointsItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + history: { + serializedName: "history", + type: { + name: "Boolean" + } + }, + customDomains: { + serializedName: "customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourcesResponseEndpointsItemCustomDomainsItem" + } + } + } + } + } + } +}; + +export const ResourcesResponseCustomDomainsItem: msRest.CompositeMapper = { + serializedName: "ResourcesResponse_customDomainsItem", + type: { + name: "Composite", + className: "ResourcesResponseCustomDomainsItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + endpointId: { + serializedName: "endpointId", + type: { + name: "String" + } + }, + history: { + serializedName: "history", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ResourcesResponse: msRest.CompositeMapper = { + serializedName: "ResourcesResponse", + type: { + name: "Composite", + className: "ResourcesResponse", + modelProperties: { + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourcesResponseEndpointsItem" + } + } + } + }, + customDomains: { + serializedName: "customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourcesResponseCustomDomainsItem" + } + } + } + } + } + } +}; + +export const WafMetricsResponseSeriesItemGroupsItem: msRest.CompositeMapper = { + serializedName: "WafMetricsResponse_seriesItem_groupsItem", + type: { + name: "Composite", + className: "WafMetricsResponseSeriesItemGroupsItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const WafMetricsResponseSeriesItemDataItem: msRest.CompositeMapper = { + serializedName: "WafMetricsResponse_seriesItem_dataItem", + type: { + name: "Composite", + className: "WafMetricsResponseSeriesItemDataItem", + modelProperties: { + dateTime: { + serializedName: "dateTime", + type: { + name: "DateTime" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const WafMetricsResponseSeriesItem: msRest.CompositeMapper = { + serializedName: "WafMetricsResponse_seriesItem", + type: { + name: "Composite", + className: "WafMetricsResponseSeriesItem", + modelProperties: { + metric: { + serializedName: "metric", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + groups: { + serializedName: "groups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WafMetricsResponseSeriesItemGroupsItem" + } + } + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WafMetricsResponseSeriesItemDataItem" + } + } + } + } + } + } +}; + +export const WafMetricsResponse: msRest.CompositeMapper = { + serializedName: "WafMetricsResponse", + type: { + name: "Composite", + className: "WafMetricsResponse", + modelProperties: { + dateTimeBegin: { + serializedName: "dateTimeBegin", + type: { + name: "DateTime" + } + }, + dateTimeEnd: { + serializedName: "dateTimeEnd", + type: { + name: "DateTime" + } + }, + granularity: { + serializedName: "granularity", + type: { + name: "String" + } + }, + series: { + serializedName: "series", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WafMetricsResponseSeriesItem" + } + } + } + } + } + } +}; + +export const WafRankingsResponseDataItemMetricsItem: msRest.CompositeMapper = { + serializedName: "WafRankingsResponse_dataItem_metricsItem", + type: { + name: "Composite", + className: "WafRankingsResponseDataItemMetricsItem", + modelProperties: { + metric: { + serializedName: "metric", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + }, + percentage: { + serializedName: "percentage", + type: { + name: "Number" + } + } + } + } +}; + +export const WafRankingsResponseDataItem: msRest.CompositeMapper = { + serializedName: "WafRankingsResponse_dataItem", + type: { + name: "Composite", + className: "WafRankingsResponseDataItem", + modelProperties: { + groupValues: { + serializedName: "groupValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + metrics: { + serializedName: "metrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WafRankingsResponseDataItemMetricsItem" + } + } + } + } + } + } +}; + +export const WafRankingsResponse: msRest.CompositeMapper = { + serializedName: "WafRankingsResponse", + type: { + name: "Composite", + className: "WafRankingsResponse", + modelProperties: { + dateTimeBegin: { + serializedName: "dateTimeBegin", + type: { + name: "DateTime" + } + }, + dateTimeEnd: { + serializedName: "dateTimeEnd", + type: { + name: "DateTime" + } + }, + groups: { + serializedName: "groups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + data: { + serializedName: "data", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WafRankingsResponseDataItem" + } + } + } + } + } + } +}; + +export const UsageName: msRest.CompositeMapper = { + serializedName: "UsageName", + type: { + name: "Composite", + className: "UsageName", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const Usage: msRest.CompositeMapper = { + serializedName: "Usage", + type: { + name: "Composite", + className: "Usage", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + unit: { + required: true, + isConstant: true, + serializedName: "unit", + defaultValue: 'Count', + type: { + name: "String" + } + }, + currentValue: { + required: true, + serializedName: "currentValue", + type: { + name: "Number" + } + }, + limit: { + required: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "Composite", + className: "UsageName" + } + } + } + } +}; + +export const PolicySettings: msRest.CompositeMapper = { + serializedName: "policySettings", + type: { + name: "Composite", + className: "PolicySettings", + modelProperties: { + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, + mode: { + serializedName: "mode", + type: { + name: "String" + } + }, + defaultRedirectUrl: { + serializedName: "defaultRedirectUrl", + type: { + name: "String" + } + }, + defaultCustomBlockResponseStatusCode: { + serializedName: "defaultCustomBlockResponseStatusCode", + type: { + name: "Number" + } + }, + defaultCustomBlockResponseBody: { + serializedName: "defaultCustomBlockResponseBody", + constraints: { + Pattern: /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$/ + }, + type: { + name: "String" + } + } + } + } +}; + +export const CustomRule: msRest.CompositeMapper = { + serializedName: "CustomRule", + type: { + name: "Composite", + className: "CustomRule", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, + priority: { + required: true, + serializedName: "priority", + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + matchConditions: { + required: true, + serializedName: "matchConditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MatchCondition" + } + } + } + }, + action: { + required: true, + serializedName: "action", + type: { + name: "String" + } + } + } + } +}; + +export const RateLimitRule: msRest.CompositeMapper = { + serializedName: "RateLimitRule", + type: { + name: "Composite", + className: "RateLimitRule", + modelProperties: { + ...CustomRule.type.modelProperties, + rateLimitThreshold: { + required: true, + serializedName: "rateLimitThreshold", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + rateLimitDurationInMinutes: { + required: true, + serializedName: "rateLimitDurationInMinutes", + constraints: { + InclusiveMaximum: 60, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const RateLimitRuleList: msRest.CompositeMapper = { + serializedName: "RateLimitRuleList", + type: { + name: "Composite", + className: "RateLimitRuleList", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RateLimitRule" + } + } + } + } + } + } +}; + +export const MatchCondition: msRest.CompositeMapper = { + serializedName: "MatchCondition", + type: { + name: "Composite", + className: "MatchCondition", + modelProperties: { + matchVariable: { + required: true, + serializedName: "matchVariable", + type: { + name: "String" + } + }, + selector: { + serializedName: "selector", + type: { + name: "String" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + negateCondition: { + serializedName: "negateCondition", + type: { + name: "Boolean" + } + }, + matchValue: { + required: true, + serializedName: "matchValue", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CustomRuleList: msRest.CompositeMapper = { + serializedName: "CustomRuleList", + type: { + name: "Composite", + className: "CustomRuleList", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomRule" + } + } + } + } + } + } +}; + +export const ManagedRuleOverride: msRest.CompositeMapper = { + serializedName: "ManagedRuleOverride", type: { name: "Composite", className: "ManagedRuleOverride", @@ -4316,6 +6686,295 @@ export const EdgenodeResult: msRest.CompositeMapper = { } }; +export const UsagesListResult: msRest.CompositeMapper = { + serializedName: "UsagesListResult", + type: { + name: "Composite", + className: "UsagesListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Usage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AFDDomainListResult: msRest.CompositeMapper = { + serializedName: "AFDDomainListResult", + type: { + name: "Composite", + className: "AFDDomainListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AFDDomain" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AFDEndpointListResult: msRest.CompositeMapper = { + serializedName: "AFDEndpointListResult", + type: { + name: "Composite", + className: "AFDEndpointListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AFDEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AFDOriginGroupListResult: msRest.CompositeMapper = { + serializedName: "AFDOriginGroupListResult", + type: { + name: "Composite", + className: "AFDOriginGroupListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AFDOriginGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AFDOriginListResult: msRest.CompositeMapper = { + serializedName: "AFDOriginListResult", + type: { + name: "Composite", + className: "AFDOriginListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AFDOrigin" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RouteListResult: msRest.CompositeMapper = { + serializedName: "RouteListResult", + type: { + name: "Composite", + className: "RouteListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Route" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RuleSetListResult: msRest.CompositeMapper = { + serializedName: "RuleSetListResult", + type: { + name: "Composite", + className: "RuleSetListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RuleSet" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RuleListResult: msRest.CompositeMapper = { + serializedName: "RuleListResult", + type: { + name: "Composite", + className: "RuleListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Rule" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityPolicyListResult: msRest.CompositeMapper = { + serializedName: "SecurityPolicyListResult", + type: { + name: "Composite", + className: "SecurityPolicyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityPolicy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SecretListResult: msRest.CompositeMapper = { + serializedName: "SecretListResult", + type: { + name: "Composite", + className: "SecretListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const CdnWebApplicationFirewallPolicyList: msRest.CompositeMapper = { serializedName: "CdnWebApplicationFirewallPolicyList", type: { @@ -4393,6 +7052,7 @@ export const discriminators = { 'DeliveryRuleCondition.IsDevice' : DeliveryRuleIsDeviceCondition, 'DeliveryRuleAction.UrlRedirect' : UrlRedirectAction, 'DeliveryRuleAction.UrlSigning' : UrlSigningAction, + 'DeliveryRuleAction.OriginGroupOverride' : OriginGroupOverrideAction, 'DeliveryRuleAction.UrlRewrite' : UrlRewriteAction, 'DeliveryRuleAction.ModifyRequestHeader' : DeliveryRuleRequestHeaderAction, 'DeliveryRuleAction.ModifyResponseHeader' : DeliveryRuleResponseHeaderAction, @@ -4400,6 +7060,12 @@ export const discriminators = { 'DeliveryRuleAction.CacheKeyQueryString' : DeliveryRuleCacheKeyQueryStringAction, 'CustomDomainHttpsParameters' : CustomDomainHttpsParameters, 'CustomDomainHttpsParameters.Cdn' : CdnManagedHttpsParameters, - 'CustomDomainHttpsParameters.AzureKeyVault' : UserManagedHttpsParameters + 'CustomDomainHttpsParameters.AzureKeyVault' : UserManagedHttpsParameters, + 'SecurityPolicyParameters.WebApplicationFirewall' : SecurityPolicyWebApplicationFirewallParameters, + 'SecurityPolicyParameters' : SecurityPolicyParameters, + 'SecretParameters' : SecretParameters, + 'SecretParameters.UrlSigningKey' : UrlSigningKeyParameters, + 'SecretParameters.ManagedCertificate' : ManagedCertificateParameters, + 'SecretParameters.CustomerCertificate' : CustomerCertificateParameters }; diff --git a/sdk/cdn/arm-cdn/src/models/operationsMappers.ts b/sdk/cdn/arm-cdn/src/models/operationsMappers.ts index b4fe02631a85..29759ce77166 100644 --- a/sdk/cdn/arm-cdn/src/models/operationsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/cdn/arm-cdn/src/models/originGroupsMappers.ts b/sdk/cdn/arm-cdn/src/models/originGroupsMappers.ts index d249da8af3d5..6f3fc30bc6a5 100644 --- a/sdk/cdn/arm-cdn/src/models/originGroupsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/originGroupsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -17,6 +25,7 @@ export { CidrIpAddress, CookiesMatchConditionParameters, CustomDomain, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -42,6 +51,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, @@ -56,6 +66,8 @@ export { IpAddressGroup, IsDeviceMatchConditionParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -67,6 +79,8 @@ export { Origin, OriginGroup, OriginGroupListResult, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginUpdateParameters, PolicySettings, @@ -86,7 +100,17 @@ export { Resource, ResourceReference, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -98,5 +122,6 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/originsMappers.ts b/sdk/cdn/arm-cdn/src/models/originsMappers.ts index ac713095f07d..181f5020b933 100644 --- a/sdk/cdn/arm-cdn/src/models/originsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/originsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -17,6 +25,7 @@ export { CidrIpAddress, CookiesMatchConditionParameters, CustomDomain, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -42,6 +51,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, @@ -56,6 +66,8 @@ export { IpAddressGroup, IsDeviceMatchConditionParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -66,6 +78,8 @@ export { MatchCondition, Origin, OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginListResult, OriginUpdateParameters, @@ -86,7 +100,17 @@ export { Resource, ResourceReference, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -98,5 +122,6 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/parameters.ts b/sdk/cdn/arm-cdn/src/models/parameters.ts index 783ef8f1bc84..079a6db0a802 100644 --- a/sdk/cdn/arm-cdn/src/models/parameters.ts +++ b/sdk/cdn/arm-cdn/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -20,6 +19,24 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; +export const actions: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "actions" + ], + mapper: { + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; export const apiVersion: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { @@ -30,6 +47,42 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const continents: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "continents" + ], + mapper: { + serializedName: "continents", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; +export const countryOrRegions: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "countryOrRegions" + ], + mapper: { + serializedName: "countryOrRegions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; export const customDomainName: msRest.OperationURLParameter = { parameterPath: "customDomainName", mapper: { @@ -40,6 +93,44 @@ export const customDomainName: msRest.OperationURLParameter = { } } }; +export const customDomains: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "customDomains" + ], + mapper: { + serializedName: "customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; +export const dateTimeBegin: msRest.OperationQueryParameter = { + parameterPath: "dateTimeBegin", + mapper: { + required: true, + serializedName: "dateTimeBegin", + type: { + name: "DateTime" + } + } +}; +export const dateTimeEnd: msRest.OperationQueryParameter = { + parameterPath: "dateTimeEnd", + mapper: { + required: true, + serializedName: "dateTimeEnd", + type: { + name: "DateTime" + } + } +}; export const endpointName: msRest.OperationURLParameter = { parameterPath: "endpointName", mapper: { @@ -50,6 +141,60 @@ export const endpointName: msRest.OperationURLParameter = { } } }; +export const granularity: msRest.OperationQueryParameter = { + parameterPath: "granularity", + mapper: { + required: true, + serializedName: "granularity", + type: { + name: "String" + } + } +}; +export const groupBy: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "groupBy" + ], + mapper: { + serializedName: "groupBy", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; +export const maxRanking: msRest.OperationQueryParameter = { + parameterPath: "maxRanking", + mapper: { + required: true, + serializedName: "maxRanking", + type: { + name: "Number" + } + } +}; +export const metrics: msRest.OperationQueryParameter = { + parameterPath: "metrics", + mapper: { + required: true, + serializedName: "metrics", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -104,7 +249,41 @@ export const profileName: msRest.OperationURLParameter = { } } }; -export const resourceGroupName: msRest.OperationURLParameter = { +export const protocols: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "protocols" + ], + mapper: { + serializedName: "protocols", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; +export const rankings: msRest.OperationQueryParameter = { + parameterPath: "rankings", + mapper: { + required: true, + serializedName: "rankings", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; +export const resourceGroupName0: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, @@ -119,6 +298,89 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const resourceGroupName1: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + constraints: { + MaxLength: 80, + MinLength: 1, + Pattern: /^[a-zA-Z0-9_\-\(\)\.]*[^\.]$/ + }, + type: { + name: "String" + } + } +}; +export const routeName: msRest.OperationURLParameter = { + parameterPath: "routeName", + mapper: { + required: true, + serializedName: "routeName", + type: { + name: "String" + } + } +}; +export const ruleName: msRest.OperationURLParameter = { + parameterPath: "ruleName", + mapper: { + required: true, + serializedName: "ruleName", + type: { + name: "String" + } + } +}; +export const ruleSetName: msRest.OperationURLParameter = { + parameterPath: "ruleSetName", + mapper: { + required: true, + serializedName: "ruleSetName", + type: { + name: "String" + } + } +}; +export const ruleTypes: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "ruleTypes" + ], + mapper: { + serializedName: "ruleTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv +}; +export const secretName: msRest.OperationURLParameter = { + parameterPath: "secretName", + mapper: { + required: true, + serializedName: "secretName", + type: { + name: "String" + } + } +}; +export const securityPolicyName: msRest.OperationURLParameter = { + parameterPath: "securityPolicyName", + mapper: { + required: true, + serializedName: "securityPolicyName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/cdn/arm-cdn/src/models/policiesMappers.ts b/sdk/cdn/arm-cdn/src/models/policiesMappers.ts index fef3266d0dd8..839c99584962 100644 --- a/sdk/cdn/arm-cdn/src/models/policiesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/policiesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -19,6 +27,7 @@ export { CloudError, CookiesMatchConditionParameters, CustomDomain, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -44,6 +53,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, @@ -58,6 +68,8 @@ export { IpAddressGroup, IsDeviceMatchConditionParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -68,6 +80,8 @@ export { MatchCondition, Origin, OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginUpdateParameters, PolicySettings, @@ -87,7 +101,17 @@ export { Resource, ResourceReference, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -99,5 +123,6 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts index 1ad0eed33bf2..06d5379b096f 100644 --- a/sdk/cdn/arm-cdn/src/models/profilesMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/profilesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,14 @@ export { discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, BaseResource, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, @@ -17,6 +25,7 @@ export { CidrIpAddress, CookiesMatchConditionParameters, CustomDomain, + CustomerCertificateParameters, CustomRule, CustomRuleList, DeepCreatedOrigin, @@ -42,6 +51,7 @@ export { DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, DeliveryRuleUrlPathCondition, + DomainValidationProperties, EdgeNode, Endpoint, EndpointPropertiesUpdateParametersDeliveryPolicy, @@ -56,6 +66,8 @@ export { IpAddressGroup, IsDeviceMatchConditionParameters, KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, ManagedRuleGroupOverride, @@ -66,6 +78,8 @@ export { MatchCondition, Origin, OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, OriginGroupUpdateParameters, OriginUpdateParameters, PolicySettings, @@ -88,9 +102,19 @@ export { ResourceUsage, ResourceUsageListResult, ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, Sku, SsoUri, SupportedOptimizationTypesListResult, + SystemData, TrackedResource, UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, @@ -102,5 +126,6 @@ export { UrlSigningAction, UrlSigningActionParameters, UrlSigningKey, + UrlSigningKeyParameters, UrlSigningParamIdentifier } from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/resourceUsageOperationsMappers.ts b/sdk/cdn/arm-cdn/src/models/resourceUsageOperationsMappers.ts index a1b52f057759..2445375e57b8 100644 --- a/sdk/cdn/arm-cdn/src/models/resourceUsageOperationsMappers.ts +++ b/sdk/cdn/arm-cdn/src/models/resourceUsageOperationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/cdn/arm-cdn/src/models/routesMappers.ts b/sdk/cdn/arm-cdn/src/models/routesMappers.ts new file mode 100644 index 000000000000..e1403d4e0d31 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/routesMappers.ts @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + RouteListResult, + RouteUpdateParameters, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/ruleSetsMappers.ts b/sdk/cdn/arm-cdn/src/models/ruleSetsMappers.ts new file mode 100644 index 000000000000..e3326d34ca5c --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/ruleSetsMappers.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + RuleSetListResult, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier, + Usage, + UsageName, + UsagesListResult +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/rulesMappers.ts b/sdk/cdn/arm-cdn/src/models/rulesMappers.ts new file mode 100644 index 000000000000..f066ad3fddd3 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/rulesMappers.ts @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleListResult, + RuleSet, + RuleUpdateParameters, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/secretsMappers.ts b/sdk/cdn/arm-cdn/src/models/secretsMappers.ts new file mode 100644 index 000000000000..88922fc27ecd --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/secretsMappers.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + AFDStateProperties, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretListResult, + SecretParameters, + SecretProperties, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/securityPoliciesMappers.ts b/sdk/cdn/arm-cdn/src/models/securityPoliciesMappers.ts new file mode 100644 index 000000000000..b28d704d2cb4 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/securityPoliciesMappers.ts @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyListResult, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/models/validateMappers.ts b/sdk/cdn/arm-cdn/src/models/validateMappers.ts new file mode 100644 index 000000000000..74dcc83550a1 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/models/validateMappers.ts @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AFDDomain, + AFDDomainHttpsParameters, + AFDEndpoint, + AFDEndpointUpdateParameters, + AfdErrorResponse, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupUpdateParameters, + AFDOriginUpdateParameters, + BaseResource, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CdnEndpoint, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyPatchParameters, + CidrIpAddress, + CookiesMatchConditionParameters, + CustomDomain, + CustomerCertificateParameters, + CustomRule, + CustomRuleList, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleCondition, + DeliveryRuleCookiesCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DomainValidationProperties, + EdgeNode, + Endpoint, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + Origin, + OriginGroup, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupUpdateParameters, + OriginUpdateParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileUpdateParameters, + ProxyResource, + QueryStringMatchConditionParameters, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResponseBasedOriginErrorDetectionParameters, + Route, + Rule, + RuleSet, + Secret, + SecretParameters, + SecurityPolicy, + SecurityPolicyParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + Sku, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier, + ValidateSecretInput, + ValidateSecretOutput +} from "../models/mappers"; diff --git a/sdk/cdn/arm-cdn/src/operations/aFDCustomDomains.ts b/sdk/cdn/arm-cdn/src/operations/aFDCustomDomains.ts new file mode 100644 index 000000000000..9fda19968080 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/aFDCustomDomains.ts @@ -0,0 +1,475 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/aFDCustomDomainsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a AFDCustomDomains. */ +export class AFDCustomDomains { + private readonly client: CdnManagementClientContext; + + /** + * Create a AFDCustomDomains. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists existing AzureFrontDoor domains. + * @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 [options] The optional parameters + * @returns Promise + */ + listByProfile(resourceGroupName: string, profileName: 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 callback The callback + */ + listByProfile(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + listByProfile(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfile(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + listByProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing AzureFrontDoor domain with the specified domain name under the specified + * subscription, resource group and profile. + * @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 customDomainName Name of the domain under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, customDomainName: 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 customDomainName Name of the domain under the profile which is unique globally. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, customDomainName: 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 customDomainName Name of the domain under the profile which is unique globally. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, customDomainName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, customDomainName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + customDomainName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new domain within the specified profile. + * @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 customDomainName Name of the domain under the profile which is unique globally + * @param customDomain Domain properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, customDomainName: string, customDomain: Models.AFDDomain, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,customDomainName,customDomain,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing domain within a profile. + * @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 customDomainName Name of the domain under the profile which is unique globally + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, customDomainName: string, options?: Models.AFDCustomDomainsUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,profileName,customDomainName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified + * subscription, resource group and profile. + * @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 customDomainName Name of the domain under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, customDomainName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,customDomainName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates the domain validation token. + * @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 customDomainName Name of the domain under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + refreshValidationToken(resourceGroupName: string, profileName: string, customDomainName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRefreshValidationToken(resourceGroupName,profileName,customDomainName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates a new domain within the specified profile. + * @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 customDomainName Name of the domain under the profile which is unique globally + * @param customDomain Domain properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, customDomainName: string, customDomain: Models.AFDDomain, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + customDomainName, + customDomain, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing domain within a profile. + * @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 customDomainName Name of the domain under the profile which is unique globally + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, customDomainName: string, options?: Models.AFDCustomDomainsBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + customDomainName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified + * subscription, resource group and profile. + * @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 customDomainName Name of the domain under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, customDomainName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + customDomainName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates the domain validation token. + * @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 customDomainName Name of the domain under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + beginRefreshValidationToken(resourceGroupName: string, profileName: string, customDomainName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + customDomainName, + options + }, + beginRefreshValidationTokenOperationSpec, + options); + } + + /** + * Lists existing AzureFrontDoor domains. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByProfileNext(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 + */ + listByProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDDomainListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.customDomainName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDDomain + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.customDomainName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "customDomain", + mapper: { + ...Mappers.AFDDomain, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDDomain + }, + 201: { + bodyMapper: Mappers.AFDDomain + }, + 202: { + bodyMapper: Mappers.AFDDomain + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.customDomainName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tlsSettings: [ + "options", + "tlsSettings" + ], + azureDnsZone: [ + "options", + "azureDnsZone" + ] + }, + mapper: { + ...Mappers.AFDDomainUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDDomain + }, + 202: { + bodyMapper: Mappers.AFDDomain + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.customDomainName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginRefreshValidationTokenOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.customDomainName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ValidationToken + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDDomainListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/aFDEndpoints.ts b/sdk/cdn/arm-cdn/src/operations/aFDEndpoints.ts new file mode 100644 index 000000000000..150360909739 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/aFDEndpoints.ts @@ -0,0 +1,683 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/aFDEndpointsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a AFDEndpoints. */ +export class AFDEndpoints { + private readonly client: CdnManagementClientContext; + + /** + * Create a AFDEndpoints. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists existing AzureFrontDoor endpoints. + * @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 [options] The optional parameters + * @returns Promise + */ + listByProfile(resourceGroupName: string, profileName: 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 callback The callback + */ + listByProfile(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + listByProfile(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfile(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + listByProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified + * subscription, resource group and profile. + * @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 + */ + get(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 + */ + get(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 + */ + get(resourceGroupName: string, profileName: string, endpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, endpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + * subscription, resource group and profile. + * @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 endpoint Endpoint properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, endpointName: string, endpoint: Models.AFDEndpoint, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,endpointName,endpoint,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified + * 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 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. + * @param endpointUpdateProperties Endpoint update properties + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: Models.AFDEndpointUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,profileName,endpointName,endpointUpdateProperties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified + * subscription, resource group and profile. + * @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 + */ + deleteMethod(resourceGroupName: string, profileName: string, endpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,endpointName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Removes a content from AzureFrontDoor. + * @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 contentPaths The path to the content to be purged. Can describe a file path or a wild + * card directory. + * @param [options] The optional parameters + * @returns Promise + */ + purgeContent(resourceGroupName: string, profileName: string, endpointName: string, contentPaths: string[], options?: Models.AFDEndpointsPurgeContentOptionalParams): Promise { + return this.beginPurgeContent(resourceGroupName,profileName,endpointName,contentPaths,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @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 + */ + listResourceUsage(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 + */ + listResourceUsage(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 + */ + listResourceUsage(resourceGroupName: string, profileName: string, endpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsage(resourceGroupName: string, profileName: string, endpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + options + }, + listResourceUsageOperationSpec, + callback) as Promise; + } + + /** + * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + * @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 hostName The host name of the custom domain. Must be a domain name. + * @param [options] The optional parameters + * @returns Promise + */ + validateCustomDomain(resourceGroupName: string, profileName: string, endpointName: string, hostName: 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 hostName The host name of the custom domain. Must be a domain name. + * @param callback The callback + */ + validateCustomDomain(resourceGroupName: string, profileName: string, endpointName: string, hostName: 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 hostName The host name of the custom domain. Must be a domain name. + * @param options The optional parameters + * @param callback The callback + */ + validateCustomDomain(resourceGroupName: string, profileName: string, endpointName: string, hostName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validateCustomDomain(resourceGroupName: string, profileName: string, endpointName: string, hostName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + hostName, + options + }, + validateCustomDomainOperationSpec, + callback) as Promise; + } + + /** + * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + * subscription, resource group and profile. + * @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 endpoint Endpoint properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, endpoint: Models.AFDEndpoint, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + endpoint, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified + * 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 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. + * @param endpointUpdateProperties Endpoint update properties + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: Models.AFDEndpointUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + endpointUpdateProperties, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified + * subscription, resource group and profile. + * @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 + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, endpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Removes a content from AzureFrontDoor. + * @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 contentPaths The path to the content to be purged. Can describe a file path or a wild + * card directory. + * @param [options] The optional parameters + * @returns Promise + */ + beginPurgeContent(resourceGroupName: string, profileName: string, endpointName: string, contentPaths: string[], options?: Models.AFDEndpointsBeginPurgeContentOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + contentPaths, + options + }, + beginPurgeContentOperationSpec, + options); + } + + /** + * Lists existing AzureFrontDoor endpoints. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByProfileNext(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 + */ + listByProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listResourceUsageNext(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 + */ + listResourceUsageNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listResourceUsageNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDEndpointListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDEndpoint + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listResourceUsageOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const validateCustomDomainOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + hostName: "hostName" + }, + mapper: { + ...Mappers.ValidateCustomDomainInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateCustomDomainOutput + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "endpoint", + mapper: { + ...Mappers.AFDEndpoint, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDEndpoint + }, + 201: { + bodyMapper: Mappers.AFDEndpoint + }, + 202: { + bodyMapper: Mappers.AFDEndpoint + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "endpointUpdateProperties", + mapper: { + ...Mappers.AFDEndpointUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDEndpoint + }, + 202: { + bodyMapper: Mappers.AFDEndpoint + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginPurgeContentOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + contentPaths: "contentPaths", + domains: [ + "options", + "domains" + ] + }, + mapper: { + ...Mappers.AfdPurgeParameters, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDEndpointListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listResourceUsageNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/aFDOriginGroups.ts b/sdk/cdn/arm-cdn/src/operations/aFDOriginGroups.ts new file mode 100644 index 000000000000..a53a30d4f7cc --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/aFDOriginGroups.ts @@ -0,0 +1,521 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/aFDOriginGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a AFDOriginGroups. */ +export class AFDOriginGroups { + private readonly client: CdnManagementClientContext; + + /** + * Create a AFDOriginGroups. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the existing origin groups within a profile. + * @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 [options] The optional parameters + * @returns Promise + */ + listByProfile(resourceGroupName: string, profileName: 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 callback The callback + */ + listByProfile(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + listByProfile(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfile(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + listByProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing origin group within a profile. + * @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 originGroupName Name of the origin group which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: 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 originGroupName Name of the origin group which is unique within the endpoint. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: 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 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, originGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, originGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + originGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new origin group within the specified profile. + * @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 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, originGroupName: string, originGroup: Models.AFDOriginGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,originGroupName,originGroup,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing origin group within a profile. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originGroupUpdateProperties Origin group properties + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, originGroupName: string, originGroupUpdateProperties: Models.AFDOriginGroupUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,profileName,originGroupName,originGroupUpdateProperties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing origin group within a profile. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, originGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,originGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @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 originGroupName Name of the origin group which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + listResourceUsage(resourceGroupName: string, profileName: 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 originGroupName Name of the origin group which is unique within the endpoint. + * @param callback The callback + */ + listResourceUsage(resourceGroupName: string, profileName: 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 originGroupName Name of the origin group which is unique within the endpoint. + * @param options The optional parameters + * @param callback The callback + */ + listResourceUsage(resourceGroupName: string, profileName: string, originGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsage(resourceGroupName: string, profileName: string, originGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + originGroupName, + options + }, + listResourceUsageOperationSpec, + callback) as Promise; + } + + /** + * Creates a new origin group within the specified profile. + * @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 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, originGroupName: string, originGroup: Models.AFDOriginGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + originGroupName, + originGroup, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing origin group within a profile. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originGroupUpdateProperties Origin group properties + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, originGroupName: string, originGroupUpdateProperties: Models.AFDOriginGroupUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + originGroupName, + originGroupUpdateProperties, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing origin group within a profile. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, originGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + originGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all of the existing origin groups within a profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByProfileNext(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 + */ + listByProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listResourceUsageNext(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 + */ + listResourceUsageNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listResourceUsageNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDOriginGroupListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDOriginGroup + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listResourceUsageOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "originGroup", + mapper: { + ...Mappers.AFDOriginGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDOriginGroup + }, + 201: { + bodyMapper: Mappers.AFDOriginGroup + }, + 202: { + bodyMapper: Mappers.AFDOriginGroup + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "originGroupUpdateProperties", + mapper: { + ...Mappers.AFDOriginGroupUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDOriginGroup + }, + 202: { + bodyMapper: Mappers.AFDOriginGroup + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDOriginGroupListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listResourceUsageNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/aFDOrigins.ts b/sdk/cdn/arm-cdn/src/operations/aFDOrigins.ts new file mode 100644 index 000000000000..e0e71a2b9c31 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/aFDOrigins.ts @@ -0,0 +1,429 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/aFDOriginsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a AFDOrigins. */ +export class AFDOrigins { + private readonly client: CdnManagementClientContext; + + /** + * Create a AFDOrigins. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the existing origins within an origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByOriginGroup(resourceGroupName: string, profileName: 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 originGroupName Name of the origin group which is unique within the profile. + * @param callback The callback + */ + listByOriginGroup(resourceGroupName: string, profileName: 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 originGroupName Name of the origin group which is unique within the profile. + * @param options The optional parameters + * @param callback The callback + */ + listByOriginGroup(resourceGroupName: string, profileName: string, originGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByOriginGroup(resourceGroupName: string, profileName: string, originGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + originGroupName, + options + }, + listByOriginGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing origin within an origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin which is unique within the profile. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, originGroupName: string, originName: 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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin which is unique within the profile. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, originGroupName: string, originName: 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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin which is unique within the profile. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + originGroupName, + originName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new origin within the specified origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin that is unique within the profile. + * @param origin Origin properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, origin: Models.AFDOrigin, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,originGroupName,originName,origin,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing origin within an origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin which is unique within the profile. + * @param originUpdateProperties Origin properties + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, originUpdateProperties: Models.AFDOriginUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,profileName,originGroupName,originName,originUpdateProperties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing origin within an origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin which is unique within the profile. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,originGroupName,originName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new origin within the specified origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin that is unique within the profile. + * @param origin Origin properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, origin: Models.AFDOrigin, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + originGroupName, + originName, + origin, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing origin within an origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin which is unique within the profile. + * @param originUpdateProperties Origin properties + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, originUpdateProperties: Models.AFDOriginUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + originGroupName, + originName, + originUpdateProperties, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing origin within an origin group. + * @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 originGroupName Name of the origin group which is unique within the profile. + * @param originName Name of the origin which is unique within the profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + originGroupName, + originName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all of the existing origins within an origin group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByOriginGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByOriginGroupNext(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 + */ + listByOriginGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByOriginGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByOriginGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByOriginGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDOriginListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.originName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDOrigin + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.originName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "origin", + mapper: { + ...Mappers.AFDOrigin, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDOrigin + }, + 201: { + bodyMapper: Mappers.AFDOrigin + }, + 202: { + bodyMapper: Mappers.AFDOrigin + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.originName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "originUpdateProperties", + mapper: { + ...Mappers.AFDOriginUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AFDOrigin + }, + 202: { + bodyMapper: Mappers.AFDOrigin + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.originGroupName, + Parameters.originName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByOriginGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AFDOriginListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/aFDProfiles.ts b/sdk/cdn/arm-cdn/src/operations/aFDProfiles.ts new file mode 100644 index 000000000000..308ff6de6181 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/aFDProfiles.ts @@ -0,0 +1,208 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/aFDProfilesMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a AFDProfiles. */ +export class AFDProfiles { + private readonly client: CdnManagementClientContext; + + /** + * Create a AFDProfiles. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @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 [options] The optional parameters + * @returns Promise + */ + listResourceUsage(resourceGroupName: string, profileName: 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 callback The callback + */ + listResourceUsage(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + listResourceUsage(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsage(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + listResourceUsageOperationSpec, + callback) as Promise; + } + + /** + * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + * @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 hostName The host name of the custom domain. Must be a domain name. + * @param [options] The optional parameters + * @returns Promise + */ + checkHostNameAvailability(resourceGroupName: string, profileName: string, hostName: 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 hostName The host name of the custom domain. Must be a domain name. + * @param callback The callback + */ + checkHostNameAvailability(resourceGroupName: string, profileName: string, hostName: 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 hostName The host name of the custom domain. Must be a domain name. + * @param options The optional parameters + * @param callback The callback + */ + checkHostNameAvailability(resourceGroupName: string, profileName: string, hostName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkHostNameAvailability(resourceGroupName: string, profileName: string, hostName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + hostName, + options + }, + checkHostNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listResourceUsageNext(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 + */ + listResourceUsageNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listResourceUsageNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listResourceUsageOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const checkHostNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + hostName: "hostName" + }, + mapper: { + ...Mappers.ValidateCustomDomainInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateCustomDomainOutput + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listResourceUsageNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/customDomains.ts b/sdk/cdn/arm-cdn/src/operations/customDomains.ts index c05b4b4c92bc..d416d0428902 100644 --- a/sdk/cdn/arm-cdn/src/operations/customDomains.ts +++ b/sdk/cdn/arm-cdn/src/operations/customDomains.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -14,7 +13,6 @@ import * as Models from "../models"; import * as Mappers from "../models/customDomainsMappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClientContext } from "../cdnManagementClientContext"; -import { Profiles } from "./profiles"; /** Class representing a CustomDomains. */ export class CustomDomains { @@ -115,7 +113,7 @@ export class CustomDomains { * @returns Promise */ create(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, hostName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName, profileName, endpointName, customDomainName, hostName, options) + return this.beginCreate(resourceGroupName,profileName,endpointName,customDomainName,hostName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -129,7 +127,7 @@ export class CustomDomains { * @returns Promise */ deleteMethod(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName, profileName, endpointName, customDomainName, options) + return this.beginDeleteMethod(resourceGroupName,profileName,endpointName,customDomainName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -201,42 +199,16 @@ export class CustomDomains { */ enableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options: Models.CustomDomainsEnableCustomHttpsOptionalParams, callback: msRest.ServiceCallback): void; enableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: Models.CustomDomainsEnableCustomHttpsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - // #region Added default values to add backwards compatibility - let newOptions: Models.CustomDomainsEnableCustomHttpsOptionalParams = {}; - - if (typeof options === "function") { - callback = options; - } else { - newOptions = options as Models.CustomDomainsEnableCustomHttpsOptionalParams; - } - - if (!newOptions) { - newOptions = {}; - } - - let optionsPreparationPromise = Promise.resolve(options); - - if (!newOptions.customDomainHttpsParameters) { - let profiles = new Profiles(this.client); - optionsPreparationPromise = profiles.get(resourceGroupName, profileName).then(profile => { - newOptions.customDomainHttpsParameters = getDefaultCustomDomainHttpsParameters(profile); - return newOptions; - }) - } - - return optionsPreparationPromise.then(options => - this.client.sendOperationRequest( - { - resourceGroupName, - profileName, - endpointName, - customDomainName, - options - }, - enableCustomHttpsOperationSpec, - callback) as Promise - ); - // #endregion + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + customDomainName, + options + }, + enableCustomHttpsOperationSpec, + callback) as Promise; } /** @@ -314,53 +286,13 @@ export class CustomDomains { } } -// #region Added default values to add backwards compatibility -class SkuNames { - public static get standard_microsoft() { return "Standard_Microsoft"; } - public static get standard_verizon() { return "Standard_Verizon"; } - public static get standard_akamai() { return "Standard_Akamai"; } -} - -function getDefaultCustomDomainHttpsParameters(profile: Models.Profile): Models.CdnManagedHttpsParameters | undefined { - switch (profile.sku.name) { - case SkuNames.standard_microsoft: - return { - certificateSource: "Cdn", - certificateSourceParameters: { - certificateType: "Dedicated" - }, - protocolType: "ServerNameIndication" - } - case SkuNames.standard_akamai: - return { - certificateSource: "Cdn", - certificateSourceParameters: { - certificateType: "Shared" - }, - protocolType: "ServerNameIndication" - } - case SkuNames.standard_verizon: - return { - certificateSource: "Cdn", - certificateSourceParameters: { - certificateType: "Shared" - }, - protocolType: "IPBased" - } - default: - return undefined; - } -} - -// #endregion - // 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}/customDomains", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -386,7 +318,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -413,7 +345,7 @@ const disableCustomHttpsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -441,7 +373,7 @@ const enableCustomHttpsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -476,7 +408,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -518,7 +450,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.customDomainName, @@ -550,6 +482,9 @@ const listByEndpointNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts b/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts index 282fd57f895a..ace8cd2a8509 100644 --- a/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts +++ b/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -110,6 +109,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/endpoints.ts b/sdk/cdn/arm-cdn/src/operations/endpoints.ts index fc412606a7d3..c942f92ca281 100644 --- a/sdk/cdn/arm-cdn/src/operations/endpoints.ts +++ b/sdk/cdn/arm-cdn/src/operations/endpoints.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -492,7 +491,7 @@ const listByProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -517,7 +516,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -543,7 +542,7 @@ const validateCustomDomainOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -578,7 +577,7 @@ const listResourceUsageOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -604,7 +603,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -643,7 +642,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -679,7 +678,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -704,7 +703,7 @@ const beginStartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -733,7 +732,7 @@ const beginStopOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -762,7 +761,7 @@ const beginPurgeContentOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -796,7 +795,7 @@ const beginLoadContentOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -833,6 +832,9 @@ const listByProfileNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -854,6 +856,9 @@ const listResourceUsageNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/index.ts b/sdk/cdn/arm-cdn/src/operations/index.ts index 6cb01556e7ca..98718b34f12a 100644 --- a/sdk/cdn/arm-cdn/src/operations/index.ts +++ b/sdk/cdn/arm-cdn/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -16,5 +15,17 @@ export * from "./customDomains"; export * from "./resourceUsageOperations"; export * from "./operations"; export * from "./edgeNodes"; +export * from "./aFDProfiles"; +export * from "./aFDCustomDomains"; +export * from "./aFDEndpoints"; +export * from "./aFDOriginGroups"; +export * from "./aFDOrigins"; +export * from "./routes"; +export * from "./ruleSets"; +export * from "./rules"; +export * from "./securityPolicies"; +export * from "./secrets"; +export * from "./validate"; +export * from "./logAnalytics"; export * from "./policies"; export * from "./managedRuleSets"; diff --git a/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts b/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts new file mode 100644 index 000000000000..07af0b0f7120 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts @@ -0,0 +1,472 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/logAnalyticsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a LogAnalytics. */ +export class LogAnalytics { + private readonly client: CdnManagementClientContext; + + /** + * Create a LogAnalytics. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Get log report for AFD profile + * @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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param granularity Possible values include: 'PT5M', 'PT1H', 'P1D' + * @param [options] The optional parameters + * @returns Promise + */ + getLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity2, options?: Models.LogAnalyticsGetLogAnalyticsMetricsOptionalParams): 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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param granularity Possible values include: 'PT5M', 'PT1H', 'P1D' + * @param callback The callback + */ + getLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity2, 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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param granularity Possible values include: 'PT5M', 'PT1H', 'P1D' + * @param options The optional parameters + * @param callback The callback + */ + getLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity2, options: Models.LogAnalyticsGetLogAnalyticsMetricsOptionalParams, callback: msRest.ServiceCallback): void; + getLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity2, options?: Models.LogAnalyticsGetLogAnalyticsMetricsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + metrics, + dateTimeBegin, + dateTimeEnd, + granularity, + options + }, + getLogAnalyticsMetricsOperationSpec, + callback) as Promise; + } + + /** + * Get log analytics ranking report for AFD profile + * @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 rankings + * @param metrics + * @param maxRanking + * @param dateTimeBegin + * @param dateTimeEnd + * @param [options] The optional parameters + * @returns Promise + */ + getLogAnalyticsRankings(resourceGroupName: string, profileName: string, rankings: string[], metrics: string[], maxRanking: number, dateTimeBegin: Date | string, dateTimeEnd: Date | string, options?: Models.LogAnalyticsGetLogAnalyticsRankingsOptionalParams): 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 rankings + * @param metrics + * @param maxRanking + * @param dateTimeBegin + * @param dateTimeEnd + * @param callback The callback + */ + getLogAnalyticsRankings(resourceGroupName: string, profileName: string, rankings: string[], metrics: string[], maxRanking: number, dateTimeBegin: Date | string, dateTimeEnd: Date | 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 rankings + * @param metrics + * @param maxRanking + * @param dateTimeBegin + * @param dateTimeEnd + * @param options The optional parameters + * @param callback The callback + */ + getLogAnalyticsRankings(resourceGroupName: string, profileName: string, rankings: string[], metrics: string[], maxRanking: number, dateTimeBegin: Date | string, dateTimeEnd: Date | string, options: Models.LogAnalyticsGetLogAnalyticsRankingsOptionalParams, callback: msRest.ServiceCallback): void; + getLogAnalyticsRankings(resourceGroupName: string, profileName: string, rankings: string[], metrics: string[], maxRanking: number, dateTimeBegin: Date | string, dateTimeEnd: Date | string, options?: Models.LogAnalyticsGetLogAnalyticsRankingsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + rankings, + metrics, + maxRanking, + dateTimeBegin, + dateTimeEnd, + options + }, + getLogAnalyticsRankingsOperationSpec, + callback) as Promise; + } + + /** + * Get all available location names for AFD log analytics report. + * @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 [options] The optional parameters + * @returns Promise + */ + getLogAnalyticsLocations(resourceGroupName: string, profileName: 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 callback The callback + */ + getLogAnalyticsLocations(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + getLogAnalyticsLocations(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getLogAnalyticsLocations(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + getLogAnalyticsLocationsOperationSpec, + callback) as Promise; + } + + /** + * Get all endpoints and custom domains available for AFD log report + * @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 [options] The optional parameters + * @returns Promise + */ + getLogAnalyticsResources(resourceGroupName: string, profileName: 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 callback The callback + */ + getLogAnalyticsResources(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + getLogAnalyticsResources(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getLogAnalyticsResources(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + getLogAnalyticsResourcesOperationSpec, + callback) as Promise; + } + + /** + * Get Waf related log analytics report for AFD profile. + * @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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param granularity Possible values include: 'PT5M', 'PT1H', 'P1D' + * @param [options] The optional parameters + * @returns Promise + */ + getWafLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity3, options?: Models.LogAnalyticsGetWafLogAnalyticsMetricsOptionalParams): 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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param granularity Possible values include: 'PT5M', 'PT1H', 'P1D' + * @param callback The callback + */ + getWafLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity3, 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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param granularity Possible values include: 'PT5M', 'PT1H', 'P1D' + * @param options The optional parameters + * @param callback The callback + */ + getWafLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity3, options: Models.LogAnalyticsGetWafLogAnalyticsMetricsOptionalParams, callback: msRest.ServiceCallback): void; + getWafLogAnalyticsMetrics(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, granularity: Models.Granularity3, options?: Models.LogAnalyticsGetWafLogAnalyticsMetricsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + metrics, + dateTimeBegin, + dateTimeEnd, + granularity, + options + }, + getWafLogAnalyticsMetricsOperationSpec, + callback) as Promise; + } + + /** + * Get WAF log analytics charts for AFD profile + * @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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param maxRanking + * @param rankings + * @param [options] The optional parameters + * @returns Promise + */ + getWafLogAnalyticsRankings(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, maxRanking: number, rankings: string[], options?: Models.LogAnalyticsGetWafLogAnalyticsRankingsOptionalParams): 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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param maxRanking + * @param rankings + * @param callback The callback + */ + getWafLogAnalyticsRankings(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, maxRanking: number, rankings: 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 metrics + * @param dateTimeBegin + * @param dateTimeEnd + * @param maxRanking + * @param rankings + * @param options The optional parameters + * @param callback The callback + */ + getWafLogAnalyticsRankings(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, maxRanking: number, rankings: string[], options: Models.LogAnalyticsGetWafLogAnalyticsRankingsOptionalParams, callback: msRest.ServiceCallback): void; + getWafLogAnalyticsRankings(resourceGroupName: string, profileName: string, metrics: string[], dateTimeBegin: Date | string, dateTimeEnd: Date | string, maxRanking: number, rankings: string[], options?: Models.LogAnalyticsGetWafLogAnalyticsRankingsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + metrics, + dateTimeBegin, + dateTimeEnd, + maxRanking, + rankings, + options + }, + getWafLogAnalyticsRankingsOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getLogAnalyticsMetricsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.profileName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.metrics, + Parameters.dateTimeBegin, + Parameters.dateTimeEnd, + Parameters.granularity, + Parameters.groupBy, + Parameters.continents, + Parameters.countryOrRegions, + Parameters.customDomains, + Parameters.protocols + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricsResponse + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getLogAnalyticsRankingsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.profileName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.rankings, + Parameters.metrics, + Parameters.maxRanking, + Parameters.dateTimeBegin, + Parameters.dateTimeEnd, + Parameters.customDomains + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RankingsResponse + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getLogAnalyticsLocationsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.profileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContinentsResponse + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getLogAnalyticsResourcesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.profileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ResourcesResponse + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getWafLogAnalyticsMetricsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.profileName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.metrics, + Parameters.dateTimeBegin, + Parameters.dateTimeEnd, + Parameters.granularity, + Parameters.actions, + Parameters.groupBy, + Parameters.ruleTypes + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WafMetricsResponse + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getWafLogAnalyticsRankingsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.profileName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.metrics, + Parameters.dateTimeBegin, + Parameters.dateTimeEnd, + Parameters.maxRanking, + Parameters.rankings, + Parameters.actions, + Parameters.ruleTypes + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WafRankingsResponse + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts index 55a5f62e5faa..5ce068169691 100644 --- a/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts +++ b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -111,6 +110,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/operations.ts b/sdk/cdn/arm-cdn/src/operations/operations.ts index 09c0ecfd5439..93ce3bee154d 100644 --- a/sdk/cdn/arm-cdn/src/operations/operations.ts +++ b/sdk/cdn/arm-cdn/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/originGroups.ts b/sdk/cdn/arm-cdn/src/operations/originGroups.ts index 8592b28f1712..00e2c5ac0e7c 100644 --- a/sdk/cdn/arm-cdn/src/operations/originGroups.ts +++ b/sdk/cdn/arm-cdn/src/operations/originGroups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -252,7 +251,7 @@ const listByEndpointOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -278,7 +277,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originGroupName, @@ -305,7 +304,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originGroupName, @@ -345,7 +344,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originGroupName, @@ -382,7 +381,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originGroupName, @@ -411,6 +410,9 @@ const listByEndpointNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/origins.ts b/sdk/cdn/arm-cdn/src/operations/origins.ts index 340e6e88b3a4..6cf0cdf7d53c 100644 --- a/sdk/cdn/arm-cdn/src/operations/origins.ts +++ b/sdk/cdn/arm-cdn/src/operations/origins.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -252,7 +251,7 @@ const listByEndpointOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.subscriptionId @@ -278,7 +277,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originName, @@ -305,7 +304,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originName, @@ -345,7 +344,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originName, @@ -382,7 +381,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.endpointName, Parameters.originName, @@ -411,6 +410,9 @@ const listByEndpointNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/policies.ts b/sdk/cdn/arm-cdn/src/operations/policies.ts index 51e412994bdc..1c4b844064ce 100644 --- a/sdk/cdn/arm-cdn/src/operations/policies.ts +++ b/sdk/cdn/arm-cdn/src/operations/policies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -219,7 +218,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName1, Parameters.subscriptionId ], queryParameters: [ @@ -243,7 +242,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName1, Parameters.policyName, Parameters.subscriptionId ], @@ -268,7 +267,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName1, Parameters.policyName, Parameters.subscriptionId ], @@ -292,7 +291,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName1, Parameters.policyName, Parameters.subscriptionId ], @@ -330,7 +329,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName1, Parameters.policyName, Parameters.subscriptionId ], @@ -373,6 +372,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/profiles.ts b/sdk/cdn/arm-cdn/src/operations/profiles.ts index cda521b7a1d0..573dae8d3766 100644 --- a/sdk/cdn/arm-cdn/src/operations/profiles.ts +++ b/sdk/cdn/arm-cdn/src/operations/profiles.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -426,7 +425,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.subscriptionId ], queryParameters: [ @@ -450,7 +449,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -475,7 +474,7 @@ const generateSsoUriOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -500,7 +499,7 @@ const listSupportedOptimizationTypesOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -525,7 +524,7 @@ const listResourceUsageOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -550,7 +549,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -588,7 +587,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -628,7 +627,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", urlParameters: [ - Parameters.resourceGroupName, + Parameters.resourceGroupName0, Parameters.profileName, Parameters.subscriptionId ], @@ -655,6 +654,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -676,6 +678,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -697,6 +702,9 @@ const listResourceUsageNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts b/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts index a8af3311c17b..d801d249f9e6 100644 --- a/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts +++ b/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -111,6 +110,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cdn/arm-cdn/src/operations/routes.ts b/sdk/cdn/arm-cdn/src/operations/routes.ts new file mode 100644 index 000000000000..b4e3523b95f9 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/routes.ts @@ -0,0 +1,436 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/routesMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a Routes. */ +export class Routes { + private readonly client: CdnManagementClientContext; + + /** + * Create a Routes. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the existing origins within a profile. + * @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 route with the specified route name under the specified subscription, resource + * group, profile, and AzureFrontDoor 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 routeName Name of the routing rule. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, endpointName: string, routeName: 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 routeName Name of the routing rule. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, endpointName: string, routeName: 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 routeName Name of the routing rule. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + endpointName, + routeName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new route with the specified route name under the specified subscription, resource + * group, profile, and AzureFrontDoor 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 routeName Name of the routing rule. + * @param route Route properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, route: Models.Route, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,endpointName,routeName,route,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing route with the specified route name under the specified subscription, + * resource group, profile, and AzureFrontDoor 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 routeName Name of the routing rule. + * @param routeUpdateProperties Route update properties + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, routeUpdateProperties: Models.RouteUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,profileName,endpointName,routeName,routeUpdateProperties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing route with the specified route name under the specified subscription, + * resource group, profile, and AzureFrontDoor 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 routeName Name of the routing rule. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,endpointName,routeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new route with the specified route name under the specified subscription, resource + * group, profile, and AzureFrontDoor 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 routeName Name of the routing rule. + * @param route Route properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, route: Models.Route, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + routeName, + route, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing route with the specified route name under the specified subscription, + * resource group, profile, and AzureFrontDoor 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 routeName Name of the routing rule. + * @param routeUpdateProperties Route update properties + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, routeUpdateProperties: Models.RouteUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + routeName, + routeUpdateProperties, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing route with the specified route name under the specified subscription, + * resource group, profile, and AzureFrontDoor 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 routeName Name of the routing rule. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + endpointName, + routeName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all of the existing origins within a profile. + * @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}/afdEndpoints/{endpointName}/routes", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RouteListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.routeName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Route + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.routeName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "route", + mapper: { + ...Mappers.Route, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Route + }, + 201: { + bodyMapper: Mappers.Route + }, + 202: { + bodyMapper: Mappers.Route + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.routeName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "routeUpdateProperties", + mapper: { + ...Mappers.RouteUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Route + }, + 202: { + bodyMapper: Mappers.Route + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.endpointName, + Parameters.routeName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByEndpointNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RouteListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/ruleSets.ts b/sdk/cdn/arm-cdn/src/operations/ruleSets.ts new file mode 100644 index 000000000000..41514fa86c29 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/ruleSets.ts @@ -0,0 +1,448 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/ruleSetsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a RuleSets. */ +export class RuleSets { + private readonly client: CdnManagementClientContext; + + /** + * Create a RuleSets. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * @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 [options] The optional parameters + * @returns Promise + */ + listByProfile(resourceGroupName: string, profileName: 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 callback The callback + */ + listByProfile(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + listByProfile(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfile(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + listByProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified + * subscription, resource group and profile. + * @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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, ruleSetName: 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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, ruleSetName: 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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, ruleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, ruleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + ruleSetName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new rule set within the specified profile. + * @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 ruleSetName Name of the rule set under the profile which is unique globally + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, ruleSetName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,ruleSetName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified + * subscription, resource group and profile. + * @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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, ruleSetName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,ruleSetName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + listResourceUsage(resourceGroupName: string, profileName: string, ruleSetName: 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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param callback The callback + */ + listResourceUsage(resourceGroupName: string, profileName: string, ruleSetName: 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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param options The optional parameters + * @param callback The callback + */ + listResourceUsage(resourceGroupName: string, profileName: string, ruleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsage(resourceGroupName: string, profileName: string, ruleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + ruleSetName, + options + }, + listResourceUsageOperationSpec, + callback) as Promise; + } + + /** + * Creates a new rule set within the specified profile. + * @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 ruleSetName Name of the rule set under the profile which is unique globally + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, ruleSetName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + ruleSetName, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified + * subscription, resource group and profile. + * @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 ruleSetName Name of the rule set under the profile which is unique globally. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, ruleSetName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + ruleSetName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByProfileNext(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 + */ + listByProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Checks the quota and actual usage of endpoints under the given CDN profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listResourceUsageNext(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 + */ + listResourceUsageNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listResourceUsageNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listResourceUsageNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RuleSetListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RuleSet + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listResourceUsageOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "ruleSet", + mapper: { + ...Mappers.RuleSet, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RuleSet + }, + 201: { + bodyMapper: Mappers.RuleSet + }, + 202: { + bodyMapper: Mappers.RuleSet + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RuleSetListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listResourceUsageNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/rules.ts b/sdk/cdn/arm-cdn/src/operations/rules.ts new file mode 100644 index 000000000000..b30e6a376e44 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/rules.ts @@ -0,0 +1,429 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/rulesMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a Rules. */ +export class Rules { + private readonly client: CdnManagementClientContext; + + /** + * Create a Rules. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the existing delivery rules within a rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByRuleSet(resourceGroupName: string, profileName: string, ruleSetName: 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 ruleSetName Name of the rule set under the profile. + * @param callback The callback + */ + listByRuleSet(resourceGroupName: string, profileName: string, ruleSetName: 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 ruleSetName Name of the rule set under the profile. + * @param options The optional parameters + * @param callback The callback + */ + listByRuleSet(resourceGroupName: string, profileName: string, ruleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByRuleSet(resourceGroupName: string, profileName: string, ruleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + ruleSetName, + options + }, + listByRuleSetOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing delivery rule within a rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: 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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: 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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + ruleSetName, + ruleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new delivery rule within the specified rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param rule The delivery rule properties. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, rule: Models.Rule, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,profileName,ruleSetName,ruleName,rule,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing delivery rule within a rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param ruleUpdateProperties Delivery rule properties + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, ruleUpdateProperties: Models.RuleUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,profileName,ruleSetName,ruleName,ruleUpdateProperties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing delivery rule within a rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,ruleSetName,ruleName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new delivery rule within the specified rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param rule The delivery rule properties. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, rule: Models.Rule, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + ruleSetName, + ruleName, + rule, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing delivery rule within a rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param ruleUpdateProperties Delivery rule properties + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, ruleUpdateProperties: Models.RuleUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + ruleSetName, + ruleName, + ruleUpdateProperties, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing delivery rule within a rule set. + * @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 ruleSetName Name of the rule set under the profile. + * @param ruleName Name of the delivery rule which is unique within the endpoint. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + ruleSetName, + ruleName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all of the existing delivery rules within a rule set. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByRuleSetNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByRuleSetNext(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 + */ + listByRuleSetNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByRuleSetNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByRuleSetNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByRuleSetOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RuleListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.ruleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Rule + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.ruleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "rule", + mapper: { + ...Mappers.Rule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Rule + }, + 201: { + bodyMapper: Mappers.Rule + }, + 202: { + bodyMapper: Mappers.Rule + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.ruleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "ruleUpdateProperties", + mapper: { + ...Mappers.RuleUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Rule + }, + 202: { + bodyMapper: Mappers.Rule + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.ruleSetName, + Parameters.ruleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByRuleSetNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RuleListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/secrets.ts b/sdk/cdn/arm-cdn/src/operations/secrets.ts new file mode 100644 index 000000000000..08dbca771caf --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/secrets.ts @@ -0,0 +1,411 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/secretsMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a Secrets. */ +export class Secrets { + private readonly client: CdnManagementClientContext; + + /** + * Create a Secrets. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists existing AzureFrontDoor secrets. + * @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 [options] The optional parameters + * @returns Promise + */ + listByProfile(resourceGroupName: string, profileName: 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 callback The callback + */ + listByProfile(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + listByProfile(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfile(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + listByProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing Secret within a profile. + * @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 secretName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, secretName: 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 secretName Name of the Secret under the profile. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, secretName: 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 secretName Name of the Secret under the profile. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + secretName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new Secret within the specified profile. + * @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 secretName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, secretName: string, options?: Models.SecretsCreateOptionalParams): Promise { + return this.beginCreate(resourceGroupName,profileName,secretName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing Secret within a profile. + * @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 secretName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, profileName: string, secretName: string, options?: Models.SecretsUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,profileName,secretName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Secret within profile. + * @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 secretName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, secretName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,secretName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new Secret within the specified profile. + * @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 secretName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, secretName: string, options?: Models.SecretsBeginCreateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + secretName, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing Secret within a profile. + * @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 secretName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, profileName: string, secretName: string, options?: Models.SecretsBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + secretName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing Secret within profile. + * @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 secretName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, secretName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + secretName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists existing AzureFrontDoor secrets. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByProfileNext(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 + */ + listByProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecretListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.secretName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.secretName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + parameters: [ + "options", + "parameters" + ] + }, + mapper: { + ...Mappers.Secret, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + 201: { + bodyMapper: Mappers.Secret + }, + 202: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.secretName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + parameters: [ + "options", + "parameters" + ] + }, + mapper: { + ...Mappers.SecretProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + 202: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.secretName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecretListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts b/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts new file mode 100644 index 000000000000..0fabf1ee239f --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts @@ -0,0 +1,409 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/securityPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a SecurityPolicies. */ +export class SecurityPolicies { + private readonly client: CdnManagementClientContext; + + /** + * Create a SecurityPolicies. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Lists security policies associated with the profile + * @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 [options] The optional parameters + * @returns Promise + */ + listByProfile(resourceGroupName: string, profileName: 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 callback The callback + */ + listByProfile(resourceGroupName: string, profileName: 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 options The optional parameters + * @param callback The callback + */ + listByProfile(resourceGroupName: string, profileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfile(resourceGroupName: string, profileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + options + }, + listByProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an existing security policy within a profile. + * @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 securityPolicyName Name of the security policy under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, profileName: string, securityPolicyName: 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 securityPolicyName Name of the security policy under the profile. + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, securityPolicyName: 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 securityPolicyName Name of the security policy under the profile. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, profileName: string, securityPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + securityPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new security policy within the specified profile. + * @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 securityPolicyName Name of the security policy under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: Models.SecurityPoliciesCreateOptionalParams): Promise { + return this.beginCreate(resourceGroupName,profileName,securityPolicyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing Secret within a profile. + * @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 securityPolicyName Name of the security policy under the profile. + * @param securityPolicyParameters Security policy update properties + * @param [options] The optional parameters + * @returns Promise + */ + patch(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicyParameters: Models.SecurityPolicyWebApplicationFirewallParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginPatch(resourceGroupName,profileName,securityPolicyName,securityPolicyParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing security policy within profile. + * @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 securityPolicyName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,profileName,securityPolicyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new security policy within the specified profile. + * @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 securityPolicyName Name of the security policy under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: Models.SecurityPoliciesBeginCreateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + securityPolicyName, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates an existing Secret within a profile. + * @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 securityPolicyName Name of the security policy under the profile. + * @param securityPolicyParameters Security policy update properties + * @param [options] The optional parameters + * @returns Promise + */ + beginPatch(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicyParameters: Models.SecurityPolicyWebApplicationFirewallParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + securityPolicyName, + securityPolicyParameters, + options + }, + beginPatchOperationSpec, + options); + } + + /** + * Deletes an existing security policy within profile. + * @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 securityPolicyName Name of the Secret under the profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + profileName, + securityPolicyName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists security policies associated with the profile + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByProfileNext(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 + */ + listByProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityPolicyListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.securityPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityPolicy + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.securityPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + parameters: [ + "options", + "parameters" + ] + }, + mapper: { + ...Mappers.SecurityPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SecurityPolicy + }, + 201: { + bodyMapper: Mappers.SecurityPolicy + }, + 202: { + bodyMapper: Mappers.SecurityPolicy + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginPatchOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.securityPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "securityPolicyParameters", + mapper: { + ...Mappers.SecurityPolicyWebApplicationFirewallParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SecurityPolicy + }, + 202: { + bodyMapper: Mappers.SecurityPolicy + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", + urlParameters: [ + Parameters.resourceGroupName0, + Parameters.profileName, + Parameters.securityPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; + +const listByProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityPolicyListResult + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +}; diff --git a/sdk/cdn/arm-cdn/src/operations/validate.ts b/sdk/cdn/arm-cdn/src/operations/validate.ts new file mode 100644 index 000000000000..ae5836e9b109 --- /dev/null +++ b/sdk/cdn/arm-cdn/src/operations/validate.ts @@ -0,0 +1,97 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/validateMappers"; +import * as Parameters from "../models/parameters"; +import { CdnManagementClientContext } from "../cdnManagementClientContext"; + +/** Class representing a Validate. */ +export class Validate { + private readonly client: CdnManagementClientContext; + + /** + * Create a Validate. + * @param {CdnManagementClientContext} client Reference to the service client. + */ + constructor(client: CdnManagementClientContext) { + this.client = client; + } + + /** + * Validate a Secret in the profile. + * @param secretSource The secret source. + * @param secretType The secret type. Possible values include: 'UrlSigningKey', + * 'ManagedCertificate', 'CustomerCertificate' + * @param [options] The optional parameters + * @returns Promise + */ + secretMethod(secretSource: Models.ResourceReference, secretType: Models.ValidateSecretType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param secretSource The secret source. + * @param secretType The secret type. Possible values include: 'UrlSigningKey', + * 'ManagedCertificate', 'CustomerCertificate' + * @param callback The callback + */ + secretMethod(secretSource: Models.ResourceReference, secretType: Models.ValidateSecretType, callback: msRest.ServiceCallback): void; + /** + * @param secretSource The secret source. + * @param secretType The secret type. Possible values include: 'UrlSigningKey', + * 'ManagedCertificate', 'CustomerCertificate' + * @param options The optional parameters + * @param callback The callback + */ + secretMethod(secretSource: Models.ResourceReference, secretType: Models.ValidateSecretType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + secretMethod(secretSource: Models.ResourceReference, secretType: Models.ValidateSecretType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + secretSource, + secretType, + options + }, + secretMethodOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const secretMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + secretSource: "secretSource", + secretType: "secretType" + }, + mapper: { + ...Mappers.ValidateSecretInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateSecretOutput + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + serializer +};