Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sdk/iothub/arm-iothub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ npm install @azure/arm-iothub

##### Install @azure/ms-rest-nodeauth

- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
npm install @azure/ms-rest-nodeauth
npm install @azure/ms-rest-nodeauth@"^3.0.0"
```

##### Sample code
Expand Down Expand Up @@ -94,3 +95,5 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
## Related projects

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

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/iothub/arm-iothub/README.png)
20 changes: 10 additions & 10 deletions sdk/iothub/arm-iothub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "IotHubClient Library with typescript type definitions for node.js and browser.",
"version": "3.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand All @@ -20,19 +20,19 @@
"module": "./esm/iotHubClient.js",
"types": "./esm/iotHubClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"typescript": "^3.5.3",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/azure/azure-sdk-for-js",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/iothub/arm-iothub",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-js/issues"
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/arm-iothub/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = {
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/arm-iothub/src/iotHubClientContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class IotHubClientContext extends msRestAzure.AzureServiceClient {

super(credentials, options);

this.apiVersion = '2019-03-22-preview';
this.apiVersion = '2019-07-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
1 change: 1 addition & 0 deletions sdk/iothub/arm-iothub/src/models/certificatesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export {
FallbackRouteProperties,
FeedbackProperties,
IotHubDescription,
IotHubLocationDescription,
IotHubProperties,
IotHubPropertiesDeviceStreams,
IotHubSkuInfo,
Expand Down
35 changes: 31 additions & 4 deletions sdk/iothub/arm-iothub/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export interface RouteProperties {
/**
* The source that the routing rule is to be applied to, such as DeviceMessages. Possible values
* include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents',
* 'DeviceJobLifecycleEvents'
* 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents'
*/
source: RoutingSource;
/**
Expand Down Expand Up @@ -607,6 +607,20 @@ export interface IotHubPropertiesDeviceStreams {
streamingEndpoints?: string[];
}

/**
* Public representation of one of the locations where a resource is provisioned.
*/
export interface IotHubLocationDescription {
/**
* Azure Geo Regions
*/
location?: string;
/**
* Specific Role assigned to this location. Possible values include: 'primary', 'secondary'
*/
role?: IotHubReplicaRoleType;
}

/**
* The properties of an IoT hub.
*/
Expand Down Expand Up @@ -670,6 +684,11 @@ export interface IotHubProperties {
* 'DeviceManagement'
*/
features?: Capabilities;
/**
* Primary and secondary location for iot hub
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly locations?: IotHubLocationDescription[];
}

/**
Expand Down Expand Up @@ -1141,7 +1160,7 @@ export interface RoutingTwin {
export interface TestAllRoutesInput {
/**
* Routing source. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents',
* 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'
* 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents'
*/
routingSource?: RoutingSource;
/**
Expand Down Expand Up @@ -1503,11 +1522,11 @@ export type IpFilterActionType = 'Accept' | 'Reject';
/**
* Defines values for RoutingSource.
* Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents',
* 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'
* 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents'
* @readonly
* @enum {string}
*/
export type RoutingSource = 'Invalid' | 'DeviceMessages' | 'TwinChangeEvents' | 'DeviceLifecycleEvents' | 'DeviceJobLifecycleEvents';
export type RoutingSource = 'Invalid' | 'DeviceMessages' | 'TwinChangeEvents' | 'DeviceLifecycleEvents' | 'DeviceJobLifecycleEvents' | 'DigitalTwinChangeEvents';

/**
* Defines values for Capabilities.
Expand All @@ -1517,6 +1536,14 @@ export type RoutingSource = 'Invalid' | 'DeviceMessages' | 'TwinChangeEvents' |
*/
export type Capabilities = 'None' | 'DeviceManagement';

/**
* Defines values for IotHubReplicaRoleType.
* Possible values include: 'primary', 'secondary'
* @readonly
* @enum {string}
*/
export type IotHubReplicaRoleType = 'primary' | 'secondary';

/**
* Defines values for IotHubSku.
* Possible values include: 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export {
IotHubCapacity,
IotHubDescription,
IotHubDescriptionListResult,
IotHubLocationDescription,
IotHubNameAvailabilityInfo,
IotHubProperties,
IotHubPropertiesDeviceStreams,
Expand Down
35 changes: 35 additions & 0 deletions sdk/iothub/arm-iothub/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,28 @@ export const IotHubPropertiesDeviceStreams: msRest.CompositeMapper = {
}
};

export const IotHubLocationDescription: msRest.CompositeMapper = {
serializedName: "IotHubLocationDescription",
type: {
name: "Composite",
className: "IotHubLocationDescription",
modelProperties: {
location: {
serializedName: "location",
type: {
name: "String"
}
},
role: {
serializedName: "role",
type: {
name: "String"
}
}
}
}
};

export const IotHubProperties: msRest.CompositeMapper = {
serializedName: "IotHubProperties",
type: {
Expand Down Expand Up @@ -1139,6 +1161,19 @@ export const IotHubProperties: msRest.CompositeMapper = {
type: {
name: "String"
}
},
locations: {
readOnly: true,
serializedName: "locations",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "IotHubLocationDescription"
}
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/arm-iothub/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"lib": ["es6", "dom"],
"declaration": true,
"outDir": "./esm",
"importHelpers": true
Expand Down