Skip to content

Commit 01f2bbe

Browse files
authored
iotcentral-track1 (Azure#18160)
* iotcentral-track1 * update * update
1 parent 81915b2 commit 01f2bbe

File tree

7 files changed

+125
-15
lines changed

7 files changed

+125
-15
lines changed

sdk/iotcentral/arm-iotcentral/README.md

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

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for IotCentralClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for IotCentralClient.
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-iotcentral @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 get apps as an example written in JavaScript.
4240

4341
##### Sample code
@@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8785
const credential = new InteractiveBrowserCredential(
8886
{
8987
clientId: "<client id for your Azure AD app>",
90-
tenantId: "<optional tenant for your organization>"
88+
tenant: "<optional tenant for your organization>"
9189
});
9290
const client = new Azure.ArmIotcentral.IotCentralClient(creds, subscriptionId);
9391
const resourceGroupName = "testresourceGroupName";

sdk/iotcentral/arm-iotcentral/package.json

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

sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts

Lines changed: 3 additions & 3 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-iotcentral";
16-
const packageVersion = "4.2.1";
16+
const packageVersion = "5.0.0";
1717

1818
export class IotCentralClientContext extends msRestAzure.AzureServiceClient {
1919
credentials: msRest.ServiceClientCredentials | TokenCredential;
@@ -49,7 +49,7 @@ export class IotCentralClientContext extends msRestAzure.AzureServiceClient {
4949

5050
super(credentials, options);
5151

52-
this.apiVersion = '2018-09-01';
52+
this.apiVersion = '2021-06-01';
5353
this.acceptLanguage = 'en-US';
5454
this.longRunningOperationRetryTimeout = 30;
5555
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ export {
1818
BaseResource,
1919
CloudError,
2020
OperationInputs,
21-
Resource
21+
Resource,
22+
SystemAssignedServiceIdentity
2223
} from "../models/mappers";

sdk/iotcentral/arm-iotcentral/src/models/index.ts

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,33 @@ export { BaseResource, CloudError };
1616
*/
1717
export interface AppSkuInfo {
1818
/**
19-
* The name of the SKU. Possible values include: 'F1', 'S1', 'ST0', 'ST1', 'ST2'
19+
* The name of the SKU. Possible values include: 'ST0', 'ST1', 'ST2'
2020
*/
2121
name: AppSku;
2222
}
2323

24+
/**
25+
* Managed service identity (either system assigned, or none)
26+
*/
27+
export interface SystemAssignedServiceIdentity {
28+
/**
29+
* The service principal ID of the system assigned identity. This property will only be provided
30+
* for a system assigned identity.
31+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
32+
*/
33+
readonly principalId?: string;
34+
/**
35+
* The tenant ID of the system assigned identity. This property will only be provided for a
36+
* system assigned identity.
37+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
38+
*/
39+
readonly tenantId?: string;
40+
/**
41+
* Possible values include: 'None', 'SystemAssigned'
42+
*/
43+
type: SystemAssignedServiceIdentityType;
44+
}
45+
2446
/**
2547
* The common properties of an ARM resource.
2648
*/
@@ -73,10 +95,18 @@ export interface App extends Resource {
7395
* allows the application to be defined from scratch.
7496
*/
7597
template?: string;
98+
/**
99+
* The current state of the application. Possible values include: 'created', 'suspended'
100+
*/
101+
state?: AppState;
76102
/**
77103
* A valid instance SKU.
78104
*/
79105
sku: AppSkuInfo;
106+
/**
107+
* The managed identities for the IoT Central application.
108+
*/
109+
identity?: SystemAssignedServiceIdentity;
80110
}
81111

82112
/**
@@ -110,6 +140,14 @@ export interface AppPatch {
110140
* allows the application to be defined from scratch.
111141
*/
112142
template?: string;
143+
/**
144+
* The current state of the application. Possible values include: 'created', 'suspended'
145+
*/
146+
state?: AppState;
147+
/**
148+
* The managed identities for the IoT Central application.
149+
*/
150+
identity?: SystemAssignedServiceIdentity;
113151
}
114152

115153
/**
@@ -330,13 +368,29 @@ export interface OperationListResult extends Array<Operation> {
330368
nextLink?: string;
331369
}
332370

371+
/**
372+
* Defines values for AppState.
373+
* Possible values include: 'created', 'suspended'
374+
* @readonly
375+
* @enum {string}
376+
*/
377+
export type AppState = 'created' | 'suspended';
378+
333379
/**
334380
* Defines values for AppSku.
335-
* Possible values include: 'F1', 'S1', 'ST0', 'ST1', 'ST2'
381+
* Possible values include: 'ST0', 'ST1', 'ST2'
382+
* @readonly
383+
* @enum {string}
384+
*/
385+
export type AppSku = 'ST0' | 'ST1' | 'ST2';
386+
387+
/**
388+
* Defines values for SystemAssignedServiceIdentityType.
389+
* Possible values include: 'None', 'SystemAssigned'
336390
* @readonly
337391
* @enum {string}
338392
*/
339-
export type AppSku = 'F1' | 'S1' | 'ST0' | 'ST1' | 'ST2';
393+
export type SystemAssignedServiceIdentityType = 'None' | 'SystemAssigned';
340394

341395
/**
342396
* Contains response data for the get operation.

sdk/iotcentral/arm-iotcentral/src/models/mappers.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,37 @@ export const AppSkuInfo: msRest.CompositeMapper = {
2929
}
3030
};
3131

32+
export const SystemAssignedServiceIdentity: msRest.CompositeMapper = {
33+
serializedName: "SystemAssignedServiceIdentity",
34+
type: {
35+
name: "Composite",
36+
className: "SystemAssignedServiceIdentity",
37+
modelProperties: {
38+
principalId: {
39+
readOnly: true,
40+
serializedName: "principalId",
41+
type: {
42+
name: "Uuid"
43+
}
44+
},
45+
tenantId: {
46+
readOnly: true,
47+
serializedName: "tenantId",
48+
type: {
49+
name: "Uuid"
50+
}
51+
},
52+
type: {
53+
required: true,
54+
serializedName: "type",
55+
type: {
56+
name: "String"
57+
}
58+
}
59+
}
60+
}
61+
};
62+
3263
export const Resource: msRest.CompositeMapper = {
3364
serializedName: "Resource",
3465
type: {
@@ -113,13 +144,26 @@ export const App: msRest.CompositeMapper = {
113144
name: "String"
114145
}
115146
},
147+
state: {
148+
serializedName: "properties.state",
149+
type: {
150+
name: "String"
151+
}
152+
},
116153
sku: {
117154
required: true,
118155
serializedName: "sku",
119156
type: {
120157
name: "Composite",
121158
className: "AppSkuInfo"
122159
}
160+
},
161+
identity: {
162+
serializedName: "identity",
163+
type: {
164+
name: "Composite",
165+
className: "SystemAssignedServiceIdentity"
166+
}
123167
}
124168
}
125169
}
@@ -173,6 +217,19 @@ export const AppPatch: msRest.CompositeMapper = {
173217
type: {
174218
name: "String"
175219
}
220+
},
221+
state: {
222+
serializedName: "properties.state",
223+
type: {
224+
name: "String"
225+
}
226+
},
227+
identity: {
228+
serializedName: "identity",
229+
type: {
230+
name: "Composite",
231+
className: "SystemAssignedServiceIdentity"
232+
}
176233
}
177234
}
178235
}

sdk/iotcentral/arm-iotcentral/src/operations/operations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class Operations {
2626
}
2727

2828
/**
29-
* Lists all of the available IoT Central application REST API operations.
29+
* Lists all of the available IoT Central Resource Provider operations.
3030
* @param [options] The optional parameters
3131
* @returns Promise<Models.OperationsListResponse>
3232
*/
@@ -50,7 +50,7 @@ export class Operations {
5050
}
5151

5252
/**
53-
* Lists all of the available IoT Central application REST API operations.
53+
* Lists all of the available IoT Central Resource Provider operations.
5454
* @param nextPageLink The NextLink from the previous successful call to List operation.
5555
* @param [options] The optional parameters
5656
* @returns Promise<Models.OperationsListNextResponse>

0 commit comments

Comments
 (0)