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

[mgmt] keyvault release #33353

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 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
79 changes: 70 additions & 9 deletions common/config/rush/pnpm-lock.yaml

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

15 changes: 6 additions & 9 deletions sdk/keyvault/arm-keyvault/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Release History

## 3.1.1 (Unreleased)

## 3.2.0 (2025-03-12)
### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Enum KnownManagedHsmSkuFamily has a new value C


## 3.1.0 (2023-10-18)

### Features Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/keyvault/arm-keyvault/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.
9 changes: 4 additions & 5 deletions sdk/keyvault/arm-keyvault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure KeyVaultManagement** 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).

Expand All @@ -64,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
import { InteractiveBrowserCredential } from "@azure/identity";
import { KeyVaultManagementClient } from "@azure/arm-keyvault";

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 KeyVaultManagementClient(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 @@ -108,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%2Fkeyvault%2Farm-keyvault%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
10 changes: 5 additions & 5 deletions sdk/keyvault/arm-keyvault/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "0a25ea9680cf080b7d34e8c5f35f564425c6b1f7",
"commit": "70eec0726034ed22734168f3cd3d2b641dbc5723",
"readme": "specification/keyvault/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\\keyvault\\resource-manager\\readme.md --use=@autorest/[email protected].11 --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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\keyvault\\resource-manager\\readme.md --use=@autorest/[email protected].36 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected].2",
"use": "@autorest/[email protected].11"
}
"release_tool": "@azure-tools/[email protected].21",
"use": "@autorest/[email protected].36"
}
2 changes: 1 addition & 1 deletion sdk/keyvault/arm-keyvault/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/keyvault/arm-keyvault",
"Tag": "js/keyvault/arm-keyvault_0f6a0b753f"
"Tag": "js/keyvault/arm-keyvault_0bb36695a9"
}
26 changes: 14 additions & 12 deletions sdk/keyvault/arm-keyvault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for KeyVaultManagementClient.",
"version": "3.1.1",
"version": "3.2.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.9.0",
"@azure/core-client": "^1.9.2",
"@azure/core-client": "^1.9.3",
"@azure/core-lro": "^2.5.4",
"@azure/core-paging": "^1.6.2",
"@azure/core-rest-pipeline": "^1.19.0",
"@azure/core-rest-pipeline": "^1.19.1",
"tslib": "^2.8.1"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic",
"cloud"
"isomorphic"
],
"license": "MIT",
"main": "./dist/commonjs/index.js",
Expand All @@ -33,17 +32,20 @@
"@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.8.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.7.2",
"vitest": "^3.0.5"
"playwright": "^1.51.0",
"typescript": "~5.6.2",
"vitest": "^3.0.6"
},
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
Expand Down
6 changes: 4 additions & 2 deletions sdk/keyvault/arm-keyvault/review/arm-keyvault.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ export enum KnownKeyPermissions {
// @public
export enum KnownManagedHsmSkuFamily {
// (undocumented)
B = "B"
B = "B",
// (undocumented)
C = "C"
}

// @public
Expand Down Expand Up @@ -841,7 +843,7 @@ export interface ManagedHsmSku {
export type ManagedHsmSkuFamily = string;

// @public
export type ManagedHsmSkuName = "Standard_B1" | "Custom_B32" | "Custom_B6";
export type ManagedHsmSkuName = "Standard_B1" | "Custom_B32" | "Custom_B6" | "Custom_C42" | "Custom_C10";

// @public
export interface ManagedHsmsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
Expand Down
5 changes: 1 addition & 4 deletions sdk/keyvault/arm-keyvault/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.
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,28 @@
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import type { KeyCreateParameters } from "@azure/arm-keyvault";
import { KeyVaultManagementClient } from "@azure/arm-keyvault";

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
KeyCreateParameters,
KeyVaultManagementClient,
} from "@azure/arm-keyvault";
import { DefaultAzureCredential } from "@azure/identity";
import "dotenv/config";

/**
* This sample demonstrates how to Creates the first version of a new key if it does not exist. If it already exists, then the existing key is returned without any write operations being performed. This API does not create subsequent versions, and does not update existing keys.
*
* @summary Creates the first version of a new key if it does not exist. If it already exists, then the existing key is returned without any write operations being performed. This API does not create subsequent versions, and does not update existing keys.
* x-ms-original-file: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/createKey.json
* x-ms-original-file: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/createKey.json
*/
async function createAKey(): Promise<void> {
const subscriptionId =
process.env["KEYVAULT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["KEYVAULT_RESOURCE_GROUP"] || "sample-group";
process.env["KEYVAULT_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["KEYVAULT_RESOURCE_GROUP"] || "sample-group";
const vaultName = "sample-vault-name";
const keyName = "sample-key-name";
const parameters: KeyCreateParameters = { properties: { kty: "RSA" } };
Expand Down
Loading
Loading