diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 270ac1d12aa9..05935731957d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1828,6 +1828,16 @@ packages: lodash: 4.17.21 dev: false + /@microsoft/api-extractor-model@7.28.2(@types/node@14.18.63): + resolution: {integrity: sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.61.0(@types/node@14.18.63) + transitivePeerDependencies: + - '@types/node' + dev: false + /@microsoft/api-extractor-model@7.28.2(@types/node@16.18.55): resolution: {integrity: sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==} dependencies: @@ -1838,6 +1848,26 @@ packages: - '@types/node' dev: false + /@microsoft/api-extractor@7.38.0(@types/node@14.18.63): + resolution: {integrity: sha512-e1LhZYnfw+JEebuY2bzhw0imDCl1nwjSThTrQqBXl40hrVo6xm3j/1EpUr89QyzgjqmAwek2ZkIVZbrhaR+cqg==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.28.2(@types/node@14.18.63) + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.61.0(@types/node@14.18.63) + '@rushstack/rig-package': 0.5.1 + '@rushstack/ts-command-line': 4.16.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.6 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.0.4 + transitivePeerDependencies: + - '@types/node' + dev: false + /@microsoft/api-extractor@7.38.0(@types/node@16.18.55): resolution: {integrity: sha512-e1LhZYnfw+JEebuY2bzhw0imDCl1nwjSThTrQqBXl40hrVo6xm3j/1EpUr89QyzgjqmAwek2ZkIVZbrhaR+cqg==} hasBin: true @@ -2486,6 +2516,24 @@ packages: rollup: 3.29.4 dev: false + /@rushstack/node-core-library@3.61.0(@types/node@14.18.63): + resolution: {integrity: sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@types/node': 14.18.63 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.6 + semver: 7.5.4 + z-schema: 5.0.5 + dev: false + /@rushstack/node-core-library@3.61.0(@types/node@16.18.55): resolution: {integrity: sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==} peerDependencies: @@ -4018,7 +4066,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug@3.2.7: @@ -4270,7 +4318,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231011 + typescript: 5.3.0-dev.20231015 dev: false /eastasianwidth@0.2.0: @@ -8841,6 +8889,37 @@ packages: code-block-writer: 12.0.0 dev: false + /ts-node@10.9.1(@types/node@14.18.63)(typescript@5.0.4): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 14.18.63 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.0.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.1(@types/node@16.18.55)(typescript@5.0.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -9014,8 +9093,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231011: - resolution: {integrity: sha512-qpyUI7J37X3Xj7/bPWSNPUvmJ8yDGVnkQ8665xD4+LVWKUX7vwO7n2E1CUuQzeQIF4y369iPaz1d396rTW5LfA==} + /typescript@5.3.0-dev.20231015: + resolution: {integrity: sha512-JAygGSVZ9qp1MlY8UH49GiUIM+R7P7QUu23/IymTR1fgnWypMnR354jHIJSr8bD2uDQfVsEV/SezM9PZshwEyQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -15268,32 +15347,34 @@ packages: dev: false file:projects/arm-resourcehealth.tgz: - resolution: {integrity: sha512-flpWBgoKofc9qBaocSFiqZEcbWqwHSF/TZWC4+usnMFFMQZK3vkPbDlwXHm7c38zFVLI3TSghk2SB3IfSTobAg==, tarball: file:projects/arm-resourcehealth.tgz} + resolution: {integrity: sha512-mZfh2zFh8XWMT5brtfLfXN7xvLk+/E2eNARIOwXZ0+Tnz35sqj3i8C8O3Bi04KTAzy38ltHqCOkowsg+J6Mxzg==, tarball: file:projects/arm-resourcehealth.tgz} name: '@rush-temp/arm-resourcehealth' version: 0.0.0 dependencies: - '@microsoft/api-extractor': 7.38.0(@types/node@16.18.55) + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.38.0(@types/node@14.18.63) '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) '@rollup/plugin-json': 6.0.0(rollup@2.79.1) '@rollup/plugin-multi-entry': 6.0.0(rollup@2.79.1) '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) '@types/chai': 4.3.6 - '@types/node': 16.18.55 + '@types/node': 14.18.63 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 mkdirp: 2.1.6 - mocha: 10.2.0 - rimraf: 3.0.2 + mocha: 7.2.0 + rimraf: 5.0.5 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3(@types/node@16.18.55)(rollup@2.79.1) - ts-node: 10.9.1(@types/node@16.18.55)(typescript@5.0.4) + rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.63)(rollup@2.79.1) + ts-node: 10.9.1(@types/node@14.18.63)(typescript@5.0.4) tslib: 2.6.2 typescript: 5.0.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' + - supports-color dev: false file:projects/arm-resourcemover.tgz: @@ -17290,7 +17371,7 @@ packages: dev: false file:projects/communication-sms.tgz: - resolution: {integrity: sha512-Zy9WPrxVxDAuq5iLYpiy+HF8IQkHW5qHW8lvszMJ0eKWAWOgTgtr60bcu7A83DWz2vWBXRsGUWKaNqS3yUqOmA==, tarball: file:projects/communication-sms.tgz} + resolution: {integrity: sha512-HPqBjVlUjJug38F2I1GghNK4OH69dfIymbHuB2zKRL+PPuX3EaSSDLRPoJm9FLQke6nSh15tekNMhtT0Mzbr1g==, tarball: file:projects/communication-sms.tgz} name: '@rush-temp/communication-sms' version: 0.0.0 dependencies: @@ -18785,7 +18866,7 @@ packages: '@azure/msal-browser': 3.2.0 '@azure/msal-common': 13.3.0 '@azure/msal-node': 2.2.0 - '@microsoft/api-extractor': 7.38.0(@types/node@16.18.58) + '@microsoft/api-extractor': 7.38.0(@types/node@16.18.55) '@types/chai': 4.3.6 '@types/jsonwebtoken': 9.0.3 '@types/jws': 3.2.6 diff --git a/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md index cbe644cc6c91..f066d1fa9857 100644 --- a/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md +++ b/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md @@ -1,15 +1,26 @@ # Release History + +## 5.0.0-beta.1 (2023-10-16) + +**Features** -## 4.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Type Alias EventSubTypeValues + - Interface Event_2 has a new optional parameter argQuery + - Interface Event_2 has a new optional parameter eventSubType + - Interface Event_2 has a new optional parameter maintenanceId + - Interface Event_2 has a new optional parameter maintenanceType + - Interface EventImpactedResource has a new optional parameter maintenanceEndTime + - Interface EventImpactedResource has a new optional parameter maintenanceStartTime + - Interface EventImpactedResource has a new optional parameter resourceGroup + - Interface EventImpactedResource has a new optional parameter resourceName + - Interface EventImpactedResource has a new optional parameter status + - Added Enum KnownEventSubTypeValues -### Other Changes +**Breaking Changes** + - Class MicrosoftResourceHealth has a new signature + + ## 4.0.0 (2023-05-12) **Features** @@ -159,4 +170,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/resourcehealth/arm-resourcehealth/README.md b/sdk/resourcehealth/arm-resourcehealth/README.md index 00c23d812391..2b7431c61050 100644 --- a/sdk/resourcehealth/arm-resourcehealth/README.md +++ b/sdk/resourcehealth/arm-resourcehealth/README.md @@ -6,7 +6,7 @@ The Resource Health Client. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcehealth/arm-resourcehealth) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-resourcehealth) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-resourcehealth) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-resourcehealth?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/resourcehealth/arm-resourcehealth/_meta.json b/sdk/resourcehealth/arm-resourcehealth/_meta.json index 0fcb29de6f68..6dfb1f521a6b 100644 --- a/sdk/resourcehealth/arm-resourcehealth/_meta.json +++ b/sdk/resourcehealth/arm-resourcehealth/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1c3433247689aa55d7ecdd213505dc28c035f2b9", + "commit": "0c115976508540feb1ecb3216b1d875d4ad1bb48", "readme": "specification/resourcehealth/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\\resourcehealth\\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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resourcehealth/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "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.2", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/resourcehealth/arm-resourcehealth/package.json b/sdk/resourcehealth/arm-resourcehealth/package.json index 112f8bc2ef16..d2608f31ebac 100644 --- a/sdk/resourcehealth/arm-resourcehealth/package.json +++ b/sdk/resourcehealth/arm-resourcehealth/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MicrosoftResourceHealth.", - "version": "4.0.1", + "version": "5.0.0-beta.1", "engines": { - "node": ">=16.0.0" + "node": ">=14.0.0" }, "dependencies": { "@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-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -36,18 +36,18 @@ "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", - "@azure/identity": "^3.3.0", + "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", - "mocha": "^10.0.0", + "mocha": "^7.1.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "@types/node": "^16.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "@types/node": "^14.0.0", + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -82,7 +82,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -110,13 +110,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcehealth/arm-resourcehealth", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resourcehealth?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcehealth/arm-resourcehealth" +} \ No newline at end of file diff --git a/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md b/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md index 2fe1bc4e41d9..e09c298d90ca 100644 --- a/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md +++ b/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md @@ -234,6 +234,7 @@ export interface ErrorResponse { // @public interface Event_2 extends ProxyResource { additionalInformation?: EventPropertiesAdditionalInformation; + argQuery?: string; article?: EventPropertiesArticle; description?: string; duration?: number; @@ -241,6 +242,7 @@ interface Event_2 extends ProxyResource { enableMicrosoftSupport?: boolean; eventLevel?: EventLevelValues; eventSource?: EventSourceValues; + eventSubType?: EventSubTypeValues; eventType?: EventTypeValues; externalIncidentId?: string; faqs?: Faq[]; @@ -254,6 +256,8 @@ interface Event_2 extends ProxyResource { lastUpdateTime?: Date; level?: LevelValues; links?: Link[]; + maintenanceId?: string; + maintenanceType?: string; platformInitiated?: boolean; priority?: number; reason?: string; @@ -299,6 +303,11 @@ export type EventGetByTenantIdAndTrackingIdResponse = Event_2; // @public export interface EventImpactedResource extends ProxyResource { info?: KeyValueItem[]; + readonly maintenanceEndTime?: string; + readonly maintenanceStartTime?: string; + readonly resourceGroup?: string; + readonly resourceName?: string; + readonly status?: string; readonly targetRegion?: string; readonly targetResourceId?: string; readonly targetResourceType?: string; @@ -412,6 +421,9 @@ export type EventSourceValues = string; // @public export type EventStatusValues = string; +// @public +export type EventSubTypeValues = string; + // @public export type EventTypeValues = string; @@ -553,6 +565,11 @@ export enum KnownEventStatusValues { Resolved = "Resolved" } +// @public +export enum KnownEventSubTypeValues { + Retirement = "Retirement" +} + // @public export enum KnownEventTypeValues { EmergingIssues = "EmergingIssues", @@ -686,6 +703,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: MicrosoftResourceHealthOptionalParams); // (undocumented) apiVersion: string; // (undocumented) @@ -709,7 +727,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { // (undocumented) securityAdvisoryImpactedResources: SecurityAdvisoryImpactedResources; // (undocumented) - subscriptionId: string; + subscriptionId?: string; } // @public diff --git a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts index 8b0b0805029f..bf7c5b5c86fc 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts @@ -43,7 +43,7 @@ import { MicrosoftResourceHealthOptionalParams } from "./models"; export class MicrosoftResourceHealth extends coreClient.ServiceClient { $host: string; apiVersion: string; - subscriptionId: string; + subscriptionId?: string; /** * Initializes a new instance of the MicrosoftResourceHealth class. @@ -55,12 +55,26 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: MicrosoftResourceHealthOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: MicrosoftResourceHealthOptionalParams | string, + options?: MicrosoftResourceHealthOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -72,7 +86,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-resourcehealth/4.0.1`; + const packageDetails = `azsdk-js-arm-resourcehealth/5.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -125,7 +139,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-10-01"; + this.apiVersion = options.apiVersion || "2023-10-01-preview"; this.availabilityStatuses = new AvailabilityStatusesImpl(this); this.operations = new OperationsImpl(this); this.metadata = new MetadataImpl(this); diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts index 92b42f4b0a75..2c805f42c403 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts @@ -453,6 +453,31 @@ export interface EventImpactedResource extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly targetRegion?: string; + /** + * Resource name of the impacted resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceName?: string; + /** + * Resource group name of the impacted resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceGroup?: string; + /** + * Status of the impacted resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Start time of maintenance for the impacted resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maintenanceStartTime?: string; + /** + * End time of maintenance for the impacted resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maintenanceEndTime?: string; /** Additional information. */ info?: KeyValueItem[]; } @@ -461,6 +486,8 @@ export interface EventImpactedResource extends ProxyResource { export interface Event extends ProxyResource { /** Type of event. */ eventType?: EventTypeValues; + /** Sub type of the event. Currently used to determine retirement communications for health advisory events */ + eventSubType?: EventSubTypeValues; /** Source of event. */ eventSource?: EventSourceValues; /** Current status of event. */ @@ -515,6 +542,12 @@ export interface Event extends ProxyResource { duration?: number; /** The type of the impact */ impactType?: string; + /** Unique identifier for planned maintenance event. */ + maintenanceId?: string; + /** The type of planned maintenance event. */ + maintenanceType?: string; + /** Azure Resource Graph query to fetch the affected resources from their existing Azure Resource Graph locations. */ + argQuery?: string; } /** The Get EmergingIssues operation response. */ @@ -652,6 +685,21 @@ export enum KnownEventTypeValues { */ export type EventTypeValues = string; +/** Known values of {@link EventSubTypeValues} that the service accepts. */ +export enum KnownEventSubTypeValues { + /** Retirement */ + Retirement = "Retirement" +} + +/** + * Defines values for EventSubTypeValues. \ + * {@link KnownEventSubTypeValues} can be used interchangeably with EventSubTypeValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Retirement** + */ +export type EventSubTypeValues = string; + /** Known values of {@link EventSourceValues} that the service accepts. */ export enum KnownEventSourceValues { /** ResourceHealth */ diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts index 6ee8e9eb11d0..1adb39226f8a 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts @@ -1265,6 +1265,41 @@ export const EventImpactedResource: coreClient.CompositeMapper = { name: "String" } }, + resourceName: { + serializedName: "properties.resourceName", + readOnly: true, + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "properties.resourceGroup", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + maintenanceStartTime: { + serializedName: "properties.maintenanceStartTime", + readOnly: true, + type: { + name: "String" + } + }, + maintenanceEndTime: { + serializedName: "properties.maintenanceEndTime", + readOnly: true, + type: { + name: "String" + } + }, info: { serializedName: "properties.info", type: { @@ -1293,6 +1328,12 @@ export const Event: coreClient.CompositeMapper = { name: "String" } }, + eventSubType: { + serializedName: "properties.eventSubType", + type: { + name: "String" + } + }, eventSource: { serializedName: "properties.eventSource", type: { @@ -1475,6 +1516,24 @@ export const Event: coreClient.CompositeMapper = { type: { name: "String" } + }, + maintenanceId: { + serializedName: "properties.maintenanceId", + type: { + name: "String" + } + }, + maintenanceType: { + serializedName: "properties.maintenanceType", + type: { + name: "String" + } + }, + argQuery: { + serializedName: "properties.argQuery", + type: { + name: "String" + } } } } diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts index d9cf79fdfa88..2c69896038b4 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts @@ -39,7 +39,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-10-01", + defaultValue: "2023-10-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/resourcehealth/arm-resourcehealth/test/sampleTest.ts b/sdk/resourcehealth/arm-resourcehealth/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/resourcehealth/arm-resourcehealth/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/resourcehealth/arm-resourcehealth/tsconfig.json b/sdk/resourcehealth/arm-resourcehealth/tsconfig.json index 8db259768606..3e6ae96443f3 100644 --- a/sdk/resourcehealth/arm-resourcehealth/tsconfig.json +++ b/sdk/resourcehealth/arm-resourcehealth/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-resourcehealth": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"