diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 10d96b0c0283..bdf09aa5ea6d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -11721,22 +11721,22 @@ packages: dev: false file:projects/arm-resourcehealth.tgz: - resolution: {integrity: sha512-GZev25KcbYlDe8ZP2ke0anCKhk0WUjEyvAHNo+O5uh+LyF7zQwbsz/hZI7jM8Q1tvNEeprrAMApnSwWfCI47qw==, tarball: file:projects/arm-resourcehealth.tgz} + resolution: {integrity: sha512-ssLCh8GgbsVtwLFyE5qlPtC6OjpWdCtYeIbKxvNKerfJOMH/Vb15Osy2TMpWEvUmLPSSeyiRXz5ZBMYg+AKK5g==, tarball: file:projects/arm-resourcehealth.tgz} name: '@rush-temp/arm-resourcehealth' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 diff --git a/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md index 72ce661de1af..5f236cdfd98b 100644 --- a/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md +++ b/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md @@ -1,15 +1,63 @@ # Release History + +## 4.0.0 (2022-02-25) + +**Features** -## 3.0.1 (Unreleased) + - Added operation group EventsOperations + - Added Interface AvailabilityStatusPropertiesRecentlyResolved + - Added Interface EventPropertiesArticle + - Added Interface EventPropertiesRecommendedActions + - Added Interface EventPropertiesRecommendedActionsItem + - Added Interface Events + - Added Interface EventsListBySingleResourceNextOptionalParams + - Added Interface EventsListBySingleResourceOptionalParams + - Added Interface EventsListBySubscriptionIdNextOptionalParams + - Added Interface EventsListBySubscriptionIdOptionalParams + - Added Interface Faq + - Added Interface Impact + - Added Interface ImpactedServiceRegion + - Added Interface Link + - Added Interface LinkDisplayText + - Added Interface MetadataEntityListResult + - Added Interface MetadataSupportedValueDetail + - Added Interface Update + - Added Type Alias Event_2 + - Added Type Alias EventLevelValues + - Added Type Alias EventsListBySingleResourceNextResponse + - Added Type Alias EventsListBySingleResourceResponse + - Added Type Alias EventsListBySubscriptionIdNextResponse + - Added Type Alias EventsListBySubscriptionIdResponse + - Added Type Alias EventSourceValues + - Added Type Alias EventStatusValues + - Added Type Alias EventTypeValues + - Added Type Alias LevelValues + - Added Type Alias LinkTypeValues + - Added Type Alias MetadataEntity + - Added Type Alias Scenario + - Interface AvailabilityStatusProperties has a new optional parameter occurredTime + - Interface AvailabilityStatusProperties has a new optional parameter recentlyResolved + - Class MicrosoftResourceHealth has a new parameter eventsOperations + - Added Enum KnownAvailabilityStateValues + - Added Enum KnownEventLevelValues + - Added Enum KnownEventSourceValues + - Added Enum KnownEventStatusValues + - Added Enum KnownEventTypeValues + - Added Enum KnownLevelValues + - Added Enum KnownLinkTypeValues + - Added Enum KnownReasonChronicityTypes + - Added Enum KnownScenario -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +**Breaking Changes** + - Removed operation group ChildAvailabilityStatuses + - Removed operation group ChildResources + - Interface AvailabilityStatusProperties no longer has parameter occuredTime + - Interface AvailabilityStatusProperties no longer has parameter recentlyResolvedState + - Class MicrosoftResourceHealth no longer has parameter childAvailabilityStatuses + - Class MicrosoftResourceHealth no longer has parameter childResources + + ## 3.0.0 (2021-12-22) The package of @azure/arm-resourcehealth is using our next generation design principles since version 3.0.0, which contains breaking changes. diff --git a/sdk/resourcehealth/arm-resourcehealth/LICENSE b/sdk/resourcehealth/arm-resourcehealth/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/resourcehealth/arm-resourcehealth/LICENSE +++ b/sdk/resourcehealth/arm-resourcehealth/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 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 diff --git a/sdk/resourcehealth/arm-resourcehealth/_meta.json b/sdk/resourcehealth/arm-resourcehealth/_meta.json index 0cdde8da8bfa..83a715839c89 100644 --- a/sdk/resourcehealth/arm-resourcehealth/_meta.json +++ b/sdk/resourcehealth/arm-resourcehealth/_meta.json @@ -1,7 +1,7 @@ { - "commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf", + "commit": "a505022a2a7498bdc4e180e4dc8b4b804cc0bbe5", "readme": "specification/resourcehealth/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/resourcehealth/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", + "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=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resourcehealth/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/resourcehealth/arm-resourcehealth/api-extractor.json b/sdk/resourcehealth/arm-resourcehealth/api-extractor.json index 3274873e39b2..b60ec4d5ce87 100644 --- a/sdk/resourcehealth/arm-resourcehealth/api-extractor.json +++ b/sdk/resourcehealth/arm-resourcehealth/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-resourcehealth.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/resourcehealth/arm-resourcehealth/package.json b/sdk/resourcehealth/arm-resourcehealth/package.json index 08b405495d09..7af2347f2256 100644 --- a/sdk/resourcehealth/arm-resourcehealth/package.json +++ b/sdk/resourcehealth/arm-resourcehealth/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MicrosoftResourceHealth.", - "version": "3.0.1", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -27,12 +27,12 @@ "types": "./types/arm-resourcehealth.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -97,4 +97,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ 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 9a5fcdf23ee2..4e5176d48213 100644 --- a/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md +++ b/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md @@ -9,7 +9,7 @@ import * as coreClient from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; // @public -export type AvailabilityStateValues = "Available" | "Unavailable" | "Unknown"; +export type AvailabilityStateValues = string; // @public export interface AvailabilityStatus { @@ -105,10 +105,10 @@ export interface AvailabilityStatusProperties { healthEventCause?: string; healthEventId?: string; healthEventType?: string; - occuredTime?: Date; + occurredTime?: Date; reasonChronicity?: ReasonChronicityTypes; reasonType?: string; - recentlyResolvedState?: AvailabilityStatusPropertiesRecentlyResolvedState; + recentlyResolved?: AvailabilityStatusPropertiesRecentlyResolved; recommendedActions?: RecommendedAction[]; reportedTime?: Date; resolutionETA?: Date; @@ -118,120 +118,185 @@ export interface AvailabilityStatusProperties { } // @public -export interface AvailabilityStatusPropertiesRecentlyResolvedState { +export interface AvailabilityStatusPropertiesRecentlyResolved { resolvedTime?: Date; unavailabilitySummary?: string; unavailableOccurredTime?: Date; } // @public -export interface ChildAvailabilityStatuses { - getByResource(resourceUri: string, options?: ChildAvailabilityStatusesGetByResourceOptionalParams): Promise; - list(resourceUri: string, options?: ChildAvailabilityStatusesListOptionalParams): PagedAsyncIterableIterator; +export interface EmergingIssueImpact { + id?: string; + name?: string; + regions?: ImpactedRegion[]; } // @public -export interface ChildAvailabilityStatusesGetByResourceOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; +export interface EmergingIssueListResult { + nextLink?: string; + value?: EmergingIssuesGetResult[]; } // @public -export type ChildAvailabilityStatusesGetByResourceResponse = AvailabilityStatus; +export interface EmergingIssues { + get(options?: EmergingIssuesGetOptionalParams): Promise; + list(options?: EmergingIssuesListOptionalParams): PagedAsyncIterableIterator; +} // @public -export interface ChildAvailabilityStatusesListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; +export interface EmergingIssuesGetOptionalParams extends coreClient.OperationOptions { } // @public -export type ChildAvailabilityStatusesListNextResponse = AvailabilityStatusListResult; +export type EmergingIssuesGetResponse = EmergingIssuesGetResult; // @public -export interface ChildAvailabilityStatusesListOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; +export type EmergingIssuesGetResult = Resource & { + refreshTimestamp?: Date; + statusBanners?: StatusBanner[]; + statusActiveEvents?: StatusActiveEvent[]; +}; + +// @public +export interface EmergingIssuesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ChildAvailabilityStatusesListResponse = AvailabilityStatusListResult; +export type EmergingIssuesListNextResponse = EmergingIssueListResult; // @public -export interface ChildResources { - list(resourceUri: string, options?: ChildResourcesListOptionalParams): PagedAsyncIterableIterator; +export interface EmergingIssuesListOptionalParams extends coreClient.OperationOptions { } // @public -export interface ChildResourcesListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; +export type EmergingIssuesListResponse = EmergingIssueListResult; + +// @public +export interface ErrorResponse { + readonly code?: string; + readonly details?: string; + readonly message?: string; } // @public -export type ChildResourcesListNextResponse = AvailabilityStatusListResult; +type Event_2 = Resource & { + eventType?: EventTypeValues; + eventSource?: EventSourceValues; + status?: EventStatusValues; + title?: string; + summary?: string; + header?: string; + level?: LevelValues; + eventLevel?: EventLevelValues; + article?: EventPropertiesArticle; + links?: Link[]; + impactStartTime?: Date; + impactMitigationTime?: Date; + impact?: Impact[]; + recommendedActions?: EventPropertiesRecommendedActions; + faqs?: Faq[]; + isHIR?: boolean; + enableMicrosoftSupport?: boolean; + description?: string; + platformInitiated?: boolean; + enableChatWithUs?: boolean; + priority?: number; + lastUpdateTime?: Date; + hirStage?: string; +}; +export { Event_2 as Event } // @public -export interface ChildResourcesListOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; +export type EventLevelValues = string; + +// @public +export interface EventPropertiesArticle { + articleContent?: string; } // @public -export type ChildResourcesListResponse = AvailabilityStatusListResult; +export interface EventPropertiesRecommendedActions { + actions?: EventPropertiesRecommendedActionsItem[]; + localeCode?: string; + message?: string; +} // @public -export interface EmergingIssueImpact { - id?: string; - name?: string; - regions?: ImpactedRegion[]; +export interface EventPropertiesRecommendedActionsItem { + actionText?: string; + groupId?: number; } // @public -export interface EmergingIssueListResult { +export interface Events { nextLink?: string; - value?: EmergingIssuesGetResult[]; + value: Event_2[]; } // @public -export interface EmergingIssues { - get(options?: EmergingIssuesGetOptionalParams): Promise; - list(options?: EmergingIssuesListOptionalParams): PagedAsyncIterableIterator; +export interface EventsListBySingleResourceNextOptionalParams extends coreClient.OperationOptions { + filter?: string; + view?: string; } // @public -export interface EmergingIssuesGetOptionalParams extends coreClient.OperationOptions { +export type EventsListBySingleResourceNextResponse = Events; + +// @public +export interface EventsListBySingleResourceOptionalParams extends coreClient.OperationOptions { + filter?: string; + view?: string; } // @public -export type EmergingIssuesGetResponse = EmergingIssuesGetResult; +export type EventsListBySingleResourceResponse = Events; // @public -export type EmergingIssuesGetResult = Resource & { - refreshTimestamp?: Date; - statusBanners?: StatusBanner[]; - statusActiveEvents?: StatusActiveEvent[]; -}; +export interface EventsListBySubscriptionIdNextOptionalParams extends coreClient.OperationOptions { + filter?: string; + queryStartTime?: string; + view?: string; +} // @public -export interface EmergingIssuesListNextOptionalParams extends coreClient.OperationOptions { +export type EventsListBySubscriptionIdNextResponse = Events; + +// @public +export interface EventsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { + filter?: string; + queryStartTime?: string; + view?: string; } // @public -export type EmergingIssuesListNextResponse = EmergingIssueListResult; +export type EventsListBySubscriptionIdResponse = Events; // @public -export interface EmergingIssuesListOptionalParams extends coreClient.OperationOptions { +export interface EventsOperations { + listBySingleResource(resourceUri: string, options?: EventsListBySingleResourceOptionalParams): PagedAsyncIterableIterator; + listBySubscriptionId(options?: EventsListBySubscriptionIdOptionalParams): PagedAsyncIterableIterator; } // @public -export type EmergingIssuesListResponse = EmergingIssueListResult; +export type EventSourceValues = string; // @public -export interface ErrorResponse { - readonly code?: string; - readonly details?: string; - readonly message?: string; +export type EventStatusValues = string; + +// @public +export type EventTypeValues = string; + +// @public +export interface Faq { + answer?: string; + localeCode?: string; + question?: string; +} + +// @public +export interface Impact { + impactedRegions?: ImpactedServiceRegion[]; + impactedService?: string; } // @public @@ -240,6 +305,101 @@ export interface ImpactedRegion { name?: string; } +// @public +export interface ImpactedServiceRegion { + impactedRegion?: string; + impactedSubscriptions?: string[]; + lastUpdateTime?: Date; + status?: EventStatusValues; + updates?: Update[]; +} + +// @public +export enum KnownAvailabilityStateValues { + // (undocumented) + Available = "Available", + // (undocumented) + Degraded = "Degraded", + // (undocumented) + Unavailable = "Unavailable", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownEventLevelValues { + // (undocumented) + Critical = "Critical", + // (undocumented) + Error = "Error", + // (undocumented) + Informational = "Informational", + // (undocumented) + Warning = "Warning" +} + +// @public +export enum KnownEventSourceValues { + // (undocumented) + ResourceHealth = "ResourceHealth", + // (undocumented) + ServiceHealth = "ServiceHealth" +} + +// @public +export enum KnownEventStatusValues { + // (undocumented) + Active = "Active", + // (undocumented) + Resolved = "Resolved" +} + +// @public +export enum KnownEventTypeValues { + // (undocumented) + EmergingIssues = "EmergingIssues", + // (undocumented) + HealthAdvisory = "HealthAdvisory", + // (undocumented) + PlannedMaintenance = "PlannedMaintenance", + // (undocumented) + RCA = "RCA", + // (undocumented) + SecurityAdvisory = "SecurityAdvisory", + // (undocumented) + ServiceIssue = "ServiceIssue" +} + +// @public +export enum KnownLevelValues { + // (undocumented) + Critical = "Critical", + // (undocumented) + Warning = "Warning" +} + +// @public +export enum KnownLinkTypeValues { + // (undocumented) + Button = "Button", + // (undocumented) + Hyperlink = "Hyperlink" +} + +// @public +export enum KnownReasonChronicityTypes { + // (undocumented) + Persistent = "Persistent", + // (undocumented) + Transient = "Transient" +} + +// @public +export enum KnownScenario { + // (undocumented) + Alerts = "Alerts" +} + // @public export enum KnownSeverityValues { // (undocumented) @@ -260,6 +420,47 @@ export enum KnownStageValues { Resolve = "Resolve" } +// @public +export type LevelValues = string; + +// @public +export interface Link { + bladeName?: string; + displayText?: LinkDisplayText; + extensionName?: string; + parameters?: Record; + type?: LinkTypeValues; +} + +// @public +export interface LinkDisplayText { + localizedValue?: string; + value?: string; +} + +// @public +export type LinkTypeValues = string; + +// @public +export type MetadataEntity = Resource & { + displayName?: string; + dependsOn?: string[]; + applicableScenarios?: Scenario[]; + supportedValues?: MetadataSupportedValueDetail[]; +}; + +// @public +export interface MetadataEntityListResult { + nextLink?: string; + value?: MetadataEntity[]; +} + +// @public +export interface MetadataSupportedValueDetail { + displayName?: string; + id?: string; +} + // @public (undocumented) export class MicrosoftResourceHealth extends coreClient.ServiceClient { // (undocumented) @@ -270,12 +471,10 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { // (undocumented) availabilityStatuses: AvailabilityStatuses; // (undocumented) - childAvailabilityStatuses: ChildAvailabilityStatuses; - // (undocumented) - childResources: ChildResources; - // (undocumented) emergingIssues: EmergingIssues; // (undocumented) + eventsOperations: EventsOperations; + // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; @@ -320,7 +519,7 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption export type OperationsListResponse = OperationListResult; // @public -export type ReasonChronicityTypes = "Transient" | "Persistent"; +export type ReasonChronicityTypes = string; // @public export interface RecommendedAction { @@ -336,6 +535,9 @@ export interface Resource { readonly type?: string; } +// @public +export type Scenario = string; + // @public export interface ServiceImpactingEvent { correlationId?: string; @@ -386,6 +588,12 @@ export interface StatusBanner { title?: string; } +// @public +export interface Update { + summary?: string; + updateDateTime?: Date; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts index 17345ce503c3..65689245249e 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts @@ -9,16 +9,14 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { + EventsOperationsImpl, AvailabilityStatusesImpl, - ChildAvailabilityStatusesImpl, - ChildResourcesImpl, OperationsImpl, EmergingIssuesImpl } from "./operations"; import { + EventsOperations, AvailabilityStatuses, - ChildAvailabilityStatuses, - ChildResources, Operations, EmergingIssues } from "./operationsInterfaces"; @@ -57,7 +55,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-resourcehealth/1.0.0-beta.1`; + const packageDetails = `azsdk-js-arm-resourcehealth/4.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -80,17 +78,15 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2017-07-01"; + this.apiVersion = options.apiVersion || "2018-07-01"; + this.eventsOperations = new EventsOperationsImpl(this); this.availabilityStatuses = new AvailabilityStatusesImpl(this); - this.childAvailabilityStatuses = new ChildAvailabilityStatusesImpl(this); - this.childResources = new ChildResourcesImpl(this); this.operations = new OperationsImpl(this); this.emergingIssues = new EmergingIssuesImpl(this); } + eventsOperations: EventsOperations; availabilityStatuses: AvailabilityStatuses; - childAvailabilityStatuses: ChildAvailabilityStatuses; - childResources: ChildResources; operations: Operations; emergingIssues: EmergingIssues; } diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts index c6a12e78a4f6..45bf85d20eef 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts @@ -8,6 +8,138 @@ import * as coreClient from "@azure/core-client"; +/** The List events operation response. */ +export interface Events { + /** The list of event. */ + value: Event[]; + /** The URI to fetch the next page of events. Call ListNext() with this URI to fetch the next page of events. */ + nextLink?: string; +} + +/** Article of event. */ +export interface EventPropertiesArticle { + /** Article content of event. */ + articleContent?: string; +} + +/** Useful links for service health event. */ +export interface Link { + /** Type of link. */ + type?: LinkTypeValues; + /** Display text of link. */ + displayText?: LinkDisplayText; + /** It provides the name of portal extension to produce link for given service health event. */ + extensionName?: string; + /** It provides the name of portal extension blade to produce link for given service health event. */ + bladeName?: string; + /** It provides a map of parameter name and value for portal extension blade to produce lik for given service health event. */ + parameters?: Record; +} + +/** Display text of link. */ +export interface LinkDisplayText { + /** Display text of link. */ + value?: string; + /** Localized display text of link. */ + localizedValue?: string; +} + +/** Azure service impacted by the service health event. */ +export interface Impact { + /** Impacted service name. */ + impactedService?: string; + /** List regions impacted by the service health event. */ + impactedRegions?: ImpactedServiceRegion[]; +} + +/** Azure region impacted by the service health event. */ +export interface ImpactedServiceRegion { + /** Impacted region name. */ + impactedRegion?: string; + /** Current status of event in the region. */ + status?: EventStatusValues; + /** List subscription impacted by the service health event. */ + impactedSubscriptions?: string[]; + /** It provides the Timestamp for when the last update for the service health event. */ + lastUpdateTime?: Date; + /** List of updates for given service health event. */ + updates?: Update[]; +} + +/** Update for service health event. */ +export interface Update { + /** Summary text for the given update for the service health event. */ + summary?: string; + /** It provides the Timestamp for the given update for the service health event. */ + updateDateTime?: Date; +} + +/** Recommended actions of event. */ +export interface EventPropertiesRecommendedActions { + /** Recommended action title for the service health event. */ + message?: string; + /** Recommended actions for the service health event. */ + actions?: EventPropertiesRecommendedActionsItem[]; + /** Recommended action locale for the service health event. */ + localeCode?: string; +} + +/** Recommended action for the service health event. */ +export interface EventPropertiesRecommendedActionsItem { + /** Recommended action group Id for the service health event. */ + groupId?: number; + /** Recommended action text */ + actionText?: string; +} + +/** Frequently asked question for the service health event */ +export interface Faq { + /** FAQ question for the service health event. */ + question?: string; + /** FAQ answer for the service health event. */ + answer?: string; + /** FAQ locale for the service health event. */ + localeCode?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** Error details. */ +export interface ErrorResponse { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: string; +} + /** The List availabilityStatus operation response. */ export interface AvailabilityStatusListResult { /** The list of availabilityStatuses. */ @@ -53,13 +185,13 @@ export interface AvailabilityStatusProperties { /** When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and time for when the issue is expected to be resolved. */ resolutionETA?: Date; /** Timestamp for when last change in health status occurred. */ - occuredTime?: Date; + occurredTime?: Date; /** Chronicity of the availability transition. */ reasonChronicity?: ReasonChronicityTypes; /** Timestamp for when the health was last checked. */ reportedTime?: Date; /** An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned */ - recentlyResolvedState?: AvailabilityStatusPropertiesRecentlyResolvedState; + recentlyResolved?: AvailabilityStatusPropertiesRecentlyResolved; /** Lists actions the user can take based on the current availabilityState of the resource. */ recommendedActions?: RecommendedAction[]; /** Lists the service impacting events that may be affecting the health of the resource. */ @@ -67,7 +199,7 @@ export interface AvailabilityStatusProperties { } /** An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned */ -export interface AvailabilityStatusPropertiesRecentlyResolvedState { +export interface AvailabilityStatusPropertiesRecentlyResolved { /** Timestamp for when the availabilityState changed to Unavailable */ unavailableOccurredTime?: Date; /** Timestamp when the availabilityState changes to Available. */ @@ -118,25 +250,6 @@ export interface ServiceImpactingEventIncidentProperties { incidentType?: string; } -/** Error details. */ -export interface ErrorResponse { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: string; -} - /** Lists the operations response. */ export interface OperationListResult { /** List of operations available in the resourcehealth resource provider. */ @@ -217,25 +330,6 @@ export interface ImpactedRegion { name?: string; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - /** The list of emerging issues. */ export interface EmergingIssueListResult { /** The list of emerging issues. */ @@ -244,6 +338,72 @@ export interface EmergingIssueListResult { nextLink?: string; } +/** The list of metadata entities */ +export interface MetadataEntityListResult { + /** The list of metadata entities. */ + value?: MetadataEntity[]; + /** The link used to get the next page of metadata. */ + nextLink?: string; +} + +/** The metadata supported value detail. */ +export interface MetadataSupportedValueDetail { + /** The id. */ + id?: string; + /** The display name. */ + displayName?: string; +} + +/** Service health event */ +export type Event = Resource & { + /** Type of event. */ + eventType?: EventTypeValues; + /** Source of event. */ + eventSource?: EventSourceValues; + /** Current status of event. */ + status?: EventStatusValues; + /** Title text of event. */ + title?: string; + /** Summary text of event. */ + summary?: string; + /** Header text of event. */ + header?: string; + /** Level of insight. */ + level?: LevelValues; + /** Level of event. */ + eventLevel?: EventLevelValues; + /** Article of event. */ + article?: EventPropertiesArticle; + /** Useful links of event. */ + links?: Link[]; + /** It provides the Timestamp for when the health impacting event started. */ + impactStartTime?: Date; + /** It provides the Timestamp for when the health impacting event resolved. */ + impactMitigationTime?: Date; + /** List services impacted by the service health event. */ + impact?: Impact[]; + /** Recommended actions of event. */ + recommendedActions?: EventPropertiesRecommendedActions; + /** Frequently asked questions for the service health event. */ + faqs?: Faq[]; + /** It provides information if the event is High incident rate event or not. */ + isHIR?: boolean; + /** Tells if we want to enable or disable Microsoft Support for this event. */ + enableMicrosoftSupport?: boolean; + /** Contains the communication message for the event, that could include summary, root cause and other details. */ + description?: string; + /** Is true if the event is platform initiated. */ + platformInitiated?: boolean; + /** Tells if we want to enable or disable Microsoft Support for this event. */ + enableChatWithUs?: boolean; + /** Priority level of the event. Has value from 0 to 23. 0 is the highest priority. Service issue events have higher priority followed by planned maintenance and health advisory. Critical events have higher priority followed by error, warning and informational. Furthermore, active events have higher priority than resolved. */ + priority?: number; + /** It provides the Timestamp for when the health impacting event was last updated. */ + lastUpdateTime?: Date; + /** Stage for HIR Document */ + hirStage?: string; +}; + /** The Get EmergingIssues operation response. */ export type EmergingIssuesGetResult = Resource & { /** Timestamp for when last time refreshed for ongoing emerging issue. */ @@ -254,6 +414,162 @@ export type EmergingIssuesGetResult = Resource & { statusActiveEvents?: StatusActiveEvent[]; }; +/** The metadata entity contract. */ +export type MetadataEntity = Resource & { + /** The display name. */ + displayName?: string; + /** The list of keys on which this entity depends on. */ + dependsOn?: string[]; + /** The list of scenarios applicable to this metadata entity. */ + applicableScenarios?: Scenario[]; + /** The list of supported values. */ + supportedValues?: MetadataSupportedValueDetail[]; +}; + +/** Known values of {@link EventTypeValues} that the service accepts. */ +export enum KnownEventTypeValues { + ServiceIssue = "ServiceIssue", + PlannedMaintenance = "PlannedMaintenance", + HealthAdvisory = "HealthAdvisory", + RCA = "RCA", + EmergingIssues = "EmergingIssues", + SecurityAdvisory = "SecurityAdvisory" +} + +/** + * Defines values for EventTypeValues. \ + * {@link KnownEventTypeValues} can be used interchangeably with EventTypeValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServiceIssue** \ + * **PlannedMaintenance** \ + * **HealthAdvisory** \ + * **RCA** \ + * **EmergingIssues** \ + * **SecurityAdvisory** + */ +export type EventTypeValues = string; + +/** Known values of {@link EventSourceValues} that the service accepts. */ +export enum KnownEventSourceValues { + ResourceHealth = "ResourceHealth", + ServiceHealth = "ServiceHealth" +} + +/** + * Defines values for EventSourceValues. \ + * {@link KnownEventSourceValues} can be used interchangeably with EventSourceValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ResourceHealth** \ + * **ServiceHealth** + */ +export type EventSourceValues = string; + +/** Known values of {@link EventStatusValues} that the service accepts. */ +export enum KnownEventStatusValues { + Active = "Active", + Resolved = "Resolved" +} + +/** + * Defines values for EventStatusValues. \ + * {@link KnownEventStatusValues} can be used interchangeably with EventStatusValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active** \ + * **Resolved** + */ +export type EventStatusValues = string; + +/** Known values of {@link LevelValues} that the service accepts. */ +export enum KnownLevelValues { + Critical = "Critical", + Warning = "Warning" +} + +/** + * Defines values for LevelValues. \ + * {@link KnownLevelValues} can be used interchangeably with LevelValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Warning** + */ +export type LevelValues = string; + +/** Known values of {@link EventLevelValues} that the service accepts. */ +export enum KnownEventLevelValues { + Critical = "Critical", + Error = "Error", + Warning = "Warning", + Informational = "Informational" +} + +/** + * Defines values for EventLevelValues. \ + * {@link KnownEventLevelValues} can be used interchangeably with EventLevelValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Error** \ + * **Warning** \ + * **Informational** + */ +export type EventLevelValues = string; + +/** Known values of {@link LinkTypeValues} that the service accepts. */ +export enum KnownLinkTypeValues { + Button = "Button", + Hyperlink = "Hyperlink" +} + +/** + * Defines values for LinkTypeValues. \ + * {@link KnownLinkTypeValues} can be used interchangeably with LinkTypeValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Button** \ + * **Hyperlink** + */ +export type LinkTypeValues = string; + +/** Known values of {@link AvailabilityStateValues} that the service accepts. */ +export enum KnownAvailabilityStateValues { + Available = "Available", + Unavailable = "Unavailable", + Degraded = "Degraded", + Unknown = "Unknown" +} + +/** + * Defines values for AvailabilityStateValues. \ + * {@link KnownAvailabilityStateValues} can be used interchangeably with AvailabilityStateValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available** \ + * **Unavailable** \ + * **Degraded** \ + * **Unknown** + */ +export type AvailabilityStateValues = string; + +/** Known values of {@link ReasonChronicityTypes} that the service accepts. */ +export enum KnownReasonChronicityTypes { + Transient = "Transient", + Persistent = "Persistent" +} + +/** + * Defines values for ReasonChronicityTypes. \ + * {@link KnownReasonChronicityTypes} can be used interchangeably with ReasonChronicityTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Transient** \ + * **Persistent** + */ +export type ReasonChronicityTypes = string; + /** Known values of {@link SeverityValues} that the service accepts. */ export enum KnownSeverityValues { Information = "Information", @@ -289,154 +605,156 @@ export enum KnownStageValues { * **Archived** */ export type StageValues = string; -/** Defines values for AvailabilityStateValues. */ -export type AvailabilityStateValues = "Available" | "Unavailable" | "Unknown"; -/** Defines values for ReasonChronicityTypes. */ -export type ReasonChronicityTypes = "Transient" | "Persistent"; -/** Optional parameters. */ -export interface AvailabilityStatusesListBySubscriptionIdOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ - filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; +/** Known values of {@link Scenario} that the service accepts. */ +export enum KnownScenario { + Alerts = "Alerts" } -/** Contains response data for the listBySubscriptionId operation. */ -export type AvailabilityStatusesListBySubscriptionIdResponse = AvailabilityStatusListResult; +/** + * Defines values for Scenario. \ + * {@link KnownScenario} can be used interchangeably with Scenario, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Alerts** + */ +export type Scenario = string; /** Optional parameters. */ -export interface AvailabilityStatusesListByResourceGroupOptionalParams +export interface EventsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; + /** Specifies from when to return events, based on the lastUpdateTime property. For example, queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020 */ + queryStartTime?: string; + /** setting view=full expands the article parameters */ + view?: string; } -/** Contains response data for the listByResourceGroup operation. */ -export type AvailabilityStatusesListByResourceGroupResponse = AvailabilityStatusListResult; +/** Contains response data for the listBySubscriptionId operation. */ +export type EventsListBySubscriptionIdResponse = Events; /** Optional parameters. */ -export interface AvailabilityStatusesGetByResourceOptionalParams +export interface EventsListBySingleResourceOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; + /** setting view=full expands the article parameters */ + view?: string; } -/** Contains response data for the getByResource operation. */ -export type AvailabilityStatusesGetByResourceResponse = AvailabilityStatus; +/** Contains response data for the listBySingleResource operation. */ +export type EventsListBySingleResourceResponse = Events; /** Optional parameters. */ -export interface AvailabilityStatusesListOptionalParams +export interface EventsListBySubscriptionIdNextOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; + /** Specifies from when to return events, based on the lastUpdateTime property. For example, queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020 */ + queryStartTime?: string; + /** setting view=full expands the article parameters */ + view?: string; } -/** Contains response data for the list operation. */ -export type AvailabilityStatusesListResponse = AvailabilityStatusListResult; +/** Contains response data for the listBySubscriptionIdNext operation. */ +export type EventsListBySubscriptionIdNextResponse = Events; /** Optional parameters. */ -export interface AvailabilityStatusesListBySubscriptionIdNextOptionalParams +export interface EventsListBySingleResourceNextOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; + /** setting view=full expands the article parameters */ + view?: string; } -/** Contains response data for the listBySubscriptionIdNext operation. */ -export type AvailabilityStatusesListBySubscriptionIdNextResponse = AvailabilityStatusListResult; +/** Contains response data for the listBySingleResourceNext operation. */ +export type EventsListBySingleResourceNextResponse = Events; /** Optional parameters. */ -export interface AvailabilityStatusesListByResourceGroupNextOptionalParams +export interface AvailabilityStatusesListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ expand?: string; } -/** Contains response data for the listByResourceGroupNext operation. */ -export type AvailabilityStatusesListByResourceGroupNextResponse = AvailabilityStatusListResult; +/** Contains response data for the listBySubscriptionId operation. */ +export type AvailabilityStatusesListBySubscriptionIdResponse = AvailabilityStatusListResult; /** Optional parameters. */ -export interface AvailabilityStatusesListNextOptionalParams +export interface AvailabilityStatusesListByResourceGroupOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ expand?: string; } -/** Contains response data for the listNext operation. */ -export type AvailabilityStatusesListNextResponse = AvailabilityStatusListResult; +/** Contains response data for the listByResourceGroup operation. */ +export type AvailabilityStatusesListByResourceGroupResponse = AvailabilityStatusListResult; /** Optional parameters. */ -export interface ChildAvailabilityStatusesGetByResourceOptionalParams +export interface AvailabilityStatusesGetByResourceOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ expand?: string; } /** Contains response data for the getByResource operation. */ -export type ChildAvailabilityStatusesGetByResourceResponse = AvailabilityStatus; +export type AvailabilityStatusesGetByResourceResponse = AvailabilityStatus; /** Optional parameters. */ -export interface ChildAvailabilityStatusesListOptionalParams +export interface AvailabilityStatusesListOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ expand?: string; } /** Contains response data for the list operation. */ -export type ChildAvailabilityStatusesListResponse = AvailabilityStatusListResult; +export type AvailabilityStatusesListResponse = AvailabilityStatusListResult; /** Optional parameters. */ -export interface ChildAvailabilityStatusesListNextOptionalParams +export interface AvailabilityStatusesListBySubscriptionIdNextOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ expand?: string; } -/** Contains response data for the listNext operation. */ -export type ChildAvailabilityStatusesListNextResponse = AvailabilityStatusListResult; +/** Contains response data for the listBySubscriptionIdNext operation. */ +export type AvailabilityStatusesListBySubscriptionIdNextResponse = AvailabilityStatusListResult; /** Optional parameters. */ -export interface ChildResourcesListOptionalParams +export interface AvailabilityStatusesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ expand?: string; } -/** Contains response data for the list operation. */ -export type ChildResourcesListResponse = AvailabilityStatusListResult; +/** Contains response data for the listByResourceGroupNext operation. */ +export type AvailabilityStatusesListByResourceGroupNextResponse = AvailabilityStatusListResult; /** Optional parameters. */ -export interface ChildResourcesListNextOptionalParams +export interface AvailabilityStatusesListNextOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ + /** A valid odata query to limit the events returned. The logical operators and, or, equal, not equal, and top are supported. For example, $filter=Properties/EventType eq 'ServiceIssue' or Properties/EventType eq 'PlannedMaintenance' OR %24filter=Properties%2FEventType%20eq%20%27ServiceIssue%27%20or%20Properties%2FEventType%20eq%20%27PlannedMaintenance%27 */ filter?: string; /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ expand?: string; } /** Contains response data for the listNext operation. */ -export type ChildResourcesListNextResponse = AvailabilityStatusListResult; +export type AvailabilityStatusesListNextResponse = AvailabilityStatusListResult; /** Optional parameters. */ export interface OperationsListOptionalParams diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts index 6ae4eaf92675..546b1d00e80a 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts @@ -8,6 +8,350 @@ import * as coreClient from "@azure/core-client"; +export const Events: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Events", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Event" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const EventPropertiesArticle: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventPropertiesArticle", + modelProperties: { + articleContent: { + serializedName: "articleContent", + type: { + name: "String" + } + } + } + } +}; + +export const Link: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Link", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + displayText: { + serializedName: "displayText", + type: { + name: "Composite", + className: "LinkDisplayText" + } + }, + extensionName: { + serializedName: "extensionName", + type: { + name: "String" + } + }, + bladeName: { + serializedName: "bladeName", + type: { + name: "String" + } + }, + parameters: { + serializedName: "parameters", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const LinkDisplayText: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LinkDisplayText", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const Impact: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Impact", + modelProperties: { + impactedService: { + serializedName: "impactedService", + type: { + name: "String" + } + }, + impactedRegions: { + serializedName: "impactedRegions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImpactedServiceRegion" + } + } + } + } + } + } +}; + +export const ImpactedServiceRegion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImpactedServiceRegion", + modelProperties: { + impactedRegion: { + serializedName: "impactedRegion", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + impactedSubscriptions: { + serializedName: "impactedSubscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + lastUpdateTime: { + serializedName: "lastUpdateTime", + type: { + name: "DateTime" + } + }, + updates: { + serializedName: "updates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Update" + } + } + } + } + } + } +}; + +export const Update: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Update", + modelProperties: { + summary: { + serializedName: "summary", + type: { + name: "String" + } + }, + updateDateTime: { + serializedName: "updateDateTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const EventPropertiesRecommendedActions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventPropertiesRecommendedActions", + modelProperties: { + message: { + serializedName: "message", + type: { + name: "String" + } + }, + actions: { + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EventPropertiesRecommendedActionsItem" + } + } + } + }, + localeCode: { + serializedName: "localeCode", + type: { + name: "String" + } + } + } + } +}; + +export const EventPropertiesRecommendedActionsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventPropertiesRecommendedActionsItem", + modelProperties: { + groupId: { + serializedName: "groupId", + type: { + name: "Number" + } + }, + actionText: { + serializedName: "actionText", + type: { + name: "String" + } + } + } + } +}; + +export const Faq: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Faq", + modelProperties: { + question: { + serializedName: "question", + type: { + name: "String" + } + }, + answer: { + serializedName: "answer", + type: { + name: "String" + } + }, + localeCode: { + serializedName: "localeCode", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const AvailabilityStatusListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -84,8 +428,7 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { availabilityState: { serializedName: "availabilityState", type: { - name: "Enum", - allowedValues: ["Available", "Unavailable", "Unknown"] + name: "String" } }, summary: { @@ -142,8 +485,8 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { name: "DateTime" } }, - occuredTime: { - serializedName: "occuredTime", + occurredTime: { + serializedName: "occurredTime", type: { name: "DateTime" } @@ -151,8 +494,7 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { reasonChronicity: { serializedName: "reasonChronicity", type: { - name: "Enum", - allowedValues: ["Transient", "Persistent"] + name: "String" } }, reportedTime: { @@ -161,11 +503,11 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { name: "DateTime" } }, - recentlyResolvedState: { - serializedName: "recentlyResolvedState", + recentlyResolved: { + serializedName: "recentlyResolved", type: { name: "Composite", - className: "AvailabilityStatusPropertiesRecentlyResolvedState" + className: "AvailabilityStatusPropertiesRecentlyResolved" } }, recommendedActions: { @@ -196,10 +538,10 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { } }; -export const AvailabilityStatusPropertiesRecentlyResolvedState: coreClient.CompositeMapper = { +export const AvailabilityStatusPropertiesRecentlyResolved: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailabilityStatusPropertiesRecentlyResolvedState", + className: "AvailabilityStatusPropertiesRecentlyResolved", modelProperties: { unavailableOccurredTime: { serializedName: "unavailableOccurredTime", @@ -339,36 +681,6 @@ export const ServiceImpactingEventIncidentProperties: coreClient.CompositeMapper } }; -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -608,28 +920,73 @@ export const ImpactedRegion: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const EmergingIssueListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "EmergingIssueListResult", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmergingIssuesGetResult" + } + } + } + }, + nextLink: { + serializedName: "nextLink", type: { name: "String" } + } + } + } +}; + +export const MetadataEntityListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetadataEntityListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataEntity" + } + } + } }, - name: { - serializedName: "name", - readOnly: true, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const MetadataSupportedValueDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetadataSupportedValueDetail", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + displayName: { + serializedName: "displayName", type: { name: "String" } @@ -638,25 +995,166 @@ export const Resource: coreClient.CompositeMapper = { } }; -export const EmergingIssueListResult: coreClient.CompositeMapper = { +export const Event: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EmergingIssueListResult", + className: "Event", modelProperties: { - value: { - serializedName: "value", + ...Resource.type.modelProperties, + eventType: { + serializedName: "properties.eventType", + type: { + name: "String" + } + }, + eventSource: { + serializedName: "properties.eventSource", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + type: { + name: "String" + } + }, + summary: { + serializedName: "properties.summary", + type: { + name: "String" + } + }, + header: { + serializedName: "properties.header", + type: { + name: "String" + } + }, + level: { + serializedName: "properties.level", + type: { + name: "String" + } + }, + eventLevel: { + serializedName: "properties.eventLevel", + type: { + name: "String" + } + }, + article: { + serializedName: "properties.article", + type: { + name: "Composite", + className: "EventPropertiesArticle" + } + }, + links: { + serializedName: "properties.links", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EmergingIssuesGetResult" + className: "Link" } } } }, - nextLink: { - serializedName: "nextLink", + impactStartTime: { + serializedName: "properties.impactStartTime", + type: { + name: "DateTime" + } + }, + impactMitigationTime: { + serializedName: "properties.impactMitigationTime", + type: { + name: "DateTime" + } + }, + impact: { + serializedName: "properties.impact", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Impact" + } + } + } + }, + recommendedActions: { + serializedName: "properties.recommendedActions", + type: { + name: "Composite", + className: "EventPropertiesRecommendedActions" + } + }, + faqs: { + serializedName: "properties.faqs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Faq" + } + } + } + }, + isHIR: { + serializedName: "properties.isHIR", + type: { + name: "Boolean" + } + }, + enableMicrosoftSupport: { + serializedName: "properties.enableMicrosoftSupport", + type: { + name: "Boolean" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + platformInitiated: { + serializedName: "properties.platformInitiated", + type: { + name: "Boolean" + } + }, + enableChatWithUs: { + serializedName: "properties.enableChatWithUs", + type: { + name: "Boolean" + } + }, + priority: { + serializedName: "properties.priority", + type: { + name: "Number" + } + }, + lastUpdateTime: { + serializedName: "properties.lastUpdateTime", + type: { + name: "DateTime" + } + }, + hirStage: { + serializedName: "properties.hirStage", type: { name: "String" } @@ -704,3 +1202,53 @@ export const EmergingIssuesGetResult: coreClient.CompositeMapper = { } } }; + +export const MetadataEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetadataEntity", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + dependsOn: { + serializedName: "properties.dependsOn", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + applicableScenarios: { + serializedName: "properties.applicableScenarios", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + supportedValues: { + serializedName: "properties.supportedValues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataSupportedValueDetail" + } + } + } + } + } + } +}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts index 6dc6222dc643..f5785baa32e6 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: "2017-07-01", + defaultValue: "2018-07-01", isConstant: true, serializedName: "api-version", type: { @@ -58,32 +58,31 @@ export const filter: OperationQueryParameter = { } }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", +export const queryStartTime: OperationQueryParameter = { + parameterPath: ["options", "queryStartTime"], mapper: { - serializedName: "subscriptionId", - required: true, + serializedName: "queryStartTime", type: { name: "String" } } }; -export const expand: OperationQueryParameter = { - parameterPath: ["options", "expand"], +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "$expand", + serializedName: "subscriptionId", + required: true, type: { name: "String" } } }; -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", +export const view: OperationQueryParameter = { + parameterPath: ["options", "view"], mapper: { - serializedName: "resourceGroupName", - required: true, + serializedName: "view", type: { name: "String" } @@ -114,6 +113,27 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + export const issueName: OperationURLParameter = { parameterPath: "issueName", mapper: { diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts index 2869f85aca59..af3c99cc30a0 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts @@ -44,8 +44,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the subscription. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the subscription. * @param options The options parameters. */ public listBySubscriptionId( @@ -87,8 +86,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the resource group. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the resource group. * @param resourceGroupName The name of the resource group. * @param options The options parameters. */ @@ -141,8 +139,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists all historical availability transitions and impacting events for a single resource. Use the - * nextLink property in the response to get the next page of availability status + * Lists all historical availability transitions and impacting events for a single resource. * @param resourceUri The fully qualified ID of the resource, including the resource name and resource * type. Currently the API support not nested and one nesting level resource types : * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} @@ -192,8 +189,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the subscription. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the subscription. * @param options The options parameters. */ private _listBySubscriptionId( @@ -206,8 +202,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the resource group. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the resource group. * @param resourceGroupName The name of the resource group. * @param options The options parameters. */ @@ -241,8 +236,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists all historical availability transitions and impacting events for a single resource. Use the - * nextLink property in the response to get the next page of availability status + * Lists all historical availability transitions and impacting events for a single resource. * @param resourceUri The fully qualified ID of the resource, including the resource name and resource * type. Currently the API support not nested and one nesting level resource types : * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} @@ -447,8 +441,8 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink + Parameters.nextLink, + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/childAvailabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/childAvailabilityStatuses.ts deleted file mode 100644 index 069e458ac30f..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/childAvailabilityStatuses.ts +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ChildAvailabilityStatuses } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MicrosoftResourceHealth } from "../microsoftResourceHealth"; -import { - AvailabilityStatus, - ChildAvailabilityStatusesListNextOptionalParams, - ChildAvailabilityStatusesListOptionalParams, - ChildAvailabilityStatusesGetByResourceOptionalParams, - ChildAvailabilityStatusesGetByResourceResponse, - ChildAvailabilityStatusesListResponse, - ChildAvailabilityStatusesListNextResponse -} from "../models"; - -/// -/** Class containing ChildAvailabilityStatuses operations. */ -export class ChildAvailabilityStatusesImpl - implements ChildAvailabilityStatuses { - private readonly client: MicrosoftResourceHealth; - - /** - * Initialize a new instance of the class ChildAvailabilityStatuses class. - * @param client Reference to the service client - */ - constructor(client: MicrosoftResourceHealth) { - this.client = client; - } - - /** - * Lists the historical availability statuses for a single child resource. Use the nextLink property in - * the response to get the next page of availability status - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(resourceUri, options); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(resourceUri, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(resourceUri, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Gets current availability status for a single resource - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - getByResource( - resourceUri: string, - options?: ChildAvailabilityStatusesGetByResourceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - getByResourceOperationSpec - ); - } - - /** - * Lists the historical availability statuses for a single child resource. Use the nextLink property in - * the response to get the next page of availability status - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceUri: string, - nextLink: string, - options?: ChildAvailabilityStatusesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getByResourceOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses/current", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/childResources.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/childResources.ts deleted file mode 100644 index 500dec89921f..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/childResources.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ChildResources } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MicrosoftResourceHealth } from "../microsoftResourceHealth"; -import { - AvailabilityStatus, - ChildResourcesListNextOptionalParams, - ChildResourcesListOptionalParams, - ChildResourcesListResponse, - ChildResourcesListNextResponse -} from "../models"; - -/// -/** Class containing ChildResources operations. */ -export class ChildResourcesImpl implements ChildResources { - private readonly client: MicrosoftResourceHealth; - - /** - * Initialize a new instance of the class ChildResources class. - * @param client Reference to the service client - */ - constructor(client: MicrosoftResourceHealth) { - this.client = client; - } - - /** - * Lists the all the children and its current health status for a parent resource. Use the nextLink - * property in the response to get the next page of children current health - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(resourceUri, options); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(resourceUri, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(resourceUri, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Lists the all the children and its current health status for a parent resource. Use the nextLink - * property in the response to get the next page of children current health - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceUri: string, - nextLink: string, - options?: ChildResourcesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ResourceHealth/childResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/eventsOperations.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/eventsOperations.ts new file mode 100644 index 000000000000..c298016fb539 --- /dev/null +++ b/sdk/resourcehealth/arm-resourcehealth/src/operations/eventsOperations.ts @@ -0,0 +1,292 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { EventsOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { MicrosoftResourceHealth } from "../microsoftResourceHealth"; +import { + Event, + EventsListBySubscriptionIdNextOptionalParams, + EventsListBySubscriptionIdOptionalParams, + EventsListBySingleResourceNextOptionalParams, + EventsListBySingleResourceOptionalParams, + EventsListBySubscriptionIdResponse, + EventsListBySingleResourceResponse, + EventsListBySubscriptionIdNextResponse, + EventsListBySingleResourceNextResponse +} from "../models"; + +/// +/** Class containing EventsOperations operations. */ +export class EventsOperationsImpl implements EventsOperations { + private readonly client: MicrosoftResourceHealth; + + /** + * Initialize a new instance of the class EventsOperations class. + * @param client Reference to the service client + */ + constructor(client: MicrosoftResourceHealth) { + this.client = client; + } + + /** + * Lists current service health events in the subscription. + * @param options The options parameters. + */ + public listBySubscriptionId( + options?: EventsListBySubscriptionIdOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionIdPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionIdPagingPage(options); + } + }; + } + + private async *listBySubscriptionIdPagingPage( + options?: EventsListBySubscriptionIdOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscriptionId(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionIdNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionIdPagingAll( + options?: EventsListBySubscriptionIdOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionIdPagingPage(options)) { + yield* page; + } + } + + /** + * Lists current service health events for given resource. + * @param resourceUri The fully qualified ID of the resource, including the resource name and resource + * type. Currently the API support not nested and one nesting level resource types : + * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} + * and + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} + * @param options The options parameters. + */ + public listBySingleResource( + resourceUri: string, + options?: EventsListBySingleResourceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySingleResourcePagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySingleResourcePagingPage(resourceUri, options); + } + }; + } + + private async *listBySingleResourcePagingPage( + resourceUri: string, + options?: EventsListBySingleResourceOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySingleResource(resourceUri, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySingleResourceNext( + resourceUri, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySingleResourcePagingAll( + resourceUri: string, + options?: EventsListBySingleResourceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySingleResourcePagingPage( + resourceUri, + options + )) { + yield* page; + } + } + + /** + * Lists current service health events in the subscription. + * @param options The options parameters. + */ + private _listBySubscriptionId( + options?: EventsListBySubscriptionIdOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionIdOperationSpec + ); + } + + /** + * Lists current service health events for given resource. + * @param resourceUri The fully qualified ID of the resource, including the resource name and resource + * type. Currently the API support not nested and one nesting level resource types : + * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} + * and + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} + * @param options The options parameters. + */ + private _listBySingleResource( + resourceUri: string, + options?: EventsListBySingleResourceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listBySingleResourceOperationSpec + ); + } + + /** + * ListBySubscriptionIdNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscriptionId method. + * @param options The options parameters. + */ + private _listBySubscriptionIdNext( + nextLink: string, + options?: EventsListBySubscriptionIdNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionIdNextOperationSpec + ); + } + + /** + * ListBySingleResourceNext + * @param resourceUri The fully qualified ID of the resource, including the resource name and resource + * type. Currently the API support not nested and one nesting level resource types : + * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} + * and + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} + * @param nextLink The nextLink from the previous successful call to the ListBySingleResource method. + * @param options The options parameters. + */ + private _listBySingleResourceNext( + resourceUri: string, + nextLink: string, + options?: EventsListBySingleResourceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listBySingleResourceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionIdOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.queryStartTime, + Parameters.view + ], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listBySingleResourceOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ResourceHealth/events", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.view], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionIdNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.queryStartTime, + Parameters.view + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySingleResourceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.view], + urlParameters: [ + Parameters.$host, + Parameters.resourceUri, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts index 7a0013d72250..1678281a5d01 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts @@ -6,8 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./eventsOperations"; export * from "./availabilityStatuses"; -export * from "./childAvailabilityStatuses"; -export * from "./childResources"; export * from "./operations"; export * from "./emergingIssues"; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts index 5000227ffff5..525fd86aa5ad 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts @@ -20,16 +20,14 @@ import { /** Interface representing a AvailabilityStatuses. */ export interface AvailabilityStatuses { /** - * Lists the current availability status for all the resources in the subscription. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the subscription. * @param options The options parameters. */ listBySubscriptionId( options?: AvailabilityStatusesListBySubscriptionIdOptionalParams ): PagedAsyncIterableIterator; /** - * Lists the current availability status for all the resources in the resource group. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the resource group. * @param resourceGroupName The name of the resource group. * @param options The options parameters. */ @@ -38,8 +36,7 @@ export interface AvailabilityStatuses { options?: AvailabilityStatusesListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Lists all historical availability transitions and impacting events for a single resource. Use the - * nextLink property in the response to get the next page of availability status + * Lists all historical availability transitions and impacting events for a single resource. * @param resourceUri The fully qualified ID of the resource, including the resource name and resource * type. Currently the API support not nested and one nesting level resource types : * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childAvailabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childAvailabilityStatuses.ts deleted file mode 100644 index d296779a9ed1..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childAvailabilityStatuses.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AvailabilityStatus, - ChildAvailabilityStatusesListOptionalParams, - ChildAvailabilityStatusesGetByResourceOptionalParams, - ChildAvailabilityStatusesGetByResourceResponse -} from "../models"; - -/// -/** Interface representing a ChildAvailabilityStatuses. */ -export interface ChildAvailabilityStatuses { - /** - * Lists the historical availability statuses for a single child resource. Use the nextLink property in - * the response to get the next page of availability status - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets current availability status for a single resource - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - getByResource( - resourceUri: string, - options?: ChildAvailabilityStatusesGetByResourceOptionalParams - ): Promise; -} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childResources.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childResources.ts deleted file mode 100644 index 330611cfd82a..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childResources.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AvailabilityStatus, - ChildResourcesListOptionalParams -} from "../models"; - -/// -/** Interface representing a ChildResources. */ -export interface ChildResources { - /** - * Lists the all the children and its current health status for a parent resource. Use the nextLink - * property in the response to get the next page of children current health - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/eventsOperations.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/eventsOperations.ts new file mode 100644 index 000000000000..ee7f637448ba --- /dev/null +++ b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/eventsOperations.ts @@ -0,0 +1,39 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Event, + EventsListBySubscriptionIdOptionalParams, + EventsListBySingleResourceOptionalParams +} from "../models"; + +/// +/** Interface representing a EventsOperations. */ +export interface EventsOperations { + /** + * Lists current service health events in the subscription. + * @param options The options parameters. + */ + listBySubscriptionId( + options?: EventsListBySubscriptionIdOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists current service health events for given resource. + * @param resourceUri The fully qualified ID of the resource, including the resource name and resource + * type. Currently the API support not nested and one nesting level resource types : + * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} + * and + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} + * @param options The options parameters. + */ + listBySingleResource( + resourceUri: string, + options?: EventsListBySingleResourceOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts index 7a0013d72250..1678281a5d01 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts @@ -6,8 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./eventsOperations"; export * from "./availabilityStatuses"; -export * from "./childAvailabilityStatuses"; -export * from "./childResources"; export * from "./operations"; export * from "./emergingIssues"; diff --git a/sdk/resourcehealth/arm-resourcehealth/tsconfig.json b/sdk/resourcehealth/arm-resourcehealth/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/resourcehealth/arm-resourcehealth/tsconfig.json +++ b/sdk/resourcehealth/arm-resourcehealth/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file