Skip to content

Commit cbde5ec

Browse files
author
SDK Automation
committed
Generated from 3dbb5209c6a1c11318e31c2ebc33af76fdf71942
Access Reviews Schema addendum | Expose reviewer and statistics APIs
1 parent 8ba3ef3 commit cbde5ec

24 files changed

+228
-3553
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: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,42 @@ 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 - Authentication, client creation and listForResource roleAssignments 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-
const { AuthorizationManagementClient } = require("@azure/arm-authorization");
30-
const { interactiveLogin } = require("@azure/ms-rest-nodeauth");
31-
29+
```typescript
30+
import * as msRest from "@azure/ms-rest-js";
31+
import * as msRestAzure from "@azure/ms-rest-azure-js";
32+
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
33+
import { AuthorizationManagementClient, AuthorizationManagementModels, AuthorizationManagementMappers } from "@azure/arm-authorization";
3234
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3335

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);
36+
msRestNodeAuth.interactiveLogin().then((creds) => {
37+
const client = new AuthorizationManagementClient(creds, subscriptionId);
38+
const resourceGroupName = "testresourceGroupName";
39+
const resourceProviderNamespace = "testresourceProviderNamespace";
40+
const parentResourcePath = "testparentResourcePath";
41+
const resourceType = "testresourceType";
42+
const resourceName = "testresourceName";
43+
const filter = "testfilter";
44+
client.roleAssignments.listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter).then((result) => {
45+
console.log("The result is:");
46+
console.log(result);
4447
});
48+
}).catch((err) => {
49+
console.error(err);
50+
});
4551
```
4652

47-
#### browser - Authentication, client creation and list classicAdministrators as an example written in JavaScript.
53+
#### browser - Authentication, client creation and listForResource roleAssignments as an example written in JavaScript.
4854

4955
##### Install @azure/ms-rest-browserauth
5056

@@ -57,7 +63,6 @@ npm install @azure/ms-rest-browserauth
5763
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
5864

5965
- index.html
60-
6166
```html
6267
<!DOCTYPE html>
6368
<html lang="en">
@@ -71,27 +76,27 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
7176
const subscriptionId = "<Subscription_Id>";
7277
const authManager = new msAuth.AuthManager({
7378
clientId: "<client id for your Azure AD app>",
74-
tenant: "<optional tenant for your organization>",
79+
tenant: "<optional tenant for your organization>"
7580
});
7681
authManager.finalizeLogin().then((res) => {
7782
if (!res.isLoggedIn) {
7883
// may cause redirects
7984
authManager.login();
8085
}
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-
});
86+
const client = new Azure.ArmAuthorization.AuthorizationManagementClient(res.creds, subscriptionId);
87+
const resourceGroupName = "testresourceGroupName";
88+
const resourceProviderNamespace = "testresourceProviderNamespace";
89+
const parentResourcePath = "testparentResourcePath";
90+
const resourceType = "testresourceType";
91+
const resourceName = "testresourceName";
92+
const filter = "testfilter";
93+
client.roleAssignments.listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter).then((result) => {
94+
console.log("The result is:");
95+
console.log(result);
96+
}).catch((err) => {
97+
console.log("An error occurred:");
98+
console.error(err);
99+
});
95100
});
96101
</script>
97102
</head>
@@ -103,4 +108,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
103108

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

106-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fauthorization%2Farm-authorization%2FREADME.png)
111+
![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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const config = {
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: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ import { AuthorizationManagementClientContext } from "./authorizationManagementC
1717

1818
class AuthorizationManagementClient extends AuthorizationManagementClientContext {
1919
// Operation groups
20-
classicAdministrators: operations.ClassicAdministrators;
21-
globalAdministrator: operations.GlobalAdministrator;
22-
providerOperationsMetadata: operations.ProviderOperationsMetadataOperations;
2320
roleAssignments: operations.RoleAssignments;
24-
permissions: operations.Permissions;
25-
roleDefinitions: operations.RoleDefinitions;
26-
denyAssignments: operations.DenyAssignments;
2721

2822
/**
2923
* Initializes a new instance of the AuthorizationManagementClient class.
@@ -33,13 +27,7 @@ class AuthorizationManagementClient extends AuthorizationManagementClientContext
3327
*/
3428
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AuthorizationManagementClientOptions) {
3529
super(credentials, subscriptionId, options);
36-
this.classicAdministrators = new operations.ClassicAdministrators(this);
37-
this.globalAdministrator = new operations.GlobalAdministrator(this);
38-
this.providerOperationsMetadata = new operations.ProviderOperationsMetadataOperations(this);
3930
this.roleAssignments = new operations.RoleAssignments(this);
40-
this.permissions = new operations.Permissions(this);
41-
this.roleDefinitions = new operations.RoleDefinitions(this);
42-
this.denyAssignments = new operations.DenyAssignments(this);
4331
}
4432
}
4533

sdk/authorization/arm-authorization/src/authorizationManagementClientContext.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const packageVersion = "8.3.3";
1818
export class AuthorizationManagementClientContext extends msRestAzure.AzureServiceClient {
1919
credentials: msRest.ServiceClientCredentials;
2020
subscriptionId: string;
21+
apiVersion?: string;
2122

2223
/**
2324
* Initializes a new instance of the AuthorizationManagementClient class.
@@ -43,6 +44,7 @@ export class AuthorizationManagementClientContext extends msRestAzure.AzureServi
4344

4445
super(credentials, options);
4546

47+
this.apiVersion = '2020-04-01-preview';
4648
this.acceptLanguage = 'en-US';
4749
this.longRunningOperationRetryTimeout = 30;
4850
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/authorization/arm-authorization/src/models/classicAdministratorsMappers.ts

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

sdk/authorization/arm-authorization/src/models/denyAssignmentsMappers.ts

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

sdk/authorization/arm-authorization/src/models/globalAdministratorMappers.ts

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

0 commit comments

Comments
 (0)