Set-AzNatGateway

Update Nat Gateway Resource with Public Ip Address, Public Ip Prefix and IdleTimeoutInMinutes.

Syntax

Set-AzNatGateway
   -ResourceGroupName <String>
   -Name <String>
   [-PublicIpAddress <PSResourceId[]>]
   [-PublicIpPrefix <PSResourceId[]>]
   [-AsJob]
   [-IdleTimeoutInMinutes <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNatGateway
   -ResourceId <String>
   [-PublicIpAddress <PSResourceId[]>]
   [-PublicIpPrefix <PSResourceId[]>]
   [-AsJob]
   [-IdleTimeoutInMinutes <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNatGateway
   -InputObject <PSNatGateway>
   [-PublicIpAddress <PSResourceId[]>]
   [-PublicIpPrefix <PSResourceId[]>]
   [-AsJob]
   [-IdleTimeoutInMinutes <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Update Nat Gateway Resource with Public Ip Address, Public Ip Prefix and IdleTimeoutInMinutes.

Examples

Example 1

PS C:\> $nGateway = Get-AzNatGateway -ResourceGroupName "natgateway_test" -Name "ng1"
PS C:\> $pipArray = $pip, $pip2
PS C:\> $natUpdate = Set-AzNatGateway -InputObject $nGateway -IdleTimeoutInMinutes 5 -PublicIpAddress $pipArray
PS C:\> $natUpdate = Set-AzNatGateway -ResourceGroupName "natgateway_test" -Name "ng1" -PublicIpAddress $pipArray
PS C:\> $natUpdate = Set-AzNatGateway -ResourceId "natgateway_id" -PublicIpAddress $pipArray

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
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:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IdleTimeoutInMinutes

The idle timeout of the nat gateway.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies Nat Gateway Resource.

Type:Microsoft.Azure.Commands.Network.Models.PSNatGateway
Aliases:NatGateway
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Name of the Nat Gateway Resource.

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

An array of public ip addresses associated with the nat gateway resource.

Type:Microsoft.Azure.Commands.Network.Models.PSResourceId[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicIpPrefix

An array of public ip prefixes associated with the nat gateway resource.

Type:Microsoft.Azure.Commands.Network.Models.PSResourceId[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Name of the Resource Group.

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

Specifies the Id of the Nat Gateway resource.

Type:String
Aliases:NatGatewayId
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Microsoft.Azure.Commands.Network.Models.PSNatGateway

Outputs

Microsoft.Azure.Commands.Network.Models.PSNatGateway