Skip to content

Commit

Permalink
containerservice-track2-relesae (#20361)
Browse files Browse the repository at this point in the history
* containerservice-track2-relesae

* update
  • Loading branch information
colawwj authored Feb 25, 2022
1 parent 4882b4a commit c2ae230
Show file tree
Hide file tree
Showing 247 changed files with 11,810 additions and 113 deletions.
9 changes: 5 additions & 4 deletions common/config/rush/pnpm-lock.yaml

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

21 changes: 10 additions & 11 deletions sdk/containerservice/arm-containerservice/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Release History

## 15.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes


## 15.1.0 (2022-02-24)

**Features**

- Added Type Alias Format
- Interface ManagedClustersListClusterUserCredentialsOptionalParams has a new optional parameter format
- Added Enum KnownFormat


## 15.0.0 (2021-12-09)

The package of @azure/arm-containerservice is using our next generation design principles since version 15.0.0, which contains breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion sdk/containerservice/arm-containerservice/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Microsoft
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
Expand Down
11 changes: 11 additions & 0 deletions sdk/containerservice/arm-containerservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The Container Service Client.
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox.

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.

### Prerequisites

- An [Azure subscription][azure_sub].
Expand Down Expand Up @@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript
const { ContainerServiceClient } = require("@azure/arm-containerservice");
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 ContainerServiceClient(new DefaultAzureCredential(), 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 ContainerServiceClient(credential, subscriptionId);
```


Expand Down
6 changes: 3 additions & 3 deletions sdk/containerservice/arm-containerservice/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"commit": "d710fb7f40338ca6ef00e0a9680be0a3d4cf5059",
"commit": "9f48feaf684784644513d11ddb7bd0ac2e32f48e",
"readme": "specification/containerservice/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/containerservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/containerservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220221.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211130.1"
"use": "@autorest/typescript@6.0.0-alpha.16.20220221.1"
}
25 changes: 19 additions & 6 deletions sdk/containerservice/arm-containerservice/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-containerservice.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}
30 changes: 23 additions & 7 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": "15.0.1",
"version": "15.1.0",
"engines": {
"node": ">=12.0.0"
},
Expand All @@ -30,12 +30,12 @@
"devDependencies": {
"@microsoft/api-extractor": "^7.18.11",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^2.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
Expand Down Expand Up @@ -98,5 +98,21 @@
"docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true
"//metadata": {
"constantPaths": [
{
"path": "src/containerServiceClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ export interface ExtendedLocation {
// @public
export type ExtendedLocationTypes = string;

// @public
export type Format = string;

// @public
export type GPUInstanceProfile = string;

Expand Down Expand Up @@ -767,6 +770,12 @@ export enum KnownExtendedLocationTypes {
EdgeZone = "EdgeZone"
}

// @public
export enum KnownFormat {
Azure = "azure",
Exec = "exec"
}

// @public
export enum KnownGPUInstanceProfile {
// (undocumented)
Expand Down Expand Up @@ -1464,6 +1473,7 @@ export type ManagedClustersListClusterMonitoringUserCredentialsResponse = Creden

// @public
export interface ManagedClustersListClusterUserCredentialsOptionalParams extends coreClient.OperationOptions {
format?: Format;
serverFqdn?: string;
}

Expand Down
78 changes: 6 additions & 72 deletions sdk/containerservice/arm-containerservice/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";

import nodeBuiltins from "builtin-modules";

/**
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
*
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
* __exportStar downleveled helper function to declare its exports which confuses
* rollup's automatic discovery mechanism.
*
* @returns an object reference that can be `...`'d into your cjs() configuration.
*/
export function openTelemetryCommonJs() {
const namedExports = {};

for (const key of [
"@opentelemetry/api",
"@azure/core-tracing/node_modules/@opentelemetry/api"
]) {
namedExports[key] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext",
"setSpanContext"
];
}

const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];

for (const version of releasedOpenTelemetryVersions) {
namedExports[
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"StatusCode",
"CanonicalCode",
"getSpanContext",
"setSpanContext"
];
}

return namedExports;
}

// #region Warning Handler

/**
* A function that can determine whether a rollupwarning should be ignored. If
* A function that can determine whether a rollup warning should be ignored. If
* the function returns `true`, then the warning will not be displayed.
*/

function ignoreNiseSinonEvalWarnings(warning) {
function ignoreNiseSinonEval(warning) {
return (
warning.code === "EVAL" &&
warning.id &&
Expand All @@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
);
}

function ignoreChaiCircularDependencyWarnings(warning) {
function ignoreChaiCircularDependency(warning) {
return (
warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer && warning.importer.includes("node_modules/chai") === true
);
}

const warningInhibitors = [
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];

/**
* Construct a warning handler for the shared rollup configuration
Expand Down Expand Up @@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
nodeResolve({
mainFields: ["module", "browser"]
}),
cjs({
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
cjs(),
json(),
sourcemaps()
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
Expand Down Expand Up @@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
],
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()]
plugins: [sourcemaps(), nodeResolve()]
};

const config = [baseConfig];
Expand Down
4 changes: 4 additions & 0 deletions sdk/containerservice/arm-containerservice/sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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.
/**
* This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster.
*
* @summary Gets the results of a command which has been run on the Managed Cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2022-01-01/examples/RunCommandResultFailed.json
*/
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";

async function commandFailedResult() {
const subscriptionId = "subid1";
const resourceGroupName = "rg1";
const resourceName = "clustername1";
const commandId = "def7b3ea71bd4f7e9d226ddbc0f00ad9";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.getCommandResult(
resourceGroupName,
resourceName,
commandId
);
console.log(result);
}

commandFailedResult().catch(console.error);
Loading

0 comments on commit c2ae230

Please sign in to comment.