Skip to content

Commit

Permalink
CodeGen from PR 32492 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge cc3edc57f4f48bf0742c4a0ecfc8b93a6e7a9577 into c39534a7c75580b1743130a7cdddafb71f28ae07
  • Loading branch information
SDKAuto committed Feb 7, 2025
1 parent 2b05e1f commit 2195559
Show file tree
Hide file tree
Showing 29 changed files with 727 additions and 675 deletions.
32 changes: 16 additions & 16 deletions common/config/rush/pnpm-lock.yaml

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

17 changes: 7 additions & 10 deletions sdk/trafficmanager/arm-trafficmanager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Release History

## 6.1.1 (Unreleased)

### Features Added


## 7.0.0 (2025-02-07)

### Breaking Changes

### Bugs Fixed

### Other Changes

- Class TrafficManagerManagementClient has a new signature


## 6.1.0 (2023-06-02)

### Features Added
Expand Down Expand Up @@ -43,4 +40,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka.

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

To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
8 changes: 4 additions & 4 deletions sdk/trafficmanager/arm-trafficmanager/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright (c) Microsoft Corporation.
The MIT License (MIT)

MIT License
Copyright (c) 2025 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 All @@ -12,10 +12,10 @@ 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
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.
SOFTWARE.
40 changes: 16 additions & 24 deletions sdk/trafficmanager/arm-trafficmanager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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



[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/trafficmanager/arm-trafficmanager) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-trafficmanager) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-trafficmanager) |
Expand Down Expand Up @@ -42,36 +44,27 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure TrafficManagerManagement** 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 { TrafficManagerManagementClient } from "@azure/arm-trafficmanager";
import { DefaultAzureCredential } from "@azure/identity";
```javascript
const { TrafficManagerManagementClient } = require("@azure/arm-trafficmanager");
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 TrafficManagerManagementClient(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 { TrafficManagerManagementClient } from "@azure/arm-trafficmanager";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const client = new TrafficManagerManagementClient(credential, 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 TrafficManagerManagementClient(credential, subscriptionId);
```

### JavaScript Bundle

### 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 All @@ -86,9 +79,8 @@ To use this client library in the browser, first you need to use a bundler. For

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`:

```ts snippet:SetLogLevel
import { setLogLevel } from "@azure/logger";

```javascript
const { setLogLevel } = require("@azure/logger");
setLogLevel("info");
```

Expand All @@ -106,7 +98,7 @@ 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)


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ftrafficmanager%2Farm-trafficmanager%2FREADME.png)

[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
Expand Down
10 changes: 5 additions & 5 deletions sdk/trafficmanager/arm-trafficmanager/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "a7db288cbce8b520781be6b23444fc895c4d6c81",
"commit": "29ed7c969b544ce290e5ed061f014870ae42780f",
"readme": "specification/trafficmanager/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\trafficmanager\\resource-manager\\readme.md --use=@autorest/[email protected].2 --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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/trafficmanager/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected].0",
"use": "@autorest/[email protected].2"
}
"release_tool": "@azure-tools/[email protected].18",
"use": "@autorest/typescript@^6.0.12"
}
6 changes: 3 additions & 3 deletions sdk/trafficmanager/arm-trafficmanager/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "dist/esm/index.d.ts",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": {
"enabled": true
},
Expand All @@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "dist/arm-trafficmanager.d.ts"
"publicTrimmedFilePath": "./types/arm-trafficmanager.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand All @@ -28,4 +28,4 @@
}
}
}
}
}
31 changes: 12 additions & 19 deletions sdk/trafficmanager/arm-trafficmanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,46 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for TrafficManagerManagementClient.",
"version": "6.1.1",
"version": "7.0.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-auth": "^1.9.0",
"@azure/core-client": "^1.9.2",
"@azure/core-paging": "^1.6.2",
"@azure/core-rest-pipeline": "^1.18.2",
"@azure/core-rest-pipeline": "^1.19.0",
"tslib": "^2.8.1"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic",
"cloud"
"isomorphic"
],
"license": "MIT",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"module": "./dist-esm/src/index.js",
"types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
"@azure-tools/test-utils-vitest": "^1.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.6.0",
"@azure/logger": "^1.1.4",
"@types/node": "^18.0.0",
"@vitest/browser": "^3.0.3",
"@vitest/coverage-istanbul": "^3.0.3",
"dotenv": "^16.0.0",
"playwright": "^1.50.0",
"typescript": "~5.7.2",
"playwright": "^1.50.1",
"typescript": "~5.6.2",
"vitest": "^3.0.3"
},
"repository": "github:Azure/azure-sdk-for-js",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
Expand Down Expand Up @@ -76,7 +77,7 @@
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "dev-tool run update-snippets"
"update-snippets": "echo skipped"
},
"sideEffects": false,
"//metadata": {
Expand All @@ -89,14 +90,6 @@
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/trafficmanager/arm-trafficmanager",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-trafficmanager?view=azure-node-preview"
},
"type": "module",
"tshy": {
"project": "./tsconfig.src.json",
Expand Down Expand Up @@ -137,4 +130,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ export class TrafficManagerManagementClient extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: TrafficManagerManagementClientOptionalParams);
constructor(credentials: coreAuth.TokenCredential, options?: TrafficManagerManagementClientOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
Expand All @@ -414,7 +415,7 @@ export class TrafficManagerManagementClient extends coreClient.ServiceClient {
// (undocumented)
profiles: Profiles;
// (undocumented)
subscriptionId: string;
subscriptionId?: string;
// (undocumented)
trafficManagerUserMetricsKeys: TrafficManagerUserMetricsKeys;
}
Expand Down
5 changes: 1 addition & 4 deletions sdk/trafficmanager/arm-trafficmanager/sample.env
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=
# Feel free to add your own environment variables.
Loading

0 comments on commit 2195559

Please sign in to comment.