Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

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

260 changes: 255 additions & 5 deletions sdk/sql/arm-sql/CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/sql/arm-sql/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
9 changes: 3 additions & 6 deletions sdk/sql/arm-sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,21 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure SqlManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
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://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.

```ts snippet:ReadmeSampleCreateClient_Node
import { SqlManagementClient } from "@azure/arm-sql";
import { DefaultAzureCredential } from "@azure/identity";

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

For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.

```ts snippet:ReadmeSampleCreateClient_Browser
import { InteractiveBrowserCredential } from "@azure/identity";
import { SqlManagementClient } from "@azure/arm-sql";
Expand All @@ -73,7 +72,6 @@ const client = new SqlManagementClient(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
Expand Down Expand Up @@ -109,7 +107,6 @@ If you'd like to contribute to this library, please read the [contributing guide
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)



[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
Expand Down
10 changes: 5 additions & 5 deletions sdk/sql/arm-sql/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "1db2fcc22dec6f21d359d3b56f822f61f5d6ee12",
"commit": "d7b5cae83f8cb8b7050787d970744a6fcebe57fa",
"readme": "specification/sql/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\sql\\resource-manager\\readme.md --use=@autorest/[email protected].24 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\sql\\resource-manager\\readme.md --use=@autorest/[email protected].46 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.11",
"use": "@autorest/[email protected].24"
}
"release_tool": "@azure-tools/js-sdk-release-tools@2.14.2",
"use": "@autorest/[email protected].46"
}
2 changes: 1 addition & 1 deletion sdk/sql/arm-sql/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/sql/arm-sql",
"Tag": "js/sql/arm-sql_8989d1c410"
"Tag": "js/sql/arm-sql_22bccad745"
}
64 changes: 32 additions & 32 deletions sdk/sql/arm-sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,27 @@
"node": ">=20.0.0"
},
"dependencies": {
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.9.0",
"@azure/core-client": "^1.9.2",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^2.1.2",
"@azure/core-paging": "^1.6.2",
"@azure/core-rest-pipeline": "^1.19.0",
"@azure/core-client": "^1.9.3",
"@azure/core-auth": "^1.9.0",
"@azure/core-rest-pipeline": "^1.19.1",
"tslib": "^2.8.1"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
"isomorphic",
"cloud"
],
"license": "MIT",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"@azure-tools/test-credential": "workspace:^",
"@azure-tools/test-recorder": "workspace:^",
Expand All @@ -42,34 +44,33 @@
"typescript": "catalog:",
"vitest": "catalog:testing"
},
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/",
"README.md",
"LICENSE",
"review/",
"CHANGELOG.md"
"LICENSE"
],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "tsc -p tsconfig.samples.json",
"check-format": "echo skipped",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"prepack": "npm run build",
"pack": "npm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"format": "echo skipped",
"lint": "echo skipped",
"pack": "pnpm pack 2>&1",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:samples": "echo skipped.",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"execute:samples": "echo skipped",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"test": "npm run test:node && npm run test:browser",
"test:node": "dev-tool run test:vitest",
"test:browser": "echo skipped",
"test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest",
"update-snippets": "dev-tool run update-snippets"
"update-snippets": "dev-tool run update-snippets",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"test:node:esm": "dev-tool run test:vitest --esm"
},
"sideEffects": false,
"//metadata": {
Expand All @@ -81,16 +82,8 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sql/arm-sql",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-sql?view=azure-node-preview"
},
"type": "module",
"browser": "./dist/browser/index.js",
"react-native": "./dist/react-native/index.js",
"tshy": {
"project": "../../../tsconfig.src.build.json",
"exports": {
Expand All @@ -107,8 +100,15 @@
],
"selfLink": false
},
"browser": "./dist/browser/index.js",
"react-native": "./dist/react-native/index.js",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sql/arm-sql",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-sql?view=azure-node-preview"
},
"exports": {
"./package.json": "./package.json",
".": {
Expand Down
Loading