/* * 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 { BaseResource } from 'ms-rest-azure'; import { CloudError } from 'ms-rest-azure'; import * as moment from 'moment'; export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; /** * @class * Initializes a new instance of the CertificateVerificationDescription class. * @constructor * The JSON-serialized leaf certificate * * @member {string} [certificate] base-64 representation of X509 certificate * .cer file or just .pem file content. */ export interface CertificateVerificationDescription { certificate?: string; } /** * @class * Initializes a new instance of the CertificateProperties class. * @constructor * The description of an X509 CA Certificate. * * @member {string} [subject] The certificate's subject name. * @member {date} [expiry] The certificate's expiration date and time. * @member {string} [thumbprint] The certificate's thumbprint. * @member {boolean} [isVerified] Determines whether certificate has been * verified. * @member {date} [created] The certificate's create date and time. * @member {date} [updated] The certificate's last update date and time. * @member {string} [certificate] The certificate content */ export interface CertificateProperties { readonly subject?: string; readonly expiry?: Date; readonly thumbprint?: string; readonly isVerified?: boolean; readonly created?: Date; readonly updated?: Date; certificate?: string; } /** * @class * Initializes a new instance of the CertificateDescription class. * @constructor * The X509 Certificate. * * @member {object} [properties] * @member {string} [properties.subject] The certificate's subject name. * @member {date} [properties.expiry] The certificate's expiration date and * time. * @member {string} [properties.thumbprint] The certificate's thumbprint. * @member {boolean} [properties.isVerified] Determines whether certificate has * been verified. * @member {date} [properties.created] The certificate's create date and time. * @member {date} [properties.updated] The certificate's last update date and * time. * @member {string} [properties.certificate] The certificate content * @member {string} [id] The resource identifier. * @member {string} [name] The name of the certificate. * @member {string} [etag] The entity tag. * @member {string} [type] The resource type. */ export interface CertificateDescription extends BaseResource { properties?: CertificateProperties; readonly id?: string; readonly name?: string; readonly etag?: string; readonly type?: string; } /** * @class * Initializes a new instance of the CertificateListDescription class. * @constructor * The JSON-serialized array of Certificate objects. * * @member {array} [value] The array of Certificate objects. */ export interface CertificateListDescription { value?: CertificateDescription[]; } /** * @class * Initializes a new instance of the CertificateBodyDescription class. * @constructor * The JSON-serialized X509 Certificate. * * @member {string} [certificate] base-64 representation of the X509 leaf * certificate .cer file or just .pem file content. */ export interface CertificateBodyDescription { certificate?: string; } /** * @class * Initializes a new instance of the CertificatePropertiesWithNonce class. * @constructor * The description of an X509 CA Certificate including the challenge nonce * issued for the Proof-Of-Possession flow. * * @member {string} [subject] The certificate's subject name. * @member {date} [expiry] The certificate's expiration date and time. * @member {string} [thumbprint] The certificate's thumbprint. * @member {boolean} [isVerified] Determines whether certificate has been * verified. * @member {date} [created] The certificate's create date and time. * @member {date} [updated] The certificate's last update date and time. * @member {string} [verificationCode] The certificate's verification code that * will be used for proof of possession. * @member {string} [certificate] The certificate content */ export interface CertificatePropertiesWithNonce { readonly subject?: string; readonly expiry?: Date; readonly thumbprint?: string; readonly isVerified?: boolean; readonly created?: Date; readonly updated?: Date; readonly verificationCode?: string; readonly certificate?: string; } /** * @class * Initializes a new instance of the CertificateWithNonceDescription class. * @constructor * The X509 Certificate. * * @member {object} [properties] * @member {string} [properties.subject] The certificate's subject name. * @member {date} [properties.expiry] The certificate's expiration date and * time. * @member {string} [properties.thumbprint] The certificate's thumbprint. * @member {boolean} [properties.isVerified] Determines whether certificate has * been verified. * @member {date} [properties.created] The certificate's create date and time. * @member {date} [properties.updated] The certificate's last update date and * time. * @member {string} [properties.verificationCode] The certificate's * verification code that will be used for proof of possession. * @member {string} [properties.certificate] The certificate content * @member {string} [id] The resource identifier. * @member {string} [name] The name of the certificate. * @member {string} [etag] The entity tag. * @member {string} [type] The resource type. */ export interface CertificateWithNonceDescription extends BaseResource { properties?: CertificatePropertiesWithNonce; readonly id?: string; readonly name?: string; readonly etag?: string; readonly type?: string; } /** * @class * Initializes a new instance of the SharedAccessSignatureAuthorizationRule class. * @constructor * The properties of an IoT hub shared access policy. * * @member {string} keyName The name of the shared access policy. * @member {string} [primaryKey] The primary key. * @member {string} [secondaryKey] The secondary key. * @member {string} 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' */ export interface SharedAccessSignatureAuthorizationRule { keyName: string; primaryKey?: string; secondaryKey?: string; rights: string; } /** * @class * Initializes a new instance of the IpFilterRule class. * @constructor * The IP filter rules for the IoT hub. * * @member {string} filterName The name of the IP filter rule. * @member {string} action The desired action for requests captured by this * rule. Possible values include: 'Accept', 'Reject' * @member {string} ipMask A string that contains the IP address range in CIDR * notation for the rule. */ export interface IpFilterRule { filterName: string; action: string; ipMask: string; } /** * @class * Initializes a new instance of the EventHubProperties class. * @constructor * The properties of the provisioned Event Hub-compatible endpoint used by the * IoT hub. * * @member {number} [retentionTimeInDays] 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 * @member {number} [partitionCount] 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. * @member {array} [partitionIds] The partition ids in the Event Hub-compatible * endpoint. * @member {string} [path] The Event Hub-compatible name. * @member {string} [endpoint] The Event Hub-compatible endpoint. */ export interface EventHubProperties { retentionTimeInDays?: number; partitionCount?: number; readonly partitionIds?: string[]; readonly path?: string; readonly endpoint?: string; } /** * @class * Initializes a new instance of the RoutingServiceBusQueueEndpointProperties class. * @constructor * The properties related to service bus queue endpoint types. * * @member {string} connectionString The connection string of the service bus * queue endpoint. * @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. * @member {string} [subscriptionId] The subscription identifier of the service * bus queue endpoint. * @member {string} [resourceGroup] The name of the resource group of the * service bus queue endpoint. */ export interface RoutingServiceBusQueueEndpointProperties { connectionString: string; name: string; subscriptionId?: string; resourceGroup?: string; } /** * @class * Initializes a new instance of the RoutingServiceBusTopicEndpointProperties class. * @constructor * The properties related to service bus topic endpoint types. * * @member {string} connectionString The connection string of the service bus * topic endpoint. * @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. * @member {string} [subscriptionId] The subscription identifier of the service * bus topic endpoint. * @member {string} [resourceGroup] The name of the resource group of the * service bus topic endpoint. */ export interface RoutingServiceBusTopicEndpointProperties { connectionString: string; name: string; subscriptionId?: string; resourceGroup?: string; } /** * @class * Initializes a new instance of the RoutingEventHubProperties class. * @constructor * The properties related to an event hub endpoint. * * @member {string} connectionString The connection string of the event hub * endpoint. * @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. * @member {string} [subscriptionId] The subscription identifier of the event * hub endpoint. * @member {string} [resourceGroup] The name of the resource group of the event * hub endpoint. */ export interface RoutingEventHubProperties { connectionString: string; name: string; subscriptionId?: string; resourceGroup?: string; } /** * @class * Initializes a new instance of the RoutingStorageContainerProperties class. * @constructor * The properties related to a storage container endpoint. * * @member {string} connectionString The connection string of the storage * account. * @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. * @member {string} [subscriptionId] The subscription identifier of the storage * account. * @member {string} [resourceGroup] The name of the resource group of the * storage account. * @member {string} containerName The name of storage container in the storage * account. * @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. * @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. * @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). * @member {string} [encoding] Encoding that is used to serialize messages to * blobs. Supported values are 'avro' and 'avrodeflate'. Default value is * 'avro'. */ export interface RoutingStorageContainerProperties { connectionString: string; name: string; subscriptionId?: string; resourceGroup?: string; containerName: string; fileNameFormat?: string; batchFrequencyInSeconds?: number; maxChunkSizeInBytes?: number; encoding?: string; } /** * @class * Initializes a new instance of the RoutingEndpoints class. * @constructor * 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. * * @member {array} [serviceBusQueues] The list of Service Bus queue endpoints * that IoT hub routes the messages to, based on the routing rules. * @member {array} [serviceBusTopics] The list of Service Bus topic endpoints * that the IoT hub routes the messages to, based on the routing rules. * @member {array} [eventHubs] 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. * @member {array} [storageContainers] The list of storage container endpoints * that IoT hub routes messages to, based on the routing rules. */ export interface RoutingEndpoints { serviceBusQueues?: RoutingServiceBusQueueEndpointProperties[]; serviceBusTopics?: RoutingServiceBusTopicEndpointProperties[]; eventHubs?: RoutingEventHubProperties[]; storageContainers?: RoutingStorageContainerProperties[]; } /** * @class * Initializes a new instance of the RouteProperties class. * @constructor * The properties of a routing rule that your IoT hub uses to route messages to * endpoints. * * @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. * @member {string} source The source that the routing rule is to be applied * to, such as DeviceMessages. Possible values include: 'Invalid', * 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', * 'DeviceJobLifecycleEvents' * @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: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language * @member {array} endpointNames The list of endpoints to which messages that * satisfy the condition are routed. Currently only one endpoint is allowed. * @member {boolean} isEnabled Used to specify whether a route is enabled. */ export interface RouteProperties { name: string; source: string; condition?: string; endpointNames: string[]; isEnabled: boolean; } /** * @class * Initializes a new instance of the FallbackRouteProperties class. * @constructor * The properties of the fallback route. IoT Hub uses these properties when it * routes messages to the fallback endpoint. * * @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. * @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: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language * @member {array} endpointNames The list of endpoints to which the messages * that satisfy the condition are routed to. Currently only 1 endpoint is * allowed. * @member {boolean} isEnabled Used to specify whether the fallback route is * enabled. */ export interface FallbackRouteProperties { name?: string; condition?: string; endpointNames: string[]; isEnabled: boolean; } /** * @class * Initializes a new instance of the RoutingProperties class. * @constructor * The routing related properties of the IoT hub. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging * * @member {object} [endpoints] * @member {array} [endpoints.serviceBusQueues] The list of Service Bus queue * endpoints that IoT hub routes the messages to, based on the routing rules. * @member {array} [endpoints.serviceBusTopics] The list of Service Bus topic * endpoints that the IoT hub routes the messages to, based on the routing * rules. * @member {array} [endpoints.eventHubs] 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. * @member {array} [endpoints.storageContainers] The list of storage container * endpoints that IoT hub routes messages to, based on the routing rules. * @member {array} [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. * @member {object} [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. * @member {string} [fallbackRoute.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. * @member {string} [fallbackRoute.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: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language * @member {array} [fallbackRoute.endpointNames] The list of endpoints to which * the messages that satisfy the condition are routed to. Currently only 1 * endpoint is allowed. * @member {boolean} [fallbackRoute.isEnabled] Used to specify whether the * fallback route is enabled. */ export interface RoutingProperties { endpoints?: RoutingEndpoints; routes?: RouteProperties[]; fallbackRoute?: FallbackRouteProperties; } /** * @class * Initializes a new instance of the StorageEndpointProperties class. * @constructor * The properties of the Azure Storage endpoint for file upload. * * @member {moment.duration} [sasTtlAsIso8601] The period of time for which the * 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. * @member {string} connectionString The connection string for the Azure * Storage account to which files are uploaded. * @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. */ export interface StorageEndpointProperties { sasTtlAsIso8601?: moment.Duration; connectionString: string; containerName: string; } /** * @class * Initializes a new instance of the MessagingEndpointProperties class. * @constructor * The properties of the messaging endpoints used by this IoT hub. * * @member {moment.duration} [lockDurationAsIso8601] The lock duration. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. * @member {moment.duration} [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. * @member {number} [maxDeliveryCount] 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. */ export interface MessagingEndpointProperties { lockDurationAsIso8601?: moment.Duration; ttlAsIso8601?: moment.Duration; maxDeliveryCount?: number; } /** * @class * Initializes a new instance of the FeedbackProperties class. * @constructor * The properties of the feedback queue for cloud-to-device messages. * * @member {moment.duration} [lockDurationAsIso8601] The lock duration for the * feedback queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. * @member {moment.duration} [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-messaging#cloud-to-device-messages. * @member {number} [maxDeliveryCount] 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. */ export interface FeedbackProperties { lockDurationAsIso8601?: moment.Duration; ttlAsIso8601?: moment.Duration; maxDeliveryCount?: number; } /** * @class * Initializes a new instance of the CloudToDeviceProperties class. * @constructor * The IoT hub cloud-to-device messaging properties. * * @member {number} [maxDeliveryCount] 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. * @member {moment.duration} [defaultTtlAsIso8601] 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. * @member {object} [feedback] * @member {moment.duration} [feedback.lockDurationAsIso8601] The lock duration * for the feedback queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. * @member {moment.duration} [feedback.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-messaging#cloud-to-device-messages. * @member {number} [feedback.maxDeliveryCount] 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. */ export interface CloudToDeviceProperties { maxDeliveryCount?: number; defaultTtlAsIso8601?: moment.Duration; feedback?: FeedbackProperties; } /** * @class * Initializes a new instance of the OperationsMonitoringProperties class. * @constructor * 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. * * @member {object} [events] */ export interface OperationsMonitoringProperties { events?: { [propertyName: string]: string }; } /** * @class * Initializes a new instance of the IotHubProperties class. * @constructor * The properties of an IoT hub. * * @member {array} [authorizationPolicies] The shared access policies you can * use to secure a connection to the IoT hub. * @member {array} [ipFilterRules] The IP filter rules. * @member {string} [provisioningState] The provisioning state. * @member {string} [state] Thehub state state. * @member {string} [hostName] The name of the host. * @member {object} [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. * @member {object} [routing] * @member {object} [routing.endpoints] * @member {array} [routing.endpoints.serviceBusQueues] The list of Service Bus * queue endpoints that IoT hub routes the messages to, based on the routing * rules. * @member {array} [routing.endpoints.serviceBusTopics] The list of Service Bus * topic endpoints that the IoT hub routes the messages to, based on the * routing rules. * @member {array} [routing.endpoints.eventHubs] 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. * @member {array} [routing.endpoints.storageContainers] The list of storage * container endpoints that IoT hub routes messages to, based on the routing * rules. * @member {array} [routing.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. * @member {object} [routing.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. * @member {string} [routing.fallbackRoute.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. * @member {string} [routing.fallbackRoute.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: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language * @member {array} [routing.fallbackRoute.endpointNames] The list of endpoints * to which the messages that satisfy the condition are routed to. Currently * only 1 endpoint is allowed. * @member {boolean} [routing.fallbackRoute.isEnabled] Used to specify whether * the fallback route is enabled. * @member {object} [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. * @member {object} [messagingEndpoints] The messaging endpoint properties for * the file upload notification queue. * @member {boolean} [enableFileUploadNotifications] If True, file upload * notifications are enabled. * @member {object} [cloudToDevice] * @member {number} [cloudToDevice.maxDeliveryCount] 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. * @member {moment.duration} [cloudToDevice.defaultTtlAsIso8601] 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. * @member {object} [cloudToDevice.feedback] * @member {moment.duration} [cloudToDevice.feedback.lockDurationAsIso8601] The * lock duration for the feedback queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. * @member {moment.duration} [cloudToDevice.feedback.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-messaging#cloud-to-device-messages. * @member {number} [cloudToDevice.feedback.maxDeliveryCount] 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. * @member {string} [comments] IoT hub comments. * @member {object} [operationsMonitoringProperties] * @member {object} [operationsMonitoringProperties.events] * @member {string} [features] The capabilities and features enabled for the * IoT hub. Possible values include: 'None', 'DeviceManagement' */ export interface IotHubProperties { authorizationPolicies?: SharedAccessSignatureAuthorizationRule[]; ipFilterRules?: IpFilterRule[]; readonly provisioningState?: string; readonly state?: string; readonly hostName?: string; eventHubEndpoints?: { [propertyName: string]: EventHubProperties }; routing?: RoutingProperties; storageEndpoints?: { [propertyName: string]: StorageEndpointProperties }; messagingEndpoints?: { [propertyName: string]: MessagingEndpointProperties }; enableFileUploadNotifications?: boolean; cloudToDevice?: CloudToDeviceProperties; comments?: string; operationsMonitoringProperties?: OperationsMonitoringProperties; features?: string; } /** * @class * Initializes a new instance of the IotHubSkuInfo class. * @constructor * Information about the SKU of the IoT hub. * * @member {string} name The name of the SKU. Possible values include: 'F1', * 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' * @member {string} [tier] The billing tier for the IoT hub. Possible values * include: 'Free', 'Standard', 'Basic' * @member {number} [capacity] The number of provisioned IoT Hub units. See: * https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. */ export interface IotHubSkuInfo { name: string; readonly tier?: string; capacity?: number; } /** * @class * Initializes a new instance of the Resource class. * @constructor * The common properties of an Azure resource. * * @member {string} [id] The resource identifier. * @member {string} [name] The resource name. * @member {string} [type] The resource type. * @member {string} location The resource location. * @member {object} [tags] The resource tags. */ export interface Resource extends BaseResource { readonly id?: string; readonly name?: string; readonly type?: string; location: string; tags?: { [propertyName: string]: string }; } /** * @class * Initializes a new instance of the IotHubDescription class. * @constructor * The description of the IoT hub. * * @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. * @member {object} [properties] IotHub properties * @member {array} [properties.authorizationPolicies] The shared access * policies you can use to secure a connection to the IoT hub. * @member {array} [properties.ipFilterRules] The IP filter rules. * @member {string} [properties.provisioningState] The provisioning state. * @member {string} [properties.state] Thehub state state. * @member {string} [properties.hostName] The name of the host. * @member {object} [properties.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. * @member {object} [properties.routing] * @member {object} [properties.routing.endpoints] * @member {array} [properties.routing.endpoints.serviceBusQueues] The list of * Service Bus queue endpoints that IoT hub routes the messages to, based on * the routing rules. * @member {array} [properties.routing.endpoints.serviceBusTopics] The list of * Service Bus topic endpoints that the IoT hub routes the messages to, based * on the routing rules. * @member {array} [properties.routing.endpoints.eventHubs] 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. * @member {array} [properties.routing.endpoints.storageContainers] The list of * storage container endpoints that IoT hub routes messages to, based on the * routing rules. * @member {array} [properties.routing.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. * @member {object} [properties.routing.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. * @member {string} [properties.routing.fallbackRoute.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. * @member {string} [properties.routing.fallbackRoute.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: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language * @member {array} [properties.routing.fallbackRoute.endpointNames] The list of * endpoints to which the messages that satisfy the condition are routed to. * Currently only 1 endpoint is allowed. * @member {boolean} [properties.routing.fallbackRoute.isEnabled] Used to * specify whether the fallback route is enabled. * @member {object} [properties.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. * @member {object} [properties.messagingEndpoints] The messaging endpoint * properties for the file upload notification queue. * @member {boolean} [properties.enableFileUploadNotifications] If True, file * upload notifications are enabled. * @member {object} [properties.cloudToDevice] * @member {number} [properties.cloudToDevice.maxDeliveryCount] 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. * @member {moment.duration} [properties.cloudToDevice.defaultTtlAsIso8601] 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. * @member {object} [properties.cloudToDevice.feedback] * @member {moment.duration} * [properties.cloudToDevice.feedback.lockDurationAsIso8601] The lock duration * for the feedback queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. * @member {moment.duration} [properties.cloudToDevice.feedback.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-messaging#cloud-to-device-messages. * @member {number} [properties.cloudToDevice.feedback.maxDeliveryCount] 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. * @member {string} [properties.comments] IoT hub comments. * @member {object} [properties.operationsMonitoringProperties] * @member {object} [properties.operationsMonitoringProperties.events] * @member {string} [properties.features] The capabilities and features enabled * for the IoT hub. Possible values include: 'None', 'DeviceManagement' * @member {object} sku IotHub SKU info * @member {string} [sku.name] The name of the SKU. Possible values include: * 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' * @member {string} [sku.tier] The billing tier for the IoT hub. Possible * values include: 'Free', 'Standard', 'Basic' * @member {number} [sku.capacity] The number of provisioned IoT Hub units. * See: * https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. */ export interface IotHubDescription extends Resource { etag?: string; properties?: IotHubProperties; sku: IotHubSkuInfo; } /** * @class * Initializes a new instance of the OperationDisplay class. * @constructor * The object that represents the operation. * * @member {string} [provider] Service provider: Microsoft Devices * @member {string} [resource] Resource Type: IotHubs * @member {string} [operation] Name of the operation */ export interface OperationDisplay { readonly provider?: string; readonly resource?: string; readonly operation?: string; } /** * @class * Initializes a new instance of the Operation class. * @constructor * IoT Hub REST API operation * * @member {string} [name] Operation name: {provider}/{resource}/{read | write * | action | delete} * @member {object} [display] The object that represents the operation. * @member {string} [display.provider] Service provider: Microsoft Devices * @member {string} [display.resource] Resource Type: IotHubs * @member {string} [display.operation] Name of the operation */ export interface Operation { readonly name?: string; display?: OperationDisplay; } /** * @class * Initializes a new instance of the ErrorDetails class. * @constructor * Error details. * * @member {string} [code] The error code. * @member {string} [httpStatusCode] The HTTP status code. * @member {string} [message] The error message. * @member {string} [details] The error details. */ export interface ErrorDetails { readonly code?: string; readonly httpStatusCode?: string; readonly message?: string; readonly details?: string; } /** * @class * Initializes a new instance of the IotHubQuotaMetricInfo class. * @constructor * Quota metrics properties. * * @member {string} [name] The name of the quota metric. * @member {number} [currentValue] The current value for the quota metric. * @member {number} [maxValue] The maximum value of the quota metric. */ export interface IotHubQuotaMetricInfo { readonly name?: string; readonly currentValue?: number; readonly maxValue?: number; } /** * @class * Initializes a new instance of the EndpointHealthData class. * @constructor * The health data for an endpoint * * @member {string} [endpointId] Id of the endpoint * @member {string} [healthStatus] Health status. Possible values include: * 'unknown', 'healthy', 'unhealthy', 'dead' */ export interface EndpointHealthData { endpointId?: string; healthStatus?: string; } /** * @class * Initializes a new instance of the RegistryStatistics class. * @constructor * Identity registry statistics. * * @member {number} [totalDeviceCount] The total count of devices in the * identity registry. * @member {number} [enabledDeviceCount] The count of enabled devices in the * identity registry. * @member {number} [disabledDeviceCount] The count of disabled devices in the * identity registry. */ export interface RegistryStatistics { readonly totalDeviceCount?: number; readonly enabledDeviceCount?: number; readonly disabledDeviceCount?: number; } /** * @class * Initializes a new instance of the JobResponse class. * @constructor * The properties of the Job Response object. * * @member {string} [jobId] The job identifier. * @member {date} [startTimeUtc] The start time of the job. * @member {date} [endTimeUtc] The time the job stopped processing. * @member {string} [type] The type of the job. Possible values include: * 'unknown', 'export', 'import', 'backup', 'readDeviceProperties', * 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', * 'factoryResetDevice', 'firmwareUpdate' * @member {string} [status] The status of the job. Possible values include: * 'unknown', 'enqueued', 'running', 'completed', 'failed', 'cancelled' * @member {string} [failureReason] If status == failed, this string containing * the reason for the failure. * @member {string} [statusMessage] The status message for the job. * @member {string} [parentJobId] The job identifier of the parent job, if any. */ export interface JobResponse { readonly jobId?: string; readonly startTimeUtc?: Date; readonly endTimeUtc?: Date; readonly type?: string; readonly status?: string; readonly failureReason?: string; readonly statusMessage?: string; readonly parentJobId?: string; } /** * @class * Initializes a new instance of the IotHubCapacity class. * @constructor * IoT Hub capacity information. * * @member {number} [minimum] The minimum number of units. * @member {number} [maximum] The maximum number of units. * @member {number} [default] The default number of units. * @member {string} [scaleType] The type of the scaling enabled. Possible * values include: 'Automatic', 'Manual', 'None' */ export interface IotHubCapacity { readonly minimum?: number; readonly maximum?: number; readonly default?: number; readonly scaleType?: string; } /** * @class * Initializes a new instance of the IotHubSkuDescription class. * @constructor * SKU properties. * * @member {string} [resourceType] The type of the resource. * @member {object} sku The type of the resource. * @member {string} [sku.name] The name of the SKU. Possible values include: * 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' * @member {string} [sku.tier] The billing tier for the IoT hub. Possible * values include: 'Free', 'Standard', 'Basic' * @member {number} [sku.capacity] The number of provisioned IoT Hub units. * See: * https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. * @member {object} capacity IotHub capacity * @member {number} [capacity.minimum] The minimum number of units. * @member {number} [capacity.maximum] The maximum number of units. * @member {number} [capacity.default] The default number of units. * @member {string} [capacity.scaleType] The type of the scaling enabled. * Possible values include: 'Automatic', 'Manual', 'None' */ export interface IotHubSkuDescription { readonly resourceType?: string; sku: IotHubSkuInfo; capacity: IotHubCapacity; } /** * @class * Initializes a new instance of the TagsResource class. * @constructor * A container holding only the Tags for a resource, allowing the user to * update the tags on an IoT Hub instance. * * @member {object} [tags] Resource tags */ export interface TagsResource { tags?: { [propertyName: string]: string }; } /** * @class * Initializes a new instance of the EventHubConsumerGroupInfo class. * @constructor * The properties of the EventHubConsumerGroupInfo object. * * @member {object} [properties] The tags. * @member {string} [id] The Event Hub-compatible consumer group identifier. * @member {string} [name] The Event Hub-compatible consumer group name. * @member {string} [type] the resource type. * @member {string} [etag] The etag. */ export interface EventHubConsumerGroupInfo extends BaseResource { properties?: { [propertyName: string]: string }; readonly id?: string; readonly name?: string; readonly type?: string; readonly etag?: string; } /** * @class * Initializes a new instance of the OperationInputs class. * @constructor * Input values. * * @member {string} name The name of the IoT hub to check. */ export interface OperationInputs { name: string; } /** * @class * Initializes a new instance of the IotHubNameAvailabilityInfo class. * @constructor * The properties indicating whether a given IoT hub name is available. * * @member {boolean} [nameAvailable] The value which indicates whether the * provided name is available. * @member {string} [reason] The reason for unavailability. Possible values * include: 'Invalid', 'AlreadyExists' * @member {string} [message] The detailed reason message. */ export interface IotHubNameAvailabilityInfo { readonly nameAvailable?: boolean; readonly reason?: string; message?: string; } /** * @class * Initializes a new instance of the Name class. * @constructor * Name of Iot Hub type * * @member {string} [value] IotHub type * @member {string} [localizedValue] Localized value of name */ export interface Name { value?: string; localizedValue?: string; } /** * @class * Initializes a new instance of the UserSubscriptionQuota class. * @constructor * User subscription quota response * * @member {string} [id] IotHub type id * @member {string} [type] Response type * @member {string} [unit] Unit of IotHub type * @member {number} [currentValue] Current number of IotHub type * @member {number} [limit] Numerical limit on IotHub type * @member {object} [name] IotHub type * @member {string} [name.value] IotHub type * @member {string} [name.localizedValue] Localized value of name */ export interface UserSubscriptionQuota { id?: string; type?: string; unit?: string; currentValue?: number; limit?: number; name?: Name; } /** * @class * Initializes a new instance of the UserSubscriptionQuotaListResult class. * @constructor * Json-serialized array of User subscription quota response * * @member {array} [value] * @member {string} [nextLink] */ export interface UserSubscriptionQuotaListResult { value?: UserSubscriptionQuota[]; readonly nextLink?: string; } /** * @class * Initializes a new instance of the RoutingMessage class. * @constructor * Routing message * * @member {string} [body] Body of routing message * @member {object} [appProperties] App properties * @member {object} [systemProperties] System properties */ export interface RoutingMessage { body?: string; appProperties?: { [propertyName: string]: string }; systemProperties?: { [propertyName: string]: string }; } /** * @class * Initializes a new instance of the TestAllRoutesInput class. * @constructor * Input for testing all routes * * @member {string} [routingSource] Routing source. Possible values include: * 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', * 'DeviceJobLifecycleEvents' * @member {object} [message] Routing message * @member {string} [message.body] Body of routing message * @member {object} [message.appProperties] App properties * @member {object} [message.systemProperties] System properties */ export interface TestAllRoutesInput { routingSource?: string; message?: RoutingMessage; } /** * @class * Initializes a new instance of the MatchedRoute class. * @constructor * Routes that matched * * @member {object} [properties] Properties of routes that matched * @member {string} [properties.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. * @member {string} [properties.source] The source that the routing rule is to * be applied to, such as DeviceMessages. Possible values include: 'Invalid', * 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', * 'DeviceJobLifecycleEvents' * @member {string} [properties.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: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language * @member {array} [properties.endpointNames] The list of endpoints to which * messages that satisfy the condition are routed. Currently only one endpoint * is allowed. * @member {boolean} [properties.isEnabled] Used to specify whether a route is * enabled. */ export interface MatchedRoute { properties?: RouteProperties; } /** * @class * Initializes a new instance of the TestAllRoutesResult class. * @constructor * Result of testing all routes * * @member {array} [routes] JSON-serialized array of matched routes */ export interface TestAllRoutesResult { routes?: MatchedRoute[]; } /** * @class * Initializes a new instance of the TestRouteInput class. * @constructor * Input for testing route * * @member {object} [message] Routing message * @member {string} [message.body] Body of routing message * @member {object} [message.appProperties] App properties * @member {object} [message.systemProperties] System properties * @member {object} route Route properties * @member {string} [route.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. * @member {string} [route.source] The source that the routing rule is to be * applied to, such as DeviceMessages. Possible values include: 'Invalid', * 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', * 'DeviceJobLifecycleEvents' * @member {string} [route.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: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language * @member {array} [route.endpointNames] The list of endpoints to which * messages that satisfy the condition are routed. Currently only one endpoint * is allowed. * @member {boolean} [route.isEnabled] Used to specify whether a route is * enabled. */ export interface TestRouteInput { message?: RoutingMessage; route: RouteProperties; } /** * @class * Initializes a new instance of the RouteErrorPosition class. * @constructor * Position where the route error happened * * @member {number} [line] Line where the route error happened * @member {number} [column] Column where the route error happened */ export interface RouteErrorPosition { line?: number; column?: number; } /** * @class * Initializes a new instance of the RouteErrorRange class. * @constructor * Range of route errors * * @member {object} [start] Start where the route error happened * @member {number} [start.line] Line where the route error happened * @member {number} [start.column] Column where the route error happened * @member {object} [end] End where the route error happened * @member {number} [end.line] Line where the route error happened * @member {number} [end.column] Column where the route error happened */ export interface RouteErrorRange { start?: RouteErrorPosition; end?: RouteErrorPosition; } /** * @class * Initializes a new instance of the RouteCompilationError class. * @constructor * Compilation error when evaluating route * * @member {string} [message] Route error message * @member {string} [severity] Severity of the route error. Possible values * include: 'error', 'warning' * @member {object} [location] Location where the route error happened * @member {object} [location.start] Start where the route error happened * @member {number} [location.start.line] Line where the route error happened * @member {number} [location.start.column] Column where the route error * happened * @member {object} [location.end] End where the route error happened * @member {number} [location.end.line] Line where the route error happened * @member {number} [location.end.column] Column where the route error happened */ export interface RouteCompilationError { message?: string; severity?: string; location?: RouteErrorRange; } /** * @class * Initializes a new instance of the TestRouteResultDetails class. * @constructor * Detailed result of testing a route * * @member {array} [compilationErrors] JSON-serialized list of route * compilation errors */ export interface TestRouteResultDetails { compilationErrors?: RouteCompilationError[]; } /** * @class * Initializes a new instance of the TestRouteResult class. * @constructor * Result of testing one route * * @member {string} [result] Result of testing route. Possible values include: * 'undefined', 'false', 'true' * @member {object} [details] Detailed result of testing route * @member {array} [details.compilationErrors] JSON-serialized list of route * compilation errors */ export interface TestRouteResult { result?: string; details?: TestRouteResultDetails; } /** * @class * Initializes a new instance of the ExportDevicesRequest class. * @constructor * Use to provide parameters when requesting an export of all devices in the * IoT hub. * * @member {string} exportBlobContainerUri The export blob container URI. * @member {boolean} excludeKeys The value indicating whether keys should be * excluded during export. */ export interface ExportDevicesRequest { exportBlobContainerUri: string; excludeKeys: boolean; } /** * @class * Initializes a new instance of the ImportDevicesRequest class. * @constructor * Use to provide parameters when requesting an import of all devices in the * hub. * * @member {string} inputBlobContainerUri The input blob container URI. * @member {string} outputBlobContainerUri The output blob container URI. */ export interface ImportDevicesRequest { inputBlobContainerUri: string; outputBlobContainerUri: string; } /** * @class * Initializes a new instance of the OperationListResult class. * @constructor * 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. * * @member {string} [nextLink] URL to get the next set of operation list * results if there are any. */ export interface OperationListResult extends Array { readonly nextLink?: string; } /** * @class * Initializes a new instance of the IotHubDescriptionListResult class. * @constructor * The JSON-serialized array of IotHubDescription objects with a next link. * * @member {string} [nextLink] The next link. */ export interface IotHubDescriptionListResult extends Array { readonly nextLink?: string; } /** * @class * Initializes a new instance of the IotHubSkuDescriptionListResult class. * @constructor * The JSON-serialized array of IotHubSkuDescription objects with a next link. * * @member {string} [nextLink] The next link. */ export interface IotHubSkuDescriptionListResult extends Array { readonly nextLink?: string; } /** * @class * Initializes a new instance of the EventHubConsumerGroupsListResult class. * @constructor * The JSON-serialized array of Event Hub-compatible consumer group names with * a next link. * * @member {string} [nextLink] The next link. */ export interface EventHubConsumerGroupsListResult extends Array { readonly nextLink?: string; } /** * @class * Initializes a new instance of the JobResponseListResult class. * @constructor * The JSON-serialized array of JobResponse objects with a next link. * * @member {string} [nextLink] The next link. */ export interface JobResponseListResult extends Array { readonly nextLink?: string; } /** * @class * Initializes a new instance of the IotHubQuotaMetricInfoListResult class. * @constructor * The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. * * @member {string} [nextLink] The next link. */ export interface IotHubQuotaMetricInfoListResult extends Array { readonly nextLink?: string; } /** * @class * Initializes a new instance of the EndpointHealthDataListResult class. * @constructor * The JSON-serialized array of EndpointHealthData objects with a next link. * * @member {string} [nextLink] Link to more results */ export interface EndpointHealthDataListResult extends Array { readonly nextLink?: string; } /** * @class * Initializes a new instance of the SharedAccessSignatureAuthorizationRuleListResult class. * @constructor * The list of shared access policies with a next link. * * @member {string} [nextLink] The next link. */ export interface SharedAccessSignatureAuthorizationRuleListResult extends Array { readonly nextLink?: string; }