Skip to content

Commit 6846c34

Browse files
Export - Import cmdlets
1 parent c69f932 commit 6846c34

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationRunbook.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ public class ExportAzureAutomationRunbook : AzureAutomationBaseCmdlet
4141
/// <summary>
4242
/// Gets or sets the runbook version type
4343
/// </summary>
44-
[Parameter(Mandatory = false, HelpMessage = "Returns the draft or the published runbook version only. If not set, returns published.")]
44+
[Parameter(Mandatory = false, HelpMessage = "Specifies what version of the runbook, draft or published, should be returned.")]
4545
[ValidateSet(Constants.Published, Constants.Draft, IgnoreCase = true)]
4646
public string Slot { get; set; }
4747

4848
/// <summary>
4949
/// Gets or sets the output folder for the configuration script.
5050
/// </summary>
51-
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The folder where runbook definition should be placed.")]
51+
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The folder where the runbook should be placed.")]
5252
public string OutputFolder { get; set; }
5353

5454
/// <summary>
55-
/// Gets or sets switch parameter to confirm overwriting of existing configuration script.
55+
/// Gets or sets switch parameter to confirm overwriting of existing local runbook file.
5656
/// </summary>
5757
[Parameter(Mandatory = false, HelpMessage = "Forces an overwrite of an existing local file with the same name.")]
5858
public SwitchParameter Force { get; set; }

src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationRunbook.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ public class ImportAzureAutomationRunbook : AzureAutomationBaseCmdlet
5353
/// <summary>
5454
/// Gets or sets the runbook version type
5555
/// </summary>
56-
[Parameter(Mandatory = false, HelpMessage = "Runbook definition type.")]
56+
[Parameter(Mandatory = true, HelpMessage = "Runbook definition type.")]
5757
[ValidateSet(Constants.RunbookType.Graph, Constants.RunbookType.PowerShell, Constants.RunbookType.PowerShellWorkflow, IgnoreCase = true)]
58+
[ValidateNotNullOrEmpty]
5859
public string Type { get; set; }
5960

6061
/// <summary>

src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ public class NewAzureAutomationRunbook : AzureAutomationBaseCmdlet
5252
/// <summary>
5353
/// Gets or sets the runbook version type
5454
/// </summary>
55-
[Parameter(Mandatory = false, HelpMessage = "Runbook definition type.")]
55+
[Parameter(Mandatory = true, HelpMessage = "Runbook definition type.")]
5656
[ValidateSet(Constants.RunbookType.Graph, Constants.RunbookType.PowerShell, Constants.RunbookType.PowerShellWorkflow, IgnoreCase = true)]
57+
[ValidateNotNullOrEmpty]
5758
public string Type { get; set; }
5859

5960
/// <summary>

src/ResourceManager/Automation/Commands.Automation/Common/AutomationClient.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,8 +1715,6 @@ private DirectoryInfo WriteRunbookToFile(string outputFolder, string runbookName
17151715

17161716
var fileExtension = (0 == string.Compare(runbookType, Constants.RunbookType.Graph, StringComparison.OrdinalIgnoreCase)) ? Constants.SupportedFileExtensions.Graph : Constants.SupportedFileExtensions.PowerShellScript;
17171717

1718-
fileExtension = "." + fileExtension;
1719-
17201718
var outputFilePath = outputFolderFullPath + "\\" + runbookName + fileExtension;
17211719

17221720
// file exists and overwrite Not specified

0 commit comments

Comments
 (0)