Set-AzIotHub
Updates the properties of an IotHub.
Syntax
UpdateSku (Default)
Set-AzIotHub
-ResourceGroupName <String>
-Name <String>
-SkuName <PSIotHubSku>
[-Units <Int64>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateEventHubEndpointProperties
Set-AzIotHub
-ResourceGroupName <String>
-Name <String>
-EventHubRetentionTimeInDays <Int64>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateFileUploadProperties
Set-AzIotHub
-ResourceGroupName <String>
-Name <String>
-EnableFileUploadNotifications <Boolean>
[-FileUploadStorageConnectionString <String>]
[-FileUploadContainerName <String>]
[-FileUploadSasUriTtl <TimeSpan>]
[-FileUploadNotificationTtl <TimeSpan>]
[-FileUploadNotificationMaxDeliveryCount <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateCloudToDeviceProperties
Set-AzIotHub
-ResourceGroupName <String>
-Name <String>
-CloudToDevice <PSCloudToDeviceProperties>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateRoutingProperties
Set-AzIotHub
-ResourceGroupName <String>
-Name <String>
[-RoutingProperties <PSRoutingProperties>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateRouteProperties
Set-AzIotHub
-ResourceGroupName <String>
-Name <String>
[-Routes <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteMetadata]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateFallbackRouteProperty
Set-AzIotHub
-ResourceGroupName <String>
-Name <String>
[-FallbackRoute <PSFallbackRouteMetadata>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Updates the properties of an IotHub.
Examples
Example 1 Update the sku
Set-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -SkuName S1 -Units 5
Update the sku to S1 and units to 5 for the IotHub named "myiothub"
Example 2 Update the eventhub properties
Set-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubRetentionTimeInDays 4
Update the retention time of telemetry in days to 4 for the IotHub named "myiothub"
Parameters
-CloudToDevice
The properties for the cloud to device command queue.
Parameter properties
Parameter sets
UpdateCloudToDeviceProperties
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableFileUploadNotifications
Flag that specifies whether notifications should be enabled for file upload.
Parameter properties
Type: Boolean
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateFileUploadProperties
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EventHubRetentionTimeInDays
Retention time in days.
Parameter properties
Type: Int64
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateEventHubEndpointProperties
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FallbackRoute
Fallback Route for Routing
Parameter properties
Parameter sets
UpdateFallbackRouteProperty
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileUploadContainerName
The name of the container to upload the files to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateFileUploadProperties
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileUploadNotificationMaxDeliveryCount
The maximum delivery count for file upload notifications.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateFileUploadProperties
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileUploadNotificationTtl
Time to live value for the messages in the file upload notification queue.
Parameter properties
Type: TimeSpan
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateFileUploadProperties
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileUploadSasUriTtl
Time to live for the for the SAS Uri thats generated for file upload.
Parameter properties
Type: TimeSpan
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateFileUploadProperties
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileUploadStorageConnectionString
The storage connection string to upload the files to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateFileUploadProperties
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Name of the IotHub
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
Resource Group Name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Routes
Routes to be added for Routing
Parameter properties
Parameter sets
UpdateRouteProperties
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RoutingProperties
The Routing properties for routing messages to external endpoints
Parameter properties
Parameter sets
UpdateRoutingProperties
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SkuName
Name of the Sku.
Parameter properties
Type: PSIotHubSku
Default value: None
Accepted values: F1, S1, S2, S3, B1, B2, B3
Supports wildcards: False
DontShow: False
Parameter sets
UpdateSku
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Units
Number of Units
Parameter properties
Type: Int64
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateSku
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs