Skip to content

Commit 696c476

Browse files
author
SDKAuto
committed
CodeGen from PR 18901 in Azure/azure-rest-api-specs
Merge 2783869ac274ab2774ee5c781cedd6b02d9fa112 into 11830d3ce01db4f39a41dc37a86075b125c87fdc
1 parent 79ec9eb commit 696c476

File tree

15 files changed

+333
-148
lines changed

15 files changed

+333
-148
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Release History
2+
3+
## 8.2.0 (2022-05-10)
4+
5+
**Features**
26

7+
- Added Interface TieringPolicy
8+
- Added Type Alias TieringMode
9+
- Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter newestRecoveryPointInArchive
10+
- Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInArchive
11+
- Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInVault
12+
- Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter newestRecoveryPointInArchive
13+
- Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInArchive
14+
- Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInVault
15+
- Interface SubProtectionPolicy has a new optional parameter tieringPolicy
16+
- Added Enum KnownTieringMode
17+
318
## 8.1.1 (2022-04-29)
419

520
**Features**

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Open API 2.0 Specs for Azure RecoveryServices Backup service
1616
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
1717
- Latest versions of Safari, Chrome, Edge and Firefox.
1818

19-
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20-
2119
### Prerequisites
2220

2321
- An [Azure subscription][azure_sub].
@@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this
5149
```javascript
5250
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
5351
const { DefaultAzureCredential } = require("@azure/identity");
54-
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55-
5652
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5753
const client = new RecoveryServicesBackupClient(new DefaultAzureCredential(), subscriptionId);
58-
59-
// For client-side applications running in the browser, use this code instead:
60-
// const credential = new InteractiveBrowserCredential({
61-
// tenantId: "<YOUR_TENANT_ID>",
62-
// clientId: "<YOUR_CLIENT_ID>"
63-
// });
64-
// const client = new RecoveryServicesBackupClient(credential, subscriptionId);
6554
```
6655

6756

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf",
3-
"readme": "specification\\recoveryservicesbackup\\resource-manager\\readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservicesbackup\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
2+
"commit": "395feffd968bd9c073bd575a4fc029b0adda57ec",
3+
"readme": "specification/recoveryservicesbackup/resource-manager/readme.md",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
66
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
7-
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
8-
}
7+
"use": "@autorest/typescript@6.0.0-alpha.16.20220105.1"
8+
}

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for RecoveryServicesBackupClient.",
6-
"version": "8.1.1",
6+
"version": "8.2.0",
77
"engines": {
88
"node": ">=12.0.0"
99
},
1010
"dependencies": {
1111
"@azure/core-lro": "^2.2.0",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
14-
"@azure/core-client": "^1.5.0",
14+
"@azure/core-client": "^1.0.0",
1515
"@azure/core-auth": "^1.3.0",
16-
"@azure/core-rest-pipeline": "^1.8.0",
16+
"@azure/core-rest-pipeline": "^1.1.0",
1717
"tslib": "^2.2.0"
1818
},
1919
"keywords": [
@@ -28,14 +28,14 @@
2828
"module": "./dist-esm/src/index.js",
2929
"types": "./types/arm-recoveryservicesbackup.d.ts",
3030
"devDependencies": {
31-
"@microsoft/api-extractor": "7.18.11",
32-
"@rollup/plugin-commonjs": "^21.0.1",
33-
"@rollup/plugin-json": "^4.1.0",
34-
"@rollup/plugin-multi-entry": "^4.1.0",
35-
"@rollup/plugin-node-resolve": "^13.1.3",
31+
"@microsoft/api-extractor": "^7.18.11",
32+
"@rollup/plugin-commonjs": "11.0.2",
33+
"@rollup/plugin-json": "^4.0.0",
34+
"@rollup/plugin-multi-entry": "^3.0.0",
35+
"@rollup/plugin-node-resolve": "^8.0.0",
3636
"mkdirp": "^1.0.4",
37-
"rollup": "^2.66.1",
38-
"rollup-plugin-sourcemaps": "^0.6.3",
37+
"rollup": "^1.16.3",
38+
"rollup-plugin-sourcemaps": "^0.4.2",
3939
"typescript": "~4.2.0",
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
@@ -98,21 +98,5 @@
9898
"docs": "echo skipped"
9999
},
100100
"sideEffects": false,
101-
"//metadata": {
102-
"constantPaths": [
103-
{
104-
"path": "src/recoveryServicesBackupClient.ts",
105-
"prefix": "packageDetails"
106-
}
107-
]
108-
},
109-
"autoPublish": true,
110-
"//sampleConfiguration": {
111-
"productName": "",
112-
"productSlugs": [
113-
"azure"
114-
],
115-
"disableDocsMs": true,
116-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesbackup?view=azure-node-preview"
117-
}
118-
}
101+
"autoPublish": true
102+
}

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ export type AzureIaaSVMProtectedItem = ProtectedItem & {
215215

216216
// @public
217217
export interface AzureIaaSVMProtectedItemExtendedInfo {
218+
newestRecoveryPointInArchive?: Date;
218219
oldestRecoveryPoint?: Date;
220+
oldestRecoveryPointInArchive?: Date;
221+
oldestRecoveryPointInVault?: Date;
219222
policyInconsistent?: boolean;
220223
recoveryPointCount?: number;
221224
}
@@ -229,6 +232,9 @@ export type AzureIaaSVMProtectionPolicy = ProtectionPolicy & {
229232
instantRPDetails?: InstantRPAdditionalDetails;
230233
schedulePolicy?: SchedulePolicyUnion;
231234
retentionPolicy?: RetentionPolicyUnion;
235+
tieringPolicy?: {
236+
[propertyName: string]: TieringPolicy;
237+
};
232238
instantRpRetentionRangeInDays?: number;
233239
timeZone?: string;
234240
policyType?: IaasvmPolicyType;
@@ -401,7 +407,10 @@ export type AzureVmWorkloadProtectedItem = ProtectedItem & {
401407

402408
// @public
403409
export interface AzureVmWorkloadProtectedItemExtendedInfo {
410+
newestRecoveryPointInArchive?: Date;
404411
oldestRecoveryPoint?: Date;
412+
oldestRecoveryPointInArchive?: Date;
413+
oldestRecoveryPointInVault?: Date;
405414
policyState?: string;
406415
recoveryModel?: string;
407416
recoveryPointCount?: number;
@@ -1670,7 +1679,7 @@ export type IaasVMBackupRequest = BackupRequest & {
16701679

16711680
// @public
16721681
export type IaaSVMContainer = ProtectionContainer & {
1673-
containerType: "IaaSVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines";
1682+
containerType: "IaasVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines";
16741683
virtualMachineId?: string;
16751684
virtualMachineVersion?: string;
16761685
resourceGroup?: string;
@@ -2685,6 +2694,18 @@ export enum KnownSupportStatus {
26852694
Supported = "Supported"
26862695
}
26872696

2697+
// @public
2698+
export enum KnownTieringMode {
2699+
// (undocumented)
2700+
DoNotTier = "DoNotTier",
2701+
// (undocumented)
2702+
Invalid = "Invalid",
2703+
// (undocumented)
2704+
TierAfter = "TierAfter",
2705+
// (undocumented)
2706+
TierRecommended = "TierRecommended"
2707+
}
2708+
26882709
// @public
26892710
export enum KnownType {
26902711
// (undocumented)
@@ -3350,7 +3371,7 @@ export type ProtectedItemUnion = ProtectedItem | AzureFileshareProtectedItem | A
33503371
// @public
33513372
export interface ProtectionContainer {
33523373
backupManagementType?: BackupManagementType;
3353-
containerType: "DPMContainer" | "AzureBackupServerContainer" | "IaaSVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureWorkloadContainer" | "SQLAGWorkLoadContainer" | "AzureSqlContainer" | "StorageContainer" | "VMAppContainer" | "GenericContainer" | "Windows";
3374+
containerType: "DPMContainer" | "AzureBackupServerContainer" | "IaasVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureWorkloadContainer" | "SQLAGWorkLoadContainer" | "AzureSqlContainer" | "StorageContainer" | "VMAppContainer" | "GenericContainer" | "Windows";
33543375
friendlyName?: string;
33553376
healthStatus?: string;
33563377
protectableObjectType?: string;
@@ -4083,6 +4104,9 @@ export interface SubProtectionPolicy {
40834104
policyType?: PolicyType;
40844105
retentionPolicy?: RetentionPolicyUnion;
40854106
schedulePolicy?: SchedulePolicyUnion;
4107+
tieringPolicy?: {
4108+
[propertyName: string]: TieringPolicy;
4109+
};
40864110
}
40874111

40884112
// @public
@@ -4102,6 +4126,16 @@ export interface TargetRestoreInfo {
41024126
targetDirectoryForFileRestore?: string;
41034127
}
41044128

4129+
// @public
4130+
export type TieringMode = string;
4131+
4132+
// @public
4133+
export interface TieringPolicy {
4134+
duration?: number;
4135+
durationType?: RetentionDurationType;
4136+
tieringMode?: TieringMode;
4137+
}
4138+
41054139
// @public
41064140
export interface TokenInformation {
41074141
expiryTimeInUtcTicks?: number;

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/rollup.config.js

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,62 @@ import json from "@rollup/plugin-json";
1414

1515
import nodeBuiltins from "builtin-modules";
1616

17+
/**
18+
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19+
*
20+
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
21+
* __exportStar downleveled helper function to declare its exports which confuses
22+
* rollup's automatic discovery mechanism.
23+
*
24+
* @returns an object reference that can be `...`'d into your cjs() configuration.
25+
*/
26+
export function openTelemetryCommonJs() {
27+
const namedExports = {};
28+
29+
for (const key of [
30+
"@opentelemetry/api",
31+
"@azure/core-tracing/node_modules/@opentelemetry/api"
32+
]) {
33+
namedExports[key] = [
34+
"SpanKind",
35+
"TraceFlags",
36+
"getSpan",
37+
"setSpan",
38+
"SpanStatusCode",
39+
"getSpanContext",
40+
"setSpanContext"
41+
];
42+
}
43+
44+
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45+
46+
for (const version of releasedOpenTelemetryVersions) {
47+
namedExports[
48+
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49+
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50+
] = [
51+
"SpanKind",
52+
"TraceFlags",
53+
"getSpan",
54+
"setSpan",
55+
"StatusCode",
56+
"CanonicalCode",
57+
"getSpanContext",
58+
"setSpanContext"
59+
];
60+
}
61+
62+
return namedExports;
63+
}
64+
1765
// #region Warning Handler
1866

1967
/**
20-
* A function that can determine whether a rollup warning should be ignored. If
68+
* A function that can determine whether a rollupwarning should be ignored. If
2169
* the function returns `true`, then the warning will not be displayed.
2270
*/
2371

24-
function ignoreNiseSinonEval(warning) {
72+
function ignoreNiseSinonEvalWarnings(warning) {
2573
return (
2674
warning.code === "EVAL" &&
2775
warning.id &&
@@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) {
3078
);
3179
}
3280

33-
function ignoreChaiCircularDependency(warning) {
81+
function ignoreChaiCircularDependencyWarnings(warning) {
3482
return (
3583
warning.code === "CIRCULAR_DEPENDENCY" &&
3684
warning.importer && warning.importer.includes("node_modules/chai") === true
3785
);
3886
}
3987

40-
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
88+
const warningInhibitors = [
89+
ignoreChaiCircularDependencyWarnings,
90+
ignoreNiseSinonEvalWarnings
91+
];
4192

4293
/**
4394
* Construct a warning handler for the shared rollup configuration
@@ -71,7 +122,22 @@ function makeBrowserTestConfig() {
71122
nodeResolve({
72123
mainFields: ["module", "browser"]
73124
}),
74-
cjs(),
125+
cjs({
126+
namedExports: {
127+
// Chai's strange internal architecture makes it impossible to statically
128+
// analyze its exports.
129+
chai: [
130+
"version",
131+
"use",
132+
"util",
133+
"config",
134+
"expect",
135+
"should",
136+
"assert"
137+
],
138+
...openTelemetryCommonJs()
139+
}
140+
}),
75141
json(),
76142
sourcemaps()
77143
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@@ -107,7 +173,7 @@ export function makeConfig(pkg, options) {
107173
],
108174
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
109175
preserveSymlinks: false,
110-
plugins: [sourcemaps(), nodeResolve()]
176+
plugins: [sourcemaps(), nodeResolve(), cjs()]
111177
};
112178

113179
const config = [baseConfig];

0 commit comments

Comments
 (0)