Skip to content

Commit 27fd704

Browse files
author
SDKAuto
committed
CodeGen from PR 15641 in Azure/azure-rest-api-specs
Merge 3da7face71169595d831f26249854d30196fb3c2 into 60d6c393c7e71b45ebe0976a35fd7a5841993159
1 parent 3b51a6e commit 27fd704

17 files changed

+954
-944
lines changed

sdk/managedapplications/arm-managedapplications/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) 2019 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/managedapplications/arm-managedapplications/README.md

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

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagedApplicationClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for ApplicationClient.
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-managedapplications @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,21 +36,19 @@ 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 listOperations as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and listOperations as an example written in JavaScript.
4240

4341
##### Sample code
4442

4543
```javascript
4644
const { DefaultAzureCredential } = require("@azure/identity");
47-
const { ManagedApplicationClient } = require("@azure/arm-managedapplications");
45+
const { ApplicationClient } = require("@azure/arm-managedapplications");
4846
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
4947

5048
// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
53-
const client = new ManagedApplicationClient(creds, subscriptionId);
54-
51+
const client = new ApplicationClient(creds, subscriptionId);
5552
client.listOperations().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
@@ -61,7 +58,7 @@ client.listOperations().then((result) => {
6158
});
6259
```
6360

64-
#### browser - Authentication, client creation, and listOperations as an example written in JavaScript.
61+
#### browser - Authentication, client creation, and listOperations as an example written in JavaScript.
6562

6663
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
6764
- 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,9 +83,9 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8683
const credential = new InteractiveBrowserCredential(
8784
{
8885
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
86+
tenant: "<optional tenant for your organization>"
9087
});
91-
const client = new Azure.ArmManagedapplications.ManagedApplicationClient(creds, subscriptionId);
88+
const client = new Azure.ArmManagedapplications.ApplicationClient(creds, subscriptionId);
9289
client.listOperations().then((result) => {
9390
console.log("The result is:");
9491
console.log(result);

sdk/managedapplications/arm-managedapplications/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@azure/arm-managedapplications",
33
"author": "Microsoft Corporation",
4-
"description": "ManagedApplicationClient Library with typescript type definitions for node.js and browser.",
4+
"description": "ApplicationClient Library with typescript type definitions for node.js and browser.",
55
"version": "1.1.1",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.4.0",
8-
"@azure/ms-rest-js": "^1.11.0",
7+
"@azure/ms-rest-azure-js": "^2.1.0",
8+
"@azure/ms-rest-js": "^2.2.0",
99
"@azure/core-auth": "^1.1.4",
10-
"tslib": "^1.9.3"
10+
"tslib": "^1.10.0"
1111
},
1212
"keywords": [
1313
"node",
@@ -18,16 +18,16 @@
1818
],
1919
"license": "MIT",
2020
"main": "./dist/arm-managedapplications.js",
21-
"module": "./esm/managedApplicationClient.js",
22-
"types": "./esm/managedApplicationClient.d.ts",
21+
"module": "./esm/applicationClient.js",
22+
"types": "./esm/applicationClient.d.ts",
2323
"devDependencies": {
2424
"typescript": "^3.6.0",
25-
"rollup": "^0.66.2",
26-
"rollup-plugin-node-resolve": "^3.4.0",
25+
"rollup": "^1.18.0",
26+
"rollup-plugin-node-resolve": "^5.2.0",
2727
"rollup-plugin-sourcemaps": "^0.4.2",
28-
"uglify-js": "^3.4.9"
28+
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/managedapplications/arm-managedapplications",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/managedapplications/arm-managedapplications",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps";
66
* @type {rollup.RollupFileOptions}
77
*/
88
const config = {
9-
input: "./esm/managedApplicationClient.js",
9+
input: "./esm/applicationClient.js",
1010
external: [
1111
"@azure/ms-rest-js",
1212
"@azure/ms-rest-azure-js"
@@ -21,15 +21,15 @@ 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.
2929
*/`
3030
},
3131
plugins: [
32-
nodeResolve({ module: true }),
32+
nodeResolve({ mainFields: ['module', 'main'] }),
3333
sourcemaps()
3434
]
3535
};

sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts renamed to sdk/managedapplications/arm-managedapplications/src/applicationClient.ts

Lines changed: 17 additions & 15 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
@@ -14,16 +13,16 @@ import * as Models from "./models";
1413
import * as Mappers from "./models/mappers";
1514
import * as Parameters from "./models/parameters";
1615
import * as operations from "./operations";
17-
import { ManagedApplicationClientContext } from "./managedApplicationClientContext";
16+
import { ApplicationClientContext } from "./applicationClientContext";
1817

1918

20-
class ManagedApplicationClient extends ManagedApplicationClientContext {
19+
class ApplicationClient extends ApplicationClientContext {
2120
// Operation groups
22-
appliances: operations.Appliances;
23-
applianceDefinitions: operations.ApplianceDefinitions;
21+
applications: operations.Applications;
22+
applicationDefinitions: operations.ApplicationDefinitions;
2423

2524
/**
26-
* Initializes a new instance of the ManagedApplicationClient class.
25+
* Initializes a new instance of the ApplicationClient class.
2726
* @param credentials Credentials needed for the client to connect to Azure. Credentials
2827
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
2928
* more information about these credentials, see
@@ -33,10 +32,10 @@ class ManagedApplicationClient extends ManagedApplicationClientContext {
3332
* @param subscriptionId The ID of the target subscription.
3433
* @param [options] The parameter options
3534
*/
36-
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) {
35+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ApplicationClientOptions) {
3736
super(credentials, subscriptionId, options);
38-
this.appliances = new operations.Appliances(this);
39-
this.applianceDefinitions = new operations.ApplianceDefinitions(this);
37+
this.applications = new operations.Applications(this);
38+
this.applicationDefinitions = new operations.ApplicationDefinitions(this);
4039
}
4140

4241
/**
@@ -121,6 +120,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
121120
urlParameters: [
122121
Parameters.nextPageLink
123122
],
123+
queryParameters: [
124+
Parameters.apiVersion
125+
],
124126
headerParameters: [
125127
Parameters.acceptLanguage
126128
],
@@ -136,9 +138,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
136138
};
137139

138140
export {
139-
ManagedApplicationClient,
140-
ManagedApplicationClientContext,
141-
Models as ManagedApplicationModels,
142-
Mappers as ManagedApplicationMappers
141+
ApplicationClient,
142+
ApplicationClientContext,
143+
Models as ApplicationModels,
144+
Mappers as ApplicationMappers
143145
};
144146
export * from "./operations";

sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts renamed to sdk/managedapplications/arm-managedapplications/src/applicationClientContext.ts

Lines changed: 7 additions & 8 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,19 +9,19 @@
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-managedapplications";
1716
const packageVersion = "1.1.1";
1817

19-
export class ManagedApplicationClientContext extends msRestAzure.AzureServiceClient {
18+
export class ApplicationClientContext extends msRestAzure.AzureServiceClient {
2019
credentials: msRest.ServiceClientCredentials | TokenCredential;
2120
subscriptionId: string;
2221
apiVersion?: string;
2322

2423
/**
25-
* Initializes a new instance of the ManagedApplicationClient class.
24+
* Initializes a new instance of the ApplicationClient class.
2625
* @param credentials Credentials needed for the client to connect to Azure. Credentials
2726
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
2827
* more information about these credentials, see
@@ -32,7 +31,7 @@ export class ManagedApplicationClientContext extends msRestAzure.AzureServiceCli
3231
* @param subscriptionId The ID of the target subscription.
3332
* @param [options] The parameter options
3433
*/
35-
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) {
34+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ApplicationClientOptions) {
3635
if (credentials == undefined) {
3736
throw new Error('\'credentials\' cannot be null.');
3837
}
@@ -50,7 +49,7 @@ export class ManagedApplicationClientContext extends msRestAzure.AzureServiceCli
5049

5150
super(credentials, options);
5251

53-
this.apiVersion = '2016-09-01-preview';
52+
this.apiVersion = '2018-06-01';
5453
this.acceptLanguage = 'en-US';
5554
this.longRunningOperationRetryTimeout = 30;
5655
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/managedapplications/arm-managedapplications/src/models/applianceDefinitionsMappers.ts

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

sdk/managedapplications/arm-managedapplications/src/models/appliancesMappers.ts renamed to sdk/managedapplications/arm-managedapplications/src/models/applicationDefinitionsMappers.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
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.
77
*/
88

99
export {
10-
Appliance,
11-
ApplianceArtifact,
12-
ApplianceDefinition,
13-
ApplianceListResult,
14-
AppliancePatchable,
15-
ApplianceProviderAuthorization,
10+
Application,
11+
ApplicationArtifact,
12+
ApplicationDefinition,
13+
ApplicationDefinitionListResult,
14+
ApplicationPatchable,
15+
ApplicationProviderAuthorization,
1616
BaseResource,
1717
ErrorResponse,
1818
GenericResource,
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
Application,
11+
ApplicationArtifact,
12+
ApplicationDefinition,
13+
ApplicationListResult,
14+
ApplicationPatchable,
15+
ApplicationProviderAuthorization,
16+
BaseResource,
17+
ErrorResponse,
18+
GenericResource,
19+
Identity,
20+
Plan,
21+
PlanPatchable,
22+
Resource,
23+
Sku
24+
} from "../models/mappers";

0 commit comments

Comments
 (0)