Skip to content

Commit f31f00d

Browse files
author
SDKAuto
committed
CodeGen from PR 10445 in Azure/azure-rest-api-specs
Merge 88d738c1f25fdfea2329a97d3a96ae9e4ce17426 into 7b34c62199a8d84f7252dcb8b08c1b593ae65124
1 parent 6c6ce54 commit f31f00d

25 files changed

+957
-533
lines changed

sdk/authorization/arm-authorization/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) 2020 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/authorization/arm-authorization/README.md

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,32 @@ npm install @azure/arm-authorization
1515

1616
### How to use
1717

18-
#### nodejs - Authentication, client creation and list classicAdministrators as an example written in TypeScript.
18+
#### nodejs - client creation and list classicAdministrators as an example written in TypeScript.
1919

2020
##### Install @azure/ms-rest-nodeauth
2121

22+
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
2223
```bash
23-
npm install @azure/ms-rest-nodeauth
24+
npm install @azure/ms-rest-nodeauth@"^3.0.0"
2425
```
2526

2627
##### Sample code
2728

28-
```javascript
29+
While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
30+
```typescript
31+
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
2932
const { AuthorizationManagementClient } = require("@azure/arm-authorization");
30-
const { interactiveLogin } = require("@azure/ms-rest-nodeauth");
31-
3233
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3334

34-
interactiveLogin()
35-
.then((creds) => {
36-
const client = new AuthorizationManagementClient(creds, subscriptionId);
37-
client.classicAdministrators.list().then((result) => {
38-
console.log("The result is:");
39-
console.log(result);
40-
});
41-
})
42-
.catch((err) => {
43-
console.error(err);
35+
msRestNodeAuth.interactiveLogin().then((creds) => {
36+
const client = new AuthorizationManagementClient(creds, subscriptionId);
37+
client.classicAdministrators.list().then((result) => {
38+
console.log("The result is:");
39+
console.log(result);
4440
});
41+
}).catch((err) => {
42+
console.error(err);
43+
});
4544
```
4645

4746
#### browser - Authentication, client creation and list classicAdministrators as an example written in JavaScript.
@@ -57,7 +56,6 @@ npm install @azure/ms-rest-browserauth
5756
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
5857

5958
- index.html
60-
6159
```html
6260
<!DOCTYPE html>
6361
<html lang="en">
@@ -71,27 +69,21 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
7169
const subscriptionId = "<Subscription_Id>";
7270
const authManager = new msAuth.AuthManager({
7371
clientId: "<client id for your Azure AD app>",
74-
tenant: "<optional tenant for your organization>",
72+
tenant: "<optional tenant for your organization>"
7573
});
7674
authManager.finalizeLogin().then((res) => {
7775
if (!res.isLoggedIn) {
7876
// may cause redirects
7977
authManager.login();
8078
}
81-
const client = new Azure.ArmAuthorization.AuthorizationManagementClient(
82-
res.creds,
83-
subscriptionId
84-
);
85-
client.classicAdministrators
86-
.list()
87-
.then((result) => {
88-
console.log("The result is:");
89-
console.log(result);
90-
})
91-
.catch((err) => {
92-
console.log("An error occurred:");
93-
console.error(err);
94-
});
79+
const client = new Azure.ArmAuthorization.AuthorizationManagementClient(res.creds, subscriptionId);
80+
client.classicAdministrators.list().then((result) => {
81+
console.log("The result is:");
82+
console.log(result);
83+
}).catch((err) => {
84+
console.log("An error occurred:");
85+
console.error(err);
86+
});
9587
});
9688
</script>
9789
</head>
@@ -103,4 +95,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
10395

10496
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
10597

106-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fauthorization%2Farm-authorization%2FREADME.png)
98+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/authorization/arm-authorization/README.png)

sdk/authorization/arm-authorization/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"description": "AuthorizationManagementClient Library with typescript type definitions for node.js and browser.",
55
"version": "8.3.3",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^2.0.0",
8-
"@azure/ms-rest-js": "^2.0.3",
9-
"tslib": "^1.9.3"
7+
"@azure/ms-rest-azure-js": "^2.0.1",
8+
"@azure/ms-rest-js": "^2.0.4",
9+
"tslib": "^1.10.0"
1010
},
1111
"keywords": [
1212
"node",
@@ -20,11 +20,11 @@
2020
"module": "./esm/authorizationManagementClient.js",
2121
"types": "./esm/authorizationManagementClient.d.ts",
2222
"devDependencies": {
23-
"typescript": "^3.1.1",
24-
"rollup": "^0.66.2",
25-
"rollup-plugin-node-resolve": "^3.4.0",
23+
"typescript": "^3.5.3",
24+
"rollup": "^1.18.0",
25+
"rollup-plugin-node-resolve": "^5.2.0",
2626
"rollup-plugin-sourcemaps": "^0.4.2",
27-
"uglify-js": "^3.4.9"
27+
"uglify-js": "^3.6.0"
2828
},
2929
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/authorization/arm-authorization",
3030
"repository": {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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/authorization/arm-authorization/src/authorizationManagementClient.ts

Lines changed: 4 additions & 5 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
@@ -20,10 +19,10 @@ class AuthorizationManagementClient extends AuthorizationManagementClientContext
2019
classicAdministrators: operations.ClassicAdministrators;
2120
globalAdministrator: operations.GlobalAdministrator;
2221
providerOperationsMetadata: operations.ProviderOperationsMetadataOperations;
23-
roleAssignments: operations.RoleAssignments;
2422
permissions: operations.Permissions;
2523
roleDefinitions: operations.RoleDefinitions;
2624
denyAssignments: operations.DenyAssignments;
25+
roleAssignments: operations.RoleAssignments;
2726

2827
/**
2928
* Initializes a new instance of the AuthorizationManagementClient class.
@@ -36,10 +35,10 @@ class AuthorizationManagementClient extends AuthorizationManagementClientContext
3635
this.classicAdministrators = new operations.ClassicAdministrators(this);
3736
this.globalAdministrator = new operations.GlobalAdministrator(this);
3837
this.providerOperationsMetadata = new operations.ProviderOperationsMetadataOperations(this);
39-
this.roleAssignments = new operations.RoleAssignments(this);
4038
this.permissions = new operations.Permissions(this);
4139
this.roleDefinitions = new operations.RoleDefinitions(this);
4240
this.denyAssignments = new operations.DenyAssignments(this);
41+
this.roleAssignments = new operations.RoleAssignments(this);
4342
}
4443
}
4544

sdk/authorization/arm-authorization/src/authorizationManagementClientContext.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/authorization/arm-authorization/src/models/classicAdministratorsMappers.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/authorization/arm-authorization/src/models/denyAssignmentsMappers.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/authorization/arm-authorization/src/models/globalAdministratorMappers.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.

0 commit comments

Comments
 (0)