Skip to content

Commit

Permalink
CodeGen from PR 31523 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge a3363e30500326fc7d171f2db464b13bceee4f6d into 74695171c408e136fa629451d23d98aac98e3981
  • Loading branch information
SDKAuto committed Nov 19, 2024
1 parent 8b7de5b commit ba0208d
Show file tree
Hide file tree
Showing 31 changed files with 619 additions and 5,201 deletions.
9 changes: 7 additions & 2 deletions rush.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This is the main configuration file for Rush.
* For full documentation, please see https://rushjs.io
*/ {
*/{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
/**
* (Required) This specifies the version of the Rush engine to be used in this repo.
Expand Down Expand Up @@ -2311,6 +2311,11 @@
"packageName": "@azure/arm-connectedcache",
"projectFolder": "sdk/connectedcache/arm-connectedcache",
"versionPolicyName": "management"
},
{
"packageName": "@azure/arm-kubernetesconfiguration-extensions",
"projectFolder": "sdk/kubernetesconfiguration/arm-kubernetesconfiguration",
"versionPolicyName": "management"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Microsoft
Copyright (c) 2024 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
34 changes: 17 additions & 17 deletions sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Azure SourceControlConfiguration client library for JavaScript
# Azure Extensions client library for JavaScript

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

KubernetesConfiguration Client
KubernetesConfiguration Extensions Client

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

## Getting started
Expand All @@ -22,18 +22,18 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP

- An [Azure subscription][azure_sub].

### Install the `@azure/arm-kubernetesconfiguration` package
### Install the `@azure/arm-kubernetesconfiguration-extensions` package

Install the Azure SourceControlConfiguration client library for JavaScript with `npm`:
Install the Azure Extensions client library for JavaScript with `npm`:

```bash
npm install @azure/arm-kubernetesconfiguration
npm install @azure/arm-kubernetesconfiguration-extensions
```

### Create and authenticate a `SourceControlConfigurationClient`
### Create and authenticate a `ExtensionsClient`

To create a client object to access the Azure SourceControlConfiguration API, you will need the `endpoint` of your Azure SourceControlConfiguration resource and a `credential`. The Azure SourceControlConfiguration client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure SourceControlConfiguration resource in the [Azure Portal][azure_portal].
To create a client object to access the Azure Extensions API, you will need the `endpoint` of your Azure Extensions resource and a `credential`. The Azure Extensions client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure Extensions resource in the [Azure Portal][azure_portal].

You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

Expand All @@ -43,25 +43,25 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure SourceControlConfiguration** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
You will also need to **register a new AAD application and grant access to Azure Extensions** 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://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

```javascript
const { SourceControlConfigurationClient } = require("@azure/arm-kubernetesconfiguration");
const { ExtensionsClient } = require("@azure/arm-kubernetesconfiguration-extensions");
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 SourceControlConfigurationClient(new DefaultAzureCredential(), subscriptionId);
const client = new ExtensionsClient(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 SourceControlConfigurationClient(credential, subscriptionId);
// const client = new ExtensionsClient(credential, subscriptionId);
```


Expand All @@ -70,9 +70,9 @@ To use this client library in the browser, first you need to use a bundler. For

## Key concepts

### SourceControlConfigurationClient
### ExtensionsClient

`SourceControlConfigurationClient` is the primary interface for developers using the Azure SourceControlConfiguration client library. Explore the methods on this client object to understand the different features of the Azure SourceControlConfiguration service that you can access.
`ExtensionsClient` is the primary interface for developers using the Azure Extensions client library. Explore the methods on this client object to understand the different features of the Azure Extensions service that you can access.

## Troubleshooting

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "baa82396a21dcc1c79a6aeea185589749515012d",
"readme": "specification/kubernetesconfiguration/resource-manager/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\\kubernetesconfiguration\\resource-manager\\readme.md --use=@autorest/typescript@6.0.8 --generate-sample=true",
"commit": "a6405ab5b39aefc288e110e774fd0116283a725b",
"readme": "specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/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.2",
"use": "@autorest/typescript@6.0.8"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.16",
"use": "@autorest/typescript@^6.0.12"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-kubernetesconfiguration.d.ts"
"publicTrimmedFilePath": "./types/arm-kubernetesconfiguration-extensions.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "@azure/arm-kubernetesconfiguration",
"name": "@azure/arm-kubernetesconfiguration-extensions",
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for SourceControlConfigurationClient.",
"version": "6.1.1",
"description": "A generated SDK for ExtensionsClient.",
"version": "1.0.0-beta.1",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/abort-controller": "^1.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-client": "^1.7.0",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^2.1.2",
"@azure/core-paging": "^1.2.0",
"@azure/core-rest-pipeline": "^1.12.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -26,20 +26,24 @@
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-kubernetesconfiguration.d.ts",
"types": "./types/arm-kubernetesconfiguration-extensions.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^1.0.0",
"@azure-tools/test-recorder": "^3.0.0",
"@microsoft/api-extractor": "^7.31.1",
"typescript": "~5.6.2",
"uglify-js": "^3.4.9",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@types/chai": "^4.2.8",
"@azure/identity": "^4.2.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.1.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
"tsx": "^4.7.1",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"dotenv": "^16.0.0",
"mocha": "^10.0.0",
"ts-node": "^10.0.0",
"typescript": "~5.6.2"
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"ts-node": "^10.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -67,47 +71,39 @@
],
"scripts": {
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api",
"build:browser": "echo skipped",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"prepack": "npm run build",
"pack": "npm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
"build:browser": "echo skipped",
"build:test": "echo skipped",
"build:samples": "echo skipped.",
"check-format": "echo skipped",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "dev-tool run extract-api",
"format": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"lint": "echo skipped",
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"pack": "npm pack 2>&1",
"prepack": "npm run build",
"test": "npm run integration-test",
"test:browser": "echo skipped",
"test:node": "echo skipped",
"test:browser": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped",
"update-snippets": "echo skipped"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/sourceControlConfigurationClient.ts",
"path": "src/extensionsClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-kubernetesconfiguration?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration"
}
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 ba0208d

Please sign in to comment.