Skip to content

Commit

Permalink
[mgmt] frontdoor release (#29249)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazrael2119 authored Apr 15, 2024
1 parent d6cbc82 commit 6d6a251
Show file tree
Hide file tree
Showing 135 changed files with 2,729 additions and 2,434 deletions.
7 changes: 4 additions & 3 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 24 additions & 10 deletions sdk/frontdoor/arm-frontdoor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
# Release History

## 5.3.0 (2024-04-15)

**Features**

## 5.2.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added Interface GroupByVariable
- Added Interface WebApplicationFirewallScrubbingRules
- Added Type Alias ScrubbingRuleEntryMatchOperator
- Added Type Alias ScrubbingRuleEntryMatchVariable
- Added Type Alias ScrubbingRuleEntryState
- Added Type Alias VariableName
- Added Type Alias WebApplicationFirewallScrubbingState
- Interface CustomRule has a new optional parameter groupBy
- Interface PolicySettings has a new optional parameter javascriptChallengeExpirationInMinutes
- Interface PolicySettings has a new optional parameter scrubbingRules
- Interface PolicySettings has a new optional parameter state
- Added Enum KnownScrubbingRuleEntryMatchOperator
- Added Enum KnownScrubbingRuleEntryMatchVariable
- Added Enum KnownScrubbingRuleEntryState
- Added Enum KnownVariableName
- Added Enum KnownWebApplicationFirewallScrubbingState
- Enum KnownActionType has a new value JSChallenge
- Class FrontDoorManagementClient has a new signature


## 5.2.0 (2023-05-09)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/frontdoor/arm-frontdoor/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Microsoft
Copyright (c) 2024 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
8 changes: 4 additions & 4 deletions sdk/frontdoor/arm-frontdoor/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "d5c8648e01a2a2a743c2649c9522d21f5db952ce",
"commit": "b54ffc9278eff071455b1dbb4ad2e772afce885d",
"readme": "specification/frontdoor/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\frontdoor\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\frontdoor\\resource-manager\\readme.md --use=@autorest/typescript@6.0.20 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/typescript@6.0.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.5",
"use": "@autorest/typescript@6.0.20"
}
20 changes: 10 additions & 10 deletions sdk/frontdoor/arm-frontdoor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for FrontDoorManagementClient.",
"version": "5.2.1",
"version": "5.3.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.0",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -30,21 +30,22 @@
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"mkdirp": "^2.1.2",
"typescript": "~5.4.5",
"typescript": "~5.3.3",
"uglify-js": "^3.4.9",
"rimraf": "^5.0.5",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"esm": "^3.2.18",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0",
"@types/mocha": "^10.0.0"
"ts-node": "^10.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -77,7 +78,6 @@
"pack": "npm pack 2>&1",
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
Expand Down
72 changes: 71 additions & 1 deletion sdk/frontdoor/arm-frontdoor/review/arm-frontdoor.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export type CustomHttpsProvisioningSubstate = string;
export interface CustomRule {
action: ActionType;
enabledState?: CustomRuleEnabledState;
groupBy?: GroupByVariable[];
matchConditions: MatchCondition[];
name?: string;
priority: number;
Expand Down Expand Up @@ -343,6 +344,7 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: FrontDoorManagementClientOptionalParams);
constructor(credentials: coreAuth.TokenCredential, options?: FrontDoorManagementClientOptionalParams);
// (undocumented)
endpoints: Endpoints;
// (undocumented)
Expand All @@ -368,7 +370,7 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient {
// (undocumented)
rulesEngines: RulesEngines;
// (undocumented)
subscriptionId: string;
subscriptionId?: string;
}

// @public
Expand Down Expand Up @@ -604,6 +606,11 @@ export interface FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLin
// @public
export function getContinuationToken(page: unknown): string | undefined;

// @public
export interface GroupByVariable {
variableName: VariableName;
}

// @public
export interface HeaderAction {
headerActionType: HeaderActionType;
Expand Down Expand Up @@ -659,6 +666,7 @@ export enum KnownActionType {
Allow = "Allow",
AnomalyScoring = "AnomalyScoring",
Block = "Block",
JSChallenge = "JSChallenge",
Log = "Log",
Redirect = "Redirect"
}
Expand Down Expand Up @@ -995,6 +1003,29 @@ export enum KnownRuleType {
RateLimitRule = "RateLimitRule"
}

// @public
export enum KnownScrubbingRuleEntryMatchOperator {
Equals = "Equals",
EqualsAny = "EqualsAny"
}

// @public
export enum KnownScrubbingRuleEntryMatchVariable {
QueryStringArgNames = "QueryStringArgNames",
RequestBodyJsonArgNames = "RequestBodyJsonArgNames",
RequestBodyPostArgNames = "RequestBodyPostArgNames",
RequestCookieNames = "RequestCookieNames",
RequestHeaderNames = "RequestHeaderNames",
RequestIPAddress = "RequestIPAddress",
RequestUri = "RequestUri"
}

// @public
export enum KnownScrubbingRuleEntryState {
Disabled = "Disabled",
Enabled = "Enabled"
}

// @public
export enum KnownSessionAffinityEnabledState {
Disabled = "Disabled",
Expand Down Expand Up @@ -1048,6 +1079,19 @@ export enum KnownTransformType {
UrlEncode = "UrlEncode"
}

// @public
export enum KnownVariableName {
GeoLocation = "GeoLocation",
None = "None",
SocketAddr = "SocketAddr"
}

// @public
export enum KnownWebApplicationFirewallScrubbingState {
Disabled = "Disabled",
Enabled = "Enabled"
}

// @public
export interface LatencyMetric {
readonly aCLower95CI?: number;
Expand Down Expand Up @@ -1392,9 +1436,12 @@ export interface PolicySettings {
customBlockResponseBody?: string;
customBlockResponseStatusCode?: number;
enabledState?: PolicyEnabledState;
javascriptChallengeExpirationInMinutes?: number;
mode?: PolicyMode;
redirectUrl?: string;
requestBodyCheck?: PolicyRequestBodyCheck;
scrubbingRules?: WebApplicationFirewallScrubbingRules[];
state?: WebApplicationFirewallScrubbingState;
}

// @public
Expand Down Expand Up @@ -1671,6 +1718,15 @@ export interface RulesEngineUpdateParameters {
// @public
export type RuleType = string;

// @public
export type ScrubbingRuleEntryMatchOperator = string;

// @public
export type ScrubbingRuleEntryMatchVariable = string;

// @public
export type ScrubbingRuleEntryState = string;

// @public
export interface SecurityPolicyLink {
id?: string;
Expand Down Expand Up @@ -1743,6 +1799,9 @@ export interface ValidateCustomDomainOutput {
readonly reason?: string;
}

// @public
export type VariableName = string;

// @public
export interface WebApplicationFirewallPolicy extends Resource {
customRules?: CustomRuleList;
Expand All @@ -1763,6 +1822,17 @@ export interface WebApplicationFirewallPolicyList {
readonly value?: WebApplicationFirewallPolicy[];
}

// @public
export interface WebApplicationFirewallScrubbingRules {
matchVariable: ScrubbingRuleEntryMatchVariable;
selector?: string;
selectorMatchOperator: ScrubbingRuleEntryMatchOperator;
state?: ScrubbingRuleEntryState;
}

// @public
export type WebApplicationFirewallScrubbingState = string;

// (No @packageDocumentation comment for this package)

```
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
PurgeParameters,
FrontDoorManagementClient
FrontDoorManagementClient,
} from "@azure/arm-frontdoor";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
Expand All @@ -28,14 +28,14 @@ async function purgeContentFromFrontDoor() {
const resourceGroupName = process.env["FRONTDOOR_RESOURCE_GROUP"] || "rg1";
const frontDoorName = "frontDoor1";
const contentFilePaths: PurgeParameters = {
contentPaths: ["/pictures.aspx", "/pictures/*"]
contentPaths: ["/pictures.aspx", "/pictures/*"],
};
const credential = new DefaultAzureCredential();
const client = new FrontDoorManagementClient(credential, subscriptionId);
const result = await client.endpoints.beginPurgeContentAndWait(
resourceGroupName,
frontDoorName,
contentFilePaths
contentFilePaths,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ async function createsAnExperiment() {
description: "this is my first experiment!",
enabledState: "Enabled",
endpointA: { name: "endpoint A", endpoint: "endpointA.net" },
endpointB: { name: "endpoint B", endpoint: "endpointB.net" }
endpointB: { name: "endpoint B", endpoint: "endpointB.net" },
};
const credential = new DefaultAzureCredential();
const client = new FrontDoorManagementClient(credential, subscriptionId);
const result = await client.experiments.beginCreateOrUpdateAndWait(
resourceGroupName,
profileName,
experimentName,
parameters
parameters,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function deletesAnExperiment() {
const result = await client.experiments.beginDeleteAndWait(
resourceGroupName,
profileName,
experimentName
experimentName,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function getsAnExperimentByExperimentName() {
const result = await client.experiments.get(
resourceGroupName,
profileName,
experimentName
experimentName,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function getsAListOfExperiments() {
const resArray = new Array();
for await (let item of client.experiments.listByProfile(
resourceGroupName,
profileName
profileName,
)) {
resArray.push(item);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
ExperimentUpdateModel,
FrontDoorManagementClient
FrontDoorManagementClient,
} from "@azure/arm-frontdoor";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
Expand All @@ -31,15 +31,15 @@ async function updatesAnExperiment() {
const experimentName = "MyExperiment";
const parameters: ExperimentUpdateModel = {
description: "string",
enabledState: "Enabled"
enabledState: "Enabled",
};
const credential = new DefaultAzureCredential();
const client = new FrontDoorManagementClient(credential, subscriptionId);
const result = await client.experiments.beginUpdateAndWait(
resourceGroupName,
profileName,
experimentName,
parameters
parameters,
);
console.log(result);
}
Expand Down
Loading

0 comments on commit 6d6a251

Please sign in to comment.