Skip to content

Commit 5c2678c

Browse files
author
SDKAuto
committed
CodeGen from PR 14870 in Azure/azure-rest-api-specs
Merge 9fa0da8cc9df287529349eabe6611783cca388c9 into 68c2d7c5e56c4c70e46d7158f19cdbf29dbdbfc4
1 parent 20321ef commit 5c2678c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+411
-11514
lines changed

sdk/applicationinsights/arm-appinsights/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/applicationinsights/arm-appinsights/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure ApplicationInsightsManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ApplicationInsightsManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for ApplicationInsightsManagementClient.
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-appinsights @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,8 +36,7 @@ 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-
41-
#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and listByResourceGroup workbookTemplates as an example written in JavaScript.
4240

4341
##### Sample code
4442

@@ -51,8 +49,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
5351
const client = new ApplicationInsightsManagementClient(creds, subscriptionId);
54-
55-
client.operations.list().then((result) => {
52+
const resourceGroupName = "testresourceGroupName";
53+
client.workbookTemplates.listByResourceGroup(resourceGroupName).then((result) => {
5654
console.log("The result is:");
5755
console.log(result);
5856
}).catch((err) => {
@@ -61,7 +59,7 @@ client.operations.list().then((result) => {
6159
});
6260
```
6361

64-
#### browser - Authentication, client creation, and list operations as an example written in JavaScript.
62+
#### browser - Authentication, client creation, and listByResourceGroup workbookTemplates as an example written in JavaScript.
6563

6664
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
6765
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
@@ -86,10 +84,11 @@ 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.ArmAppinsights.ApplicationInsightsManagementClient(creds, subscriptionId);
92-
client.operations.list().then((result) => {
90+
const resourceGroupName = "testresourceGroupName";
91+
client.workbookTemplates.listByResourceGroup(resourceGroupName).then((result) => {
9392
console.log("The result is:");
9493
console.log(result);
9594
}).catch((err) => {

sdk/applicationinsights/arm-appinsights/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/applicationinsights/arm-appinsights",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/applicationinsights/arm-appinsights",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

sdk/applicationinsights/arm-appinsights/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/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts

Lines changed: 4 additions & 41 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
@@ -18,25 +17,7 @@ import { ApplicationInsightsManagementClientContext } from "./applicationInsight
1817

1918
class ApplicationInsightsManagementClient extends ApplicationInsightsManagementClientContext {
2019
// Operation groups
21-
operations: operations.Operations;
22-
annotations: operations.Annotations;
23-
aPIKeys: operations.APIKeys;
24-
exportConfigurations: operations.ExportConfigurations;
25-
componentCurrentBillingFeatures: operations.ComponentCurrentBillingFeatures;
26-
componentQuotaStatus: operations.ComponentQuotaStatus;
27-
componentFeatureCapabilities: operations.ComponentFeatureCapabilities;
28-
componentAvailableFeatures: operations.ComponentAvailableFeatures;
29-
proactiveDetectionConfigurations: operations.ProactiveDetectionConfigurations;
30-
workItemConfigurations: operations.WorkItemConfigurations;
31-
favorites: operations.Favorites;
32-
webTestLocations: operations.WebTestLocations;
33-
webTests: operations.WebTests;
34-
analyticsItems: operations.AnalyticsItems;
35-
workbooks: operations.Workbooks;
36-
myWorkbooks: operations.MyWorkbooks;
37-
components: operations.Components;
38-
componentLinkedStorageAccounts: operations.ComponentLinkedStorageAccountsOperations;
39-
liveToken: operations.LiveToken;
20+
workbookTemplates: operations.WorkbookTemplates;
4021

4122
/**
4223
* Initializes a new instance of the ApplicationInsightsManagementClient class.
@@ -51,25 +32,7 @@ class ApplicationInsightsManagementClient extends ApplicationInsightsManagementC
5132
*/
5233
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ApplicationInsightsManagementClientOptions) {
5334
super(credentials, subscriptionId, options);
54-
this.operations = new operations.Operations(this);
55-
this.annotations = new operations.Annotations(this);
56-
this.aPIKeys = new operations.APIKeys(this);
57-
this.exportConfigurations = new operations.ExportConfigurations(this);
58-
this.componentCurrentBillingFeatures = new operations.ComponentCurrentBillingFeatures(this);
59-
this.componentQuotaStatus = new operations.ComponentQuotaStatus(this);
60-
this.componentFeatureCapabilities = new operations.ComponentFeatureCapabilities(this);
61-
this.componentAvailableFeatures = new operations.ComponentAvailableFeatures(this);
62-
this.proactiveDetectionConfigurations = new operations.ProactiveDetectionConfigurations(this);
63-
this.workItemConfigurations = new operations.WorkItemConfigurations(this);
64-
this.favorites = new operations.Favorites(this);
65-
this.webTestLocations = new operations.WebTestLocations(this);
66-
this.webTests = new operations.WebTests(this);
67-
this.analyticsItems = new operations.AnalyticsItems(this);
68-
this.workbooks = new operations.Workbooks(this);
69-
this.myWorkbooks = new operations.MyWorkbooks(this);
70-
this.components = new operations.Components(this);
71-
this.componentLinkedStorageAccounts = new operations.ComponentLinkedStorageAccountsOperations(this);
72-
this.liveToken = new operations.LiveToken(this);
35+
this.workbookTemplates = new operations.WorkbookTemplates(this);
7336
}
7437
}
7538

sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts

Lines changed: 8 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,14 +9,15 @@
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-appinsights";
1716
const packageVersion = "3.1.0";
1817

1918
export class ApplicationInsightsManagementClientContext extends msRestAzure.AzureServiceClient {
2019
credentials: msRest.ServiceClientCredentials | TokenCredential;
20+
apiVersion?: string;
2121
subscriptionId: string;
2222

2323
/**
@@ -42,24 +42,25 @@ export class ApplicationInsightsManagementClientContext extends msRestAzure.Azur
4242
if (!options) {
4343
options = {};
4444
}
45-
if(!options.userAgent) {
45+
if (!options.userAgent) {
4646
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
4747
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
4848
}
4949

5050
super(credentials, options);
5151

52+
this.apiVersion = '2020-11-20';
5253
this.acceptLanguage = 'en-US';
5354
this.longRunningOperationRetryTimeout = 30;
5455
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
5556
this.requestContentType = "application/json; charset=utf-8";
5657
this.credentials = credentials;
5758
this.subscriptionId = subscriptionId;
5859

59-
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
60+
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
6061
this.acceptLanguage = options.acceptLanguage;
6162
}
62-
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
63+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
6364
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
6465
}
6566
}

sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)