diff --git a/sdk/iothub/arm-iothub/LICENSE.txt b/sdk/iothub/arm-iothub/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/iothub/arm-iothub/LICENSE.txt +++ b/sdk/iothub/arm-iothub/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/iothub/arm-iothub/README.md b/sdk/iothub/arm-iothub/README.md index 846237190adb..e0119d94d701 100644 --- a/sdk/iothub/arm-iothub/README.md +++ b/sdk/iothub/arm-iothub/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for IotHubClient. ### How to Install -``` +```bash npm install @azure/arm-iothub ``` @@ -19,13 +19,13 @@ npm install @azure/arm-iothub ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -47,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -94,6 +94,3 @@ 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) diff --git a/sdk/iothub/arm-iothub/package.json b/sdk/iothub/arm-iothub/package.json index a7e9a4bb7b46..5885ca5e1601 100644 --- a/sdk/iothub/arm-iothub/package.json +++ b/sdk/iothub/arm-iothub/package.json @@ -4,8 +4,8 @@ "description": "IotHubClient Library with typescript type definitions for node.js and browser.", "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/iothub/arm-iothub", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/iothub/arm-iothub/rollup.config.js b/sdk/iothub/arm-iothub/rollup.config.js index 0209b0ba1400..8464171f6338 100644 --- a/sdk/iothub/arm-iothub/rollup.config.js +++ b/sdk/iothub/arm-iothub/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/iotHubClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/iotHubClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-iothub.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/iothub/arm-iothub/src/iotHubClient.ts b/sdk/iothub/arm-iothub/src/iotHubClient.ts index 36360600b831..acbec4a87d10 100644 --- a/sdk/iothub/arm-iothub/src/iotHubClient.ts +++ b/sdk/iothub/arm-iothub/src/iotHubClient.ts @@ -21,6 +21,7 @@ class IotHubClient extends IotHubClientContext { iotHubResource: operations.IotHubResource; resourceProviderCommon: operations.ResourceProviderCommon; certificates: operations.Certificates; + iotHub: operations.IotHub; /** * Initializes a new instance of the IotHubClient class. @@ -34,6 +35,7 @@ class IotHubClient extends IotHubClientContext { this.iotHubResource = new operations.IotHubResource(this); this.resourceProviderCommon = new operations.ResourceProviderCommon(this); this.certificates = new operations.Certificates(this); + this.iotHub = new operations.IotHub(this); } } diff --git a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts index 4e27860b04d5..86967fe65040 100644 --- a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts +++ b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-iothub"; -const packageVersion = "0.1.0"; +const packageVersion = "2.1.0"; export class IotHubClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +44,7 @@ export class IotHubClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-04-01'; + this.apiVersion = '2019-03-22-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts b/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts index 063684f78e5f..1be3b19c89d5 100644 --- a/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts @@ -1,43 +1,41 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - CertificateListDescription, - CertificateDescription, BaseResource, - CertificateProperties, - ErrorDetails, CertificateBodyDescription, - CertificateWithNonceDescription, + CertificateDescription, + CertificateListDescription, + CertificateProperties, CertificatePropertiesWithNonce, CertificateVerificationDescription, - Resource, + CertificateWithNonceDescription, + CloudToDeviceProperties, + EnrichmentProperties, + ErrorDetails, EventHubConsumerGroupInfo, + EventHubProperties, + FallbackRouteProperties, + FeedbackProperties, IotHubDescription, IotHubProperties, - SharedAccessSignatureAuthorizationRule, + IotHubPropertiesDeviceStreams, + IotHubSkuInfo, IpFilterRule, - EventHubProperties, - RoutingProperties, + MessagingEndpointProperties, + Resource, + RouteProperties, RoutingEndpoints, + RoutingEventHubProperties, + RoutingProperties, RoutingServiceBusQueueEndpointProperties, RoutingServiceBusTopicEndpointProperties, - RoutingEventHubProperties, RoutingStorageContainerProperties, - RouteProperties, - FallbackRouteProperties, - StorageEndpointProperties, - MessagingEndpointProperties, - CloudToDeviceProperties, - FeedbackProperties, - OperationsMonitoringProperties, - IotHubSkuInfo + SharedAccessSignatureAuthorizationRule, + StorageEndpointProperties } from "../models/mappers"; - diff --git a/sdk/iothub/arm-iothub/src/models/index.ts b/sdk/iothub/arm-iothub/src/models/index.ts index e621acb66598..d6d48dd3b916 100644 --- a/sdk/iothub/arm-iothub/src/models/index.ts +++ b/sdk/iothub/arm-iothub/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,1848 +11,1470 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing CertificateVerificationDescription. * The JSON-serialized leaf certificate - * */ export interface CertificateVerificationDescription { /** - * @member {string} [certificate] base-64 representation of X509 certificate - * .cer file or just .pem file content. + * base-64 representation of X509 certificate .cer file or just .pem file content. */ certificate?: string; } /** - * @interface - * An interface representing CertificateProperties. * The description of an X509 CA Certificate. - * */ export interface CertificateProperties { /** - * @member {string} [subject] The certificate's subject name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's subject name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly subject?: string; /** - * @member {Date} [expiry] The certificate's expiration date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's expiration date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly expiry?: Date; /** - * @member {string} [thumbprint] The certificate's thumbprint. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's thumbprint. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbprint?: string; /** - * @member {boolean} [isVerified] Determines whether certificate has been - * verified. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Determines whether certificate has been verified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isVerified?: boolean; /** - * @member {Date} [created] The certificate's create date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's create date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** - * @member {Date} [updated] The certificate's last update date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's last update date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly updated?: Date; /** - * @member {string} [certificate] The certificate content + * The certificate content */ certificate?: string; } /** - * @interface - * An interface representing CertificateDescription. * The X509 Certificate. - * - * @extends BaseResource */ export interface CertificateDescription extends BaseResource { - /** - * @member {CertificateProperties} [properties] - */ properties?: CertificateProperties; /** - * @member {string} [id] The resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the certificate. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the certificate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [etag] The entity tag. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The entity tag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing CertificateListDescription. * The JSON-serialized array of Certificate objects. - * */ export interface CertificateListDescription { /** - * @member {CertificateDescription[]} [value] The array of Certificate - * objects. + * The array of Certificate objects. */ value?: CertificateDescription[]; } /** - * @interface - * An interface representing CertificateBodyDescription. * The JSON-serialized X509 Certificate. - * */ export interface CertificateBodyDescription { /** - * @member {string} [certificate] base-64 representation of the X509 leaf - * certificate .cer file or just .pem file content. + * base-64 representation of the X509 leaf certificate .cer file or just .pem file content. */ certificate?: string; } /** - * @interface - * An interface representing CertificatePropertiesWithNonce. - * The description of an X509 CA Certificate including the challenge nonce - * issued for the Proof-Of-Possession flow. - * + * The description of an X509 CA Certificate including the challenge nonce issued for the + * Proof-Of-Possession flow. */ export interface CertificatePropertiesWithNonce { /** - * @member {string} [subject] The certificate's subject name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's subject name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly subject?: string; /** - * @member {Date} [expiry] The certificate's expiration date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's expiration date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly expiry?: Date; /** - * @member {string} [thumbprint] The certificate's thumbprint. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's thumbprint. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbprint?: string; /** - * @member {boolean} [isVerified] Determines whether certificate has been - * verified. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Determines whether certificate has been verified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isVerified?: boolean; /** - * @member {Date} [created] The certificate's create date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's create date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** - * @member {Date} [updated] The certificate's last update date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's last update date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly updated?: Date; /** - * @member {string} [verificationCode] The certificate's verification code - * that will be used for proof of possession. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's verification code that will be used for proof of possession. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly verificationCode?: string; /** - * @member {string} [certificate] The certificate content - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate content + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly certificate?: string; } /** - * @interface - * An interface representing CertificateWithNonceDescription. * The X509 Certificate. - * - * @extends BaseResource */ export interface CertificateWithNonceDescription extends BaseResource { - /** - * @member {CertificatePropertiesWithNonce} [properties] - */ properties?: CertificatePropertiesWithNonce; /** - * @member {string} [id] The resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the certificate. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the certificate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [etag] The entity tag. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The entity tag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing SharedAccessSignatureAuthorizationRule. * The properties of an IoT hub shared access policy. - * */ export interface SharedAccessSignatureAuthorizationRule { /** - * @member {string} keyName The name of the shared access policy. + * The name of the shared access policy. */ keyName: string; /** - * @member {string} [primaryKey] The primary key. + * The primary key. */ primaryKey?: string; /** - * @member {string} [secondaryKey] The secondary key. + * The secondary key. */ secondaryKey?: string; /** - * @member {AccessRights} rights The permissions assigned to the shared - * access policy. Possible values include: 'RegistryRead', 'RegistryWrite', - * 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', - * 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', - * 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', - * 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - * ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', - * 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, - * ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - * ServiceConnect, DeviceConnect' + * The permissions assigned to the shared access policy. Possible values include: 'RegistryRead', + * 'RegistryWrite', 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', + * 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', 'RegistryWrite, + * ServiceConnect', 'RegistryWrite, DeviceConnect', 'ServiceConnect, DeviceConnect', + * 'RegistryRead, RegistryWrite, ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', + * 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, ServiceConnect, DeviceConnect', + * 'RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect' */ rights: AccessRights; } /** - * @interface - * An interface representing IpFilterRule. * The IP filter rules for the IoT hub. - * */ export interface IpFilterRule { /** - * @member {string} filterName The name of the IP filter rule. + * The name of the IP filter rule. */ filterName: string; /** - * @member {IpFilterActionType} action The desired action for requests - * captured by this rule. Possible values include: 'Accept', 'Reject' + * The desired action for requests captured by this rule. Possible values include: 'Accept', + * 'Reject' */ action: IpFilterActionType; /** - * @member {string} ipMask A string that contains the IP address range in - * CIDR notation for the rule. + * A string that contains the IP address range in CIDR notation for the rule. */ ipMask: string; } /** - * @interface - * An interface representing EventHubProperties. - * The properties of the provisioned Event Hub-compatible endpoint used by the - * IoT hub. - * + * The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub. */ export interface EventHubProperties { /** - * @member {number} [retentionTimeInDays] The retention time for - * device-to-cloud messages in days. See: + * The retention time for device-to-cloud messages in days. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages */ retentionTimeInDays?: number; /** - * @member {number} [partitionCount] The number of partitions for receiving - * device-to-cloud messages in the Event Hub-compatible endpoint. See: + * The number of partitions for receiving device-to-cloud messages in the Event Hub-compatible + * endpoint. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. */ partitionCount?: number; /** - * @member {string[]} [partitionIds] The partition ids in the Event - * Hub-compatible endpoint. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The partition ids in the Event Hub-compatible endpoint. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly partitionIds?: string[]; /** - * @member {string} [path] The Event Hub-compatible name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Event Hub-compatible name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly path?: string; /** - * @member {string} [endpoint] The Event Hub-compatible endpoint. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Event Hub-compatible endpoint. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly endpoint?: string; } /** - * @interface - * An interface representing RoutingServiceBusQueueEndpointProperties. * The properties related to service bus queue endpoint types. - * */ export interface RoutingServiceBusQueueEndpointProperties { /** - * @member {string} connectionString The connection string of the service bus - * queue endpoint. + * The connection string of the service bus queue endpoint. */ connectionString: string; /** - * @member {string} name The name that identifies this endpoint. The name can - * only include alphanumeric characters, periods, underscores, hyphens and - * has a maximum length of 64 characters. The following names are reserved: - * events, operationsMonitoringEvents, fileNotifications, $default. Endpoint - * names must be unique across endpoint types. The name need not be the same - * as the actual queue name. + * The name that identifies this endpoint. The name can only include alphanumeric characters, + * periods, underscores, hyphens and has a maximum length of 64 characters. The following names + * are reserved: events, fileNotifications, $default. Endpoint names must be unique across + * endpoint types. The name need not be the same as the actual queue name. */ name: string; /** - * @member {string} [subscriptionId] The subscription identifier of the - * service bus queue endpoint. + * The subscription identifier of the service bus queue endpoint. */ subscriptionId?: string; /** - * @member {string} [resourceGroup] The name of the resource group of the - * service bus queue endpoint. + * The name of the resource group of the service bus queue endpoint. */ resourceGroup?: string; } /** - * @interface - * An interface representing RoutingServiceBusTopicEndpointProperties. * The properties related to service bus topic endpoint types. - * */ export interface RoutingServiceBusTopicEndpointProperties { /** - * @member {string} connectionString The connection string of the service bus - * topic endpoint. + * The connection string of the service bus topic endpoint. */ connectionString: string; /** - * @member {string} name The name that identifies this endpoint. The name can - * only include alphanumeric characters, periods, underscores, hyphens and - * has a maximum length of 64 characters. The following names are reserved: - * events, operationsMonitoringEvents, fileNotifications, $default. Endpoint - * names must be unique across endpoint types. The name need not be the same - * as the actual topic name. + * The name that identifies this endpoint. The name can only include alphanumeric characters, + * periods, underscores, hyphens and has a maximum length of 64 characters. The following names + * are reserved: events, fileNotifications, $default. Endpoint names must be unique across + * endpoint types. The name need not be the same as the actual topic name. */ name: string; /** - * @member {string} [subscriptionId] The subscription identifier of the - * service bus topic endpoint. + * The subscription identifier of the service bus topic endpoint. */ subscriptionId?: string; /** - * @member {string} [resourceGroup] The name of the resource group of the - * service bus topic endpoint. + * The name of the resource group of the service bus topic endpoint. */ resourceGroup?: string; } /** - * @interface - * An interface representing RoutingEventHubProperties. * The properties related to an event hub endpoint. - * */ export interface RoutingEventHubProperties { /** - * @member {string} connectionString The connection string of the event hub - * endpoint. + * The connection string of the event hub endpoint. */ connectionString: string; /** - * @member {string} name The name that identifies this endpoint. The name can - * only include alphanumeric characters, periods, underscores, hyphens and - * has a maximum length of 64 characters. The following names are reserved: - * events, operationsMonitoringEvents, fileNotifications, $default. Endpoint - * names must be unique across endpoint types. + * The name that identifies this endpoint. The name can only include alphanumeric characters, + * periods, underscores, hyphens and has a maximum length of 64 characters. The following names + * are reserved: events, fileNotifications, $default. Endpoint names must be unique across + * endpoint types. */ name: string; /** - * @member {string} [subscriptionId] The subscription identifier of the event - * hub endpoint. + * The subscription identifier of the event hub endpoint. */ subscriptionId?: string; /** - * @member {string} [resourceGroup] The name of the resource group of the - * event hub endpoint. + * The name of the resource group of the event hub endpoint. */ resourceGroup?: string; } /** - * @interface - * An interface representing RoutingStorageContainerProperties. * The properties related to a storage container endpoint. - * */ export interface RoutingStorageContainerProperties { /** - * @member {string} connectionString The connection string of the storage - * account. + * The connection string of the storage account. */ connectionString: string; /** - * @member {string} name The name that identifies this endpoint. The name can - * only include alphanumeric characters, periods, underscores, hyphens and - * has a maximum length of 64 characters. The following names are reserved: - * events, operationsMonitoringEvents, fileNotifications, $default. Endpoint - * names must be unique across endpoint types. + * The name that identifies this endpoint. The name can only include alphanumeric characters, + * periods, underscores, hyphens and has a maximum length of 64 characters. The following names + * are reserved: events, fileNotifications, $default. Endpoint names must be unique across + * endpoint types. */ name: string; /** - * @member {string} [subscriptionId] The subscription identifier of the - * storage account. + * The subscription identifier of the storage account. */ subscriptionId?: string; /** - * @member {string} [resourceGroup] The name of the resource group of the - * storage account. + * The name of the resource group of the storage account. */ resourceGroup?: string; /** - * @member {string} containerName The name of storage container in the - * storage account. + * The name of storage container in the storage account. */ containerName: string; /** - * @member {string} [fileNameFormat] File name format for the blob. Default - * format is {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters - * are mandatory but can be reordered. + * File name format for the blob. Default format is + * {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be + * reordered. */ fileNameFormat?: string; /** - * @member {number} [batchFrequencyInSeconds] Time interval at which blobs - * are written to storage. Value should be between 60 and 720 seconds. - * Default value is 300 seconds. + * Time interval at which blobs are written to storage. Value should be between 60 and 720 + * seconds. Default value is 300 seconds. */ batchFrequencyInSeconds?: number; /** - * @member {number} [maxChunkSizeInBytes] Maximum number of bytes for each - * blob written to storage. Value should be between 10485760(10MB) and - * 524288000(500MB). Default value is 314572800(300MB). + * Maximum number of bytes for each blob written to storage. Value should be between + * 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). */ maxChunkSizeInBytes?: number; /** - * @member {string} [encoding] Encoding that is used to serialize messages to - * blobs. Supported values are 'avro' and 'avrodeflate'. Default value is - * 'avro'. + * Encoding that is used to serialize messages to blobs. Supported values are 'avro', + * 'avrodeflate', and 'JSON'. Default value is 'avro'. Possible values include: 'Avro', + * 'AvroDeflate', 'JSON' */ - encoding?: string; + encoding?: Encoding; } /** - * @interface - * An interface representing RoutingEndpoints. - * The properties related to the custom endpoints to which your IoT hub routes - * messages based on the routing rules. A maximum of 10 custom endpoints are - * allowed across all endpoint types for paid hubs and only 1 custom endpoint - * is allowed across all endpoint types for free hubs. - * + * The properties related to the custom endpoints to which your IoT hub routes messages based on + * the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for + * paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs. */ export interface RoutingEndpoints { /** - * @member {RoutingServiceBusQueueEndpointProperties[]} [serviceBusQueues] - * The list of Service Bus queue endpoints that IoT hub routes the messages - * to, based on the routing rules. + * The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the + * routing rules. */ serviceBusQueues?: RoutingServiceBusQueueEndpointProperties[]; /** - * @member {RoutingServiceBusTopicEndpointProperties[]} [serviceBusTopics] - * The list of Service Bus topic endpoints that the IoT hub routes the - * messages to, based on the routing rules. + * The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the + * routing rules. */ serviceBusTopics?: RoutingServiceBusTopicEndpointProperties[]; /** - * @member {RoutingEventHubProperties[]} [eventHubs] The list of Event Hubs - * endpoints that IoT hub routes messages to, based on the routing rules. + * The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. * This list does not include the built-in Event Hubs endpoint. */ eventHubs?: RoutingEventHubProperties[]; /** - * @member {RoutingStorageContainerProperties[]} [storageContainers] The list - * of storage container endpoints that IoT hub routes messages to, based on - * the routing rules. + * The list of storage container endpoints that IoT hub routes messages to, based on the routing + * rules. */ storageContainers?: RoutingStorageContainerProperties[]; } /** - * @interface - * An interface representing RouteProperties. - * The properties of a routing rule that your IoT hub uses to route messages to - * endpoints. - * + * The properties of a routing rule that your IoT hub uses to route messages to endpoints. */ export interface RouteProperties { /** - * @member {string} name The name of the route. The name can only include - * alphanumeric characters, periods, underscores, hyphens, has a maximum - * length of 64 characters, and must be unique. + * The name of the route. The name can only include alphanumeric characters, periods, + * underscores, hyphens, has a maximum length of 64 characters, and must be unique. */ name: string; /** - * @member {RoutingSource} source The source that the routing rule is to be - * applied to, such as DeviceMessages. Possible values include: 'Invalid', - * 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + * The source that the routing rule is to be applied to, such as DeviceMessages. Possible values + * include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', * 'DeviceJobLifecycleEvents' */ source: RoutingSource; /** - * @member {string} [condition] The condition that is evaluated to apply the - * routing rule. If no condition is provided, it evaluates to true by - * default. For grammar, see: + * The condition that is evaluated to apply the routing rule. If no condition is provided, it + * evaluates to true by default. For grammar, see: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language */ condition?: string; /** - * @member {string[]} endpointNames The list of endpoints to which messages - * that satisfy the condition are routed. Currently only one endpoint is - * allowed. + * The list of endpoints to which messages that satisfy the condition are routed. Currently only + * one endpoint is allowed. */ endpointNames: string[]; /** - * @member {boolean} isEnabled Used to specify whether a route is enabled. + * Used to specify whether a route is enabled. */ isEnabled: boolean; } /** - * @interface - * An interface representing FallbackRouteProperties. - * The properties of the fallback route. IoT Hub uses these properties when it - * routes messages to the fallback endpoint. - * + * The properties of the fallback route. IoT Hub uses these properties when it routes messages to + * the fallback endpoint. */ export interface FallbackRouteProperties { /** - * @member {string} [name] The name of the route. The name can only include - * alphanumeric characters, periods, underscores, hyphens, has a maximum - * length of 64 characters, and must be unique. + * The name of the route. The name can only include alphanumeric characters, periods, + * underscores, hyphens, has a maximum length of 64 characters, and must be unique. */ name?: string; /** - * @member {string} [condition] The condition which is evaluated in order to - * apply the fallback route. If the condition is not provided it will - * evaluate to true by default. For grammar, See: + * The condition which is evaluated in order to apply the fallback route. If the condition is not + * provided it will evaluate to true by default. For grammar, See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language */ condition?: string; /** - * @member {string[]} endpointNames The list of endpoints to which the - * messages that satisfy the condition are routed to. Currently only 1 - * endpoint is allowed. + * The list of endpoints to which the messages that satisfy the condition are routed to. + * Currently only 1 endpoint is allowed. */ endpointNames: string[]; /** - * @member {boolean} isEnabled Used to specify whether the fallback route is - * enabled. + * Used to specify whether the fallback route is enabled. */ isEnabled: boolean; } /** - * @interface - * An interface representing RoutingProperties. + * The properties of an enrichment that your IoT hub applies to messages delivered to endpoints. + */ +export interface EnrichmentProperties { + /** + * The key or name for the enrichment property. + */ + key: string; + /** + * The value for the enrichment property. + */ + value: string; + /** + * The list of endpoints for which the enrichment is applied to the message. + */ + endpointNames: string[]; +} + +/** * The routing related properties of the IoT hub. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging - * */ export interface RoutingProperties { - /** - * @member {RoutingEndpoints} [endpoints] - */ endpoints?: RoutingEndpoints; /** - * @member {RouteProperties[]} [routes] The list of user-provided routing - * rules that the IoT hub uses to route messages to built-in and custom - * endpoints. A maximum of 100 routing rules are allowed for paid hubs and a - * maximum of 5 routing rules are allowed for free hubs. + * The list of user-provided routing rules that the IoT hub uses to route messages to built-in + * and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum + * of 5 routing rules are allowed for free hubs. */ routes?: RouteProperties[]; /** - * @member {FallbackRouteProperties} [fallbackRoute] The properties of the - * route that is used as a fall-back route when none of the conditions - * specified in the 'routes' section are met. This is an optional parameter. - * When this property is not set, the messages which do not meet any of the - * conditions specified in the 'routes' section get routed to the built-in - * eventhub endpoint. + * The properties of the route that is used as a fall-back route when none of the conditions + * specified in the 'routes' section are met. This is an optional parameter. When this property + * is not set, the messages which do not meet any of the conditions specified in the 'routes' + * section get routed to the built-in eventhub endpoint. */ fallbackRoute?: FallbackRouteProperties; + /** + * The list of user-provided enrichments that the IoT hub applies to messages to be delivered to + * built-in and custom endpoints. See: https://aka.ms/iotmsgenrich + */ + enrichments?: EnrichmentProperties[]; } /** - * @interface - * An interface representing StorageEndpointProperties. * The properties of the Azure Storage endpoint for file upload. - * */ export interface StorageEndpointProperties { /** - * @member {string} [sasTtlAsIso8601] The period of time for which the the - * SAS URI generated by IoT Hub for file upload is valid. See: + * The period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. */ sasTtlAsIso8601?: string; /** - * @member {string} connectionString The connection string for the Azure - * Storage account to which files are uploaded. + * The connection string for the Azure Storage account to which files are uploaded. */ connectionString: string; /** - * @member {string} containerName The name of the root container where you - * upload files. The container need not exist but should be creatable using - * the connectionString specified. + * The name of the root container where you upload files. The container need not exist but should + * be creatable using the connectionString specified. */ containerName: string; } /** - * @interface - * An interface representing MessagingEndpointProperties. * The properties of the messaging endpoints used by this IoT hub. - * */ export interface MessagingEndpointProperties { /** - * @member {string} [lockDurationAsIso8601] The lock duration. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + * The lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. */ lockDurationAsIso8601?: string; /** - * @member {string} [ttlAsIso8601] The period of time for which a message is - * available to consume before it is expired by the IoT hub. See: - * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + * The period of time for which a message is available to consume before it is expired by the IoT + * hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. */ ttlAsIso8601?: string; /** - * @member {number} [maxDeliveryCount] The number of times the IoT hub - * attempts to deliver a message. See: + * The number of times the IoT hub attempts to deliver a message. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. */ maxDeliveryCount?: number; } /** - * @interface - * An interface representing FeedbackProperties. * The properties of the feedback queue for cloud-to-device messages. - * */ export interface FeedbackProperties { /** - * @member {string} [lockDurationAsIso8601] The lock duration for the - * feedback queue. See: + * The lock duration for the feedback queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. */ lockDurationAsIso8601?: string; /** - * @member {string} [ttlAsIso8601] The period of time for which a message is - * available to consume before it is expired by the IoT hub. See: + * The period of time for which a message is available to consume before it is expired by the IoT + * hub. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. */ ttlAsIso8601?: string; /** - * @member {number} [maxDeliveryCount] The number of times the IoT hub - * attempts to deliver a message on the feedback queue. See: + * The number of times the IoT hub attempts to deliver a message on the feedback queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. */ maxDeliveryCount?: number; } /** - * @interface - * An interface representing CloudToDeviceProperties. * The IoT hub cloud-to-device messaging properties. - * */ export interface CloudToDeviceProperties { /** - * @member {number} [maxDeliveryCount] The max delivery count for - * cloud-to-device messages in the device queue. See: + * The max delivery count for cloud-to-device messages in the device queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. */ maxDeliveryCount?: number; /** - * @member {string} [defaultTtlAsIso8601] The default time to live for - * cloud-to-device messages in the device queue. See: + * The default time to live for cloud-to-device messages in the device queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. */ defaultTtlAsIso8601?: string; - /** - * @member {FeedbackProperties} [feedback] - */ feedback?: FeedbackProperties; } /** - * @interface - * An interface representing OperationsMonitoringProperties. - * The operations monitoring properties for the IoT hub. The possible keys to - * the dictionary are Connections, DeviceTelemetry, C2DCommands, - * DeviceIdentityOperations, FileUploadOperations, Routes, D2CTwinOperations, - * C2DTwinOperations, TwinQueries, JobsOperations, DirectMethods. - * + * The device streams properties of iothub. */ -export interface OperationsMonitoringProperties { +export interface IotHubPropertiesDeviceStreams { /** - * @member {{ [propertyName: string]: OperationMonitoringLevel }} [events] + * List of Device Streams Endpoints. */ - events?: { [propertyName: string]: OperationMonitoringLevel }; + streamingEndpoints?: string[]; } /** - * @interface - * An interface representing IotHubProperties. * The properties of an IoT hub. - * */ export interface IotHubProperties { /** - * @member {SharedAccessSignatureAuthorizationRule[]} [authorizationPolicies] - * The shared access policies you can use to secure a connection to the IoT - * hub. + * The shared access policies you can use to secure a connection to the IoT hub. */ authorizationPolicies?: SharedAccessSignatureAuthorizationRule[]; /** - * @member {IpFilterRule[]} [ipFilterRules] The IP filter rules. + * The IP filter rules. */ ipFilterRules?: IpFilterRule[]; /** - * @member {string} [provisioningState] The provisioning state. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The provisioning state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; /** - * @member {string} [state] Thehub state state. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The hub state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly state?: string; /** - * @member {string} [hostName] The name of the host. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the host. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly hostName?: string; /** - * @member {{ [propertyName: string]: EventHubProperties }} - * [eventHubEndpoints] The Event Hub-compatible endpoint properties. The - * possible keys to this dictionary are events and - * operationsMonitoringEvents. Both of these keys have to be present in the - * dictionary while making create or update calls for the IoT hub. + * The Event Hub-compatible endpoint properties. The only possible keys to this dictionary is + * events. This key has to be present in the dictionary while making create or update calls for + * the IoT hub. */ eventHubEndpoints?: { [propertyName: string]: EventHubProperties }; - /** - * @member {RoutingProperties} [routing] - */ routing?: RoutingProperties; /** - * @member {{ [propertyName: string]: StorageEndpointProperties }} - * [storageEndpoints] The list of Azure Storage endpoints where you can - * upload files. Currently you can configure only one Azure Storage account - * and that MUST have its key as $default. Specifying more than one storage - * account causes an error to be thrown. Not specifying a value for this - * property when the enableFileUploadNotifications property is set to True, - * causes an error to be thrown. + * The list of Azure Storage endpoints where you can upload files. Currently you can configure + * only one Azure Storage account and that MUST have its key as $default. Specifying more than + * one storage account causes an error to be thrown. Not specifying a value for this property + * when the enableFileUploadNotifications property is set to True, causes an error to be thrown. */ storageEndpoints?: { [propertyName: string]: StorageEndpointProperties }; /** - * @member {{ [propertyName: string]: MessagingEndpointProperties }} - * [messagingEndpoints] The messaging endpoint properties for the file upload - * notification queue. + * The messaging endpoint properties for the file upload notification queue. */ messagingEndpoints?: { [propertyName: string]: MessagingEndpointProperties }; /** - * @member {boolean} [enableFileUploadNotifications] If True, file upload - * notifications are enabled. + * If True, file upload notifications are enabled. */ enableFileUploadNotifications?: boolean; - /** - * @member {CloudToDeviceProperties} [cloudToDevice] - */ cloudToDevice?: CloudToDeviceProperties; /** - * @member {string} [comments] IoT hub comments. + * IoT hub comments. */ comments?: string; /** - * @member {OperationsMonitoringProperties} [operationsMonitoringProperties] + * The device streams properties of iothub. */ - operationsMonitoringProperties?: OperationsMonitoringProperties; + deviceStreams?: IotHubPropertiesDeviceStreams; /** - * @member {Capabilities} [features] The capabilities and features enabled - * for the IoT hub. Possible values include: 'None', 'DeviceManagement' + * The capabilities and features enabled for the IoT hub. Possible values include: 'None', + * 'DeviceManagement' */ features?: Capabilities; } /** - * @interface - * An interface representing IotHubSkuInfo. * Information about the SKU of the IoT hub. - * */ export interface IotHubSkuInfo { /** - * @member {IotHubSku} name The name of the SKU. Possible values include: - * 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' + * The name of the SKU. Possible values include: 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' */ name: IotHubSku; /** - * @member {IotHubSkuTier} [tier] The billing tier for the IoT hub. Possible - * values include: 'Free', 'Standard', 'Basic' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The billing tier for the IoT hub. Possible values include: 'Free', 'Standard', 'Basic' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tier?: IotHubSkuTier; /** - * @member {number} [capacity] The number of provisioned IoT Hub units. See: + * The number of provisioned IoT Hub units. See: * https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. */ capacity?: number; } /** - * @interface - * An interface representing Resource. * The common properties of an Azure resource. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] The resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} location The resource location. + * The resource location. */ location: string; /** - * @member {{ [propertyName: string]: string }} [tags] The resource tags. + * The resource tags. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing IotHubDescription. * The description of the IoT hub. - * - * @extends Resource */ export interface IotHubDescription extends Resource { /** - * @member {string} [etag] The Etag field is *not* required. If it is - * provided in the response body, it must also be provided as a header per - * the normal ETag convention. + * The Etag field is *not* required. If it is provided in the response body, it must also be + * provided as a header per the normal ETag convention. */ etag?: string; /** - * @member {IotHubProperties} [properties] IotHub properties + * IotHub properties */ properties?: IotHubProperties; /** - * @member {IotHubSkuInfo} sku IotHub SKU info + * IotHub SKU info */ sku: IotHubSkuInfo; } /** - * @interface - * An interface representing OperationDisplay. * The object that represents the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Service provider: Microsoft Devices - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service provider: Microsoft Devices + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provider?: string; /** - * @member {string} [resource] Resource Type: IotHubs - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Type: IotHubs + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resource?: string; /** - * @member {string} [operation] Name of the operation - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly operation?: string; + /** + * Description of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; } /** - * @interface - * An interface representing Operation. * IoT Hub REST API operation - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{read | - * write | action | delete} - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation name: {provider}/{resource}/{read | write | action | delete} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The object that represents the operation. */ display?: OperationDisplay; } /** - * @interface - * An interface representing ErrorDetails. * Error details. - * */ export interface ErrorDetails { /** - * @member {string} [code] The error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [httpStatusCode] The HTTP status code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The HTTP status code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly httpStatusCode?: string; /** - * @member {string} [message] The error message. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; /** - * @member {string} [details] The error details. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly details?: string; } /** - * @interface - * An interface representing IotHubQuotaMetricInfo. * Quota metrics properties. - * */ export interface IotHubQuotaMetricInfo { /** - * @member {string} [name] The name of the quota metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the quota metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {number} [currentValue] The current value for the quota metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The current value for the quota metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly currentValue?: number; /** - * @member {number} [maxValue] The maximum value of the quota metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The maximum value of the quota metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly maxValue?: number; } /** - * @interface - * An interface representing EndpointHealthData. * The health data for an endpoint - * */ export interface EndpointHealthData { /** - * @member {string} [endpointId] Id of the endpoint + * Id of the endpoint */ endpointId?: string; /** - * @member {EndpointHealthStatus} [healthStatus] Health status. Possible - * values include: 'unknown', 'healthy', 'unhealthy', 'dead' + * Health statuses have following meanings. The 'healthy' status shows that the endpoint is + * accepting messages as expected. The 'unhealthy' status shows that the endpoint is not + * accepting messages as expected and IoT Hub is retrying to send data to this endpoint. The + * status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an + * eventually consistent state of health. The 'dead' status shows that the endpoint is not + * accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub + * metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that + * the IoT Hub has not established a connection with the endpoint. No messages have been + * delivered to or rejected from this endpoint. Possible values include: 'unknown', 'healthy', + * 'unhealthy', 'dead' */ healthStatus?: EndpointHealthStatus; } /** - * @interface - * An interface representing RegistryStatistics. * Identity registry statistics. - * */ export interface RegistryStatistics { /** - * @member {number} [totalDeviceCount] The total count of devices in the - * identity registry. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The total count of devices in the identity registry. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalDeviceCount?: number; /** - * @member {number} [enabledDeviceCount] The count of enabled devices in the - * identity registry. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The count of enabled devices in the identity registry. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly enabledDeviceCount?: number; /** - * @member {number} [disabledDeviceCount] The count of disabled devices in - * the identity registry. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The count of disabled devices in the identity registry. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly disabledDeviceCount?: number; } /** - * @interface - * An interface representing JobResponse. * The properties of the Job Response object. - * */ export interface JobResponse { /** - * @member {string} [jobId] The job identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The job identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly jobId?: string; /** - * @member {Date} [startTimeUtc] The start time of the job. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The start time of the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly startTimeUtc?: Date; /** - * @member {Date} [endTimeUtc] The time the job stopped processing. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time the job stopped processing. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly endTimeUtc?: Date; /** - * @member {JobType} [type] The type of the job. Possible values include: - * 'unknown', 'export', 'import', 'backup', 'readDeviceProperties', - * 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', + * The type of the job. Possible values include: 'unknown', 'export', 'import', 'backup', + * 'readDeviceProperties', 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', * 'factoryResetDevice', 'firmwareUpdate' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: JobType; /** - * @member {JobStatus} [status] The status of the job. Possible values - * include: 'unknown', 'enqueued', 'running', 'completed', 'failed', - * 'cancelled' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The status of the job. Possible values include: 'unknown', 'enqueued', 'running', 'completed', + * 'failed', 'cancelled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: JobStatus; /** - * @member {string} [failureReason] If status == failed, this string - * containing the reason for the failure. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * If status == failed, this string containing the reason for the failure. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly failureReason?: string; /** - * @member {string} [statusMessage] The status message for the job. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The status message for the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly statusMessage?: string; /** - * @member {string} [parentJobId] The job identifier of the parent job, if - * any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The job identifier of the parent job, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly parentJobId?: string; } /** - * @interface - * An interface representing IotHubCapacity. * IoT Hub capacity information. - * */ export interface IotHubCapacity { /** - * @member {number} [minimum] The minimum number of units. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum number of units. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly minimum?: number; /** - * @member {number} [maximum] The maximum number of units. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The maximum number of units. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly maximum?: number; /** - * @member {number} [default] The default number of units. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The default number of units. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly default?: number; /** - * @member {IotHubScaleType} [scaleType] The type of the scaling enabled. - * Possible values include: 'Automatic', 'Manual', 'None' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the scaling enabled. Possible values include: 'Automatic', 'Manual', 'None' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly scaleType?: IotHubScaleType; } /** - * @interface - * An interface representing IotHubSkuDescription. * SKU properties. - * */ export interface IotHubSkuDescription { /** - * @member {string} [resourceType] The type of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceType?: string; /** - * @member {IotHubSkuInfo} sku The type of the resource. + * The type of the resource. */ sku: IotHubSkuInfo; /** - * @member {IotHubCapacity} capacity IotHub capacity + * IotHub capacity */ capacity: IotHubCapacity; } /** - * @interface - * An interface representing TagsResource. - * A container holding only the Tags for a resource, allowing the user to - * update the tags on an IoT Hub instance. - * + * A container holding only the Tags for a resource, allowing the user to update the tags on an IoT + * Hub instance. */ export interface TagsResource { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing EventHubConsumerGroupInfo. * The properties of the EventHubConsumerGroupInfo object. - * - * @extends BaseResource */ export interface EventHubConsumerGroupInfo extends BaseResource { /** - * @member {{ [propertyName: string]: string }} [properties] The tags. + * The tags. */ properties?: { [propertyName: string]: string }; /** - * @member {string} [id] The Event Hub-compatible consumer group identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Event Hub-compatible consumer group identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The Event Hub-compatible consumer group name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Event Hub-compatible consumer group name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] the resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [etag] The etag. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; } /** - * @interface - * An interface representing OperationInputs. * Input values. - * */ export interface OperationInputs { /** - * @member {string} name The name of the IoT hub to check. + * The name of the IoT hub to check. */ name: string; } /** - * @interface - * An interface representing IotHubNameAvailabilityInfo. * The properties indicating whether a given IoT hub name is available. - * */ export interface IotHubNameAvailabilityInfo { /** - * @member {boolean} [nameAvailable] The value which indicates whether the - * provided name is available. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The value which indicates whether the provided name is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nameAvailable?: boolean; /** - * @member {IotHubNameUnavailabilityReason} [reason] The reason for - * unavailability. Possible values include: 'Invalid', 'AlreadyExists' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reason for unavailability. Possible values include: 'Invalid', 'AlreadyExists' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reason?: IotHubNameUnavailabilityReason; /** - * @member {string} [message] The detailed reason message. + * The detailed reason message. */ message?: string; } /** - * @interface - * An interface representing Name. * Name of Iot Hub type - * */ export interface Name { /** - * @member {string} [value] IotHub type + * IotHub type */ value?: string; /** - * @member {string} [localizedValue] Localized value of name + * Localized value of name */ localizedValue?: string; } /** - * @interface - * An interface representing UserSubscriptionQuota. * User subscription quota response - * */ export interface UserSubscriptionQuota { /** - * @member {string} [id] IotHub type id + * IotHub type id */ id?: string; /** - * @member {string} [type] Response type + * Response type */ type?: string; /** - * @member {string} [unit] Unit of IotHub type + * Unit of IotHub type */ unit?: string; /** - * @member {number} [currentValue] Current number of IotHub type + * Current number of IotHub type */ currentValue?: number; /** - * @member {number} [limit] Numerical limit on IotHub type + * Numerical limit on IotHub type */ limit?: number; /** - * @member {Name} [name] IotHub type + * IotHub type */ name?: Name; } /** - * @interface - * An interface representing UserSubscriptionQuotaListResult. * Json-serialized array of User subscription quota response - * */ export interface UserSubscriptionQuotaListResult { - /** - * @member {UserSubscriptionQuota[]} [value] - */ value?: UserSubscriptionQuota[]; /** - * @member {string} [nextLink] **NOTE: This property will not be serialized. - * It can only be populated by the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** - * @interface - * An interface representing RoutingMessage. * Routing message - * */ export interface RoutingMessage { /** - * @member {string} [body] Body of routing message + * Body of routing message */ body?: string; /** - * @member {{ [propertyName: string]: string }} [appProperties] App - * properties + * App properties */ appProperties?: { [propertyName: string]: string }; /** - * @member {{ [propertyName: string]: string }} [systemProperties] System - * properties + * System properties */ systemProperties?: { [propertyName: string]: string }; } /** - * @interface * An interface representing RoutingTwinProperties. */ export interface RoutingTwinProperties { /** - * @member {any} [desiredProperties] Twin desired properties + * Twin desired properties */ - desiredProperties?: any; + desired?: any; /** - * @member {any} [reportedProperties] Twin desired properties + * Twin desired properties */ - reportedProperties?: any; + reported?: any; } /** - * @interface - * An interface representing RoutingTwin. * Twin reference input parameter. This is an optional parameter - * */ export interface RoutingTwin { /** - * @member {any} [tags] Twin Tags + * Twin Tags */ tags?: any; - /** - * @member {RoutingTwinProperties} [properties] - */ properties?: RoutingTwinProperties; } /** - * @interface - * An interface representing TestAllRoutesInput. * Input for testing all routes - * */ export interface TestAllRoutesInput { /** - * @member {RoutingSource} [routingSource] Routing source. Possible values - * include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', + * Routing source. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', * 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents' */ routingSource?: RoutingSource; /** - * @member {RoutingMessage} [message] Routing message + * Routing message */ message?: RoutingMessage; /** - * @member {RoutingTwin} [twin] Routing Twin Reference + * Routing Twin Reference */ twin?: RoutingTwin; } /** - * @interface - * An interface representing MatchedRoute. * Routes that matched - * */ export interface MatchedRoute { /** - * @member {RouteProperties} [properties] Properties of routes that matched + * Properties of routes that matched */ properties?: RouteProperties; } /** - * @interface - * An interface representing TestAllRoutesResult. * Result of testing all routes - * */ export interface TestAllRoutesResult { /** - * @member {MatchedRoute[]} [routes] JSON-serialized array of matched routes + * JSON-serialized array of matched routes */ routes?: MatchedRoute[]; } /** - * @interface - * An interface representing TestRouteInput. * Input for testing route - * */ export interface TestRouteInput { /** - * @member {RoutingMessage} [message] Routing message + * Routing message */ message?: RoutingMessage; /** - * @member {RouteProperties} route Route properties + * Route properties */ route: RouteProperties; /** - * @member {RoutingTwin} [twin] Routing Twin Reference + * Routing Twin Reference */ twin?: RoutingTwin; } /** - * @interface - * An interface representing RouteErrorPosition. * Position where the route error happened - * */ export interface RouteErrorPosition { /** - * @member {number} [line] Line where the route error happened + * Line where the route error happened */ line?: number; /** - * @member {number} [column] Column where the route error happened + * Column where the route error happened */ column?: number; } /** - * @interface - * An interface representing RouteErrorRange. * Range of route errors - * */ export interface RouteErrorRange { /** - * @member {RouteErrorPosition} [start] Start where the route error happened + * Start where the route error happened */ start?: RouteErrorPosition; /** - * @member {RouteErrorPosition} [end] End where the route error happened + * End where the route error happened */ end?: RouteErrorPosition; } /** - * @interface - * An interface representing RouteCompilationError. * Compilation error when evaluating route - * */ export interface RouteCompilationError { /** - * @member {string} [message] Route error message + * Route error message */ message?: string; /** - * @member {RouteErrorSeverity} [severity] Severity of the route error. - * Possible values include: 'error', 'warning' + * Severity of the route error. Possible values include: 'error', 'warning' */ severity?: RouteErrorSeverity; /** - * @member {RouteErrorRange} [location] Location where the route error - * happened + * Location where the route error happened */ location?: RouteErrorRange; } /** - * @interface - * An interface representing TestRouteResultDetails. * Detailed result of testing a route - * */ export interface TestRouteResultDetails { /** - * @member {RouteCompilationError[]} [compilationErrors] JSON-serialized list - * of route compilation errors + * JSON-serialized list of route compilation errors */ compilationErrors?: RouteCompilationError[]; } /** - * @interface - * An interface representing TestRouteResult. * Result of testing one route - * */ export interface TestRouteResult { /** - * @member {TestResultStatus} [result] Result of testing route. Possible - * values include: 'undefined', 'false', 'true' + * Result of testing route. Possible values include: 'undefined', 'false', 'true' */ result?: TestResultStatus; /** - * @member {TestRouteResultDetails} [details] Detailed result of testing - * route + * Detailed result of testing route */ details?: TestRouteResultDetails; } /** - * @interface - * An interface representing ExportDevicesRequest. - * Use to provide parameters when requesting an export of all devices in the - * IoT hub. - * + * Use to provide parameters when requesting an export of all devices in the IoT hub. */ export interface ExportDevicesRequest { /** - * @member {string} exportBlobContainerUri The export blob container URI. + * The export blob container URI. */ exportBlobContainerUri: string; /** - * @member {boolean} excludeKeys The value indicating whether keys should be - * excluded during export. + * The value indicating whether keys should be excluded during export. */ excludeKeys: boolean; } /** - * @interface - * An interface representing ImportDevicesRequest. - * Use to provide parameters when requesting an import of all devices in the - * hub. - * + * Use to provide parameters when requesting an import of all devices in the hub. */ export interface ImportDevicesRequest { /** - * @member {string} inputBlobContainerUri The input blob container URI. + * The input blob container URI. */ inputBlobContainerUri: string; /** - * @member {string} outputBlobContainerUri The output blob container URI. + * The output blob container URI. */ outputBlobContainerUri: string; } /** - * @interface - * An interface representing IotHubResourceCreateOrUpdateOptionalParams. + * Use to provide failover region when requesting manual Failover for a hub. + */ +export interface FailoverInput { + /** + * Region the hub will be failed over to + */ + failoverRegion: string; +} + +/** * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface IotHubResourceCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] ETag of the IoT Hub. Do not specify for - * creating a brand new IoT Hub. Required to update an existing IoT Hub. + * ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an + * existing IoT Hub. */ ifMatch?: string; } /** - * @interface - * An interface representing IotHubResourceUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface IotHubResourceUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing IotHubResourceBeginCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface IotHubResourceBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] ETag of the IoT Hub. Do not specify for - * creating a brand new IoT Hub. Required to update an existing IoT Hub. + * ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an + * existing IoT Hub. */ ifMatch?: string; } /** - * @interface - * An interface representing IotHubResourceBeginUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface IotHubResourceBeginUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing CertificatesCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface CertificatesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] ETag of the Certificate. Do not specify for - * creating a brand new certificate. Required to update an existing - * certificate. + * ETag of the Certificate. Do not specify for creating a brand new certificate. Required to + * update an existing certificate. */ ifMatch?: string; /** - * @member {string} [certificate] base-64 representation of the X509 leaf - * certificate .cer file or just .pem file content. + * base-64 representation of the X509 leaf certificate .cer file or just .pem file content. */ certificate?: string; } /** - * @interface - * An interface representing CertificatesVerifyOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface CertificatesVerifyOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [certificate] base-64 representation of X509 certificate - * .cer file or just .pem file content. + * base-64 representation of X509 certificate .cer file or just .pem file content. */ certificate?: string; } /** - * @interface * An interface representing IotHubClientOptions. - * @extends AzureServiceClientOptions */ export interface IotHubClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the OperationListResult. - * Result of the request to list IoT Hub operations. It contains a list of - * operations and a URL link to get the next set of results. - * + * Result of the request to list IoT Hub operations. It contains a list of operations and a URL + * link to get the next set of results. * @extends Array */ export interface OperationListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * URL to get the next set of operation list results if there are any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the IotHubDescriptionListResult. * The JSON-serialized array of IotHubDescription objects with a next link. - * * @extends Array */ export interface IotHubDescriptionListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the IotHubSkuDescriptionListResult. * The JSON-serialized array of IotHubSkuDescription objects with a next link. - * * @extends Array */ export interface IotHubSkuDescriptionListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the EventHubConsumerGroupsListResult. - * The JSON-serialized array of Event Hub-compatible consumer group names with - * a next link. - * + * The JSON-serialized array of Event Hub-compatible consumer group names with a next link. * @extends Array */ export interface EventHubConsumerGroupsListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the JobResponseListResult. * The JSON-serialized array of JobResponse objects with a next link. - * * @extends Array */ export interface JobResponseListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the IotHubQuotaMetricInfoListResult. * The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. - * * @extends Array */ export interface IotHubQuotaMetricInfoListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the EndpointHealthDataListResult. * The JSON-serialized array of EndpointHealthData objects with a next link. - * * @extends Array */ export interface EndpointHealthDataListResult extends Array { /** - * @member {string} [nextLink] Link to more results - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Link to more results + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the SharedAccessSignatureAuthorizationRuleListResult. * The list of shared access policies with a next link. - * * @extends Array */ export interface SharedAccessSignatureAuthorizationRuleListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } @@ -1889,14 +1509,6 @@ export type IpFilterActionType = 'Accept' | 'Reject'; */ export type RoutingSource = 'Invalid' | 'DeviceMessages' | 'TwinChangeEvents' | 'DeviceLifecycleEvents' | 'DeviceJobLifecycleEvents'; -/** - * Defines values for OperationMonitoringLevel. - * Possible values include: 'None', 'Error', 'Information', 'Error, Information' - * @readonly - * @enum {string} - */ -export type OperationMonitoringLevel = 'None' | 'Error' | 'Information' | 'Error, Information'; - /** * Defines values for Capabilities. * Possible values include: 'None', 'DeviceManagement' @@ -1979,6 +1591,14 @@ export type TestResultStatus = 'undefined' | 'false' | 'true'; */ export type RouteErrorSeverity = 'error' | 'warning'; +/** + * Defines values for Encoding. + * Possible values include: 'Avro', 'AvroDeflate', 'JSON' + * @readonly + * @enum {string} + */ +export type Encoding = 'Avro' | 'AvroDeflate' | 'JSON'; + /** * Contains response data for the list operation. */ @@ -1991,6 +1611,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2010,6 +1631,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2029,6 +1651,7 @@ export type IotHubResourceGetResponse = IotHubDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2048,6 +1671,7 @@ export type IotHubResourceCreateOrUpdateResponse = IotHubDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2067,6 +1691,7 @@ export type IotHubResourceUpdateResponse = IotHubDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2082,6 +1707,7 @@ export type IotHubResourceDeleteMethodResponse = { * The parsed response body. */ body: any; + /** * The underlying HTTP response. */ @@ -2090,6 +1716,7 @@ export type IotHubResourceDeleteMethodResponse = { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2109,6 +1736,7 @@ export type IotHubResourceListBySubscriptionResponse = IotHubDescriptionListResu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2128,6 +1756,7 @@ export type IotHubResourceListByResourceGroupResponse = IotHubDescriptionListRes * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2147,6 +1776,7 @@ export type IotHubResourceGetStatsResponse = RegistryStatistics & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2166,6 +1796,7 @@ export type IotHubResourceGetValidSkusResponse = IotHubSkuDescriptionListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2185,6 +1816,7 @@ export type IotHubResourceListEventHubConsumerGroupsResponse = EventHubConsumerG * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2204,6 +1836,7 @@ export type IotHubResourceGetEventHubConsumerGroupResponse = EventHubConsumerGro * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2223,6 +1856,7 @@ export type IotHubResourceCreateEventHubConsumerGroupResponse = EventHubConsumer * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2242,6 +1876,7 @@ export type IotHubResourceListJobsResponse = JobResponseListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2261,6 +1896,7 @@ export type IotHubResourceGetJobResponse = JobResponse & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2280,6 +1916,7 @@ export type IotHubResourceGetQuotaMetricsResponse = IotHubQuotaMetricInfoListRes * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2299,6 +1936,7 @@ export type IotHubResourceGetEndpointHealthResponse = EndpointHealthDataListResu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2318,6 +1956,7 @@ export type IotHubResourceCheckNameAvailabilityResponse = IotHubNameAvailability * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2337,6 +1976,7 @@ export type IotHubResourceTestAllRoutesResponse = TestAllRoutesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2356,6 +1996,7 @@ export type IotHubResourceTestRouteResponse = TestRouteResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2375,6 +2016,7 @@ export type IotHubResourceListKeysResponse = SharedAccessSignatureAuthorizationR * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2394,6 +2036,7 @@ export type IotHubResourceGetKeysForKeyNameResponse = SharedAccessSignatureAutho * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2413,6 +2056,7 @@ export type IotHubResourceExportDevicesResponse = JobResponse & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2432,6 +2076,7 @@ export type IotHubResourceImportDevicesResponse = JobResponse & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2451,6 +2096,7 @@ export type IotHubResourceBeginCreateOrUpdateResponse = IotHubDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2470,6 +2116,7 @@ export type IotHubResourceBeginUpdateResponse = IotHubDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2485,6 +2132,7 @@ export type IotHubResourceBeginDeleteMethodResponse = { * The parsed response body. */ body: any; + /** * The underlying HTTP response. */ @@ -2493,6 +2141,7 @@ export type IotHubResourceBeginDeleteMethodResponse = { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2512,6 +2161,7 @@ export type IotHubResourceListBySubscriptionNextResponse = IotHubDescriptionList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2531,6 +2181,7 @@ export type IotHubResourceListByResourceGroupNextResponse = IotHubDescriptionLis * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2550,6 +2201,7 @@ export type IotHubResourceGetValidSkusNextResponse = IotHubSkuDescriptionListRes * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2569,6 +2221,7 @@ export type IotHubResourceListEventHubConsumerGroupsNextResponse = EventHubConsu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2588,6 +2241,7 @@ export type IotHubResourceListJobsNextResponse = JobResponseListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2607,6 +2261,7 @@ export type IotHubResourceGetQuotaMetricsNextResponse = IotHubQuotaMetricInfoLis * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2626,6 +2281,7 @@ export type IotHubResourceGetEndpointHealthNextResponse = EndpointHealthDataList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2645,6 +2301,7 @@ export type IotHubResourceListKeysNextResponse = SharedAccessSignatureAuthorizat * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2664,6 +2321,7 @@ export type ResourceProviderCommonGetSubscriptionQuotaResponse = UserSubscriptio * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2683,6 +2341,7 @@ export type CertificatesListByIotHubResponse = CertificateListDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2702,6 +2361,7 @@ export type CertificatesGetResponse = CertificateDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2721,6 +2381,7 @@ export type CertificatesCreateOrUpdateResponse = CertificateDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2740,6 +2401,7 @@ export type CertificatesGenerateVerificationCodeResponse = CertificateWithNonceD * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2759,6 +2421,7 @@ export type CertificatesVerifyResponse = CertificateDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/iothub/arm-iothub/src/models/iotHubMappers.ts b/sdk/iothub/arm-iothub/src/models/iotHubMappers.ts new file mode 100644 index 000000000000..7714701e2033 --- /dev/null +++ b/sdk/iothub/arm-iothub/src/models/iotHubMappers.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorDetails, + FailoverInput +} from "../models/mappers"; diff --git a/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts b/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts index edcf42a6f5d8..ab4c4252953b 100644 --- a/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts @@ -1,71 +1,69 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - IotHubDescription, - Resource, BaseResource, - IotHubProperties, - SharedAccessSignatureAuthorizationRule, - IpFilterRule, + CertificateDescription, + CertificateProperties, + CertificatePropertiesWithNonce, + CertificateWithNonceDescription, + CloudError, + CloudToDeviceProperties, + EndpointHealthData, + EndpointHealthDataListResult, + EnrichmentProperties, + ErrorDetails, + EventHubConsumerGroupInfo, + EventHubConsumerGroupsListResult, EventHubProperties, - RoutingProperties, - RoutingEndpoints, - RoutingServiceBusQueueEndpointProperties, - RoutingServiceBusTopicEndpointProperties, - RoutingEventHubProperties, - RoutingStorageContainerProperties, - RouteProperties, + ExportDevicesRequest, FallbackRouteProperties, - StorageEndpointProperties, - MessagingEndpointProperties, - CloudToDeviceProperties, FeedbackProperties, - OperationsMonitoringProperties, - IotHubSkuInfo, - ErrorDetails, - TagsResource, - CloudError, + ImportDevicesRequest, + IotHubCapacity, + IotHubDescription, IotHubDescriptionListResult, - RegistryStatistics, - IotHubSkuDescriptionListResult, + IotHubNameAvailabilityInfo, + IotHubProperties, + IotHubPropertiesDeviceStreams, + IotHubQuotaMetricInfo, + IotHubQuotaMetricInfoListResult, IotHubSkuDescription, - IotHubCapacity, - EventHubConsumerGroupsListResult, - EventHubConsumerGroupInfo, - JobResponseListResult, + IotHubSkuDescriptionListResult, + IotHubSkuInfo, + IpFilterRule, JobResponse, - IotHubQuotaMetricInfoListResult, - IotHubQuotaMetricInfo, - EndpointHealthDataListResult, - EndpointHealthData, + JobResponseListResult, + MatchedRoute, + MessagingEndpointProperties, OperationInputs, - IotHubNameAvailabilityInfo, - TestAllRoutesInput, + RegistryStatistics, + Resource, + RouteCompilationError, + RouteErrorPosition, + RouteErrorRange, + RouteProperties, + RoutingEndpoints, + RoutingEventHubProperties, RoutingMessage, + RoutingProperties, + RoutingServiceBusQueueEndpointProperties, + RoutingServiceBusTopicEndpointProperties, + RoutingStorageContainerProperties, RoutingTwin, RoutingTwinProperties, + SharedAccessSignatureAuthorizationRule, + SharedAccessSignatureAuthorizationRuleListResult, + StorageEndpointProperties, + TagsResource, + TestAllRoutesInput, TestAllRoutesResult, - MatchedRoute, TestRouteInput, TestRouteResult, - TestRouteResultDetails, - RouteCompilationError, - RouteErrorRange, - RouteErrorPosition, - SharedAccessSignatureAuthorizationRuleListResult, - ExportDevicesRequest, - ImportDevicesRequest, - CertificateDescription, - CertificateProperties, - CertificateWithNonceDescription, - CertificatePropertiesWithNonce + TestRouteResultDetails } from "../models/mappers"; - diff --git a/sdk/iothub/arm-iothub/src/models/mappers.ts b/sdk/iothub/arm-iothub/src/models/mappers.ts index ffafd0911b12..89d81a23b79e 100644 --- a/sdk/iothub/arm-iothub/src/models/mappers.ts +++ b/sdk/iothub/arm-iothub/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -781,6 +779,45 @@ export const FallbackRouteProperties: msRest.CompositeMapper = { } }; +export const EnrichmentProperties: msRest.CompositeMapper = { + serializedName: "EnrichmentProperties", + type: { + name: "Composite", + className: "EnrichmentProperties", + modelProperties: { + key: { + required: true, + serializedName: "key", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + }, + endpointNames: { + required: true, + serializedName: "endpointNames", + constraints: { + MinItems: 1 + }, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const RoutingProperties: msRest.CompositeMapper = { serializedName: "RoutingProperties", type: { @@ -812,6 +849,18 @@ export const RoutingProperties: msRest.CompositeMapper = { name: "Composite", className: "FallbackRouteProperties" } + }, + enrichments: { + serializedName: "enrichments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrichmentProperties" + } + } + } } } } @@ -944,17 +993,17 @@ export const CloudToDeviceProperties: msRest.CompositeMapper = { } }; -export const OperationsMonitoringProperties: msRest.CompositeMapper = { - serializedName: "OperationsMonitoringProperties", +export const IotHubPropertiesDeviceStreams: msRest.CompositeMapper = { + serializedName: "IotHubProperties_deviceStreams", type: { name: "Composite", - className: "OperationsMonitoringProperties", + className: "IotHubPropertiesDeviceStreams", modelProperties: { - events: { - serializedName: "events", + streamingEndpoints: { + serializedName: "streamingEndpoints", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "String" } @@ -1078,11 +1127,11 @@ export const IotHubProperties: msRest.CompositeMapper = { name: "String" } }, - operationsMonitoringProperties: { - serializedName: "operationsMonitoringProperties", + deviceStreams: { + serializedName: "deviceStreams", type: { name: "Composite", - className: "OperationsMonitoringProperties" + className: "IotHubPropertiesDeviceStreams" } }, features: { @@ -1240,6 +1289,13 @@ export const OperationDisplay: msRest.CompositeMapper = { type: { name: "String" } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } } } } @@ -1808,14 +1864,14 @@ export const RoutingTwinProperties: msRest.CompositeMapper = { name: "Composite", className: "RoutingTwinProperties", modelProperties: { - desiredProperties: { - serializedName: "desiredProperties", + desired: { + serializedName: "desired", type: { name: "Object" } }, - reportedProperties: { - serializedName: "reportedProperties", + reported: { + serializedName: "reported", type: { name: "Object" } @@ -2116,6 +2172,23 @@ export const ImportDevicesRequest: msRest.CompositeMapper = { } }; +export const FailoverInput: msRest.CompositeMapper = { + serializedName: "FailoverInput", + type: { + name: "Composite", + className: "FailoverInput", + modelProperties: { + failoverRegion: { + required: true, + serializedName: "failoverRegion", + type: { + name: "String" + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { diff --git a/sdk/iothub/arm-iothub/src/models/operationsMappers.ts b/sdk/iothub/arm-iothub/src/models/operationsMappers.ts index 50fee90a2573..5d69c8a954f1 100644 --- a/sdk/iothub/arm-iothub/src/models/operationsMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetails, Operation, OperationDisplay, - ErrorDetails + OperationListResult } from "../models/mappers"; - diff --git a/sdk/iothub/arm-iothub/src/models/resourceProviderCommonMappers.ts b/sdk/iothub/arm-iothub/src/models/resourceProviderCommonMappers.ts index 56dd6753f391..232343c4f750 100644 --- a/sdk/iothub/arm-iothub/src/models/resourceProviderCommonMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/resourceProviderCommonMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - UserSubscriptionQuotaListResult, - UserSubscriptionQuota, + ErrorDetails, Name, - ErrorDetails + UserSubscriptionQuota, + UserSubscriptionQuotaListResult } from "../models/mappers"; - diff --git a/sdk/iothub/arm-iothub/src/operations/index.ts b/sdk/iothub/arm-iothub/src/operations/index.ts index 6746b192f768..9c561acd7985 100644 --- a/sdk/iothub/arm-iothub/src/operations/index.ts +++ b/sdk/iothub/arm-iothub/src/operations/index.ts @@ -12,3 +12,4 @@ export * from "./operations"; export * from "./iotHubResource"; export * from "./resourceProviderCommon"; export * from "./certificates"; +export * from "./iotHub"; diff --git a/sdk/iothub/arm-iothub/src/operations/iotHub.ts b/sdk/iothub/arm-iothub/src/operations/iotHub.ts new file mode 100644 index 000000000000..a37d6e109ad6 --- /dev/null +++ b/sdk/iothub/arm-iothub/src/operations/iotHub.ts @@ -0,0 +1,98 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Mappers from "../models/iotHubMappers"; +import * as Parameters from "../models/parameters"; +import { IotHubClientContext } from "../iotHubClientContext"; + +/** Class representing a IotHub. */ +export class IotHub { + private readonly client: IotHubClientContext; + + /** + * Create a IotHub. + * @param {IotHubClientContext} client Reference to the service client. + */ + constructor(client: IotHubClientContext) { + this.client = client; + } + + /** + * Perform manual fail over of given hub + * @summary Manual Failover Fail over + * @param iotHubName IotHub to fail over + * @param resourceGroupName resource group which Iot Hub belongs to + * @param failoverRegion Region the hub will be failed over to + * @param [options] The optional parameters + * @returns Promise + */ + manualFailover(iotHubName: string, resourceGroupName: string, failoverRegion: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginManualFailover(iotHubName,resourceGroupName,failoverRegion,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Perform manual fail over of given hub + * @summary Manual Failover Fail over + * @param iotHubName IotHub to fail over + * @param resourceGroupName resource group which Iot Hub belongs to + * @param failoverRegion Region the hub will be failed over to + * @param [options] The optional parameters + * @returns Promise + */ + beginManualFailover(iotHubName: string, resourceGroupName: string, failoverRegion: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + iotHubName, + resourceGroupName, + failoverRegion, + options + }, + beginManualFailoverOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginManualFailoverOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover", + urlParameters: [ + Parameters.iotHubName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + failoverRegion: "failoverRegion" + }, + mapper: { + ...Mappers.FailoverInput, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +};