Skip to content

[DataFactory]Fixed Set-AzDataFactoryV2 -InputObject not correct with PublicNetworkAccess Parameter #17968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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