Edit

Share via


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

(All)
Position:Named
Mandatory:False
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:None
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

-IdleTimeoutInMinutes

The idle timeout of the nat gateway.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies Nat Gateway Resource.

Parameter properties

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

Parameter sets

SetByInputObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of the Nat Gateway Resource.

Parameter properties

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

Parameter sets

SetByNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Name of the Resource Group.

Parameter properties

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

Parameter sets

SetByNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

SetByResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-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

(All)
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:None
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.

Inputs

String

PSNatGateway

Outputs

PSNatGateway