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-containerservice] add vm description #13819

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
6 changes: 3 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.

2 changes: 1 addition & 1 deletion sdk/containerservice/arm-containerservice/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.
10 changes: 5 additions & 5 deletions sdk/containerservice/arm-containerservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Container Service Client.

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

## Getting started
Expand Down Expand Up @@ -63,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
import { InteractiveBrowserCredential } from "@azure/identity";
import { ContainerServiceClient } from "@azure/arm-containerservice";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
clientId: "<YOUR_CLIENT_ID>"
});
const client = new ContainerServiceClient(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 @@ -107,6 +105,8 @@ 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%2Fcontainerservice%2Farm-containerservice%2FREADME.png)

[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
Expand Down
8 changes: 4 additions & 4 deletions sdk/containerservice/arm-containerservice/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "f6674831693bce0982f08ccf356255248a4c9a8f",
"commit": "131e4cb871509b37b4ce9575c24aa24e456abb23",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/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\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.34 --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/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.19",
"use": "@autorest/typescript@6.0.34"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.21",
"use": "@autorest/typescript@^6.0.12"
}
6 changes: 3 additions & 3 deletions sdk/containerservice/arm-containerservice/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-containerservice.d.ts"
"publicTrimmedFilePath": "./types/arm-containerservice.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand All @@ -28,4 +28,4 @@
}
}
}
}
}
22 changes: 7 additions & 15 deletions sdk/containerservice/arm-containerservice/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 ContainerServiceClient.",
"version": "21.4.0",
"version": "1.0.0-beta.1",
"engines": {
"node": ">=18.0.0"
},
Expand All @@ -25,22 +25,22 @@
],
"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/identity": "^4.7.0",
"@azure/logger": "^1.1.4",
"@types/node": "^18.0.0",
"@vitest/browser": "^3.0.5",
"@vitest/coverage-istanbul": "^3.0.5",
"@vitest/browser": "^3.0.6",
"@vitest/coverage-istanbul": "^3.0.6",
"dotenv": "^16.0.0",
"playwright": "^1.50.1",
"typescript": "~5.6.2",
"vitest": "^3.0.5"
"vitest": "^3.0.6"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -93,14 +93,6 @@
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview"
},
"type": "module",
"tshy": {
"project": "./tsconfig.src.json",
Expand Down Expand Up @@ -141,4 +133,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient {
credential: credentials,
};

const packageDetails = `azsdk-js-arm-containerservice/21.4.0`;
const packageDetails = `azsdk-js-arm-containerservice/1.0.0-beta.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
6 changes: 3 additions & 3 deletions sdk/containerservice/arm-containerservice/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export interface ManagedClusterAgentPoolProfileProperties {
readonly eTag?: string;
/** Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. */
count?: number;
/** VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions */
/** VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. If this field is not specified, AKS will attempt to find an appropriate VM SKU for your pool, based on quota and capacity. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions */
vmSize?: string;
/** OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. */
osDiskSizeGB?: number;
Expand Down Expand Up @@ -292,7 +292,7 @@ export interface ManagedClusterAgentPoolProfileProperties {

/** Settings for upgrading an agentpool */
export interface AgentPoolUpgradeSettings {
/** This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade */
/** This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade */
maxSurge?: string;
/** The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. */
drainTimeoutInMinutes?: number;
Expand Down Expand Up @@ -1805,7 +1805,7 @@ export interface AgentPool extends SubResource {
readonly eTag?: string;
/** Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. */
count?: number;
/** VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions */
/** VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. If this field is not specified, AKS will attempt to find an appropriate VM SKU for your pool, based on quota and capacity. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions */
vmSize?: string;
/** OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. */
osDiskSizeGB?: number;
Expand Down
40 changes: 40 additions & 0 deletions sdk/containerservice/arm-containerservice/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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,
} from "@azure-tools/test-recorder";

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 (ctx) => {
recorder = new Recorder(ctx);
await recorder.start(recorderOptions);
});

afterEach(async () => {
await recorder.stop();
});

it("sample test", async function () {
console.log("Hi, I'm a test!");
});
});
18 changes: 16 additions & 2 deletions sdk/containerservice/arm-containerservice/test/snippets.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
/*
* 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.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { ContainerServiceClient } from "../src/index.js";
import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity";
import {
DefaultAzureCredential,
InteractiveBrowserCredential,
} from "@azure/identity";
import { setLogLevel } from "@azure/logger";
import { describe, it } from "vitest";

describe("snippets", () => {
it("ReadmeSampleCreateClient_Node", async () => {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(new DefaultAzureCredential(), subscriptionId);
const client = new ContainerServiceClient(
new DefaultAzureCredential(),
subscriptionId,
);
});

it("ReadmeSampleCreateClient_Browser", async () => {
Expand Down
36 changes: 25 additions & 11 deletions sdk/containerservice/arm-containerservice/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
{
"references": [
{
"path": "./tsconfig.src.json"
},
{
"path": "./tsconfig.samples.json"
},
{
"path": "./tsconfig.test.json"
}
"compilerOptions": {
"module": "es6",
"moduleResolution": "node",
"strict": true,
"target": "es6",
"sourceMap": true,
"declarationMap": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"es6",
"dom"
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true
},
"include": [
"src/**/*.ts",
"test/**/*.ts"
],
"exclude": [
"node_modules"
]
}
}