Skip to content

Commit e900084

Browse files
gitlwhWeiheng Li
andauthored
fix (#19455)
Co-authored-by: Weiheng Li <[email protected]>
1 parent 7bff831 commit e900084

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/Network/Network/BYOIP/CustomIpPrefix/UpdateAzureCustomIpPrefixCommand.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public class UpdateAzureCustomIpPrefixCommand : CustomIpPrefixBaseCmdlet
7676
[Parameter(Mandatory = false, HelpMessage = "start deprovisioning process.")]
7777
public SwitchParameter Deprovision { get; set; }
7878

79+
[Parameter(Mandatory = false, HelpMessage = "Current commission is No Internet Advertise commission")]
80+
public SwitchParameter NoInternetAdvertise { get; set; }
81+
7982
[Parameter(
8083
Mandatory = false,
8184
ValueFromPipelineByPropertyName = true,
@@ -151,6 +154,11 @@ public override void Execute()
151154
customIpPrefixToUpdate.Cidr = this.Cidr;
152155
}
153156

157+
if (NoInternetAdvertise)
158+
{
159+
customIpPrefixToUpdate.NoInternetAdvertise = true;
160+
}
161+
154162
var sdkModel = NetworkResourceManagerProfile.Mapper.Map<MNM.CustomIpPrefix>(customIpPrefixToUpdate);
155163

156164
if (this.IsParameterBound(c => c.InputObject))

src/Network/Network/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
## Upcoming Release
2222
* Updated commandlet to support bypassing the ExpressRoute gateway when accessing private-links.
2323
- `New-AzVirtualNetworkGatewayConnection`
24+
* Updated commandlet to support no-internet advertise CustomIpPrefix.
25+
- `Update-AzCustomIpPrefix`
2426

2527
## Version 4.20.1
2628
* Added breaking change notification for `Get-AzFirewall`, `New-AzFirewall`, `Set-AzFirewall` and `New-AzFirewallHubIpAddress`

src/Network/Network/Models/BYOIP/PSCustomIpPrefix.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class PSCustomIpPrefix : PSTopLevelResource
3737

3838
public List<PSResourceId> ChildCustomIpPrefixes { get; set; }
3939

40+
public bool NoInternetAdvertise { get; set; }
41+
4042
[JsonIgnore]
4143
public string PublicIpPrefixesText
4244
{

0 commit comments

Comments
 (0)