Skip to content

Commit 82223de

Browse files
authored
hdinsight-track1 (Azure#18118)
1 parent b933b45 commit 82223de

22 files changed

+2826
-2051
lines changed

sdk/hdinsight/arm-hdinsight/README.md

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This package contains an isomorphic SDK (runs both in node.js and in browsers) f
44

55
### Currently supported environments
66

7-
- Node.js version 8.x.x or higher
8-
- Browser JavaScript
7+
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -14,18 +14,15 @@ You must have an [Azure subscription](https://azure.microsoft.com/free/).
1414
### How to install
1515

1616
To use this SDK in your project, you will need to install two packages.
17-
1817
- `@azure/arm-hdinsight` that contains the client.
1918
- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
2019

2120
Install both packages using the below command:
22-
2321
```bash
2422
npm install --save @azure/arm-hdinsight @azure/identity
2523
```
26-
2724
> **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.
28-
> 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.
25+
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.
2926

3027
### How to use
3128

@@ -39,7 +36,6 @@ npm install --save @azure/arm-hdinsight @azure/identity
3936

4037
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
4138
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.
42-
4339
#### nodejs - Authentication, client creation, and get clusters as an example written in JavaScript.
4440

4541
##### Sample code
@@ -55,24 +51,20 @@ const creds = new DefaultAzureCredential();
5551
const client = new HDInsightManagementClient(creds, subscriptionId);
5652
const resourceGroupName = "testresourceGroupName";
5753
const clusterName = "testclusterName";
58-
client.clusters
59-
.get(resourceGroupName, clusterName)
60-
.then((result) => {
61-
console.log("The result is:");
62-
console.log(result);
63-
})
64-
.catch((err) => {
65-
console.log("An error occurred:");
66-
console.error(err);
67-
});
54+
client.clusters.get(resourceGroupName, clusterName).then((result) => {
55+
console.log("The result is:");
56+
console.log(result);
57+
}).catch((err) => {
58+
console.log("An error occurred:");
59+
console.error(err);
60+
});
6861
```
6962

7063
#### browser - Authentication, client creation, and get clusters as an example written in JavaScript.
7164

7265
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
73-
74-
- 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.
75-
- Note down the client Id from the previous step and use it in the browser sample below.
66+
- 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.
67+
- Note down the client Id from the previous step and use it in the browser sample below.
7668

7769
##### Sample code
7870

@@ -90,23 +82,21 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
9082
const subscriptionId = "<Subscription_Id>";
9183
// Create credentials using the `@azure/identity` package.
9284
// Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead.
93-
const credential = new InteractiveBrowserCredential({
85+
const credential = new InteractiveBrowserCredential(
86+
{
9487
clientId: "<client id for your Azure AD app>",
9588
tenant: "<optional tenant for your organization>"
9689
});
9790
const client = new Azure.ArmHdinsight.HDInsightManagementClient(creds, subscriptionId);
9891
const resourceGroupName = "testresourceGroupName";
9992
const clusterName = "testclusterName";
100-
client.clusters
101-
.get(resourceGroupName, clusterName)
102-
.then((result) => {
103-
console.log("The result is:");
104-
console.log(result);
105-
})
106-
.catch((err) => {
107-
console.log("An error occurred:");
108-
console.error(err);
109-
});
93+
client.clusters.get(resourceGroupName, clusterName).then((result) => {
94+
console.log("The result is:");
95+
console.log(result);
96+
}).catch((err) => {
97+
console.log("An error occurred:");
98+
console.error(err);
99+
});
110100
</script>
111101
</head>
112102
<body></body>

sdk/hdinsight/arm-hdinsight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@azure/arm-hdinsight",
33
"author": "Microsoft Corporation",
44
"description": "HDInsightManagementClient Library with typescript type definitions for node.js and browser.",
5-
"version": "0.23.1",
5+
"version": "0.24.0",
66
"dependencies": {
77
"@azure/ms-rest-azure-js": "^2.1.0",
88
"@azure/ms-rest-js": "^2.2.0",

sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import * as Mappers from "./models/mappers";
1414
import * as operations from "./operations";
1515
import { HDInsightManagementClientContext } from "./hDInsightManagementClientContext";
1616

17+
1718
class HDInsightManagementClient extends HDInsightManagementClientContext {
1819
// Operation groups
1920
clusters: operations.Clusters;
@@ -25,6 +26,8 @@ class HDInsightManagementClient extends HDInsightManagementClientContext {
2526
scriptExecutionHistory: operations.ScriptExecutionHistory;
2627
operations: operations.Operations;
2728
virtualMachines: operations.VirtualMachines;
29+
privateEndpointConnections: operations.PrivateEndpointConnections;
30+
privateLinkResources: operations.PrivateLinkResources;
2831

2932
/**
3033
* Initializes a new instance of the HDInsightManagementClient class.
@@ -38,11 +41,7 @@ class HDInsightManagementClient extends HDInsightManagementClientContext {
3841
* subscription. The subscription ID forms part of the URI for every service call.
3942
* @param [options] The parameter options
4043
*/
41-
constructor(
42-
credentials: msRest.ServiceClientCredentials | TokenCredential,
43-
subscriptionId: string,
44-
options?: Models.HDInsightManagementClientOptions
45-
) {
44+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.HDInsightManagementClientOptions) {
4645
super(credentials, subscriptionId, options);
4746
this.clusters = new operations.Clusters(this);
4847
this.applications = new operations.Applications(this);
@@ -53,6 +52,8 @@ class HDInsightManagementClient extends HDInsightManagementClientContext {
5352
this.scriptExecutionHistory = new operations.ScriptExecutionHistory(this);
5453
this.operations = new operations.Operations(this);
5554
this.virtualMachines = new operations.VirtualMachines(this);
55+
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
56+
this.privateLinkResources = new operations.PrivateLinkResources(this);
5657
}
5758
}
5859

sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClientContext.ts

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import * as msRestAzure from "@azure/ms-rest-azure-js";
1313
import { TokenCredential } from "@azure/core-auth";
1414

1515
const packageName = "@azure/arm-hdinsight";
16-
const packageVersion = "0.23.1";
16+
const packageVersion = "0.24.0";
1717

1818
export class HDInsightManagementClientContext extends msRestAzure.AzureServiceClient {
1919
credentials: msRest.ServiceClientCredentials | TokenCredential;
@@ -32,16 +32,12 @@ export class HDInsightManagementClientContext extends msRestAzure.AzureServiceCl
3232
* subscription. The subscription ID forms part of the URI for every service call.
3333
* @param [options] The parameter options
3434
*/
35-
constructor(
36-
credentials: msRest.ServiceClientCredentials | TokenCredential,
37-
subscriptionId: string,
38-
options?: Models.HDInsightManagementClientOptions
39-
) {
35+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.HDInsightManagementClientOptions) {
4036
if (credentials == undefined) {
41-
throw new Error("'credentials' cannot be null.");
37+
throw new Error('\'credentials\' cannot be null.');
4238
}
4339
if (subscriptionId == undefined) {
44-
throw new Error("'subscriptionId' cannot be null.");
40+
throw new Error('\'subscriptionId\' cannot be null.');
4541
}
4642

4743
if (!options) {
@@ -54,8 +50,8 @@ export class HDInsightManagementClientContext extends msRestAzure.AzureServiceCl
5450

5551
super(credentials, options);
5652

57-
this.apiVersion = "2018-06-01-preview";
58-
this.acceptLanguage = "en-US";
53+
this.apiVersion = '2021-06-01';
54+
this.acceptLanguage = 'en-US';
5955
this.longRunningOperationRetryTimeout = 30;
6056
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
6157
this.requestContentType = "application/json; charset=utf-8";
@@ -65,10 +61,7 @@ export class HDInsightManagementClientContext extends msRestAzure.AzureServiceCl
6561
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
6662
this.acceptLanguage = options.acceptLanguage;
6763
}
68-
if (
69-
options.longRunningOperationRetryTimeout !== null &&
70-
options.longRunningOperationRetryTimeout !== undefined
71-
) {
64+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
7265
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
7366
}
7467
}

sdk/hdinsight/arm-hdinsight/src/models/applicationsMappers.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ export {
1818
AutoscaleRecurrence,
1919
AutoscaleSchedule,
2020
AutoscaleTimeAndCapacity,
21+
AzureEntityResource,
2122
BaseResource,
2223
ClientGroupInfo,
2324
Cluster,
2425
ClusterDefinition,
2526
ClusterGetProperties,
2627
ClusterIdentity,
27-
ClusterIdentityUserAssignedIdentitiesValue,
2828
ComputeIsolationProperties,
2929
ComputeProfile,
3030
ConnectivityEndpoint,
@@ -35,13 +35,20 @@ export {
3535
Errors,
3636
ExcludedServicesConfig,
3737
HardwareProfile,
38+
IPConfiguration,
3839
KafkaRestProperties,
3940
LinuxOperatingSystemProfile,
4041
NetworkProperties,
4142
OsProfile,
43+
PrivateEndpoint,
44+
PrivateEndpointConnection,
45+
PrivateLinkConfiguration,
46+
PrivateLinkResource,
47+
PrivateLinkServiceConnectionState,
4248
ProxyResource,
4349
QuotaInfo,
4450
Resource,
51+
ResourceId,
4552
Role,
4653
RuntimeScriptAction,
4754
RuntimeScriptActionDetail,
@@ -52,6 +59,8 @@ export {
5259
SshPublicKey,
5360
StorageAccount,
5461
StorageProfile,
62+
SystemData,
5563
TrackedResource,
64+
UserAssignedIdentity,
5665
VirtualNetworkProfile
5766
} from "../models/mappers";

sdk/hdinsight/arm-hdinsight/src/models/clustersMappers.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export {
1818
AutoscaleRecurrence,
1919
AutoscaleSchedule,
2020
AutoscaleTimeAndCapacity,
21+
AzureEntityResource,
2122
BaseResource,
2223
ClientGroupInfo,
2324
Cluster,
@@ -28,7 +29,6 @@ export {
2829
ClusterDiskEncryptionParameters,
2930
ClusterGetProperties,
3031
ClusterIdentity,
31-
ClusterIdentityUserAssignedIdentitiesValue,
3232
ClusterListResult,
3333
ClusterPatchParameters,
3434
ClusterResizeParameters,
@@ -44,13 +44,20 @@ export {
4444
ExecuteScriptActionParameters,
4545
GatewaySettings,
4646
HardwareProfile,
47+
IPConfiguration,
4748
KafkaRestProperties,
4849
LinuxOperatingSystemProfile,
4950
NetworkProperties,
5051
OsProfile,
52+
PrivateEndpoint,
53+
PrivateEndpointConnection,
54+
PrivateLinkConfiguration,
55+
PrivateLinkResource,
56+
PrivateLinkServiceConnectionState,
5157
ProxyResource,
5258
QuotaInfo,
5359
Resource,
60+
ResourceId,
5461
Role,
5562
RuntimeScriptAction,
5663
RuntimeScriptActionDetail,
@@ -61,8 +68,10 @@ export {
6168
SshPublicKey,
6269
StorageAccount,
6370
StorageProfile,
71+
SystemData,
6472
TrackedResource,
6573
UpdateClusterIdentityCertificateParameters,
6674
UpdateGatewaySettingsParameters,
75+
UserAssignedIdentity,
6776
VirtualNetworkProfile
6877
} from "../models/mappers";

0 commit comments

Comments
 (0)