Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Release History

## 5.0.0-beta.1 (2023-09-06)

**Features**

## 4.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
- Added Type Alias EventSubTypeValues
- Interface Event_2 has a new optional parameter argQuery
- Interface Event_2 has a new optional parameter eventSubType
- Interface Event_2 has a new optional parameter maintenanceId
- Interface Event_2 has a new optional parameter maintenanceType
- Interface EventImpactedResource has a new optional parameter maintenanceEndTime
- Interface EventImpactedResource has a new optional parameter maintenanceStartTime
- Interface EventImpactedResource has a new optional parameter resourceGroup
- Interface EventImpactedResource has a new optional parameter resourceName
- Interface EventImpactedResource has a new optional parameter status
- Added Enum KnownEventSubTypeValues

### Other Changes
**Breaking Changes**

- Class MicrosoftResourceHealth has a new signature


## 4.0.0 (2023-05-12)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/resourcehealth/arm-resourcehealth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Resource Health Client.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcehealth/arm-resourcehealth) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-resourcehealth) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-resourcehealth) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-resourcehealth?view=azure-node-preview) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand Down
8 changes: 4 additions & 4 deletions sdk/resourcehealth/arm-resourcehealth/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "1c3433247689aa55d7ecdd213505dc28c035f2b9",
"commit": "cf125719502a6ec76f08f93226156e9cfdc1bc1c",
"readme": "specification/resourcehealth/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\resourcehealth\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resourcehealth/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/typescript@6.0.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.2",
"use": "@autorest/typescript@^6.0.4"
}
20 changes: 6 additions & 14 deletions sdk/resourcehealth/arm-resourcehealth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for MicrosoftResourceHealth.",
"version": "4.0.1",
"version": "5.0.0-beta.1",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-rest-pipeline": "^1.12.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand Down Expand Up @@ -46,8 +46,8 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0"
"ts-node": "^10.0.0",
"@azure/dev-tool": "^1.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -110,13 +110,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcehealth/arm-resourcehealth",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resourcehealth?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcehealth/arm-resourcehealth"
}
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,15 @@ export interface ErrorResponse {
// @public
interface Event_2 extends ProxyResource {
additionalInformation?: EventPropertiesAdditionalInformation;
argQuery?: string;
article?: EventPropertiesArticle;
description?: string;
duration?: number;
enableChatWithUs?: boolean;
enableMicrosoftSupport?: boolean;
eventLevel?: EventLevelValues;
eventSource?: EventSourceValues;
eventSubType?: EventSubTypeValues;
eventType?: EventTypeValues;
externalIncidentId?: string;
faqs?: Faq[];
Expand All @@ -254,6 +256,8 @@ interface Event_2 extends ProxyResource {
lastUpdateTime?: Date;
level?: LevelValues;
links?: Link[];
maintenanceId?: string;
maintenanceType?: string;
platformInitiated?: boolean;
priority?: number;
reason?: string;
Expand Down Expand Up @@ -299,6 +303,11 @@ export type EventGetByTenantIdAndTrackingIdResponse = Event_2;
// @public
export interface EventImpactedResource extends ProxyResource {
info?: KeyValueItem[];
readonly maintenanceEndTime?: string;
readonly maintenanceStartTime?: string;
readonly resourceGroup?: string;
readonly resourceName?: string;
readonly status?: string;
readonly targetRegion?: string;
readonly targetResourceId?: string;
readonly targetResourceType?: string;
Expand Down Expand Up @@ -412,6 +421,9 @@ export type EventSourceValues = string;
// @public
export type EventStatusValues = string;

// @public
export type EventSubTypeValues = string;

// @public
export type EventTypeValues = string;

Expand Down Expand Up @@ -553,6 +565,11 @@ export enum KnownEventStatusValues {
Resolved = "Resolved"
}

// @public
export enum KnownEventSubTypeValues {
Retirement = "Retirement"
}

// @public
export enum KnownEventTypeValues {
EmergingIssues = "EmergingIssues",
Expand Down Expand Up @@ -686,6 +703,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams);
constructor(credentials: coreAuth.TokenCredential, options?: MicrosoftResourceHealthOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
Expand All @@ -709,7 +727,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
// (undocumented)
securityAdvisoryImpactedResources: SecurityAdvisoryImpactedResources;
// (undocumented)
subscriptionId: string;
subscriptionId?: string;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { MicrosoftResourceHealthOptionalParams } from "./models";
export class MicrosoftResourceHealth extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;
subscriptionId?: string;

/**
* Initializes a new instance of the MicrosoftResourceHealth class.
Expand All @@ -55,12 +55,26 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: MicrosoftResourceHealthOptionalParams
);
constructor(
credentials: coreAuth.TokenCredential,
options?: MicrosoftResourceHealthOptionalParams
);
constructor(
credentials: coreAuth.TokenCredential,
subscriptionIdOrOptions?: MicrosoftResourceHealthOptionalParams | string,
options?: MicrosoftResourceHealthOptionalParams
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");

let subscriptionId: string | undefined;

if (typeof subscriptionIdOrOptions === "string") {
subscriptionId = subscriptionIdOrOptions;
} else if (typeof subscriptionIdOrOptions === "object") {
options = subscriptionIdOrOptions;
}

// Initializing default values for options
Expand All @@ -72,7 +86,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-resourcehealth/4.0.1`;
const packageDetails = `azsdk-js-arm-resourcehealth/5.0.0-beta.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -125,7 +139,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-10-01";
this.apiVersion = options.apiVersion || "2023-07-01-preview";
this.availabilityStatuses = new AvailabilityStatusesImpl(this);
this.operations = new OperationsImpl(this);
this.metadata = new MetadataImpl(this);
Expand Down
48 changes: 48 additions & 0 deletions sdk/resourcehealth/arm-resourcehealth/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,31 @@ export interface EventImpactedResource extends ProxyResource {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly targetRegion?: string;
/**
* Resource name of the impacted resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resourceName?: string;
/**
* Resource group name of the impacted resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resourceGroup?: string;
/**
* Status of the impacted resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly status?: string;
/**
* Start time of maintenance for the impacted resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maintenanceStartTime?: string;
/**
* End time of maintenance for the impacted resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maintenanceEndTime?: string;
/** Additional information. */
info?: KeyValueItem[];
}
Expand All @@ -461,6 +486,8 @@ export interface EventImpactedResource extends ProxyResource {
export interface Event extends ProxyResource {
/** Type of event. */
eventType?: EventTypeValues;
/** Sub type of the event. Currently used to determine retirement communications for health advisory events */
eventSubType?: EventSubTypeValues;
/** Source of event. */
eventSource?: EventSourceValues;
/** Current status of event. */
Expand Down Expand Up @@ -515,6 +542,12 @@ export interface Event extends ProxyResource {
duration?: number;
/** The type of the impact */
impactType?: string;
/** Unique identifier for planned maintenance event. */
maintenanceId?: string;
/** The type of planned maintenance event. */
maintenanceType?: string;
/** Azure Resource Graph query to fetch the affected resources from their existing Azure Resource Graph locations. */
argQuery?: string;
}

/** The Get EmergingIssues operation response. */
Expand Down Expand Up @@ -652,6 +685,21 @@ export enum KnownEventTypeValues {
*/
export type EventTypeValues = string;

/** Known values of {@link EventSubTypeValues} that the service accepts. */
export enum KnownEventSubTypeValues {
/** Retirement */
Retirement = "Retirement"
}

/**
* Defines values for EventSubTypeValues. \
* {@link KnownEventSubTypeValues} can be used interchangeably with EventSubTypeValues,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Retirement**
*/
export type EventSubTypeValues = string;

/** Known values of {@link EventSourceValues} that the service accepts. */
export enum KnownEventSourceValues {
/** ResourceHealth */
Expand Down
59 changes: 59 additions & 0 deletions sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,41 @@ export const EventImpactedResource: coreClient.CompositeMapper = {
name: "String"
}
},
resourceName: {
serializedName: "properties.resourceName",
readOnly: true,
type: {
name: "String"
}
},
resourceGroup: {
serializedName: "properties.resourceGroup",
readOnly: true,
type: {
name: "String"
}
},
status: {
serializedName: "properties.status",
readOnly: true,
type: {
name: "String"
}
},
maintenanceStartTime: {
serializedName: "properties.maintenanceStartTime",
readOnly: true,
type: {
name: "String"
}
},
maintenanceEndTime: {
serializedName: "properties.maintenanceEndTime",
readOnly: true,
type: {
name: "String"
}
},
info: {
serializedName: "properties.info",
type: {
Expand Down Expand Up @@ -1293,6 +1328,12 @@ export const Event: coreClient.CompositeMapper = {
name: "String"
}
},
eventSubType: {
serializedName: "properties.eventSubType",
type: {
name: "String"
}
},
eventSource: {
serializedName: "properties.eventSource",
type: {
Expand Down Expand Up @@ -1475,6 +1516,24 @@ export const Event: coreClient.CompositeMapper = {
type: {
name: "String"
}
},
maintenanceId: {
serializedName: "properties.maintenanceId",
type: {
name: "String"
}
},
maintenanceType: {
serializedName: "properties.maintenanceType",
type: {
name: "String"
}
},
argQuery: {
serializedName: "properties.argQuery",
type: {
name: "String"
}
}
}
}
Expand Down
Loading