Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Set-AzNatGateway

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

Syntax

SetByNameParameterSet (Default)

Set-AzNatGateway
 -ResourceGroupName <String>
 -Name <String>
 [-PublicIpAddress <PSResourceId[]>]
 [-PublicIpAddressV6 <PSResourceId[]>]
 [-PublicIpPrefix <PSResourceId[]>]
 [-PublicIpPrefixV6 <PSResourceId[]>]
 [-SourceVirtualNetwork <PSResourceId>]
 [-AsJob]
 [-IdleTimeoutInMinutes <Int32>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourceIdParameterSet

Set-AzNatGateway
 -ResourceId <String>
 [-PublicIpAddress <PSResourceId[]>]
 [-PublicIpAddressV6 <PSResourceId[]>]
 [-PublicIpPrefix <PSResourceId[]>]
 [-PublicIpPrefixV6 <PSResourceId[]>]
 [-SourceVirtualNetwork <PSResourceId>]
 [-AsJob]
 [-IdleTimeoutInMinutes <Int32>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByInputObjectParameterSet

Set-AzNatGateway
 -InputObject <PSNatGateway>
 [-PublicIpAddress <PSResourceId[]>]
 [-PublicIpAddressV6 <PSResourceId[]>]
 [-PublicIpPrefix <PSResourceId[]>]
 [-PublicIpPrefixV6 <PSResourceId[]>]
 [-SourceVirtualNetwork <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

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

Parameters

-AsJob

Run cmdlet in the background

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-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

-IdleTimeoutInMinutes

The idle timeout of the nat gateway.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-InputObject

Specifies Nat Gateway Resource.

Parameter properties

Type:PSNatGateway
Default value:None
Supports wildcards:False
DontShow:False
Aliases:NatGateway

Parameter sets

-Name

Name of the Nat Gateway Resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddress

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

Parameter properties

Type:

PSResourceId[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddressV6

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

Parameter properties

Type:

PSResourceId[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpPrefix

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

Parameter properties

Type:

PSResourceId[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpPrefixV6

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

Parameter properties

Type:

PSResourceId[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

Name of the Resource Group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceId

Specifies the Id of the Nat Gateway resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:NatGatewayId

Parameter sets

-SourceVirtualNetwork

The id of the source virtual network using this nat gateway resource.

Parameter properties

Type:PSResourceId
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

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.

Inputs

String

PSNatGateway

Outputs

PSNatGateway


Feedback

Was this page helpful?