Skip to content

Commit 5b8b7c6

Browse files
authored
[DataFactory]Fixed Set-AzDataFactoryV2 -InputObject not correct with PublicNetworkAccess Parameter (#17968)
* [DataFactory]Updated ADF .Net SDK version to 5.4.0 * [DataFactory]Updated ADF .Net SDK version to 6.0.0 * [DataFactory]Fixed Set-AzDataFactoryV2 -InputObject not correct with PublicNetworkAccess Parameter
1 parent 2f604ad commit 5b8b7c6

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-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+
* Fixed Set-AzDataFactoryV2 -InputObject not correct with PublicNetworkAccess Parameter
2122

2223
## Version 1.16.6
2324
* Updated ADF .Net SDK version to 6.0.0

src/DataFactory/DataFactoryV2/DataFactories/SetAzureDataFactoryCommand.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ public override void ExecuteCmdlet()
501501
factoryIdentityType = this.IdentityType;
502502
}
503503

504-
if(this.UserAssignedIdentity != null && this.UserAssignedIdentity.Count > 0)
504+
if (this.UserAssignedIdentity != null && this.UserAssignedIdentity.Count > 0)
505505
{
506506
if (!factoryIdentityType.ToLower().Contains(FactoryIdentityType.UserAssigned.ToLower()))
507507
{
@@ -511,7 +511,7 @@ public override void ExecuteCmdlet()
511511
FactoryIdentity factoryIdentity = new FactoryIdentity(factoryIdentityType, userAssignedIdentities: this.UserAssignedIdentity);
512512

513513
EncryptionConfiguration encryption = null;
514-
if(!string.IsNullOrWhiteSpace(this.EncryptionVaultBaseUrl) && !string.IsNullOrWhiteSpace(this.EncryptionKeyName))
514+
if (!string.IsNullOrWhiteSpace(this.EncryptionVaultBaseUrl) && !string.IsNullOrWhiteSpace(this.EncryptionKeyName))
515515
{
516516
CMKIdentityDefinition cmkIdentity = null;
517517
if (!string.IsNullOrWhiteSpace(this.EncryptionUserAssignedIdentity))
@@ -552,14 +552,15 @@ private void ValidateParameters()
552552
this.ResourceGroupName = InputObject.ResourceGroupName;
553553
this.Name = InputObject.DataFactoryName;
554554
this.Location = this.Location ?? InputObject.Location;
555+
this.PublicNetworkAccess = this.PublicNetworkAccess ?? InputObject.PublicNetworkAccess;
555556
this.Tag = this.Tag ?? new Hashtable((IDictionary)InputObject.Tags);
556557

557-
if(InputObject.Identity != null)
558+
if (InputObject.Identity != null)
558559
{
559560
this.IdentityType = InputObject.Identity.Type;
560561
this.UserAssignedIdentity = InputObject.Identity.UserAssignedIdentities;
561562
}
562-
if(InputObject.Encryption != null)
563+
if (InputObject.Encryption != null)
563564
{
564565
this.EncryptionVaultBaseUrl = InputObject.Encryption.VaultBaseUrl;
565566
this.EncryptionKeyName = InputObject.Encryption.KeyName;
@@ -590,7 +591,7 @@ private void ValidateParameters()
590591
}
591592
}
592593
}
593-
594+
594595
this.GlobalParameterDefinition = InputObject.GlobalParameters;
595596
}
596597

0 commit comments

Comments
 (0)