Skip to content

Commit 1f46108

Browse files
authored
release eventhub track1 2021-06-preview (Azure#18073)
* release eventhub track1 2021-06-preview * Update package.json * Update eventHubManagementClientContext.ts
1 parent af0330b commit 1f46108

30 files changed

+3484
-1039
lines changed

sdk/eventhub/arm-eventhub/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/eventhub/arm-eventhub/README.md

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

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for EventHubManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for EventHubManagementClient.
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-eventhub @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 list operations as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and listAvailableClusterRegion clusters as an example written in JavaScript.
4240

4341
##### Sample code
4442

@@ -51,8 +49,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
5351
const client = new EventHubManagementClient(creds, subscriptionId);
54-
55-
client.operations.list().then((result) => {
52+
client.clusters.listAvailableClusterRegion().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
5855
}).catch((err) => {
@@ -61,7 +58,7 @@ client.operations.list().then((result) => {
6158
});
6259
```
6360

64-
#### browser - Authentication, client creation, and list operations as an example written in JavaScript.
61+
#### browser - Authentication, client creation, and listAvailableClusterRegion clusters as an example written in JavaScript.
6562

6663
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
6764
- 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.
@@ -86,10 +83,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8683
const credential = new InteractiveBrowserCredential(
8784
{
8885
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
86+
tenant: "<optional tenant for your organization>"
9087
});
9188
const client = new Azure.ArmEventhub.EventHubManagementClient(creds, subscriptionId);
92-
client.operations.list().then((result) => {
89+
client.clusters.listAvailableClusterRegion().then((result) => {
9390
console.log("The result is:");
9491
console.log(result);
9592
}).catch((err) => {
@@ -106,4 +103,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
106103

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

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

sdk/eventhub/arm-eventhub/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "@azure/arm-eventhub",
33
"author": "Microsoft Corporation",
44
"description": "EventHubManagementClient Library with typescript type definitions for node.js and browser.",
5-
"version": "3.3.1",
5+
"version": "4.0.0",
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/eventHubManagementClient.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/feature/v4/sdk/eventhub/arm-eventhub",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/arm-eventhub",
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/eventhub/arm-eventhub/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/eventhub/arm-eventhub/src/eventHubManagementClient.ts

Lines changed: 14 additions & 9 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,12 +17,15 @@ import { EventHubManagementClientContext } from "./eventHubManagementClientConte
1817

1918
class EventHubManagementClient extends EventHubManagementClientContext {
2019
// Operation groups
21-
operations: operations.Operations;
20+
clusters: operations.Clusters;
21+
configuration: operations.Configuration;
2222
namespaces: operations.Namespaces;
23-
disasterRecoveryConfigs: operations.DisasterRecoveryConfigs;
23+
privateEndpointConnections: operations.PrivateEndpointConnections;
24+
privateLinkResources: operations.PrivateLinkResources;
25+
operations: operations.Operations;
2426
eventHubs: operations.EventHubs;
27+
disasterRecoveryConfigs: operations.DisasterRecoveryConfigs;
2528
consumerGroups: operations.ConsumerGroups;
26-
regions: operations.Regions;
2729

2830
/**
2931
* Initializes a new instance of the EventHubManagementClient class.
@@ -39,12 +41,15 @@ class EventHubManagementClient extends EventHubManagementClientContext {
3941
*/
4042
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.EventHubManagementClientOptions) {
4143
super(credentials, subscriptionId, options);
42-
this.operations = new operations.Operations(this);
44+
this.clusters = new operations.Clusters(this);
45+
this.configuration = new operations.Configuration(this);
4346
this.namespaces = new operations.Namespaces(this);
44-
this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this);
47+
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
48+
this.privateLinkResources = new operations.PrivateLinkResources(this);
49+
this.operations = new operations.Operations(this);
4550
this.eventHubs = new operations.EventHubs(this);
51+
this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this);
4652
this.consumerGroups = new operations.ConsumerGroups(this);
47-
this.regions = new operations.Regions(this);
4853
}
4954
}
5055

sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts

Lines changed: 6 additions & 7 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,16 +9,16 @@
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-eventhub";
17-
const packageVersion = "3.3.1";
16+
const packageVersion = "4.0.0";
1817

1918
export class EventHubManagementClientContext extends msRestAzure.AzureServiceClient {
2019
credentials: msRest.ServiceClientCredentials | TokenCredential;
21-
subscriptionId: string;
2220
apiVersion?: string;
21+
subscriptionId: string;
2322

2423
/**
2524
* Initializes a new instance of the EventHubManagementClient class.
@@ -51,7 +50,7 @@ export class EventHubManagementClientContext extends msRestAzure.AzureServiceCli
5150

5251
super(credentials, options);
5352

54-
this.apiVersion = '2017-04-01';
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";
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
ArmDisasterRecovery,
11+
AuthorizationRule,
12+
AvailableCluster,
13+
AvailableClustersList,
14+
BaseResource,
15+
CaptureDescription,
16+
Cluster,
17+
ClusterListResult,
18+
ClusterSku,
19+
ConnectionState,
20+
ConsumerGroup,
21+
Destination,
22+
EHNamespace,
23+
EHNamespaceIdContainer,
24+
EHNamespaceIdListResult,
25+
Encryption,
26+
ErrorResponse,
27+
Eventhub,
28+
Identity,
29+
KeyVaultProperties,
30+
NetworkRuleSet,
31+
NWRuleSetIpRules,
32+
NWRuleSetVirtualNetworkRules,
33+
PrivateEndpoint,
34+
PrivateEndpointConnection,
35+
Resource,
36+
Sku,
37+
Subnet,
38+
SystemData,
39+
TrackedResource,
40+
UserAssignedIdentity,
41+
UserAssignedIdentityProperties
42+
} from "../models/mappers";
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
ClusterQuotaConfigurationProperties,
11+
ErrorResponse
12+
} from "../models/mappers";
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +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 license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -11,20 +11,28 @@ export {
1111
AuthorizationRule,
1212
BaseResource,
1313
CaptureDescription,
14+
Cluster,
15+
ClusterSku,
16+
ConnectionState,
1417
ConsumerGroup,
1518
ConsumerGroupListResult,
1619
Destination,
1720
EHNamespace,
21+
Encryption,
1822
ErrorResponse,
1923
Eventhub,
20-
MessagingPlan,
21-
MessagingRegions,
22-
MessagingRegionsProperties,
24+
Identity,
25+
KeyVaultProperties,
2326
NetworkRuleSet,
2427
NWRuleSetIpRules,
2528
NWRuleSetVirtualNetworkRules,
29+
PrivateEndpoint,
30+
PrivateEndpointConnection,
2631
Resource,
2732
Sku,
2833
Subnet,
29-
TrackedResource
34+
SystemData,
35+
TrackedResource,
36+
UserAssignedIdentity,
37+
UserAssignedIdentityProperties
3038
} from "../models/mappers";

sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +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 license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -16,19 +16,27 @@ export {
1616
CaptureDescription,
1717
CheckNameAvailabilityParameter,
1818
CheckNameAvailabilityResult,
19+
Cluster,
20+
ClusterSku,
21+
ConnectionState,
1922
ConsumerGroup,
2023
Destination,
2124
EHNamespace,
25+
Encryption,
2226
ErrorResponse,
2327
Eventhub,
24-
MessagingPlan,
25-
MessagingRegions,
26-
MessagingRegionsProperties,
28+
Identity,
29+
KeyVaultProperties,
2730
NetworkRuleSet,
2831
NWRuleSetIpRules,
2932
NWRuleSetVirtualNetworkRules,
33+
PrivateEndpoint,
34+
PrivateEndpointConnection,
3035
Resource,
3136
Sku,
3237
Subnet,
33-
TrackedResource
38+
SystemData,
39+
TrackedResource,
40+
UserAssignedIdentity,
41+
UserAssignedIdentityProperties
3442
} from "../models/mappers";

0 commit comments

Comments
 (0)