Skip to content

Commit 8289620

Browse files
[DataFacotry]Added support copyComputeScale And pipelineExternalComputeScale in Set-AzDataFactoryV2IntegrationRuntime Command (#23321)
* [DataFacotry]Added support copyComputeScale And pipelineExternalComputeScale in Set-AzDataFactoryV2IntegrationRuntime Command * fix * change * fix * Update ChangeLog.md --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent 8226ac0 commit 8289620

File tree

6 files changed

+242
-5
lines changed

6 files changed

+242
-5
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+
* Added support copyComputeScale And pipelineExternalComputeScale in `Set-AzDataFactoryV2IntegrationRuntime` Command
2122
* Added ParquetReadSettings in ADF
2223
* Fixed minor issues
2324

src/DataFactory/DataFactoryV2/Constants.cs

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

157157
public const string HelpIntegrationRuntimeDataFlowTimeToLive = "Time to live (in minutes) setting of the data flow cluster which will execute data flow job.";
158158

159+
public const string HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit = "DIU number setting reserved for copy activity execution.";
160+
161+
public const string HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive = "Time to live (in minutes) setting of integration runtime which will execute copy activity.";
162+
163+
public const string HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive = "Time to live (in minutes) setting of integration runtime which will execute pipeline and external activity.";
164+
165+
public const string HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes = "Number of the pipeline nodes, which should be greater than 0 and less than 11.";
166+
167+
public const string HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes = "Number of the the external nodes, which should be greater than 0 and less than 11.";
168+
169+
public const string HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled = "An alternative option to ensure interactive authoring function when your self-hosted integration runtime is unable to establish a connection with Azure Relay.";
170+
159171
public const string HelpIntegrationRuntimeSetupScriptContainerSasUri = "The SAS URI of the Azure blob container that contains the custom setup script.";
160172

161173
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: 127 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace Microsoft.Azure.Commands.DataFactoryV2
2828
{
29-
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "DataFactoryV2IntegrationRuntime",DefaultParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,SupportsShouldProcess = true),OutputType(typeof(PSIntegrationRuntime))]
29+
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "DataFactoryV2IntegrationRuntime", DefaultParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, SupportsShouldProcess = true), OutputType(typeof(PSIntegrationRuntime))]
3030
public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCmdlet
3131
{
3232
[Parameter(
@@ -286,8 +286,8 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm
286286
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
287287
Mandatory = false,
288288
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowComputeType)]
289-
[PSArgumentCompleter(Management.DataFactory.Models.DataFlowComputeType.General,
290-
Management.DataFactory.Models.DataFlowComputeType.MemoryOptimized,
289+
[PSArgumentCompleter(Management.DataFactory.Models.DataFlowComputeType.General,
290+
Management.DataFactory.Models.DataFlowComputeType.MemoryOptimized,
291291
Management.DataFactory.Models.DataFlowComputeType.ComputeOptimized)]
292292
[ValidateNotNullOrEmpty]
293293
public string DataFlowComputeType { get; set; }
@@ -334,6 +334,90 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm
334334
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowTimeToLive)]
335335
public int? DataFlowTimeToLive { get; set; }
336336

337+
[Parameter(
338+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
339+
Mandatory = false,
340+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit)]
341+
[Parameter(
342+
ParameterSetName = ParameterSetNames.ByResourceId,
343+
Mandatory = false,
344+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit)]
345+
[Parameter(
346+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
347+
Mandatory = false,
348+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit)]
349+
public int? ManagedVNetCopyComputeScaleDataIntegrationUnit { get; set; }
350+
351+
[Parameter(
352+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
353+
Mandatory = false,
354+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive)]
355+
[Parameter(
356+
ParameterSetName = ParameterSetNames.ByResourceId,
357+
Mandatory = false,
358+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive)]
359+
[Parameter(
360+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
361+
Mandatory = false,
362+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive)]
363+
public int? ManagedVNetCopyComputeScaleTimeToLive { get; set; }
364+
365+
[Parameter(
366+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
367+
Mandatory = false,
368+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive)]
369+
[Parameter(
370+
ParameterSetName = ParameterSetNames.ByResourceId,
371+
Mandatory = false,
372+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive)]
373+
[Parameter(
374+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
375+
Mandatory = false,
376+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive)]
377+
public int? ManagedVNetPipelineExternalComputeScaleTimeToLive { get; set; }
378+
379+
[Parameter(
380+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
381+
Mandatory = false,
382+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes)]
383+
[Parameter(
384+
ParameterSetName = ParameterSetNames.ByResourceId,
385+
Mandatory = false,
386+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes)]
387+
[Parameter(
388+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
389+
Mandatory = false,
390+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes)]
391+
public int? ManagedVNetNumberOfPipelineNodeCount { get; set; }
392+
393+
[Parameter(
394+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
395+
Mandatory = false,
396+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes)]
397+
[Parameter(
398+
ParameterSetName = ParameterSetNames.ByResourceId,
399+
Mandatory = false,
400+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes)]
401+
[Parameter(
402+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
403+
Mandatory = false,
404+
HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes)]
405+
public int? ManagedVNetNumberOfExternalNodeCount { get; set; }
406+
407+
[Parameter(
408+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
409+
Mandatory = false,
410+
HelpMessage = Constants.HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled)]
411+
[Parameter(
412+
ParameterSetName = ParameterSetNames.ByResourceId,
413+
Mandatory = false,
414+
HelpMessage = Constants.HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled)]
415+
[Parameter(
416+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
417+
Mandatory = false,
418+
HelpMessage = Constants.HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled)]
419+
public SwitchParameter SelfContainedInteractiveAuthoringEnabled { get; set; }
420+
337421
[Parameter(
338422
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
339423
Mandatory = false,
@@ -613,7 +697,10 @@ public override void ExecuteCmdlet()
613697
var authKey = ConvertToUnsecureString(AuthKey);
614698
selfHosted.LinkedInfo = new LinkedIntegrationRuntimeKeyAuthorization(new SecureString(authKey));
615699
}
616-
700+
if (SelfContainedInteractiveAuthoringEnabled.IsPresent)
701+
{
702+
selfHosted.SelfContainedInteractiveAuthoringEnabled = true;
703+
}
617704
resource.Properties = selfHosted;
618705
}
619706
}
@@ -629,6 +716,10 @@ public override void ExecuteCmdlet()
629716
if (selfHostedIr != null)
630717
{
631718
selfHostedIr.LinkedInfo = new LinkedIntegrationRuntimeRbacAuthorization(SharedIntegrationRuntimeResourceId);
719+
if (SelfContainedInteractiveAuthoringEnabled.IsPresent)
720+
{
721+
selfHostedIr.SelfContainedInteractiveAuthoringEnabled = true;
722+
}
632723
}
633724
else
634725
{
@@ -790,7 +881,7 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati
790881
if (DataFlowEnableQuickReuse.IsPresent)
791882
{
792883
integrationRuntime.ComputeProperties.DataFlowProperties.Cleanup = false;
793-
}
884+
}
794885
else
795886
{
796887
// setting it as null as the default value for the cleanup variable is false, and the backend endpoint treats null value as true.
@@ -799,6 +890,37 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati
799890

800891
}
801892

893+
if (ManagedVNetCopyComputeScaleDataIntegrationUnit != null || ManagedVNetCopyComputeScaleTimeToLive != null)
894+
{
895+
if (integrationRuntime.ComputeProperties == null)
896+
{
897+
integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties();
898+
}
899+
if (integrationRuntime.ComputeProperties.CopyComputeScaleProperties == null)
900+
{
901+
integrationRuntime.ComputeProperties.CopyComputeScaleProperties = new CopyComputeScaleProperties();
902+
}
903+
904+
integrationRuntime.ComputeProperties.CopyComputeScaleProperties.DataIntegrationUnit = ManagedVNetCopyComputeScaleDataIntegrationUnit ?? integrationRuntime.ComputeProperties.CopyComputeScaleProperties.DataIntegrationUnit;
905+
integrationRuntime.ComputeProperties.CopyComputeScaleProperties.TimeToLive = ManagedVNetCopyComputeScaleTimeToLive ?? integrationRuntime.ComputeProperties.CopyComputeScaleProperties.TimeToLive;
906+
}
907+
908+
if (ManagedVNetPipelineExternalComputeScaleTimeToLive != null || ManagedVNetNumberOfPipelineNodeCount != null || ManagedVNetNumberOfExternalNodeCount != null)
909+
{
910+
if (integrationRuntime.ComputeProperties == null)
911+
{
912+
integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties();
913+
}
914+
if (integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties == null)
915+
{
916+
integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties = new PipelineExternalComputeScaleProperties();
917+
}
918+
919+
integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.TimeToLive = ManagedVNetPipelineExternalComputeScaleTimeToLive ?? integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.TimeToLive;
920+
integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfPipelineNodes = ManagedVNetNumberOfPipelineNodeCount ?? integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfPipelineNodes;
921+
integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfExternalNodes = ManagedVNetNumberOfExternalNodeCount ?? integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfExternalNodes;
922+
}
923+
802924
if (PublicIPs != null)
803925
{
804926
if (string.IsNullOrWhiteSpace(VNetId) && string.IsNullOrWhiteSpace(SubnetId))

src/DataFactory/DataFactoryV2/Models/PSManagedIntegrationRuntime.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ public PSManagedIntegrationRuntime(
7474

7575
public bool? DataFlowEnableCleanUp => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties.Cleanup;
7676

77+
public int? CopyComputeScaleDataIntegrationUnit => ManagedIntegrationRuntime.ComputeProperties?.CopyComputeScaleProperties?.DataIntegrationUnit;
78+
79+
public int? CopyComputeScaleTimeToLive => ManagedIntegrationRuntime.ComputeProperties?.CopyComputeScaleProperties?.TimeToLive;
80+
81+
public int? PipelineExternalComputeScaleTimeToLive => ManagedIntegrationRuntime.ComputeProperties?.PipelineExternalComputeScaleProperties?.TimeToLive;
82+
83+
public int? PipelineExternalComputeScaleNumberOfPipelineNodes => ManagedIntegrationRuntime.ComputeProperties?.PipelineExternalComputeScaleProperties?.NumberOfPipelineNodes;
84+
85+
public int? PipelineExternalComputeScaleNumberOfExternalNodes => ManagedIntegrationRuntime.ComputeProperties?.PipelineExternalComputeScaleProperties?.NumberOfExternalNodes;
86+
7787
public string State => ManagedIntegrationRuntime.State;
7888

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

src/DataFactory/DataFactoryV2/Models/PSSelfHostedIntegrationRuntime.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public PSSelfHostedIntegrationRuntime(
3636
}
3737
}
3838

39+
public bool? SelfContainedInteractiveAuthoringEnabled => SelfHostedIntegrationRuntime.SelfContainedInteractiveAuthoringEnabled;
40+
3941
protected SelfHostedIntegrationRuntime SelfHostedIntegrationRuntime => IntegrationRuntime.Properties as SelfHostedIntegrationRuntime;
4042
}
4143
}

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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,96 @@ Accept pipeline input: False
289289
Accept wildcard characters: False
290290
```
291291
292+
### -ManagedVNetCopyComputeScaleDataIntegrationUnit
293+
DIU number setting reserved for copy activity execution.
294+
295+
```yaml
296+
Type: System.Nullable`1[System.Int32]
297+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
298+
Aliases:
299+
300+
Required: False
301+
Position: Named
302+
Default value: None
303+
Accept pipeline input: False
304+
Accept wildcard characters: False
305+
```
306+
307+
### -ManagedVNetCopyComputeScaleTimeToLive
308+
Time to live (in minutes) setting of integration runtime which will execute copy activity.
309+
310+
```yaml
311+
Type: System.Nullable`1[System.Int32]
312+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
313+
Aliases:
314+
315+
Required: False
316+
Position: Named
317+
Default value: None
318+
Accept pipeline input: False
319+
Accept wildcard characters: False
320+
```
321+
322+
### -ManagedVNetPipelineExternalComputeScaleTimeToLive
323+
Time to live (in minutes) setting of integration runtime which will execute pipeline and external activity.
324+
325+
```yaml
326+
Type: System.Nullable`1[System.Int32]
327+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
328+
Aliases:
329+
330+
Required: False
331+
Position: Named
332+
Default value: None
333+
Accept pipeline input: False
334+
Accept wildcard characters: False
335+
```
336+
337+
### -ManagedVNetNumberOfPipelineNodeCount
338+
Number of the pipeline nodes, which should be greater than 0 and less than 11.
339+
340+
```yaml
341+
Type: System.Nullable`1[System.Int32]
342+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
343+
Aliases:
344+
345+
Required: False
346+
Position: Named
347+
Default value: None
348+
Accept pipeline input: False
349+
Accept wildcard characters: False
350+
```
351+
352+
### -ManagedVNetNumberOfExternalNodeCount
353+
Number of the the external nodes, which should be greater than 0 and less than 11.
354+
355+
```yaml
356+
Type: System.Nullable`1[System.Int32]
357+
Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject
358+
Aliases:
359+
360+
Required: False
361+
Position: Named
362+
Default value: None
363+
Accept pipeline input: False
364+
Accept wildcard characters: False
365+
```
366+
367+
### -SelfContainedInteractiveAuthoringEnabled
368+
An alternative option to ensure interactive authoring function when your self-hosted integration runtime is unable to establish a connection with Azure Relay.
369+
370+
```yaml
371+
Type: System.Management.Automation.SwitchParameter
372+
Parameter Sets: (All)
373+
Aliases:
374+
375+
Required: False
376+
Position: Named
377+
Default value: None
378+
Accept pipeline input: False
379+
Accept wildcard characters: False
380+
```
381+
292382
### -DataProxyIntegrationRuntimeName
293383
The Self-Hosted Integration Runtime name which is used as a proxy
294384

0 commit comments

Comments
 (0)