Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-authorization] Update RoleManagementAlerts paths #3056

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 6 additions & 33 deletions sdk/authorization/arm-authorization/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
# Release History

## 9.0.0-beta.4 (2022-12-02)

## 9.0.0-beta.4 (Unreleased)
The package of @azure/arm-authorization is using our next generation design principles since version 9.0.0-beta.4, which contains breaking changes.

### Features Added
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).

### Breaking Changes
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).

### Bugs Fixed

### Other Changes

## 9.0.0-beta.3 (2022-10-08)

**Bugs Fixed**

- revert credential scopes

## 9.0.0-beta.2 (2022-09-30)

**Bugs Fixed**

- fix better user experience of credential scopes in government cloud

## 9.0.0-beta.1 (2021-10-09)

This is the first preview for the new version of the `@azure/arm-authorization` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.

While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).

Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.

**Noteworthy changes and features**
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
2 changes: 1 addition & 1 deletion sdk/authorization/arm-authorization/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Microsoft
Copyright (c) 2022 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 20 additions & 4 deletions sdk/authorization/arm-authorization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure AuthorizationManagement client.

Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role assignments. A role assignment grants access to Azure Active Directory users.
Access reviews service provides the workflow for running access reviews on different kind of resources.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/authorization/arm-authorization) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-authorization) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-authorization) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-authorization?view=azure-node-preview) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand All @@ -16,6 +16,8 @@ Role based access control provides you a way to apply granular level policy admi
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
- Latest versions of Safari, Chrome, Edge and Firefox.

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.

### Prerequisites

- An [Azure subscription][azure_sub].
Expand All @@ -33,9 +35,9 @@ npm install @azure/arm-authorization
To create a client object to access the Azure AuthorizationManagement API, you will need the `endpoint` of your Azure AuthorizationManagement resource and a `credential`. The Azure AuthorizationManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure AuthorizationManagement resource in the [Azure Portal][azure_portal].

#### Using an Azure Active Directory Credential
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:

```bash
npm install @azure/identity
Expand All @@ -45,13 +47,27 @@ You will also need to **register a new AAD application and grant access to Azure
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.

For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

```javascript
const { AuthorizationManagementClient } = require("@azure/arm-authorization");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new AuthorizationManagementClient(new DefaultAzureCredential(), subscriptionId);

// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new AuthorizationManagementClient(credential, subscriptionId);
```


### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).

## Key concepts

### AuthorizationManagementClient
Expand Down
7 changes: 4 additions & 3 deletions sdk/authorization/arm-authorization/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"commit": "f9e4843e2ed3494e8bd66a92c3e7f65655f58f46",
"commit": "7fa3a133a04c39416845556fef090acd6d9ae871",
"readme": "specification/authorization/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/authorization/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.12",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/authorization/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-beta.12"
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.1",
"use": "@autorest/typescript@6.0.0-rc.2"
}
27 changes: 20 additions & 7 deletions sdk/authorization/arm-authorization/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-authorization.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}
61 changes: 39 additions & 22 deletions sdk/authorization/arm-authorization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-paging": "^1.1.1",
"@azure/core-client": "^1.0.0",
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.5.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.1.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -23,19 +25,28 @@
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-authorization.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^2.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9"
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.6.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/authorization/arm-authorization",
"repository": {
Expand Down Expand Up @@ -64,33 +75,39 @@
"types/*"
],
"scripts": {
"build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"prepack": "npm run build",
"pack": "npm pack 2>&1",
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "echo skipped",
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
"build:test": "echo skipped",
"build:samples": "echo skipped.",
"check-format": "echo skipped",
"execute:samples": "echo skipped",
"format": "echo skipped",
"test": "echo skipped",
"prebuild": "echo skipped",
"test": "npm run integration-test",
"test:node": "echo skipped",
"test:browser": "echo skipped",
"unit-test": "echo skipped",
"unit-test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:browser": "echo skipped",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test": "echo skipped",
"docs": "echo skipped"
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/authorizationManagementClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true
}
}
Loading