|
12 | 12 | // limitations under the License.
|
13 | 13 | // ----------------------------------------------------------------------------------
|
14 | 14 |
|
| 15 | +using System.Collections; |
15 | 16 | using System.Collections.Generic;
|
16 | 17 | using System.Linq;
|
17 | 18 | using System.Management.Automation;
|
| 19 | +using Microsoft.Azure.Commands.ResourceManager.Common.Tags; |
18 | 20 | using Microsoft.Rest.Azure;
|
19 | 21 |
|
20 | 22 | namespace Microsoft.Azure.Commands.Sql.JobAgent.Cmdlet
|
@@ -57,7 +59,14 @@ public class NewAzureSqlJobAgent : AzureSqlJobAgentCmdletBase
|
57 | 59 | /// </summary>
|
58 | 60 | [Parameter(Mandatory = false,
|
59 | 61 | HelpMessage = "The tags to associate with the Azure Sql Job Account")]
|
60 |
| - public Dictionary<string, string> Tags { get; set; } |
| 62 | + [Alias("Tag")] |
| 63 | + public Hashtable Tags { get; set; } |
| 64 | + |
| 65 | + /// <summary> |
| 66 | + /// Gets or sets whether or not to run this cmdlet in the background as a job |
| 67 | + /// </summary> |
| 68 | + [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")] |
| 69 | + public SwitchParameter AsJob { get; set; } |
61 | 70 |
|
62 | 71 | /// <summary>
|
63 | 72 | /// Check to see if the job account already exists in this resource group.
|
@@ -106,7 +115,7 @@ public class NewAzureSqlJobAgent : AzureSqlJobAgentCmdletBase
|
106 | 115 | ServerName = this.ServerName,
|
107 | 116 | JobAgentName = this.JobAgentName,
|
108 | 117 | DatabaseName = this.DatabaseName,
|
109 |
| - Tags = this.Tags |
| 118 | + Tags = TagsConversionHelper.CreateTagDictionary(Tags, validate: true), |
110 | 119 | }
|
111 | 120 | };
|
112 | 121 | return newEntity;
|
|
0 commit comments