Skip to content

Commit 46fb269

Browse files
author
SDKAuto
committed
CodeGen from PR 16536 in Azure/azure-rest-api-specs
Merge 33f8f27abccc644fe994e364c1d303765b9d0d46 into bf84d93cc1ac9db3ec674d4a8854b3ed43f86c94
1 parent ff8f058 commit 46fb269

29 files changed

+7756
-704
lines changed

sdk/keyvault/arm-keyvault/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/keyvault/arm-keyvault/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure KeyVaultManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for KeyVaultManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for KeyVaultManagementClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-keyvault @azure/identity
2323
```
24-
2524
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
2625
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2726

@@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40-
41-
#### nodejs - Authentication, client creation, and get vaults as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and get keys as an example written in JavaScript.
4240

4341
##### Sample code
4442

@@ -53,7 +51,8 @@ const creds = new DefaultAzureCredential();
5351
const client = new KeyVaultManagementClient(creds, subscriptionId);
5452
const resourceGroupName = "testresourceGroupName";
5553
const vaultName = "testvaultName";
56-
client.vaults.get(resourceGroupName, vaultName).then((result) => {
54+
const keyName = "testkeyName";
55+
client.keys.get(resourceGroupName, vaultName, keyName).then((result) => {
5756
console.log("The result is:");
5857
console.log(result);
5958
}).catch((err) => {
@@ -62,7 +61,7 @@ client.vaults.get(resourceGroupName, vaultName).then((result) => {
6261
});
6362
```
6463

65-
#### browser - Authentication, client creation, and get vaults as an example written in JavaScript.
64+
#### browser - Authentication, client creation, and get keys as an example written in JavaScript.
6665

6766
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
6867
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
@@ -87,12 +86,13 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8786
const credential = new InteractiveBrowserCredential(
8887
{
8988
clientId: "<client id for your Azure AD app>",
90-
tenantId: "<optional tenant for your organization>"
89+
tenant: "<optional tenant for your organization>"
9190
});
9291
const client = new Azure.ArmKeyvault.KeyVaultManagementClient(creds, subscriptionId);
9392
const resourceGroupName = "testresourceGroupName";
9493
const vaultName = "testvaultName";
95-
client.vaults.get(resourceGroupName, vaultName).then((result) => {
94+
const keyName = "testkeyName";
95+
client.keys.get(resourceGroupName, vaultName, keyName).then((result) => {
9696
console.log("The result is:");
9797
console.log(result);
9898
}).catch((err) => {
@@ -109,4 +109,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
109109

110110
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
111111

112-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/.\sdk\keyvault\arm-keyvault\/README.png)
112+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/keyvault/arm-keyvault/README.png)

sdk/keyvault/arm-keyvault/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"description": "KeyVaultManagementClient Library with typescript type definitions for node.js and browser.",
55
"version": "1.3.2",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.4.0",
8-
"@azure/ms-rest-js": "^1.11.0",
7+
"@azure/ms-rest-azure-js": "^2.1.0",
8+
"@azure/ms-rest-js": "^2.2.0",
99
"@azure/core-auth": "^1.1.4",
10-
"tslib": "^1.9.3"
10+
"tslib": "^1.10.0"
1111
},
1212
"keywords": [
1313
"node",
@@ -22,18 +22,18 @@
2222
"types": "./esm/keyVaultManagementClient.d.ts",
2323
"devDependencies": {
2424
"typescript": "^3.6.0",
25-
"rollup": "^0.66.2",
26-
"rollup-plugin-node-resolve": "^3.4.0",
25+
"rollup": "^1.18.0",
26+
"rollup-plugin-node-resolve": "^5.2.0",
2727
"rollup-plugin-sourcemaps": "^0.4.2",
28-
"uglify-js": "^3.4.9"
28+
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/keyvault/arm-keyvault",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/arm-keyvault",
3131
"repository": {
3232
"type": "git",
33-
"url": "https://github.com/azure/azure-sdk-for-js.git"
33+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
3434
},
3535
"bugs": {
36-
"url": "https://github.com/azure/azure-sdk-for-js/issues"
36+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
3737
},
3838
"files": [
3939
"dist/**/*.js",

sdk/keyvault/arm-keyvault/rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2929
*/`
3030
},
3131
plugins: [
32-
nodeResolve({ module: true }),
32+
nodeResolve({ mainFields: ['module', 'main'] }),
3333
sourcemaps()
3434
]
3535
};

sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -18,8 +17,15 @@ import { KeyVaultManagementClientContext } from "./keyVaultManagementClientConte
1817

1918
class KeyVaultManagementClient extends KeyVaultManagementClientContext {
2019
// Operation groups
20+
keys: operations.Keys;
2121
vaults: operations.Vaults;
22+
privateEndpointConnections: operations.PrivateEndpointConnections;
23+
privateLinkResources: operations.PrivateLinkResources;
24+
managedHsms: operations.ManagedHsms;
25+
mHSMPrivateEndpointConnections: operations.MHSMPrivateEndpointConnections;
26+
mHSMPrivateLinkResources: operations.MHSMPrivateLinkResources;
2227
operations: operations.Operations;
28+
secrets: operations.Secrets;
2329

2430
/**
2531
* Initializes a new instance of the KeyVaultManagementClient class.
@@ -35,8 +41,15 @@ class KeyVaultManagementClient extends KeyVaultManagementClientContext {
3541
*/
3642
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) {
3743
super(credentials, subscriptionId, options);
44+
this.keys = new operations.Keys(this);
3845
this.vaults = new operations.Vaults(this);
46+
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
47+
this.privateLinkResources = new operations.PrivateLinkResources(this);
48+
this.managedHsms = new operations.ManagedHsms(this);
49+
this.mHSMPrivateEndpointConnections = new operations.MHSMPrivateEndpointConnections(this);
50+
this.mHSMPrivateLinkResources = new operations.MHSMPrivateLinkResources(this);
3951
this.operations = new operations.Operations(this);
52+
this.secrets = new operations.Secrets(this);
4053
}
4154
}
4255

sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -10,8 +9,8 @@
109

1110
import * as Models from "./models";
1211
import * as msRest from "@azure/ms-rest-js";
13-
import { TokenCredential } from "@azure/core-auth";
1412
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1514

1615
const packageName = "@azure/arm-keyvault";
1716
const packageVersion = "1.3.2";
@@ -51,7 +50,7 @@ export class KeyVaultManagementClientContext extends msRestAzure.AzureServiceCli
5150

5251
super(credentials, options);
5352

54-
this.apiVersion = '2018-02-14';
53+
this.apiVersion = '2021-06-01-preview';
5554
this.acceptLanguage = 'en-US';
5655
this.longRunningOperationRetryTimeout = 30;
5756
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

0 commit comments

Comments
 (0)