Skip to content

Commit 3baac41

Browse files
authored
Merge pull request #5245 from HaoQian-MS/preview
Add license type for managed integration runtime
2 parents 155f41b + 69bc45c commit 3baac41

File tree

7 files changed

+189240
-19
lines changed

7 files changed

+189240
-19
lines changed

src/ResourceManager/DataFactories/Commands.DataFactoryV2.Test/ScenarioTests/IntegrationRuntimeTests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ function Test-SsisAzure-IntegrationRuntime
112112
-CatalogAdminCredential $mycreds `
113113
-CatalogPricingTier 'S1' `
114114
-MaxParallelExecutionsPerNode 1 `
115+
-LicenseType LicenseIncluded `
115116
-Force
116117

117118
$expected = Get-AzureRmDataFactoryV2IntegrationRuntime -ResourceGroupName $rgname `

src/ResourceManager/DataFactories/Commands.DataFactoryV2.Test/SessionRecords/Microsoft.Azure.Commands.DataFactoryV2.Test.IntegrationRuntimeTests/TestSsisAzureIntegrationRuntime.json

Lines changed: 189175 additions & 0 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactoryV2/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* Added license type property for Azure SSIS integration runtime
2424
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
2525
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
26+
* Add parameter "LicenseType" for "Set-AzureRmDataFactoryV2IntegrationRuntime" cmd to enable AHUB functionality
2627

2728
## Version 0.4.1
2829
* Added two new cmdlets: Update-AzureRmDataFactoryV2 and Stop-AzureRmDataFactoryV2PipelineRun

src/ResourceManager/DataFactories/Commands.DataFactoryV2/Constants.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ internal static class Constants
108108

109109
public const string HelpIntegrationRuntimeMaxParallelExecutionsPerNode = "Maximum parallel execution count per node for a managed dedicated integration runtime.";
110110

111+
public const string HelpIntegrationRuntimeLicenseType = "The license type that you want to select for the SSIS IR. There are two types: LicenseIncluded or BasePrice. If you are qualified for the Azure Hybrid Use Benefit (AHUB) pricing, please select BasePrice. If not, please select LicenseIncluded.";
112+
111113
public const string HelpIntegrationRuntimeAutoUpdate = "Enable or disable the self-hosted integration runtime auto-update.";
112114

113115
public const string HelpIntegrationRuntimeAutoUpdateTime = "The time of the day for the self-hosted integration runtime auto-update.";
@@ -167,5 +169,9 @@ internal static class Constants
167169
public const string IntegrationRuntimeAutoUpdateDisabled = "Off";
168170

169171
public const string TriggerName = "TriggerName";
172+
173+
public const string IntegrationRuntimeLicenseIncluded = "LicenseIncluded";
174+
175+
public const string IntegrationRuntimeBasePrice = "BasePrice";
170176
}
171177
}

src/ResourceManager/DataFactories/Commands.DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm
102102
HelpMessage = Constants.HelpIntegrationRuntimeMaxParallelExecutionsPerNode)]
103103
public int? MaxParallelExecutionsPerNode { get; set; }
104104

105+
[Parameter(
106+
Mandatory = false,
107+
HelpMessage = Constants.HelpIntegrationRuntimeLicenseType)]
108+
[ValidateNotNullOrEmpty]
109+
[ValidateSet(
110+
Constants.IntegrationRuntimeLicenseIncluded,
111+
Constants.IntegrationRuntimeBasePrice,
112+
IgnoreCase = true)]
113+
public string LicenseType { get; set; }
114+
105115
[Parameter(
106116
Mandatory = false, HelpMessage = Constants.HelpDontAskConfirmation)]
107117
public SwitchParameter Force { get; set; }
@@ -338,6 +348,16 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati
338348
}
339349
}
340350

351+
if (!string.IsNullOrWhiteSpace(LicenseType))
352+
{
353+
if (integrationRuntime.SsisProperties == null)
354+
{
355+
integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties();
356+
}
357+
358+
integrationRuntime.SsisProperties.LicenseType = LicenseType;
359+
}
360+
341361
integrationRuntime.Validate();
342362
}
343363
}

src/ResourceManager/DataFactories/Commands.DataFactoryV2/Models/PSManagedIntegrationRuntime.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@ public PSManagedIntegrationRuntime(
6060
public string Subnet => ManagedIntegrationRuntime.ComputeProperties?.VNetProperties?.Subnet;
6161

6262
public string State => ManagedIntegrationRuntime.State;
63+
64+
public string LicenseType => ManagedIntegrationRuntime.SsisProperties?.LicenseType;
6365
}
6466
}

src/ResourceManager/DataFactories/Commands.DataFactoryV2/help/Set-AzureRmDataFactoryV2IntegrationRuntime.md

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ Updates an integration runtime.
1717
Set-AzureRmDataFactoryV2IntegrationRuntime [-Type <String>] [-Description <String>] [-Location <String>]
1818
[-NodeSize <String>] [-NodeCount <Int32>] [-CatalogServerEndpoint <String>]
1919
[-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>]
20-
[-MaxParallelExecutionsPerNode <Int32>] [-Force] [-Name] <String> [-ResourceGroupName] <String>
21-
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
22-
[<CommonParameters>]
20+
[-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-Force] [-Name] <String>
21+
[-ResourceGroupName] <String> [-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
22+
[-Confirm] [<CommonParameters>]
2323
```
2424

2525
### ByResourceId
2626
```
2727
Set-AzureRmDataFactoryV2IntegrationRuntime [-Type <String>] [-Description <String>] [-Location <String>]
2828
[-NodeSize <String>] [-NodeCount <Int32>] [-CatalogServerEndpoint <String>]
2929
[-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>]
30-
[-MaxParallelExecutionsPerNode <Int32>] [-Force] [-ResourceId] <String>
30+
[-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-Force] [-ResourceId] <String>
3131
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3232
```
3333

@@ -36,7 +36,7 @@ Set-AzureRmDataFactoryV2IntegrationRuntime [-Type <String>] [-Description <Strin
3636
Set-AzureRmDataFactoryV2IntegrationRuntime [-Type <String>] [-Description <String>] [-Location <String>]
3737
[-NodeSize <String>] [-NodeCount <Int32>] [-CatalogServerEndpoint <String>]
3838
[-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>]
39-
[-MaxParallelExecutionsPerNode <Int32>] [-Force] [-InputObject] <PSIntegrationRuntime>
39+
[-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-Force] [-InputObject] <PSIntegrationRuntime>
4040
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
4141
```
4242

@@ -67,7 +67,7 @@ The catalog database administrator credential of the integration runtime.
6767
```yaml
6868
Type: PSCredential
6969
Parameter Sets: (All)
70-
Aliases:
70+
Aliases:
7171

7272
Required: False
7373
Position: Named
@@ -82,7 +82,7 @@ The catalog database pricing tier of the integration runtime.
8282
```yaml
8383
Type: String
8484
Parameter Sets: (All)
85-
Aliases:
85+
Aliases:
8686

8787
Required: False
8888
Position: Named
@@ -97,7 +97,7 @@ The catalog database server endpoint of the integration runtime.
9797
```yaml
9898
Type: String
9999
Parameter Sets: (All)
100-
Aliases:
100+
Aliases:
101101

102102
Required: False
103103
Position: Named
@@ -112,7 +112,7 @@ The data factory name.
112112
```yaml
113113
Type: String
114114
Parameter Sets: ByIntegrationRuntimeName
115-
Aliases:
115+
Aliases:
116116

117117
Required: True
118118
Position: 1
@@ -142,7 +142,7 @@ The integration runtime description.
142142
```yaml
143143
Type: String
144144
Parameter Sets: (All)
145-
Aliases:
145+
Aliases:
146146

147147
Required: False
148148
Position: Named
@@ -157,7 +157,7 @@ Runs the cmdlet without prompting for confirmation.
157157
```yaml
158158
Type: SwitchParameter
159159
Parameter Sets: (All)
160-
Aliases:
160+
Aliases:
161161

162162
Required: False
163163
Position: Named
@@ -172,7 +172,7 @@ The integration runtime object.
172172
```yaml
173173
Type: PSIntegrationRuntime
174174
Parameter Sets: ByIntegrationRuntimeObject
175-
Aliases:
175+
Aliases:
176176

177177
Required: True
178178
Position: 0
@@ -181,13 +181,29 @@ Accept pipeline input: True (ByValue)
181181
Accept wildcard characters: False
182182
```
183183
184+
### -LicenseType
185+
The license type that you want to select for the SSIS IR. There are two types: LicenseIncluded or BasePrice. If you are qualified for the Azure Hybrid Use Benefit (AHUB) pricing, please select BasePrice. If not, please select LicenseIncluded.
186+
187+
```yaml
188+
Type: String
189+
Parameter Sets: (All)
190+
Aliases:
191+
Accepted values: LicenseIncluded, BasePrice
192+
193+
Required: False
194+
Position: Named
195+
Default value: None
196+
Accept pipeline input: False
197+
Accept wildcard characters: False
198+
```
199+
184200
### -Location
185201
The integration runtime location.
186202
187203
```yaml
188204
Type: String
189205
Parameter Sets: (All)
190-
Aliases:
206+
Aliases:
191207

192208
Required: False
193209
Position: Named
@@ -202,7 +218,7 @@ Maximum parallel execution count per node for a managed dedicated integration ru
202218
```yaml
203219
Type: Int32
204220
Parameter Sets: (All)
205-
Aliases:
221+
Aliases:
206222

207223
Required: False
208224
Position: Named
@@ -232,7 +248,7 @@ Target nodes count of the integration runtime.
232248
```yaml
233249
Type: Int32
234250
Parameter Sets: (All)
235-
Aliases:
251+
Aliases:
236252

237253
Required: False
238254
Position: Named
@@ -247,7 +263,7 @@ The integration runtime node size.
247263
```yaml
248264
Type: String
249265
Parameter Sets: (All)
250-
Aliases:
266+
Aliases:
251267

252268
Required: False
253269
Position: Named
@@ -262,7 +278,7 @@ The resource group name.
262278
```yaml
263279
Type: String
264280
Parameter Sets: ByIntegrationRuntimeName
265-
Aliases:
281+
Aliases:
266282

267283
Required: True
268284
Position: 0
@@ -307,7 +323,7 @@ The integration runtime type.
307323
```yaml
308324
Type: String
309325
Parameter Sets: (All)
310-
Aliases:
326+
Aliases:
311327
Accepted values: Managed, SelfHosted
312328

313329
Required: False
@@ -323,7 +339,7 @@ The ID of the VNet that the integration runtime joins.
323339
```yaml
324340
Type: String
325341
Parameter Sets: (All)
326-
Aliases:
342+
Aliases:
327343

328344
Required: False
329345
Position: Named

0 commit comments

Comments
 (0)