|
19 | 19 |
|
20 | 20 | namespace Microsoft.Azure.Commands.Batch
|
21 | 21 | {
|
22 |
| - [Cmdlet(VerbsCommon.New, Constants.AzureRmBatchApplicationPackage), OutputType(typeof(PSApplicationPackage))] |
| 22 | + [Cmdlet(VerbsCommon.New, Constants.AzureRmBatchApplicationPackage, DefaultParameterSetName = UploadAndActivateSet), OutputType(typeof(PSApplicationPackage))] |
23 | 23 | public class NewBatchApplicationPackageCommand : BatchCmdletBase
|
24 | 24 | {
|
25 | 25 | internal const string ActivateOnlySet = "ActivateOnly";
|
26 |
| - internal const string UpdateAndActivateSet = "UpdateAndActivate"; |
| 26 | + internal const string UploadAndActivateSet = "UpdateAndActivate"; |
27 | 27 |
|
28 |
| - [Parameter(Position = 0, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] |
| 28 | + [Parameter(Position = 0, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] |
29 | 29 | [Parameter(Position = 0, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")]
|
30 | 30 | [ValidateNotNullOrEmpty]
|
31 | 31 | public string AccountName { get; set; }
|
32 | 32 |
|
33 |
| - [Parameter(Position = 1, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] |
| 33 | + [Parameter(Position = 1, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] |
34 | 34 | [Parameter(Position = 1, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")]
|
35 | 35 | [ValidateNotNullOrEmpty]
|
36 | 36 | public string ResourceGroupName { get; set; }
|
37 | 37 |
|
38 |
| - [Parameter(Position = 2, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] |
| 38 | + [Parameter(Position = 2, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] |
39 | 39 | [Parameter(Position = 2, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")]
|
40 | 40 | [ValidateNotNullOrEmpty]
|
41 | 41 |
|
42 | 42 | public string ApplicationId { get; set; }
|
43 | 43 |
|
44 |
| - [Parameter(Position = 3, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")] |
| 44 | + [Parameter(Position = 3, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")] |
45 | 45 | [Parameter(Position = 3, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")]
|
46 | 46 | [ValidateNotNullOrEmpty]
|
47 | 47 | public string ApplicationVersion { get; set; }
|
48 | 48 |
|
49 |
| - [Parameter(Position = 4, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the format of the application package binary file.")] |
| 49 | + [Parameter(Position = 4, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the format of the application package binary file.")] |
50 | 50 | [Parameter(Position = 4, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the format of the application package binary file.")]
|
51 | 51 | [ValidateNotNullOrEmpty]
|
52 | 52 | public string Format { get; set; }
|
53 | 53 |
|
54 |
| - [Parameter(ValueFromPipelineByPropertyName = true, ParameterSetName = UpdateAndActivateSet, Mandatory = true, HelpMessage = "Specifies the file path of the application that will be uploaded to Azure Storage.")] |
| 54 | + [Parameter(ValueFromPipelineByPropertyName = true, ParameterSetName = UploadAndActivateSet, Mandatory = true, HelpMessage = "Specifies the file path of the application that will be uploaded to Azure Storage.")] |
55 | 55 | [ValidateNotNullOrEmpty]
|
56 | 56 | public string FilePath { get; set; }
|
57 | 57 |
|
|
0 commit comments