Skip to content

Commit 728aaab

Browse files
MikhailTryakhovdagoroztoki95jtoromanhaagha
authored
Fix network june (#12868)
* updated sdk version * Add null check in ConditionVersion of Set-AzRoleAssignmenr (#12829) * add missing null check * update docs * Remove old TODO * Added operation parameters and operation steps in MI operations PS cmdlet (#12437) * Added operation parameters and operation steps in `Get-AzSqlInstanceOperation` * Starting validation. * Fixing build Co-authored-by: Jovana Toroman <[email protected]> * Adding patchStatus property to VM Instance View (#12777) * updated .net to 38.1 and added patchstatus property * Adding tests and upgrading sdk version for dependent projects * Update PSVirtualMachineInstanceView.cs Adding comma * Corrected parameter field name in the example (#12825) Changed 'Name' to 'StorageSyncServiceName' field in the example. 'Name' is not a valid parameter. * Update spelling of Proeprty to Property (#12821) Co-authored-by: Joshua Van Daalen <[email protected]> * [SQL] Fix\add AzSqlServerActiveDirectoryOnlyAuthentication APIs (#12782) * * Fix `Disable-AzSqlServerActiveDirectoryOnlyAuthentication` * Added cmdlet `Get-AzSqlServerActiveDirectoryOnlyAuthentication` * Added cmdlet `Enable-AzSqlServerActiveDirectoryOnlyAuthentication` * Revert changes in authentication * Fix files in Accounts * Update Resources.Designer.cs * Add help files * Adding breaking change to Exceptions/Az.Sql/BreakingChangeIssues.csv * Removing empty lines Co-authored-by: Amol Agarwal <[email protected]> Co-authored-by: Milan Brkic <[email protected]> * [RecoveryServices.backup] changing number of VMs from 100 to 1000 (#12816) * changing number of VMs from 100 to 1000 * adding description inside changelog.md * [KeyVault] Refactor tests (#12797) * don't use mgmt clients * remove unused code * remove useless comments * Add parameter EnableRbcAuthorization for 'New-AzKeyVault' and 'Update-AzKeyVault' (#12459) * Add parameter EnableRbcAuthorization for 'New-AzKeyVault' and 'Update-AzKeyVault'. * Update src/KeyVault/KeyVault/ChangeLog.md Co-authored-by: Yeming Liu <[email protected]> * Update src/KeyVault/KeyVault/KeyVault.format.ps1xml Co-authored-by: Yeming Liu <[email protected]> * Simplify codes in VaultManagementClient.cs. Co-authored-by: Yeming Liu <[email protected]> * Disk Access changes (#12673) * baseline work * New-AzDiskAccess Remove-AzDiskAccess * New cmdlets * New disk config (#12665) * Checking in changes * checking in changes * new cmdlets * help docs * help docs * fix errors * update help * Checking in SnapshotConfigTests * remove Online: lines from help doc * remove online line * Disk access (#12713) * comments remain, committing so others can see content. * New-AzDiskEncryptionSetConfig dev and testing * New-AzDiskEncryptionSetConfig changelog and help doc Co-authored-by: Adam Sandor <[email protected]> * clean up test * changelog.md * adding parameters to New-AzDiskUpdateConfig * Improving default testing of New-AzDiskEncryptionSetConfig EncryptionType param (#12759) * Improving default testing * update recorded test file * correcting incorrect copy and paste to Test-DiskAccessObject test * Addressing review comments * Update ChangeLog.md * Update New-AzDiskEncryptionSetConfig.md * add argument completer Co-authored-by: Theodore Chang <[email protected]> Co-authored-by: Adam Sandor <[email protected]> Co-authored-by: Jin Lei <[email protected]> * Skip network api version check (#12854) Co-authored-by: Zhenyu Zhou <[email protected]> * [Synapse] Add dataset and data flow management cmdlets and update some reference package version (#12831) * add support for dataset * add support for dataflow * add help docs * rebase master * update help docs * add dataset subclass * update help doc * update help docs * update SDK version * remove blank line Co-authored-by: Wan Yang <[email protected]> * RecoveryServices oob release (#12845) Co-authored-by: Daniel Orozco <[email protected]> Co-authored-by: toki95 <[email protected]> Co-authored-by: Jovana Toroman <[email protected]> Co-authored-by: haagha <[email protected]> Co-authored-by: Eragon Riddle <[email protected]> Co-authored-by: Joshua Van Daalen <[email protected]> Co-authored-by: Joshua Van Daalen <[email protected]> Co-authored-by: Amol Agarwal <[email protected]> Co-authored-by: Amol Agarwal <[email protected]> Co-authored-by: Milan Brkic <[email protected]> Co-authored-by: Himanshu Agarwal <[email protected]> Co-authored-by: Yeming Liu <[email protected]> Co-authored-by: Beisi Zhou <[email protected]> Co-authored-by: Yeming Liu <[email protected]> Co-authored-by: Theodore Chang <[email protected]> Co-authored-by: Adam Sandor <[email protected]> Co-authored-by: Jin Lei <[email protected]> Co-authored-by: aim-for-better <[email protected]> Co-authored-by: Zhenyu Zhou <[email protected]> Co-authored-by: wonner <[email protected]> Co-authored-by: Wan Yang <[email protected]> Co-authored-by: Dingmeng Xue <[email protected]>
1 parent 2559453 commit 728aaab

File tree

126 files changed

+9369
-877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+9369
-877
lines changed

src/RecoveryServices/RecoveryServices.Backup.Helpers/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343
// [assembly: AssemblyVersion("1.0.0")]
44-
[assembly: AssemblyVersion("2.11.1")]
45-
[assembly: AssemblyFileVersion("2.11.1")]
44+
[assembly: AssemblyVersion("2.12.0")]
45+
[assembly: AssemblyFileVersion("2.12.0")]

src/RecoveryServices/RecoveryServices.Backup.Logger/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343
// [assembly: AssemblyVersion("1.0.0")]
44-
[assembly: AssemblyVersion("2.11.1")]
45-
[assembly: AssemblyFileVersion("2.11.1")]
44+
[assembly: AssemblyVersion("2.12.0")]
45+
[assembly: AssemblyFileVersion("2.12.0")]

src/RecoveryServices/RecoveryServices.Backup.Models/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343
// [assembly: AssemblyVersion("1.0.0")]
44-
[assembly: AssemblyVersion("2.11.1")]
45-
[assembly: AssemblyFileVersion("2.11.1")]
44+
[assembly: AssemblyVersion("2.12.0")]
45+
[assembly: AssemblyFileVersion("2.12.0")]

src/RecoveryServices/RecoveryServices.Backup.Providers/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343
// [assembly: AssemblyVersion("1.0.0")]
44-
[assembly: AssemblyVersion("2.11.1")]
45-
[assembly: AssemblyFileVersion("2.11.1")]
44+
[assembly: AssemblyVersion("2.12.0")]
45+
[assembly: AssemblyFileVersion("2.12.0")]

src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343
// [assembly: AssemblyVersion("1.0.0")]
44-
[assembly: AssemblyVersion("2.11.1")]
45-
[assembly: AssemblyFileVersion("2.11.1")]
44+
[assembly: AssemblyVersion("2.12.0")]
45+
[assembly: AssemblyFileVersion("2.12.0")]

src/RecoveryServices/RecoveryServices.Backup/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343
// [assembly: AssemblyVersion("1.0.0")]
44-
[assembly: AssemblyVersion("2.11.1")]
45-
[assembly: AssemblyFileVersion("2.11.1")]
44+
[assembly: AssemblyVersion("2.12.0")]
45+
[assembly: AssemblyFileVersion("2.12.0")]

src/RecoveryServices/RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
// You can specify all the values or you can default the Build and Revision Numbers
4343
// by using the '*' as shown below:
4444

45-
[assembly: AssemblyVersion("2.11.1")]
46-
[assembly: AssemblyFileVersion("2.11.1")]
45+
[assembly: AssemblyVersion("2.12.0")]
46+
[assembly: AssemblyFileVersion("2.12.0")]

src/RecoveryServices/RecoveryServices/Az.RecoveryServices.psd1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 7/30/2020
6+
# Generated on: 9/3/2020
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '2.11.1'
15+
ModuleVersion = '2.12.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -190,7 +190,7 @@ CmdletsToExport = 'Get-AzRecoveryServicesBackupProperty',
190190
'Get-AzRecoveryServicesBackupStatus',
191191
'Undo-AzRecoveryServicesBackupItemDeletion',
192192
'Set-AzRecoveryServicesVaultProperty',
193-
'Get-AzRecoveryServicesVaultProperty',
193+
'Get-AzRecoveryServicesVaultProperty',
194194
'Copy-AzRecoveryServicesVault'
195195

196196
# Variables to export from this module
@@ -267,7 +267,8 @@ PrivateData = @{
267267
# IconUri = ''
268268

269269
# ReleaseNotes of this module
270-
ReleaseNotes = '* Improved the Azure Backup container/item discovery experience.'
270+
ReleaseNotes = '* Azure Backup added a new cmdlet Copy-AzRecoveryServicesVault for DS move feature.
271+
* Get-AzRecoveryServicesBackupJob cmdlet now supports operation type ''BackupDataMove''.'
271272

272273
# Prerelease string of this module
273274
# Prerelease = ''

src/RecoveryServices/RecoveryServices/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
22+
## Version 2.12.0
2123
* Azure Backup added a new cmdlet Copy-AzRecoveryServicesVault for DS move feature.
2224
* Get-AzRecoveryServicesBackupJob cmdlet now supports operation type 'BackupDataMove'.
2325
* Modifying the configure backup per policy limit for VMs from 100 to 1000.

src/RecoveryServices/RecoveryServices/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
// You can specify all the values or you can default the Build and Revision Numbers
4343
// by using the '*' as shown below:
4444

45-
[assembly: AssemblyVersion("2.11.1")]
46-
[assembly: AssemblyFileVersion("2.11.1")]
45+
[assembly: AssemblyVersion("2.12.0")]
46+
[assembly: AssemblyFileVersion("2.12.0")]

src/Synapse/Synapse/Az.Synapse.psd1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,19 @@ CmdletsToExport = 'Get-AzSynapseSparkJob', 'Stop-AzSynapseSparkJob',
118118
'Set-AzSynapseTrigger', 'Get-AzSynapseTrigger', 'Remove-AzSynapseTrigger',
119119
'Get-AzSynapseTriggerSubscriptionStatus', 'Add-AzSynapseTriggerSubscription',
120120
'Remove-AzSynapseTriggerSubscription', 'Start-AzSynapseTrigger',
121-
'Stop-AzSynapseTrigger', 'Get-AzSynapseTriggerRun'
121+
'Stop-AzSynapseTrigger', 'Get-AzSynapseTriggerRun',
122+
'Set-AzSynapseDataset', 'Get-AzSynapseDataset',
123+
'Remove-AzSynapseDataset', 'Set-AzSynapseDataFlow',
124+
'Get-AzSynapseDataFlow', 'Remove-AzSynapseDataFlow'
122125

123126
# Variables to export from this module
124127
# VariablesToExport = @()
125128

126129
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
127130
AliasesToExport = 'New-AzSynapsePipeline', 'New-AzSynapseLinkedService',
128131
'New-AzSynapseNotebook', 'Import-AzSynapseNotebook',
129-
'New-AzSynapseTrigger'
132+
'New-AzSynapseTrigger', 'New-AzSynapseDataset',
133+
'New-AzSynapseDataFlow'
130134

131135
# DSC resources to export from this module
132136
# DscResourcesToExport = @()

src/Synapse/Synapse/ChangeLog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@
5050
- Add `Start-AzSynapseTrigger` cmdlet
5151
- Add `Stop-AzSynapseTrigger` cmdlet
5252
- Add `Get-AzSynapseTriggerRun` cmdlet
53+
* Added support for operation of Synapse DataFlow
54+
- Add `Get-AzSynapseDataFlow` cmdlet
55+
- Add `Remove-AzSynapseDataFlow` cmdlet
56+
- Add `Set-AzSynapseDataFlow` cmdlet
57+
- Add `New-AzSynapseDataFlow` cmdlet
58+
* Added support for operation of Synapse Dataset
59+
- Add `Get-AzSynapseDataset` cmdlet
60+
- Add `Remove-AzSynapseDataset` cmdlet
61+
- Add `Set-AzSynapseDataset` cmdlet
62+
- Add `New-AzSynapseDataset` cmdlet
5363

5464
## Version 0.2.0
5565

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2+
using Microsoft.Azure.Commands.Synapse.Common;
3+
using Microsoft.Azure.Commands.Synapse.Models;
4+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
5+
using System.Linq;
6+
using System.Management.Automation;
7+
8+
namespace Microsoft.Azure.Commands.Synapse
9+
{
10+
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.DataFlow,
11+
DefaultParameterSetName = GetByName)]
12+
[OutputType(typeof(PSDataFlowResource))]
13+
public class GetAzureSynapseDataFlow : SynapseArtifactsCmdletBase
14+
{
15+
private const string GetByName = "GetByName";
16+
private const string GetByObject = "GetByObject";
17+
18+
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByName,
19+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)]
20+
[ResourceNameCompleter(ResourceTypes.Workspace, "ResourceGroupName")]
21+
[ValidateNotNullOrEmpty]
22+
public override string WorkspaceName { get; set; }
23+
24+
[Parameter(ValueFromPipeline = true, ParameterSetName = GetByObject,
25+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)]
26+
[ValidateNotNull]
27+
public PSSynapseWorkspace WorkspaceObject { get; set; }
28+
29+
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false, HelpMessage = HelpMessages.DataFlowName)]
30+
[ValidateNotNullOrEmpty]
31+
[Alias("DataFlowName")]
32+
public string Name { get; set; }
33+
34+
public override void ExecuteCmdlet()
35+
{
36+
if (this.IsParameterBound(c => c.WorkspaceObject))
37+
{
38+
this.WorkspaceName = this.WorkspaceObject.Name;
39+
}
40+
41+
if (this.IsParameterBound(c => c.Name))
42+
{
43+
WriteObject(new PSDataFlowResource(SynapseAnalyticsClient.GetDataFlow(this.Name), this.WorkspaceName));
44+
}
45+
else
46+
{
47+
var datasets = SynapseAnalyticsClient.GetDataFlowsByWorkspace()
48+
.Select(element => new PSDataFlowResource(element, this.WorkspaceName));
49+
WriteObject(datasets, true);
50+
}
51+
}
52+
}
53+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2+
using Microsoft.Azure.Commands.Synapse.Common;
3+
using Microsoft.Azure.Commands.Synapse.Models;
4+
using Microsoft.Azure.Commands.Synapse.Properties;
5+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
6+
using System;
7+
using System.Management.Automation;
8+
9+
namespace Microsoft.Azure.Commands.Synapse
10+
{
11+
[Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.DataFlow,
12+
DefaultParameterSetName = RemoveByName, SupportsShouldProcess = true)]
13+
[OutputType(typeof(bool))]
14+
public class RemoveAzureSynapseDataFlow : SynapseArtifactsCmdletBase
15+
{
16+
private const string RemoveByName = "RemoveByName";
17+
private const string RemoveByObject = "RemoveByObject";
18+
private const string RemoveByInputObject = "RemoveByInputObject";
19+
20+
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByName,
21+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)]
22+
[ResourceNameCompleter(ResourceTypes.Workspace, "ResourceGroupName")]
23+
[ValidateNotNullOrEmpty]
24+
public override string WorkspaceName { get; set; }
25+
26+
[Parameter(ValueFromPipeline = true, ParameterSetName = RemoveByObject,
27+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)]
28+
[ValidateNotNull]
29+
public PSSynapseWorkspace WorkspaceObject { get; set; }
30+
31+
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByName,
32+
Mandatory = true, HelpMessage = HelpMessages.DataFlowName)]
33+
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByObject,
34+
Mandatory = true, HelpMessage = HelpMessages.DataFlowName)]
35+
[ValidateNotNullOrEmpty]
36+
[Alias("DataFlowName")]
37+
public string Name { get; set; }
38+
39+
[Parameter(ValueFromPipeline = true, ParameterSetName = RemoveByInputObject,
40+
Mandatory = true, HelpMessage = HelpMessages.DataFlowObject)]
41+
[ValidateNotNull]
42+
public PSDataFlowResource InputObject { get; set; }
43+
44+
[Parameter(Mandatory = false, HelpMessage = HelpMessages.PassThru)]
45+
public SwitchParameter PassThru { get; set; }
46+
47+
[Parameter(Mandatory = false, HelpMessage = HelpMessages.AsJob)]
48+
public SwitchParameter AsJob { get; set; }
49+
50+
public override void ExecuteCmdlet()
51+
{
52+
if (this.IsParameterBound(c => c.WorkspaceObject))
53+
{
54+
this.WorkspaceName = this.WorkspaceObject.Name;
55+
}
56+
57+
if (this.IsParameterBound(c => c.InputObject))
58+
{
59+
this.WorkspaceName = this.InputObject.WorkspaceName;
60+
this.Name = this.InputObject.Name;
61+
}
62+
63+
if (this.ShouldProcess(this.WorkspaceName, String.Format(Resources.RemovingSynapseDataFlow, this.Name, this.WorkspaceName)))
64+
{
65+
SynapseAnalyticsClient.DeleteDataFlow(this.Name);
66+
if (PassThru)
67+
{
68+
WriteObject(true);
69+
}
70+
}
71+
}
72+
}
73+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2+
using Microsoft.Azure.Commands.Synapse.Common;
3+
using Microsoft.Azure.Commands.Synapse.Models;
4+
using Microsoft.Azure.Commands.Synapse.Properties;
5+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
6+
using System;
7+
using System.Management.Automation;
8+
9+
namespace Microsoft.Azure.Commands.Synapse
10+
{
11+
[Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.DataFlow,
12+
DefaultParameterSetName = SetByName, SupportsShouldProcess = true)]
13+
[Alias("New-" + ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.DataFlow)]
14+
[OutputType(typeof(PSDataFlowResource))]
15+
public class SetAzureSynapseDataFlow : SynapseArtifactsCmdletBase
16+
{
17+
private const string SetByName = "SetByName";
18+
private const string SetByObject = "SetByObject";
19+
20+
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByName,
21+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)]
22+
[ResourceNameCompleter(ResourceTypes.Workspace, "ResourceGroupName")]
23+
[ValidateNotNullOrEmpty]
24+
public override string WorkspaceName { get; set; }
25+
26+
[Parameter(ValueFromPipeline = true, ParameterSetName = SetByObject,
27+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)]
28+
[ValidateNotNull]
29+
public PSSynapseWorkspace WorkspaceObject { get; set; }
30+
31+
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = true, HelpMessage = HelpMessages.DataFlowName)]
32+
[ValidateNotNullOrEmpty]
33+
[Alias("DataFlowName")]
34+
public string Name { get; set; }
35+
36+
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = true, HelpMessage = HelpMessages.JsonFilePath)]
37+
[ValidateNotNullOrEmpty]
38+
[Alias("File")]
39+
public string DefinitionFile { get; set; }
40+
41+
[Parameter(Mandatory = false, HelpMessage = HelpMessages.AsJob)]
42+
public SwitchParameter AsJob { get; set; }
43+
44+
public override void ExecuteCmdlet()
45+
{
46+
if (this.IsParameterBound(c => c.WorkspaceObject))
47+
{
48+
this.WorkspaceName = this.WorkspaceObject.Name;
49+
}
50+
51+
if (this.ShouldProcess(this.WorkspaceName, String.Format(Resources.SettingSynapseDataFlow, this.Name, this.WorkspaceName)))
52+
{
53+
string rawJsonContent = SynapseAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(DefinitionFile));
54+
WriteObject(new PSDataFlowResource(SynapseAnalyticsClient.CreateOrUpdateDataFlow(this.Name, rawJsonContent), this.WorkspaceName));
55+
}
56+
}
57+
}
58+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2+
using Microsoft.Azure.Commands.Synapse.Common;
3+
using Microsoft.Azure.Commands.Synapse.Models;
4+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
5+
using System.Linq;
6+
using System.Management.Automation;
7+
8+
namespace Microsoft.Azure.Commands.Synapse
9+
{
10+
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.Dataset,
11+
DefaultParameterSetName = GetByName)]
12+
[OutputType(typeof(PSDatasetResource))]
13+
public class GetAzureSynapseDataset : SynapseArtifactsCmdletBase
14+
{
15+
private const string GetByName = "GetByName";
16+
private const string GetByObject = "GetByObject";
17+
18+
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByName,
19+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)]
20+
[ResourceNameCompleter(ResourceTypes.Workspace, "ResourceGroupName")]
21+
[ValidateNotNullOrEmpty]
22+
public override string WorkspaceName { get; set; }
23+
24+
[Parameter(ValueFromPipeline = true, ParameterSetName = GetByObject,
25+
Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)]
26+
[ValidateNotNull]
27+
public PSSynapseWorkspace WorkspaceObject { get; set; }
28+
29+
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false, HelpMessage = HelpMessages.DatasetName)]
30+
[ValidateNotNullOrEmpty]
31+
[Alias("DatasetName")]
32+
public string Name { get; set; }
33+
34+
public override void ExecuteCmdlet()
35+
{
36+
if (this.IsParameterBound(c => c.WorkspaceObject))
37+
{
38+
this.WorkspaceName = this.WorkspaceObject.Name;
39+
}
40+
41+
if (this.IsParameterBound(c => c.Name))
42+
{
43+
WriteObject(new PSDatasetResource(SynapseAnalyticsClient.GetDataset(this.Name), this.WorkspaceName));
44+
}
45+
else
46+
{
47+
var datasets = SynapseAnalyticsClient.GetDatasetsByWorkspace()
48+
.Select(element => new PSDatasetResource(element, this.WorkspaceName));
49+
WriteObject(datasets, true);
50+
}
51+
}
52+
}
53+
}

0 commit comments

Comments
 (0)