Skip to content

Commit fbf40a0

Browse files
authored
Migration guide (#18262)
1 parent 20160e6 commit fbf40a0

File tree

1 file changed

+290
-0
lines changed

1 file changed

+290
-0
lines changed
Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
# Migration Guide for Az 8.0.0
2+
## Az.Aks
3+
4+
### `Get-AzAks`
5+
Alias `Get-AzAks` is removed. Please use `Get-AzAksCluster` instead.
6+
7+
#### Before
8+
```powershell
9+
Get-AzAks -ResourceGroupName $resourceGroupName -Name $name
10+
```
11+
#### After
12+
```powershell
13+
Get-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name
14+
```
15+
16+
### `New-AzAks`
17+
Alias `New-AzAks` is removed. Please use `New-AzAksCluster` instead.
18+
19+
#### Before
20+
```powershell
21+
New-AzAks -ResourceGroupName $resourceGroupName -Name $name -Location $location
22+
```
23+
#### After
24+
```powershell
25+
New-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name -Location $location
26+
```
27+
28+
### `Set-AzAks`
29+
Alias `Set-AzAks` is removed. Please use `Set-AzAksCluster` instead.
30+
31+
#### Before
32+
```powershell
33+
Set-AzAks -ResourceGroupName $resourceGroupName -Name $name
34+
```
35+
#### After
36+
```powershell
37+
Set-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name
38+
```
39+
40+
### `Remove-AzAks`
41+
Alias `Remove-AzAks` is removed. Please use `Remove-AzAksCluster` instead.
42+
43+
#### Before
44+
```powershell
45+
Remove-AzAks -ResourceGroupName $resourceGroupName -Name $name
46+
```
47+
#### After
48+
```powershell
49+
Remove-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name
50+
```
51+
52+
## Az.Cdn
53+
54+
### `New-AzCdnProfile`
55+
Changed the type of parameter `Sku` to `SkuName`
56+
Changed the type of parameter `ProfileName` to `Name`
57+
58+
#### Before
59+
```powershell
60+
$profileSku = "Standard_Microsoft";
61+
$cdnProfileName = "profileNameXXXX";
62+
$resourceGroupName = "myresourcegroup"
63+
New-AzCdnProfile -Sku $profileSku -ProfileName $cdnProfileName -ResourceGroupName $resourceGroupName -Location Global
64+
```
65+
#### After
66+
```powershell
67+
$profileSku = "Standard_Microsoft";
68+
$cdnProfileName = "profileNameXXXX";
69+
$resourceGroupName = "myresourcegroup"
70+
New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $resourceGroupName -Location Global
71+
```
72+
73+
### `New-AzCdnEndpoint`
74+
Changed parameter `EndpointName` to `Name`
75+
Changed parameter `GeoFilters` to `GeoFilter`
76+
Changed parameter `DefaultOriginGroup` to `DefaultOriginGroupId`
77+
Merge parameters `OriginHostName`,`OriginId`,`OriginName`,`Priority`,`PrivateLinkApprovalMessage`,`PrivateLinkLocation`,`PrivateLinkResourceId`,`Weight`,`HttpPort`,`HttpsPort`into parameter `Origin`
78+
Merge parameters `OriginGroupName`,`OriginGroupProbeIntervalInSeconds`,`OriginGroupProbePath`,`OriginGroupProbeProtocol`,`OriginGroupProbeRequestType`into parameter `OriginGroup`
79+
Split parameter `DeliveryPolicy` in to parameters `DeliveryPolicyDescription`,`DeliveryPolicyRule`
80+
Add parameters `SubscriptionId`,`UrlSigningKey`,`WebApplicationFirewallPolicyLinkId`
81+
Delete parameter `CdnProfile `
82+
83+
#### Before
84+
```powershell
85+
New-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -Location westus -EndpointName myendpoint `
86+
-OriginName mystorage -OriginHostName mystorage.blob.core.windows.net `
87+
-OriginHostHeader mystorage.blob.core.windows.net -IsHttpAllowed $false
88+
```
89+
#### After
90+
```powershell
91+
$origin = @{
92+
Name = "origin1"
93+
HostName = "host1.hello.com"
94+
};
95+
$location = "westus"
96+
97+
$endpoint = New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin
98+
```
99+
100+
### `New-AzCdnDeliveryPolicy`
101+
Delete command `New-AzCdnDeliveryPolicy`. Use `New-AzCdnDeliveryRuleObject` create rule object and used it in `New-AzCdnEndpoint` directly
102+
103+
104+
### `New-AzCdnDeliveryRule`
105+
Changed command name to `New-AzCdnDeliveryRuleObject`
106+
107+
#### Before
108+
```powershell
109+
New-AzCdnDeliveryRule -Name "rule1" -Order 1 -Condition $cond1 -Action $action1
110+
```
111+
#### After
112+
```powershell
113+
$cond1 = New-AzCdnDeliveryRuleIsDeviceConditionObject -Name "IsDevice" -ParameterMatchValue "Desktop"
114+
$action1 = New-AzCdnUrlRewriteActionObject -Name "UrlRewrite" -ParameterDestination "/def" -ParameterSourcePattern "/abc" -ParameterPreserveUnmatchedPath $true
115+
$rule1 = New-AzCdnDeliveryRuleObject -Name "Rule1" -Action $action1,$action2 -Condition $cond1 -Order 1
116+
```
117+
118+
### `New-AzCdnCustomDomain`
119+
Changed the type of parameter `CustomDomainName` to `Name`
120+
Add parameter `SubscriptionId`
121+
Delete parameter `CdnEndpoint`
122+
123+
#### Before
124+
```powershell
125+
New-AzCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName -CustomDomainName $customDomainName -HostName $customDomainHostName
126+
```
127+
#### After
128+
```powershell
129+
New-AzCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName -Name $customDomainName -HostName $customDomainHostName -SubscriptionId $subId
130+
```
131+
132+
### `Set-AzCdnProfile`
133+
Replaced by command `Update-AzCdnProfile`
134+
135+
#### Before
136+
```powershell
137+
$profileObject = Get-AzCdnProfile -ResourceGroupName myresourcegroup -ProfileName mycdnprofile
138+
$profileObject.Tags = @{"key"="value"}
139+
Set-AzCdnProfile -CdnProfile $profileObject
140+
```
141+
142+
#### After
143+
```powershell
144+
$profileSku = "Standard_Microsoft";
145+
$cdnProfileName = "profileNameXXXX";
146+
$resourceGroupName = "myresourcegroup"
147+
New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $resourceGroupName -Location Global
148+
149+
$tags = @{
150+
Tag1 = 11
151+
Tag2 = 22
152+
}
153+
Update-AzCdnProfile -Name $cdnProfileName -ResourceGroupName $resourceGroupName -Tag $tags
154+
```
155+
156+
### `Set-AzCdnEndpoint`
157+
Replaced by command `Update-AzCdnEndpoint`
158+
`DeliveryPolicyDescription` and `DeliveryPolicyRule` should be provided together when you want to update one of them.
159+
160+
#### Before
161+
```powershell
162+
$endpointObject = Get-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint
163+
$endpointObject.IsHttpAllowed = $false
164+
Set-AzCdnEndpoint -CdnEndpoint $endpointObject
165+
```
166+
#### After
167+
```powershell
168+
$tags = @{
169+
Tag1 = 11
170+
Tag2 = 22
171+
}
172+
173+
//Update tags
174+
Update-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $resourceGroupName -Tag $tags
175+
176+
//Update DeliveryPolicyDescription or DeliveryPolicyRule
177+
Update-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $resourceGroupName `
178+
-DeliveryPolicyDescription $descprption -DeliveryPolicyRule $rule
179+
```
180+
181+
### `Set-AzCdnOriginGroup`
182+
Replaced by command `Update-AzCdnOriginGroup`
183+
184+
#### Before
185+
```powershell
186+
Set-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName -OriginId $originIds -ProbeIntervalInSeconds $probeInterval
187+
```
188+
#### After
189+
```powershell
190+
Update-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroup.Name -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName `
191+
-HealthProbeSetting $healthProbeParametersObject2 -Origin @(@{ Id = $originId })
192+
193+
```
194+
195+
### `Set-AzCdnOrigin`
196+
Replaced by command `Update-AzCdnOrigin`
197+
198+
#### Before
199+
```powershell
200+
Set-AzCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
201+
-OriginName $originName -HostName "mystorage2.blob.core.windows.net"
202+
```
203+
#### After
204+
```powershell
205+
Update-AzCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
206+
-Name $originName -HostName "mystorage2.blob.core.windows.net" -HttpPort 456 -HttpsPort 789
207+
```
208+
209+
## Az.EventHub
210+
211+
### `New-AzEventHubNamespace`
212+
Parameter `Identity` is removed.
213+
#### Before
214+
```powershell
215+
New-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -Location northeurope -SkuName Premium -IdentityType SystemAssigned -Identity
216+
```
217+
#### After
218+
```powershell
219+
New-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -Location northeurope -SkuName Premium -IdentityType SystemAssigned
220+
```
221+
222+
### `Set-AzEventHubNamespace`
223+
Parameter `Identity` is removed.
224+
#### Before
225+
```powershell
226+
Set-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -EncryptionConfig $ec1,$ec2 -Identity
227+
```
228+
#### After
229+
```powershell
230+
Set-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -EncryptionConfig $ec1,$ec2
231+
```
232+
233+
234+
## Az.HealthcareApis
235+
236+
### `Set-AzHealthcareApisService`
237+
Combine New-AzHealthcareApisService and Set-AzHealthcareApisService into New-AzHealthcareApisService
238+
239+
#### Before
240+
```powershell
241+
Set-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -CosmosOfferThroughput 500
242+
```
243+
#### After
244+
```powershell
245+
New-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -Location MyLocation -Kind fhir-R4 -CosmosOfferThroughput 500
246+
```
247+
248+
249+
### `Get-AzHealthcareApisService`
250+
`-ResourceId` is removed
251+
252+
#### Before
253+
```powershell
254+
Get-AzHealthcareApisService -ResourceId $ResourceId
255+
```
256+
#### After
257+
```powershell
258+
Get-AzHealthcareApisService -ResourceGroupName $ResourceGroup -Name $Name
259+
```
260+
261+
262+
### `Remove-AzHealthcareApisService`
263+
`-ResourceId` is removed
264+
265+
#### Before
266+
```powershell
267+
Remove-AzHealthcareApisService -ResourceId $ResourceId
268+
```
269+
#### After
270+
```powershell
271+
Remove-AzHealthcareApisService -ResourceGroupName $ResourceGroup -Name $Name
272+
```
273+
274+
275+
### `New-AzHealthcareApisService`
276+
`-ManagedIdentity` is renamed to `-IdentityType`
277+
`-FhirVersion` is removed and the desired content can be selected with the parameter `-Kind`
278+
`-DisableCorsCredential` and `-AllowCorsCredential`: now uniformly named as `-AllowCorsCredential`, example: -AllowCorsCredential:$false or -AllowCorsCredential:$true
279+
`-DisableSmartProxy` and `-EnableSmartProxy`: now uniformly named as `-EnableSmartProxy`, example: -EnableSmartProxy:$false or -EnableSmartProxy:$true
280+
281+
#### Before
282+
```powershell
283+
New-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -Location MyLocation -FhirVersion fhir-R4 -CosmosOfferThroughput 500 -ManagedIdentity $IdentityType -DisableCorsCredential -DisableSmartProxy
284+
```
285+
#### After
286+
```powershell
287+
New-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -Location MyLocation -Kind fhir-R4 -CosmosOfferThroughput 500 -IdentityType $IdentityType -AllowCorsCredential:$false -EnableSmartProxy:$false
288+
```
289+
290+

0 commit comments

Comments
 (0)