Skip to content

Commit 08f140b

Browse files
authored
confluent-track1 (Azure#18677)
1 parent ee5cbb0 commit 08f140b

File tree

8 files changed

+214
-282
lines changed

8 files changed

+214
-282
lines changed

sdk/confluent/arm-confluent/README.md

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

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ConfluentManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for ConfluentManagementClient.
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-confluent @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,7 +36,6 @@ 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-
4139
#### nodejs - Authentication, client creation, and list marketplaceAgreements as an example written in JavaScript.
4240

4341
##### Sample code
@@ -51,7 +49,6 @@ 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 ConfluentManagementClient(creds, subscriptionId);
54-
5552
client.marketplaceAgreements.list().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
@@ -86,7 +83,7 @@ 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.ArmConfluent.ConfluentManagementClient(creds, subscriptionId);
9289
client.marketplaceAgreements.list().then((result) => {

sdk/confluent/arm-confluent/package.json

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

sdk/confluent/arm-confluent/src/confluentManagementClient.ts

Lines changed: 2 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 { ConfluentManagementClientContext } from "./confluentManagementClientContext";
1616

17+
1718
class ConfluentManagementClient extends ConfluentManagementClientContext {
1819
// Operation groups
1920
marketplaceAgreements: operations.MarketplaceAgreements;
@@ -32,11 +33,7 @@ class ConfluentManagementClient extends ConfluentManagementClientContext {
3233
* @param subscriptionId Microsoft Azure subscription id
3334
* @param [options] The parameter options
3435
*/
35-
constructor(
36-
credentials: msRest.ServiceClientCredentials | TokenCredential,
37-
subscriptionId: string,
38-
options?: Models.ConfluentManagementClientOptions
39-
) {
36+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ConfluentManagementClientOptions) {
4037
super(credentials, subscriptionId, options);
4138
this.marketplaceAgreements = new operations.MarketplaceAgreements(this);
4239
this.organizationOperations = new operations.OrganizationOperations(this);

sdk/confluent/arm-confluent/src/confluentManagementClientContext.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
import * as Models from "./models";
1111
import * as msRest from "@azure/ms-rest-js";
12-
import { TokenCredential } from "@azure/core-auth";
1312
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1414

1515
const packageName = "@azure/arm-confluent";
16-
const packageVersion = "2.1.1";
16+
const packageVersion = "2.2.0";
1717

1818
export class ConfluentManagementClientContext extends msRestAzure.AzureServiceClient {
1919
credentials: msRest.ServiceClientCredentials | TokenCredential;
@@ -31,16 +31,12 @@ export class ConfluentManagementClientContext extends msRestAzure.AzureServiceCl
3131
* @param subscriptionId Microsoft Azure subscription id
3232
* @param [options] The parameter options
3333
*/
34-
constructor(
35-
credentials: msRest.ServiceClientCredentials | TokenCredential,
36-
subscriptionId: string,
37-
options?: Models.ConfluentManagementClientOptions
38-
) {
34+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ConfluentManagementClientOptions) {
3935
if (credentials == undefined) {
40-
throw new Error("'credentials' cannot be null.");
36+
throw new Error('\'credentials\' cannot be null.');
4137
}
4238
if (subscriptionId == undefined) {
43-
throw new Error("'subscriptionId' cannot be null.");
39+
throw new Error('\'subscriptionId\' cannot be null.');
4440
}
4541

4642
if (!options) {
@@ -53,8 +49,8 @@ export class ConfluentManagementClientContext extends msRestAzure.AzureServiceCl
5349

5450
super(credentials, options);
5551

56-
this.apiVersion = "2021-03-01-preview";
57-
this.acceptLanguage = "en-US";
52+
this.apiVersion = '2021-09-01-preview';
53+
this.acceptLanguage = 'en-US';
5854
this.longRunningOperationRetryTimeout = 30;
5955
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
6056
this.requestContentType = "application/json; charset=utf-8";
@@ -64,10 +60,7 @@ export class ConfluentManagementClientContext extends msRestAzure.AzureServiceCl
6460
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
6561
this.acceptLanguage = options.acceptLanguage;
6662
}
67-
if (
68-
options.longRunningOperationRetryTimeout !== null &&
69-
options.longRunningOperationRetryTimeout !== undefined
70-
) {
63+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
7164
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
7265
}
7366
}

0 commit comments

Comments
 (0)