Skip to content

Commit eec0f73

Browse files
author
SDKAuto
committed
CodeGen from PR 15007 in Azure/azure-rest-api-specs
Merge e98221e59c3b1b8f6ec54a662d3c735bd2eeee00 into 3cf8aa90fbdf15379f62a1e8e0c3dcbd9c4d46af
1 parent b8da289 commit eec0f73

20 files changed

+279
-90
lines changed

sdk/advisor/arm-advisor/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/advisor/arm-advisor/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure AdvisorManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AdvisorManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for AdvisorManagementClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-advisor @azure/identity
2323
```
24-
2524
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
2625
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2726

@@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40-
4139
#### nodejs - Authentication, client creation, and get recommendationMetadata as an example written in JavaScript.
4240

4341
##### Sample code
@@ -86,7 +84,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8684
const credential = new InteractiveBrowserCredential(
8785
{
8886
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
87+
tenant: "<optional tenant for your organization>"
9088
});
9189
const client = new Azure.ArmAdvisor.AdvisorManagementClient(creds, subscriptionId);
9290
const name = "testname";

sdk/advisor/arm-advisor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"rollup-plugin-sourcemaps": "^0.4.2",
2828
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/advisor/arm-advisor",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/advisor/arm-advisor",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

sdk/advisor/arm-advisor/src/advisorManagementClient.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is

sdk/advisor/arm-advisor/src/advisorManagementClientContext.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -10,8 +9,8 @@
109

1110
import * as Models from "./models";
1211
import * as msRest from "@azure/ms-rest-js";
13-
import { TokenCredential } from "@azure/core-auth";
1412
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1514

1615
const packageName = "@azure/arm-advisor";
1716
const packageVersion = "2.1.0";
@@ -43,7 +42,7 @@ export class AdvisorManagementClientContext extends msRestAzure.AzureServiceClie
4342
if (!options) {
4443
options = {};
4544
}
46-
if(!options.userAgent) {
45+
if (!options.userAgent) {
4746
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
4847
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
4948
}
@@ -58,10 +57,10 @@ export class AdvisorManagementClientContext extends msRestAzure.AzureServiceClie
5857
this.credentials = credentials;
5958
this.subscriptionId = subscriptionId;
6059

61-
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
60+
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
6261
this.acceptLanguage = options.acceptLanguage;
6362
}
64-
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
63+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
6564
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
6665
}
6766
}

sdk/advisor/arm-advisor/src/models/configurationsMappers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

sdk/advisor/arm-advisor/src/models/index.ts

Lines changed: 88 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -181,6 +181,18 @@ export interface ResourceMetadata {
181181
* Source from which recommendation is generated
182182
*/
183183
source?: string;
184+
/**
185+
* The action to view resource.
186+
*/
187+
action?: { [propertyName: string]: any };
188+
/**
189+
* The singular user friendly name of resource type. eg: virtual machine
190+
*/
191+
singular?: string;
192+
/**
193+
* The plural user friendly name of resource type. eg: virtual machines
194+
*/
195+
plural?: string;
184196
}
185197

186198
/**
@@ -237,6 +249,34 @@ export interface ResourceRecommendationBase extends Resource {
237249
* Metadata of resource that was assessed
238250
*/
239251
resourceMetadata?: ResourceMetadata;
252+
/**
253+
* The detailed description of recommendation.
254+
*/
255+
description?: string;
256+
/**
257+
* The label of recommendation.
258+
*/
259+
label?: string;
260+
/**
261+
* The link to learn more about recommendation and generation logic.
262+
*/
263+
learnMoreLink?: string;
264+
/**
265+
* The potential benefit of implementing recommendation.
266+
*/
267+
potentialBenefits?: string;
268+
/**
269+
* The list of recommended actions to implement recommendation.
270+
*/
271+
actions?: { [propertyName: string]: any }[];
272+
/**
273+
* The automated way to apply recommendation.
274+
*/
275+
remediation?: { [propertyName: string]: any };
276+
/**
277+
* The recommendation metadata properties exposed to customer to provide additional information.
278+
*/
279+
exposedMetadataProperties?: { [propertyName: string]: any };
240280
}
241281

242282
/**
@@ -288,14 +328,43 @@ export interface SuppressionContract extends Resource {
288328
* The duration for which the suppression is valid.
289329
*/
290330
ttl?: string;
331+
/**
332+
* Gets or sets the expiration time stamp.
333+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
334+
*/
335+
readonly expirationTimeStamp?: Date;
291336
}
292337

293338
/**
294339
* Optional Parameters.
295340
*/
296341
export interface RecommendationsListOptionalParams extends msRest.RequestOptionsBase {
297342
/**
298-
* The filter to apply to the recommendations.
343+
* The filter to apply to the recommendations.<br>Filter can be applied to properties
344+
* ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with
345+
* operators ['eq', 'and', 'or'].<br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup
346+
* eq 'MyResourceGroup'
347+
*/
348+
filter?: string;
349+
/**
350+
* The number of recommendations per page if a paged version of this API is being used.
351+
*/
352+
top?: number;
353+
/**
354+
* The page-continuation token to use with a paged version of this API.
355+
*/
356+
skipToken?: string;
357+
}
358+
359+
/**
360+
* Optional Parameters.
361+
*/
362+
export interface RecommendationsListNextOptionalParams extends msRest.RequestOptionsBase {
363+
/**
364+
* The filter to apply to the recommendations.<br>Filter can be applied to properties
365+
* ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with
366+
* operators ['eq', 'and', 'or'].<br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup
367+
* eq 'MyResourceGroup'
299368
*/
300369
filter?: string;
301370
/**
@@ -322,6 +391,20 @@ export interface SuppressionsListOptionalParams extends msRest.RequestOptionsBas
322391
skipToken?: string;
323392
}
324393

394+
/**
395+
* Optional Parameters.
396+
*/
397+
export interface SuppressionsListNextOptionalParams extends msRest.RequestOptionsBase {
398+
/**
399+
* The number of suppressions per page if a paged version of this API is being used.
400+
*/
401+
top?: number;
402+
/**
403+
* The page-continuation token to use with a paged version of this API.
404+
*/
405+
skipToken?: string;
406+
}
407+
325408
/**
326409
* An interface representing AdvisorManagementClientOptions.
327410
*/
@@ -456,12 +539,7 @@ export type Risk = 'Error' | 'Warning' | 'None';
456539
/**
457540
* Contains response data for the get operation.
458541
*/
459-
export type RecommendationMetadataGetResponse = {
460-
/**
461-
* The parsed response body.
462-
*/
463-
body: any;
464-
542+
export type RecommendationMetadataGetResponse = MetadataEntity & {
465543
/**
466544
* The underlying HTTP response.
467545
*/
@@ -474,7 +552,7 @@ export type RecommendationMetadataGetResponse = {
474552
/**
475553
* The response body as parsed JSON or XML
476554
*/
477-
parsedBody: any;
555+
parsedBody: MetadataEntity;
478556
};
479557
};
480558

0 commit comments

Comments
 (0)