Skip to content

Commit

Permalink
CodeGen from PR 21177 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 6a2bca651b1259d3de2fbd0564e03a2f9f74008e into 9366804c62e024801daf8a578924099ff644ccf6
  • Loading branch information
SDKAuto committed Oct 19, 2022
1 parent cfbaabf commit dc257d8
Show file tree
Hide file tree
Showing 21 changed files with 4,642 additions and 4 deletions.
29 changes: 26 additions & 3 deletions common/config/rush/pnpm-lock.yaml

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

7 changes: 6 additions & 1 deletion rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,11 @@
"packageName": "@azure/arm-devhub",
"projectFolder": "sdk/devhub/arm-devhub",
"versionPolicyName": "management"
},
{
"packageName": "@azure-rest/loadtestservice",
"projectFolder": "sdk/loadtestservice/loadtestservice-rest",
"versionPolicyName": "client"
}
]
}
}
39 changes: 39 additions & 0 deletions sdk/loadtestservice/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.

trigger:
branches:
include:
- main
- feature/*
- release/*
- hotfix/*
exclude:
- feature/v4
paths:
include:
- sdk/loadtestservice/
exclude:
- sdk/loadtestservice/ci.mgmt.yml
- sdk/loadtestservice/arm-loadtestservice
pr:
branches:
include:
- main
- feature/*
- release/*
- hotfix/*
exclude:
- feature/v4
paths:
include:
- sdk/loadtestservice/
exclude:
- sdk/loadtestservice/ci.mgmt.yml
- sdk/loadtestservice/arm-loadtestservice
extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: loadtestservice
Artifacts:
- name: azure-rest-loadtestservice
safeName: azurerestloadtestservice
11 changes: 11 additions & 0 deletions sdk/loadtestservice/loadtestservice-rest/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": ["@azure/azure-sdk"],
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
"rules": {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn"
}
}
3 changes: 3 additions & 0 deletions sdk/loadtestservice/loadtestservice-rest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0-beta.1 (2022-10-19)

- Initial Release
21 changes: 21 additions & 0 deletions sdk/loadtestservice/loadtestservice-rest/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.
59 changes: 59 additions & 0 deletions sdk/loadtestservice/loadtestservice-rest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Azure LoadTesting REST client library for JavaScript

These APIs allow end users to create, view and run load tests using Azure Load Test Service.

**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**

Key links:

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

## Getting started

### Currently supported environments

- Node.js version 14.x.x or higher

### Prerequisites

- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.

### Install the `@azure-rest/loadtestservice` package

Install the Azure LoadTesting REST client REST client library for JavaScript with `npm`:

```bash
npm install @azure-rest/loadtestservice
```

### Create and authenticate a `LoadTestingClient`

To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
provide an instance of the desired credential type obtained from the
[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.

To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)

After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
can be used to authenticate the client.

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

## Troubleshooting

### Logging

Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:

```javascript
import { setLogLevel } from "@azure/logger";

setLogLevel("info");
```

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
31 changes: 31 additions & 0 deletions sdk/loadtestservice/loadtestservice-rest/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./types/index.d.ts",
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/loadtestservice.d.ts"
},
"messages": {
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
94 changes: 94 additions & 0 deletions sdk/loadtestservice/loadtestservice-rest/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"name": "@azure-rest/loadtestservice",
"sdk-type": "client",
"author": "Microsoft Corporation",
"version": "1.0.0-beta.1",
"description": "A generated SDK for LoadTestingClient.",
"keywords": [
"node",
"azure",
"cloud",
"typescript",
"browser",
"isomorphic"
],
"license": "MIT",
"main": "dist/index.js",
"module": "./dist-esm/index.js",
"types": "./types/loadtestservice.d.ts",
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/",
"dist-esm/",
"types/loadtestservice.d.ts",
"README.md",
"LICENSE",
"review/*"
],
"engines": {
"node": ">=14.0.0"
},
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:browser": "tsc -p . && dev-tool run bundle",
"build:node": "tsc -p . && dev-tool run bundle",
"build:samples": "echo skipped.",
"build:test": "echo skipped.",
"build:debug": "tsc -p . && dev-tool run bundle && api-extractor run --local",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
"generate:client": "autorest --typescript swagger/README.md && npm run format",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test": "echo skipped",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts",
"pack": "npm pack 2>&1",
"test:browser": "echo skipped",
"test:node": "echo skipped",
"test": "echo \"Error: no test specified\" && exit 1",
"unit-test": "echo skipped",
"unit-test:node": "echo skipped",
"unit-test:browser": "echo skipped",
"build": "npm run clean && tsc -p . && dev-tool run bundle && mkdirp ./review && api-extractor run --local"
},
"sideEffects": false,
"autoPublish": false,
"dependencies": {
"@azure/core-auth": "^1.3.0",
"@azure-rest/core-client": "1.0.0-beta.10",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.2.0",
"@azure/core-paging": "^1.2.0"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"autorest": "latest",
"@types/node": "^14.0.0",
"dotenv": "^8.2.0",
"eslint": "^8.0.0",
"mkdirp": "^1.0.4",
"prettier": "2.2.1",
"rimraf": "^3.0.0",
"source-map-support": "^0.5.9",
"typescript": "~4.6.0",
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/loadtestservice-rest/README.md",
"//metadata": {
"constantPaths": [
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
}
}
Loading

0 comments on commit dc257d8

Please sign in to comment.