Skip to content
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
109 changes: 63 additions & 46 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 2 additions & 18 deletions sdk/loadtestservice/arm-loadtesting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Release History

## 1.0.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 1.0.0-beta.2 (2023-01-06)

**Features**

-bugs Fixed

## 1.0.0-beta.1 (2022-11-24)

## 1.0.0 (2023-01-11)

The package of @azure/arm-loadtesting is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
2 changes: 1 addition & 1 deletion sdk/loadtestservice/arm-loadtesting/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 Microsoft
Copyright (c) 2023 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
107 changes: 2 additions & 105 deletions sdk/loadtestservice/arm-loadtesting/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Azure Load Testing client library for JavaScript
# Azure LoadTest client library for JavaScript

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

LoadTest client provides access to LoadTest Resource and it's status operations.

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

## Getting started
Expand Down Expand Up @@ -64,109 +64,6 @@ const client = new LoadTestClient(new DefaultAzureCredential(), subscriptionId);
// const client = new LoadTestClient(credential, subscriptionId);
```

### Create an Azure Load Testing resource

Create a new Azure Load Testing resource.
```javascript
loadTestResourceCreatePayload = {
location: "westus2"
};

const resource = await client.loadTests.beginCreateOrUpdateAndWait(
"sample-rg",
"sample-loadtesting-resource",
loadTestResourceCreatePayload
);

console.log(resource);
```

Create a new Azure Load Testing resource with managed identity and customer managed key encryption.
```javascript
loadTestResourceCreatePayload = {
location: "westus2",
tags: { team: "testing" },
identity: {
type: 'SystemAssigned, UserAssigned',
userAssignedIdentities: {
'/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity1': {}
}
},
encryption: {
identity: {
type: 'UserAssigned',
resourceId: '/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity1'
},
keyUrl: 'https://sample-kv.vault.azure.net/keys/cmkkey/2d1ccd5c50234ea2a0858fe148b69cde'
}
};

const resource = await client.loadTests.beginCreateOrUpdateAndWait(
"sample-rg",
"sample-loadtesting-resource",
loadTestResourceCreatePayload
);

console.log(resource);
```

### Get an Azure Load Testing resource

```javascript
let resourceName = 'sample-loadtesting-resource';
let resourceGroupName = 'sample-rg';

const resource = await client.loadTests.get(
resourceGroupName,
resourceName
);

console.log(resource);
```

### Update an Azure Load Testing resource

```javascript
loadTestResourcePatchPayload = {
tags: { team: "testing-dev" },
identity: {
type: 'SystemAssigned, UserAssigned',
userAssignedIdentities: {
// removing a user-assigned managed identity by assigning the value in the payload as null
'/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity1': null,
'/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity2': {}
}
},
encryption: {
// use system-assigned managed identity for CMK encryption
identity: {
type: 'SystemAssigned',
resourceId: null
},
keyUrl: 'https://sample-kv.vault.azure.net/keys/cmkkey/2d1ccd5c50234ea2a0858fe148b69cde'
}
};

const resource = await client.loadTests.beginUpdateAndWait(
"sample-rg",
"sample-loadtesting-resource",
loadTestResourcePatchPayload
);

console.log(resource);
```

### Delete an Azure Load Testing resource

```javascript
let resourceName = 'sample-loadtesting-resource';
let resourceGroupName = 'sample-rg';

const result = await client.loadTests.beginDeleteAndWait(
resourceGroupName,
resourceName
);
```

### 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).
Expand Down
8 changes: 4 additions & 4 deletions sdk/loadtestservice/arm-loadtesting/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "7a54c1a83d14da431c0ae48c4315cba143084bce",
"commit": "f5cc64dff0ec000ad19a8db598fa737c65209129",
"readme": "specification/loadtestservice/resource-manager/readme.md",
"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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\loadtestservice\\resource-manager\\readme.md --use=@autorest/[email protected].3.20221108.1 --generate-sample=true",
"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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/loadtestservice/resource-manager/readme.md --use=@autorest/[email protected].5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/[email protected].3.20221108.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.0",
"use": "@autorest/[email protected].5"
}
14 changes: 3 additions & 11 deletions sdk/loadtestservice/arm-loadtesting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for LoadTestClient.",
"version": "1.0.0-beta.3",
"version": "1.0.0",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -110,13 +110,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-loadtesting?view=azure-node-preview"
}
}
"autoPublish": true
}
2 changes: 1 addition & 1 deletion sdk/loadtestservice/arm-loadtesting/src/loadTestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class LoadTestClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-loadtesting/1.0.0-beta.3`;
const packageDetails = `azsdk-js-arm-loadtesting/1.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Expand All @@ -853,7 +852,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Expand All @@ -874,7 +872,6 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.Oper
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Expand Down
8 changes: 4 additions & 4 deletions sdk/loadtestservice/arm-loadtesting/src/pagingHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export interface PageInfo {
const pageMap = new WeakMap<object, PageInfo>();

/**
* Given a result page from a pageable operation, returns a
* continuation token that can be used to begin paging from
* Given the last `.value` produced by the `byPage` iterator,
* returns a continuation token that can be used to begin paging from
* that point later.
* @param page A result object from calling .byPage() on a paged operation.
* @returns The continuation token that can be passed into byPage().
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
* @returns The continuation token that can be passed into byPage() during future calls.
*/
export function getContinuationToken(page: unknown): string | undefined {
if (typeof page !== "object" || page === null) {
Expand Down
43 changes: 43 additions & 0 deletions sdk/loadtestservice/arm-loadtesting/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import {
Recorder,
RecorderStartOptions,
env
} from "@azure-tools/test-recorder";
import { assert } from "chai";
import { Context } from "mocha";

const replaceableVariables: Record<string, string> = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
};

const recorderOptions: RecorderStartOptions = {
envSetupForPlayback: replaceableVariables
};

describe("My test", () => {
let recorder: Recorder;

beforeEach(async function(this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});

afterEach(async function() {
await recorder.stop();
});

it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});
10 changes: 2 additions & 8 deletions sdk/loadtestservice/arm-loadtesting/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-loadtesting": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down
2 changes: 1 addition & 1 deletion sdk/maps/maps-geolocation-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@azure/core-auth": "^1.3.0",
"@azure-rest/core-client": "1.0.0-beta.10",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/maps-common": "^1.0.0-beta.2",
"@azure/maps-common": "1.0.0-beta.2",
"tslib": "^2.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/maps/maps-render-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@azure/core-auth": "^1.3.0",
"@azure-rest/core-client": "1.0.0-beta.10",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/maps-common": "^1.0.0-beta.2",
"@azure/maps-common": "1.0.0-beta.2",
"tslib": "^2.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/maps/maps-route-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/logger": "^1.0.0",
"@azure/core-lro": "^2.2.0",
"@azure/maps-common": "^1.0.0-beta.1",
"@azure/maps-common": "1.0.0-beta.2",
"tslib": "^2.4.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/maps/maps-search-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0",
"@azure/core-lro": "^2.2.0",
"@azure/maps-common": "^1.0.0-beta.2"
"@azure/maps-common": "1.0.0-beta.2"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
Expand Down