Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-cdn] Azure CDN : Update default tag version #2846

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions sdk/cdn/arm-cdn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/cdn/arm-cdn/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
36 changes: 31 additions & 5 deletions sdk/cdn/arm-cdn/src/cdnManagementClient.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -26,17 +25,32 @@ 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;

/**
* Initializes a new instance of the CdnManagementClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Azure Subscription ID.
* @param subscriptionId1 Azure Subscription ID.
* @param apiVersion1 Version of the API to be used with the client request. Current version is
* 2019-09-01.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CdnManagementClientOptions) {
super(credentials, subscriptionId, options);
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, apiVersion1: string, options?: Models.CdnManagementClientOptions) {
super(credentials, subscriptionId, subscriptionId1, apiVersion1, options);
this.profiles = new operations.Profiles(this);
this.endpoints = new operations.Endpoints(this);
this.origins = new operations.Origins(this);
Expand All @@ -45,6 +59,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);
}
Expand Down
22 changes: 17 additions & 5 deletions sdk/cdn/arm-cdn/src/cdnManagementClientContext.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,20 +18,31 @@ export class CdnManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
apiVersion?: string;
subscriptionId1: string;
apiVersion1: string;

/**
* Initializes a new instance of the CdnManagementClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Azure Subscription ID.
* @param subscriptionId1 Azure Subscription ID.
* @param apiVersion1 Version of the API to be used with the client request. Current version is
* 2019-09-01.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CdnManagementClientOptions) {
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, apiVersion1: string, options?: Models.CdnManagementClientOptions) {
if (credentials == undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId == undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}
if (subscriptionId1 == undefined) {
throw new Error('\'subscriptionId1\' cannot be null.');
}
if (apiVersion1 == undefined) {
throw new Error('\'apiVersion1\' cannot be null.');
}

if (!options) {
options = {};
Expand All @@ -44,13 +54,15 @@ 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";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
this.subscriptionId = subscriptionId;
this.subscriptionId1 = subscriptionId1;
this.apiVersion1 = apiVersion1;

if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
Expand Down
128 changes: 128 additions & 0 deletions sdk/cdn/arm-cdn/src/models/aFDCustomDomainsMappers.ts
Original file line number Diff line number Diff line change
@@ -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,
AFDDomainListResult,
AFDDomainUpdateParameters,
AFDEndpoint,
AFDEndpointUpdateParameters,
AfdErrorResponse,
AFDOrigin,
AFDOriginGroup,
AFDOriginGroupUpdateParameters,
AFDOriginUpdateParameters,
BaseResource,
CacheExpirationActionParameters,
CacheKeyQueryStringActionParameters,
CdnEndpoint,
CdnWebApplicationFirewallPolicy,
CdnWebApplicationFirewallPolicyPatchParameters,
CidrIpAddress,
CookiesMatchConditionParameters,
CustomDomain,
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,
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";
Loading