Skip to content
Draft
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
2 changes: 1 addition & 1 deletion sdk/frontdoor/arm-frontdoor/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 4 additions & 5 deletions sdk/frontdoor/arm-frontdoor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-frontdoor

### How to use

#### nodejs - Authentication, client creation and list networkExperimentProfiles as an example written in TypeScript.
#### nodejs - client creation and list networkExperimentProfiles 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 { FrontDoorManagementClient, FrontDoorManagementModels, FrontDoorManagementMappers } from "@azure/arm-frontdoor";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { FrontDoorManagementClient } = require("@azure/arm-frontdoor");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/frontdoor/arm-frontdoor/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
123 changes: 6 additions & 117 deletions sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.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 @@ -11,7 +10,6 @@
import * as msRest from "@azure/ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as Parameters from "./models/parameters";
import * as operations from "./operations";
import { FrontDoorManagementClientContext } from "./frontDoorManagementClientContext";

Expand All @@ -22,6 +20,8 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext {
preconfiguredEndpoints: operations.PreconfiguredEndpoints;
experiments: operations.Experiments;
reports: operations.Reports;
frontDoorNameAvailability: operations.FrontDoorNameAvailability;
frontDoorNameAvailabilityWithSubscription: operations.FrontDoorNameAvailabilityWithSubscription;
frontDoors: operations.FrontDoors;
frontendEndpoints: operations.FrontendEndpoints;
endpoints: operations.Endpoints;
Expand All @@ -42,129 +42,18 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext {
this.preconfiguredEndpoints = new operations.PreconfiguredEndpoints(this);
this.experiments = new operations.Experiments(this);
this.reports = new operations.Reports(this);
this.frontDoorNameAvailability = new operations.FrontDoorNameAvailability(this);
this.frontDoorNameAvailabilityWithSubscription = new operations.FrontDoorNameAvailabilityWithSubscription(this);
this.frontDoors = new operations.FrontDoors(this);
this.frontendEndpoints = new operations.FrontendEndpoints(this);
this.endpoints = new operations.Endpoints(this);
this.rulesEngines = new operations.RulesEngines(this);
this.policies = new operations.Policies(this);
this.managedRuleSets = new operations.ManagedRuleSets(this);
}

/**
* Check the availability of a Front Door resource name.
* @param checkFrontDoorNameAvailabilityInput Input to check.
* @param [options] The optional parameters
* @returns Promise<Models.CheckFrontDoorNameAvailabilityResponse>
*/
checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise<Models.CheckFrontDoorNameAvailabilityResponse>;
/**
* @param checkFrontDoorNameAvailabilityInput Input to check.
* @param callback The callback
*/
checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>): void;
/**
* @param checkFrontDoorNameAvailabilityInput Input to check.
* @param options The optional parameters
* @param callback The callback
*/
checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>): void;
checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>, callback?: msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>): Promise<Models.CheckFrontDoorNameAvailabilityResponse> {
return this.sendOperationRequest(
{
checkFrontDoorNameAvailabilityInput,
options
},
checkFrontDoorNameAvailabilityOperationSpec,
callback) as Promise<Models.CheckFrontDoorNameAvailabilityResponse>;
}

/**
* Check the availability of a Front Door subdomain.
* @param checkFrontDoorNameAvailabilityInput Input to check.
* @param [options] The optional parameters
* @returns Promise<Models.CheckFrontDoorNameAvailabilityWithSubscriptionResponse>
*/
checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise<Models.CheckFrontDoorNameAvailabilityWithSubscriptionResponse>;
/**
* @param checkFrontDoorNameAvailabilityInput Input to check.
* @param callback The callback
*/
checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>): void;
/**
* @param checkFrontDoorNameAvailabilityInput Input to check.
* @param options The optional parameters
* @param callback The callback
*/
checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>): void;
checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>, callback?: msRest.ServiceCallback<Models.CheckNameAvailabilityOutput>): Promise<Models.CheckFrontDoorNameAvailabilityWithSubscriptionResponse> {
return this.sendOperationRequest(
{
checkFrontDoorNameAvailabilityInput,
options
},
checkFrontDoorNameAvailabilityWithSubscriptionOperationSpec,
callback) as Promise<Models.CheckFrontDoorNameAvailabilityWithSubscriptionResponse>;
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const checkFrontDoorNameAvailabilityOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "providers/Microsoft.Network/checkFrontDoorNameAvailability",
queryParameters: [
Parameters.apiVersion1
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "checkFrontDoorNameAvailabilityInput",
mapper: {
...Mappers.CheckNameAvailabilityInput,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.CheckNameAvailabilityOutput
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};

const checkFrontDoorNameAvailabilityWithSubscriptionOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability",
urlParameters: [
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion1
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "checkFrontDoorNameAvailabilityInput",
mapper: {
...Mappers.CheckNameAvailabilityInput,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.CheckNameAvailabilityOutput
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};

export {
FrontDoorManagementClient,
Expand Down
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 Down
4 changes: 2 additions & 2 deletions sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -48,10 +48,14 @@ export {
Resource,
RouteConfiguration,
RoutingRule,
RoutingRuleLink,
RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink,
RulesEngine,
RulesEngineAction,
RulesEngineMatchCondition,
RulesEngineRule,
SecurityPolicyLink,
Sku,
SubResource,
Timeseries,
TimeseriesDataPoint,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* 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,
CheckNameAvailabilityInput,
CheckNameAvailabilityOutput,
ErrorResponse
} from "../models/mappers";
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* 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,
CheckNameAvailabilityInput,
CheckNameAvailabilityOutput,
ErrorResponse
} from "../models/mappers";
8 changes: 6 additions & 2 deletions sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -47,10 +47,14 @@ export {
Resource,
RouteConfiguration,
RoutingRule,
RoutingRuleLink,
RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink,
RulesEngine,
RulesEngineAction,
RulesEngineMatchCondition,
RulesEngineRule,
SecurityPolicyLink,
Sku,
SubResource,
Timeseries,
TimeseriesDataPoint,
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -47,10 +47,14 @@ export {
Resource,
RouteConfiguration,
RoutingRule,
RoutingRuleLink,
RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink,
RulesEngine,
RulesEngineAction,
RulesEngineMatchCondition,
RulesEngineRule,
SecurityPolicyLink,
Sku,
SubResource,
Timeseries,
TimeseriesDataPoint,
Expand Down
Loading