Editar

Compartir a través de


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

$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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
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

-IdleTimeoutInMinutes

The idle timeout of the nat gateway.

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

-InputObject

Specifies Nat Gateway Resource.

Type:PSNatGateway
Aliases:NatGateway
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Name of the Nat Gateway Resource.

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

-PublicIpAddress

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

Type:PSResourceId[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PublicIpPrefix

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

Type:PSResourceId[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of the Resource Group.

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

Inputs

String

PSNatGateway

Outputs

PSNatGateway