Skip to content

Commit 82a1f6f

Browse files
authored
Merge pull request Azure#2480 from wastoresh/dev
Change Tags parameter name to Tag, and modify some help text
2 parents 790c14b + aeb46bd commit 82a1f6f

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -696,16 +696,17 @@
696696
<maml:name>Kind</maml:name>
697697
<maml:description>
698698
<maml:para>Kind of Storage Account. Valid values are:
699-
• Storage (Supports Blob, Table, Queue, and File data)
700-
• BlobStorage (Supports Blob data only)
699+
• Storage (General-purpose storage account which supports storing Blobs, Tables, Queues, Files and Disks)
700+
• BlobStorage (Blob storage account which supports storing Blobs only)
701701
Default is Storage.</maml:para>
702702
</maml:description>
703703
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
704704
</command:parameter>
705705
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
706706
<maml:name>AccessTier</maml:name>
707707
<maml:description>
708-
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
708+
<maml:para>Access Tier for Blob Storage Accounts. This is mandatory when Storage Account Kind is equal to BlobStorage. Setting this will fail if Storage Account Kind is equal to Storage.
709+
709710
Valid values are:
710711
• Hot
711712
• Cool</maml:para>
@@ -741,7 +742,7 @@ Valid values are:
741742
<command:parameterValue required="true" variableLength="true">[EncryptionSupportServiceEnum?]</command:parameterValue>
742743
</command:parameter>
743744
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="9">
744-
<maml:name>Tags</maml:name>
745+
<maml:name>Tag</maml:name>
745746
<maml:description>
746747
<maml:para>Tags to set on the storage account.</maml:para>
747748
</maml:description>
@@ -809,8 +810,8 @@ Valid values are:
809810
<maml:name>Kind</maml:name>
810811
<maml:description>
811812
<maml:para>Kind of Storage Account. Valid values are:
812-
• Storage (Supports Blob, Table, Queue, and File data)
813-
• BlobStorage (Supports Blob data only)
813+
• Storage (General-purpose storage account which supports storing Blobs, Tables, Queues, Files and Disks)
814+
• BlobStorage (Blob storage account which supports storing Blobs only)
814815
Default is Storage.</maml:para>
815816
</maml:description>
816817
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
@@ -823,7 +824,7 @@ Default is Storage.</maml:para>
823824
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
824825
<maml:name>AccessTier</maml:name>
825826
<maml:description>
826-
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
827+
<maml:para>Access Tier for Blob Storage Accounts. This is mandatory when Storage Account Kind is equal to BlobStorage. Setting this will fail if Storage Account Kind is equal to Storage.
827828
Valid values are:
828829
• Hot
829830
• Cool</maml:para>
@@ -884,7 +885,7 @@ Valid values are:
884885
<dev:defaultValue></dev:defaultValue>
885886
</command:parameter>
886887
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="9">
887-
<maml:name>Tags</maml:name>
888+
<maml:name>Tag</maml:name>
888889
<maml:description>
889890
<maml:para>Tags to set on the storage account.</maml:para>
890891
</maml:description>
@@ -1567,7 +1568,7 @@ Note that Standard_ZRS, Premium_LRS accounts cannot be changed to other account
15671568
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
15681569
<maml:name>AccessTier</maml:name>
15691570
<maml:description>
1570-
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
1571+
<maml:para>Access Tier for Blob Storage Accounts. Changing the access tier may result in additional charges. See (http://go.microsoft.com/fwlink/?LinkId=786482) to learn more. Setting this will fail if Storage Account Kind is equal to Storage.
15711572
Valid values are:
15721573
• Hot
15731574
• Cool</maml:para>
@@ -1603,7 +1604,7 @@ Valid values are:
16031604
<command:parameterValue required="true" variableLength="true">[EncryptionSupportServiceEnum?]</command:parameterValue>
16041605
</command:parameter>
16051606
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="8">
1606-
<maml:name>Tags</maml:name>
1607+
<maml:name>Tag</maml:name>
16071608
<maml:description>
16081609
<maml:para>Tags to set on the storage account.</maml:para>
16091610
</maml:description>
@@ -1672,7 +1673,7 @@ Note that Standard_ZRS, Premium_LRS accounts cannot be changed to other account
16721673
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
16731674
<maml:name>AccessTier</maml:name>
16741675
<maml:description>
1675-
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
1676+
<maml:para>Access Tier for Blob Storage Accounts. Changing the access tier may result in additional charges. See (http://go.microsoft.com/fwlink/?LinkId=786482) to learn more. Setting this will fail if Storage Account Kind is equal to Storage.
16761677
Valid values are:
16771678
• Hot
16781679
• Cool</maml:para>
@@ -1733,7 +1734,7 @@ Valid values are:
17331734
<dev:defaultValue></dev:defaultValue>
17341735
</command:parameter>
17351736
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="8">
1736-
<maml:name>Tags</maml:name>
1737+
<maml:name>Tag</maml:name>
17371738
<maml:description>
17381739
<maml:para>Tags to set on the storage account.</maml:para>
17391740
</maml:description>

src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public class NewAzureStorageAccountCommand : StorageAccountBaseCmdlet
100100
Mandatory = false,
101101
HelpMessage = "Storage Account Tags.")]
102102
[ValidateNotNull]
103-
public Hashtable[] Tags { get; set; }
103+
[Alias(TagsAlias)]
104+
public Hashtable[] Tag { get; set; }
104105

105106
public override void ExecuteCmdlet()
106107
{
@@ -119,7 +120,7 @@ public override void ExecuteCmdlet()
119120
Location = this.Location,
120121
Kind = ParseAccountKind(Kind),
121122
Sku = new Sku(ParseSkuName(this.SkuName)),
122-
Tags = TagsConversionHelper.CreateTagDictionary(Tags, validate: true),
123+
Tags = TagsConversionHelper.CreateTagDictionary(Tag, validate: true),
123124
};
124125

125126
if (this.CustomDomainName != null)

src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public class SetAzureStorageAccountCommand : StorageAccountBaseCmdlet
9494
HelpMessage = "Storage Account Tags.")]
9595
[AllowEmptyCollection]
9696
[ValidateNotNull]
97-
public Hashtable[] Tags { get; set; }
97+
[Alias(TagsAlias)]
98+
public Hashtable[] Tag { get; set; }
9899

99100
public override void ExecuteCmdlet()
100101
{
@@ -108,9 +109,9 @@ public override void ExecuteCmdlet()
108109
updateParameters.Sku = new Sku(ParseSkuName(this.SkuName));
109110
}
110111

111-
if (this.Tags != null)
112+
if (this.Tag != null)
112113
{
113-
Dictionary<string, string> tagDictionary = TagsConversionHelper.CreateTagDictionary(Tags, validate: true);
114+
Dictionary<string, string> tagDictionary = TagsConversionHelper.CreateTagDictionary(Tag, validate: true);
114115
updateParameters.Tags = tagDictionary ?? new Dictionary<string, string>();
115116
}
116117

src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public abstract class StorageAccountBaseCmdlet : AzureRMCmdlet
3737
protected const string AccountTypeAlias = "AccountType";
3838
protected const string Account_TypeAlias = "Type";
3939

40+
protected const string TagsAlias = "Tags";
41+
4042
protected const string StorageAccountNameAvailabilityStr = "AzureRmStorageAccountNameAvailability";
4143

4244
protected const string StorageUsageNounStr = "AzureRmStorageUsage";

0 commit comments

Comments
 (0)