Skip to content

Commit

Permalink
[DataFactory]Fixed Set-AzDataFactoryV2 -InputObject not correct with …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Jingshu923 authored Apr 26, 2022
1 parent 2f604ad commit 5b8b7c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/DataFactory/DataFactoryV2/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed Set-AzDataFactoryV2 -InputObject not correct with PublicNetworkAccess Parameter

## Version 1.16.6
* Updated ADF .Net SDK version to 6.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public override void ExecuteCmdlet()
factoryIdentityType = this.IdentityType;
}

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

EncryptionConfiguration encryption = null;
if(!string.IsNullOrWhiteSpace(this.EncryptionVaultBaseUrl) && !string.IsNullOrWhiteSpace(this.EncryptionKeyName))
if (!string.IsNullOrWhiteSpace(this.EncryptionVaultBaseUrl) && !string.IsNullOrWhiteSpace(this.EncryptionKeyName))
{
CMKIdentityDefinition cmkIdentity = null;
if (!string.IsNullOrWhiteSpace(this.EncryptionUserAssignedIdentity))
Expand Down Expand Up @@ -552,14 +552,15 @@ private void ValidateParameters()
this.ResourceGroupName = InputObject.ResourceGroupName;
this.Name = InputObject.DataFactoryName;
this.Location = this.Location ?? InputObject.Location;
this.PublicNetworkAccess = this.PublicNetworkAccess ?? InputObject.PublicNetworkAccess;
this.Tag = this.Tag ?? new Hashtable((IDictionary)InputObject.Tags);

if(InputObject.Identity != null)
if (InputObject.Identity != null)
{
this.IdentityType = InputObject.Identity.Type;
this.UserAssignedIdentity = InputObject.Identity.UserAssignedIdentities;
}
if(InputObject.Encryption != null)
if (InputObject.Encryption != null)
{
this.EncryptionVaultBaseUrl = InputObject.Encryption.VaultBaseUrl;
this.EncryptionKeyName = InputObject.Encryption.KeyName;
Expand Down Expand Up @@ -590,7 +591,7 @@ private void ValidateParameters()
}
}
}

this.GlobalParameterDefinition = InputObject.GlobalParameters;
}

Expand Down

0 comments on commit 5b8b7c6

Please sign in to comment.