Set-AzIotHub

Updates the properties of an IotHub.

Syntax

Set-AzIotHub
   -ResourceGroupName <String>
   -Name <String>
   -SkuName <PSIotHubSku>
   [-Units <Int64>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHub
   -ResourceGroupName <String>
   -Name <String>
   -EventHubRetentionTimeInDays <Int64>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHub
   -ResourceGroupName <String>
   -Name <String>
   [-FileUploadStorageConnectionString <String>]
   [-FileUploadContainerName <String>]
   [-FileUploadSasUriTtl <TimeSpan>]
   [-FileUploadNotificationTtl <TimeSpan>]
   [-FileUploadNotificationMaxDeliveryCount <Int32>]
   -EnableFileUploadNotifications <Boolean>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHub
   -ResourceGroupName <String>
   -Name <String>
   -CloudToDevice <PSCloudToDeviceProperties>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHub
   -ResourceGroupName <String>
   -Name <String>
   [-RoutingProperties <PSRoutingProperties>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHub
   -ResourceGroupName <String>
   -Name <String>
   [-Routes <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteMetadata]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
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.

Type:PSCloudToDeviceProperties
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableFileUploadNotifications

Flag that specifies whether notifications should be enabled for file upload.

Type:Boolean
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-EventHubRetentionTimeInDays

Retention time in days.

Type:Int64
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-FallbackRoute

Fallback Route for Routing

Type:PSFallbackRouteMetadata
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FileUploadContainerName

The name of the container to upload the files to.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FileUploadNotificationMaxDeliveryCount

The maximum delivery count for file upload notifications.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FileUploadNotificationTtl

Time to live value for the messages in the file upload notification queue.

Type:TimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FileUploadSasUriTtl

Time to live for the for the SAS Uri thats generated for file upload.

Type:TimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FileUploadStorageConnectionString

The storage connection string to upload the files to.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the IotHub

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Resource Group Name

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Routes

Routes to be added for Routing

Type:List<T>[PSRouteMetadata]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RoutingProperties

The Routing properties for routing messages to external endpoints

Type:PSRoutingProperties
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SkuName

Name of the Sku.

Type:PSIotHubSku
Accepted values:F1, S1, S2, S3, B1, B2, B3
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Units

Number of Units

Type:Int64
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

PSIotHub