Edit

Invoke-AzPublicIpAddressCloudServiceReservation

Reserves or rolls back allocation for a cloud service public IP address.

Syntax

ByName (Default)

Invoke-AzPublicIpAddressCloudServiceReservation
    -Name <String>
    -ResourceGroupName <String>
    [-IsRollback]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

ByInputObject

Invoke-AzPublicIpAddressCloudServiceReservation
    -InputObject <PSPublicIpAddress>
    [-IsRollback]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

ByResourceId

Invoke-AzPublicIpAddressCloudServiceReservation
    -ResourceId <String>
    [-IsRollback]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

Description

The Invoke-AzPublicIpAddressCloudServiceReservation cmdlet invokes the ReserveCloudServicePublicIpAddress operation on the target public IP. By default it reserves the cloud service public IP (static allocation). When IsRollback is specified, the operation reverts from static to dynamic allocation (undo reservation).

This cmdlet supports WhatIf and Confirm (see about_CommonParameters).

Examples

Example 1: Reserve using resource group and name

Invoke-AzPublicIpAddressCloudServiceReservation -ResourceGroupName 'myResourceGroup' -Name 'myCloudServicePublicIp'

Reserves the cloud service public IP named myCloudServicePublicIp in myResourceGroup.

Example 2: Roll back reservation (dynamic allocation)

Invoke-AzPublicIpAddressCloudServiceReservation -ResourceGroupName 'myResourceGroup' -Name 'myCloudServicePublicIp' -IsRollback

Reverts the public IP from static to dynamic allocation for the same resource.

Example 3: Pipe a public IP object

$pip = Get-AzPublicIpAddress -ResourceGroupName 'myResourceGroup' -Name 'myCloudServicePublicIp'
Invoke-AzPublicIpAddressCloudServiceReservation -InputObject $pip

Runs the reservation operation using a PSPublicIpAddress from Get-AzPublicIpAddress.

Parameters

-AcquirePolicyToken

Acquire an Azure Policy token automatically for this resource operation.

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

-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

-ChangeReference

The change reference resource ID for this resource operation.

Parameter properties

Type:String
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

-InputObject

The public IP address object.

Parameter properties

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

Parameter sets

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

-IsRollback

When true, reverts from static to dynamic allocation (undo reservation).

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

-Name

The public IP address name.

Parameter properties

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

Parameter sets

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

-ResourceGroupName

The resource group name.

Parameter properties

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

Parameter sets

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

-ResourceId

The public IP address resource ID.

Parameter properties

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

Parameter sets

ByResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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

PSPublicIpAddress

Outputs

PSPublicIpAddress