Skip to content

Commit 5247512

Browse files
authored
[Data Factory] Support CRUD of data flow runtime properties in Managed IR. (#11626)
* support data flow properties in azure ir * fix md
1 parent 499c0ad commit 5247512

File tree

5 files changed

+139
-17
lines changed

5 files changed

+139
-17
lines changed

src/DataFactory/DataFactoryV2/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Support CRUD of data flow runtime properties in Managed IR.
2122

2223
## Version 1.7.0
2324
* Updated ADF .Net SDK version to 4.8.0

src/DataFactory/DataFactoryV2/Constants.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ internal static class Constants
138138

139139
public const string HelpIntegrationRuntimePublicIP = "The static public IP addresses which the integration runtime will use.";
140140

141+
public const string HelpIntegrationRuntimeDataFlowCoreCount = "Core count of the data flow cluster which will execute data flow job.";
142+
143+
public const string HelpIntegrationRuntimeDataFlowComputeType = "Compute type of the data flow cluster which will execute data flow job.";
144+
145+
public const string HelpIntegrationRuntimeDataFlowTimeToLive = "Time to live (in minutes) setting of the data flow cluster which will execute data flow job.";
146+
141147
public const string HelpIntegrationRuntimeSetupScriptContainerSasUri = "The SAS URI of the Azure blob container that contains the custom setup script.";
142148

143149
public const string HelpIntegrationRuntimeEdition = "The edition for SSIS integration runtime which could be Standard or Enterprise, default is Standard if it is not specified.";

src/DataFactory/DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2525
using Microsoft.Rest.Azure;
2626

27-
2827
namespace Microsoft.Azure.Commands.DataFactoryV2
2928
{
3029
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "DataFactoryV2IntegrationRuntime",DefaultParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,SupportsShouldProcess = true),OutputType(typeof(PSIntegrationRuntime))]
@@ -260,6 +259,52 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm
260259
[ValidateNotNull]
261260
public string[] PublicIPs { get; set; }
262261

262+
[Parameter(
263+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
264+
Mandatory = false,
265+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowComputeType)]
266+
[Parameter(
267+
ParameterSetName = ParameterSetNames.ByResourceId,
268+
Mandatory = false,
269+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowComputeType)]
270+
[Parameter(
271+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
272+
Mandatory = false,
273+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowComputeType)]
274+
[PSArgumentCompleter(Management.DataFactory.Models.DataFlowComputeType.General,
275+
Management.DataFactory.Models.DataFlowComputeType.MemoryOptimized,
276+
Management.DataFactory.Models.DataFlowComputeType.ComputeOptimized)]
277+
[ValidateNotNullOrEmpty]
278+
public string DataFlowComputeType { get; set; }
279+
280+
[Parameter(
281+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
282+
Mandatory = false,
283+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowCoreCount)]
284+
[Parameter(
285+
ParameterSetName = ParameterSetNames.ByResourceId,
286+
Mandatory = false,
287+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowCoreCount)]
288+
[Parameter(
289+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
290+
Mandatory = false,
291+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowCoreCount)]
292+
public int? DataFlowCoreCount { get; set; }
293+
294+
[Parameter(
295+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
296+
Mandatory = false,
297+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowTimeToLive)]
298+
[Parameter(
299+
ParameterSetName = ParameterSetNames.ByResourceId,
300+
Mandatory = false,
301+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowTimeToLive)]
302+
[Parameter(
303+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
304+
Mandatory = false,
305+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowTimeToLive)]
306+
public int? DataFlowTimeToLive { get; set; }
307+
263308
[Parameter(
264309
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
265310
Mandatory = false,
@@ -728,6 +773,22 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati
728773
}
729774
}
730775

776+
if (!string.IsNullOrWhiteSpace(DataFlowComputeType) || DataFlowCoreCount != null || DataFlowTimeToLive != null)
777+
{
778+
if (integrationRuntime.ComputeProperties == null)
779+
{
780+
integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties();
781+
}
782+
if (integrationRuntime.ComputeProperties.DataFlowProperties == null)
783+
{
784+
integrationRuntime.ComputeProperties.DataFlowProperties = new IntegrationRuntimeDataFlowProperties();
785+
}
786+
787+
integrationRuntime.ComputeProperties.DataFlowProperties.ComputeType = DataFlowComputeType ?? integrationRuntime.ComputeProperties.DataFlowProperties.ComputeType;
788+
integrationRuntime.ComputeProperties.DataFlowProperties.CoreCount = DataFlowCoreCount ?? integrationRuntime.ComputeProperties.DataFlowProperties.CoreCount;
789+
integrationRuntime.ComputeProperties.DataFlowProperties.TimeToLive = DataFlowTimeToLive ?? integrationRuntime.ComputeProperties.DataFlowProperties.TimeToLive;
790+
}
791+
731792
if (PublicIPs != null)
732793
{
733794
if (string.IsNullOrWhiteSpace(VNetId))

src/DataFactory/DataFactoryV2/Models/PSManagedIntegrationRuntime.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ public PSManagedIntegrationRuntime(
6262

6363
public string[] PublicIPs => ManagedIntegrationRuntime.ComputeProperties?.VNetProperties?.PublicIPs == null ? null : new List<string>(ManagedIntegrationRuntime.ComputeProperties?.VNetProperties?.PublicIPs).ToArray();
6464

65+
public int? DataFlowCoreCount => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties?.CoreCount;
66+
67+
public string DataFlowComputeType => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties?.ComputeType;
68+
69+
public int? DataFlowTimeToLive => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties?.TimeToLive;
70+
6571
public string State => ManagedIntegrationRuntime.State;
6672

6773
public string LicenseType => ManagedIntegrationRuntime.SsisProperties?.LicenseType;

src/DataFactory/DataFactoryV2/help/Set-AzDataFactoryV2IntegrationRuntime.md

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,26 @@ Updates an integration runtime.
1717
Set-AzDataFactoryV2IntegrationRuntime [-ResourceGroupName] <String> [-DataFactoryName] <String>
1818
[-Name] <String> [-Type <String>] [-Description <String>] [-Location <String>] [-NodeSize <String>]
1919
[-NodeCount <Int32>] [-CatalogServerEndpoint <String>] [-CatalogAdminCredential <PSCredential>]
20-
[-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>]
21-
[-PublicIPs <String[]>] [-SetupScriptContainerSasUri <String>]
22-
[-Edition <String>] [-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-AuthKey <SecureString>]
23-
[-DataProxyIntegrationRuntimeName <String>] [-DataProxyStagingLinkedServiceName <String>] [-DataProxyStagingPath <String>]
24-
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
25-
[-ExpressCustomSetup <ArrayList>]
20+
[-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>] [-PublicIPs <String[]>]
21+
[-DataFlowComputeType <String>] [-DataFlowCoreCount <Int32>] [-DataFlowTimeToLive <Int32>]
22+
[-SetupScriptContainerSasUri <String>] [-Edition <String>] [-ExpressCustomSetup <ArrayList>]
23+
[-DataProxyIntegrationRuntimeName <String>] [-DataProxyStagingLinkedServiceName <String>]
24+
[-DataProxyStagingPath <String>] [-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>]
25+
[-AuthKey <SecureString>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
26+
[<CommonParameters>]
2627
```
2728

2829
### ByResourceId
2930
```
3031
Set-AzDataFactoryV2IntegrationRuntime [-ResourceId] <String> [-Type <String>] [-Description <String>]
3132
[-Location <String>] [-NodeSize <String>] [-NodeCount <Int32>] [-CatalogServerEndpoint <String>]
32-
[-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>] [-PublicIPs <String[]>]
33-
[-SetupScriptContainerSasUri <String>] [-Edition <String>] [-MaxParallelExecutionsPerNode <Int32>]
34-
[-DataProxyIntegrationRuntimeName <String>] [-DataProxyStagingLinkedServiceName <String>] [-DataProxyStagingPath <String>]
35-
[-LicenseType <String>] [-AuthKey <SecureString>] [-Force] [-DefaultProfile <IAzureContextContainer>]
36-
[-WhatIf] [-Confirm] [<CommonParameters>] [-ExpressCustomSetup <ArrayList>]
33+
[-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>]
34+
[-PublicIPs <String[]>] [-DataFlowComputeType <String>] [-DataFlowCoreCount <Int32>]
35+
[-DataFlowTimeToLive <Int32>] [-SetupScriptContainerSasUri <String>] [-Edition <String>]
36+
[-ExpressCustomSetup <ArrayList>] [-DataProxyIntegrationRuntimeName <String>]
37+
[-DataProxyStagingLinkedServiceName <String>] [-DataProxyStagingPath <String>]
38+
[-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-AuthKey <SecureString>] [-Force]
39+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3740
```
3841

3942
### ByLinkedIntegrationRuntimeResourceId
@@ -55,12 +58,12 @@ Set-AzDataFactoryV2IntegrationRuntime [-ResourceGroupName] <String> [-DataFactor
5558
Set-AzDataFactoryV2IntegrationRuntime [-InputObject] <PSIntegrationRuntime> [-Type <String>]
5659
[-Description <String>] [-Location <String>] [-NodeSize <String>] [-NodeCount <Int32>]
5760
[-CatalogServerEndpoint <String>] [-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>]
58-
[-VNetId <String>] [-Subnet <String>] [-PublicIPs <String[]>]
59-
[-SetupScriptContainerSasUri <String>] [-Edition <String>]
60-
[-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-DataProxyIntegrationRuntimeName <String>]
61-
[-DataProxyStagingLinkedServiceName <String>] [-DataProxyStagingPath <String>] [-AuthKey <SecureString>] [-Force]
61+
[-VNetId <String>] [-Subnet <String>] [-PublicIPs <String[]>] [-DataFlowComputeType <String>]
62+
[-DataFlowCoreCount <Int32>] [-DataFlowTimeToLive <Int32>] [-SetupScriptContainerSasUri <String>]
63+
[-Edition <String>] [-ExpressCustomSetup <ArrayList>] [-DataProxyIntegrationRuntimeName <String>]
64+
[-DataProxyStagingLinkedServiceName <String>] [-DataProxyStagingPath <String>]
65+
[-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-AuthKey <SecureString>] [-Force]
6266
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
63-
[-ExpressCustomSetup <ArrayList>]
6467
```
6568

6669
### ByLinkedIntegrationRuntimeObject
@@ -217,6 +220,51 @@ Accept pipeline input: True (ByPropertyName)
217220
Accept wildcard characters: False
218221
```
219222
223+
### -DataFlowComputeType
224+
Compute type of the data flow cluster which will execute data flow job.
225+
226+
```yaml
227+
Type: System.String
228+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
229+
Aliases:
230+
231+
Required: False
232+
Position: Named
233+
Default value: None
234+
Accept pipeline input: False
235+
Accept wildcard characters: False
236+
```
237+
238+
### -DataFlowCoreCount
239+
Core count of the data flow cluster which will execute data flow job.
240+
241+
```yaml
242+
Type: System.Nullable`1[System.Int32]
243+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
244+
Aliases:
245+
246+
Required: False
247+
Position: Named
248+
Default value: None
249+
Accept pipeline input: False
250+
Accept wildcard characters: False
251+
```
252+
253+
### -DataFlowTimeToLive
254+
Time to live (in minutes) setting of the data flow cluster which will execute data flow job.
255+
256+
```yaml
257+
Type: System.Nullable`1[System.Int32]
258+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
259+
Aliases:
260+
261+
Required: False
262+
Position: Named
263+
Default value: None
264+
Accept pipeline input: False
265+
Accept wildcard characters: False
266+
```
267+
220268
### -DataProxyIntegrationRuntimeName
221269
The Self-Hosted Integration Runtime name which is used as a proxy
222270

0 commit comments

Comments
 (0)