Skip to content

Commit d0252b5

Browse files
committed
Adding aliases to a few cmdlets and updating help documentation to match.
1 parent 480b8c9 commit d0252b5

File tree

47 files changed

+143
-230
lines changed

Some content is hidden

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

47 files changed

+143
-230
lines changed

src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class GetAzureSqlDatabase : AzureSqlDatabaseCmdletBase<IEnumerable<AzureS
2929
ValueFromPipelineByPropertyName = true,
3030
Position = 2,
3131
HelpMessage = "The name of the Azure SQL Database to retrieve.")]
32+
[Alias("Name")]
3233
[ValidateNotNullOrEmpty]
3334
public string DatabaseName { get; set; }
3435

src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/NewAzureSqlDatabase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class NewAzureSqlDatabase : AzureSqlDatabaseCmdletBase<AzureSqlDatabaseCr
3333
/// </summary>
3434
[Parameter(Mandatory = true,
3535
HelpMessage = "The name of the Azure SQL Database to create.")]
36+
[Alias("Name")]
3637
[ValidateNotNullOrEmpty]
3738
public string DatabaseName { get; set; }
3839

src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class RemoveAzureSqlDatabase : AzureSqlDatabaseCmdletBase<IEnumerable<Azu
2929
ValueFromPipelineByPropertyName = true,
3030
Position = 2,
3131
HelpMessage = "The name of the Azure SQL Database to remove.")]
32+
[Alias("Name")]
3233
[ValidateNotNullOrEmpty]
3334
public string DatabaseName { get; set; }
3435

src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/SetAzureSqlDatabase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class SetAzureSqlDatabase : AzureSqlDatabaseCmdletBase<IEnumerable<AzureS
3535
ValueFromPipelineByPropertyName = true,
3636
Position = 2,
3737
HelpMessage = "The name of the Azure SQL Database.")]
38+
[Alias("Name")]
3839
[ValidateNotNullOrEmpty]
3940
public string DatabaseName { get; set; }
4041

src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class GetAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase
2929
ValueFromPipelineByPropertyName = true,
3030
Position = 2,
3131
HelpMessage = "The name of the Azure SQL Elastic Pool to retrieve.")]
32+
[Alias("Name")]
3233
[ValidateNotNullOrEmpty]
3334
public string ElasticPoolName { get; set; }
3435

src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/NewAzureSqlElasticPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class NewAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase
3535
/// </summary>
3636
[Parameter(Mandatory = true,
3737
HelpMessage = "The name of the Azure SQL ElasticPool to create.")]
38+
[Alias("Name")]
3839
[ValidateNotNullOrEmpty]
3940
public string ElasticPoolName { get; set; }
4041

src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/RemoveAzureSqlElasticPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class RemoveAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase
3030
ValueFromPipelineByPropertyName = true,
3131
Position = 2,
3232
HelpMessage = "The name of the Azure SQL Elastic Pool to remove.")]
33+
[Alias("Name")]
3334
[ValidateNotNullOrEmpty]
3435
public string ElasticPoolName { get; set; }
3536

src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/SetAzureSqlElasticPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class SetAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase
3636
ValueFromPipelineByPropertyName = true,
3737
Position = 2,
3838
HelpMessage = "The name of the Azure SQL Elastic Pool.")]
39+
[Alias("Name")]
3940
[ValidateNotNullOrEmpty]
4041
public string ElasticPoolName { get; set; }
4142

src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/GetAzureSqlServerFirewallRule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class GetAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas
3131
ValueFromPipelineByPropertyName = true,
3232
Position = 2,
3333
HelpMessage = "The Azure Sql Database Server Firewall Rule name.")]
34+
[Alias("Name")]
3435
[ValidateNotNullOrEmpty]
3536
public string FirewallRuleName { get; set; }
3637

src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/NewAzureSqlServerFirewallRule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class NewAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas
4747
[Parameter(Mandatory = true,
4848
HelpMessage = "Azure Sql Database Server Firewall Rule Name.",
4949
ParameterSetName = UserSpecifiedRuleSet)]
50+
[Alias("Name")]
5051
[ValidateNotNullOrEmpty]
5152
public string FirewallRuleName { get; set; }
5253

src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/RemoveAzureSqlServerFirewallRule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class RemoveAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdlet
3131
ValueFromPipelineByPropertyName = true,
3232
Position = 2,
3333
HelpMessage = "Azure Sql Database Server Firewall Rule name")]
34+
[Alias("Name")]
3435
[ValidateNotNullOrEmpty]
3536
public string FirewallRuleName { get; set; }
3637

src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/SetAzureSqlServerFirewallRule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class SetAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas
3131
ValueFromPipelineByPropertyName = true,
3232
Position = 2,
3333
HelpMessage = "The name of the Azure Sql Database Server Firewall Rule.")]
34+
[Alias("Name")]
3435
[ValidateNotNullOrEmpty]
3536
public string FirewallRuleName { get; set; }
3637

src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class GetAzureSqlServer : AzureSqlServerCmdletBase, IModuleAssemblyInitia
3535
ValueFromPipelineByPropertyName = true,
3636
Position = 1,
3737
HelpMessage = "SQL Database server name.")]
38+
[Alias("Name")]
3839
[ValidateNotNullOrEmpty]
3940
public string ServerName { get; set; }
4041

src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/NewAzureSqlServer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase
3333
/// </summary>
3434
[Parameter(Mandatory = true,
3535
HelpMessage = "SQL Database server name.")]
36+
[Alias("Name")]
3637
[ValidateNotNullOrEmpty]
3738
public string ServerName { get; set; }
3839

src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/RemoveAzureSqlServer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class RemoveAzureSqlServer : AzureSqlServerCmdletBase
3131
ValueFromPipelineByPropertyName = true,
3232
Position = 1,
3333
HelpMessage = "SQL Database server name.")]
34+
[Alias("Name")]
3435
[ValidateNotNullOrEmpty]
3536
public string ServerName { get; set; }
3637

src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/SetAzureSqlServer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class SetAzureSqlServer : AzureSqlServerCmdletBase
3636
ValueFromPipelineByPropertyName = true,
3737
Position = 1,
3838
HelpMessage = "SQL Database server name.")]
39+
[Alias("Name")]
3940
[ValidateNotNullOrEmpty]
4041
public string ServerName { get; set; }
4142

src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/AzureSqlServerServiceObjectiveCmdletBase.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,37 @@
1818
using Microsoft.Azure.Commands.Sql.ServiceObjective.Adapter;
1919
using Microsoft.Azure.Commands.Sql.ServiceObjective.Model;
2020
using System.Collections.Generic;
21+
using System.Management.Automation;
2122

2223
namespace Microsoft.Azure.Commands.Sql.ServiceObjective.Cmdlet
2324
{
2425
public abstract class AzureSqlServerServiceObjectiveCmdletBase
25-
: AzureSqlDatabaseCmdletBase<IEnumerable<AzureSqlServerServiceObjectiveModel>, AzureSqlServerServiceObjectiveAdapter>
26+
: AzureSqlCmdletBase<IEnumerable<AzureSqlServerServiceObjectiveModel>, AzureSqlServerServiceObjectiveAdapter>
2627
{
28+
/// <summary>
29+
/// Gets or sets the name of the database server to use.
30+
/// </summary>
31+
[Parameter(Mandatory = true,
32+
ValueFromPipelineByPropertyName = true,
33+
Position = 1,
34+
HelpMessage = "SQL Database server name.")]
35+
[ValidateNotNullOrEmpty]
36+
public string ServerName { get; set; }
37+
38+
/// <summary>
39+
/// Gets or sets the name of the database to use.
40+
/// </summary>
41+
/// <remarks>
42+
/// This parameter is not needed or used. It will be removed in a future release.
43+
/// </remarks>
44+
[Parameter(Mandatory = false,
45+
ValueFromPipelineByPropertyName = true,
46+
Position = 2,
47+
HelpMessage = "SQL Database name.",
48+
DontShow = true)]
49+
[ValidateNotNullOrEmpty]
50+
public string DatabaseName { get; set; }
51+
2752
/// <summary>
2853
/// Intializes the model adapter
2954
/// </summary>

src/ResourceManager/Sql/Commands.Sql/help/Add-AzureRmSqlDatabaseToFailoverGroup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Adds one or more databases to an Azure SQL Database Failover Group.
1212
## SYNTAX
1313

1414
```
15-
Add-AzureRmSqlDatabaseToFailoverGroup -ServerName <String> -FailoverGroupName <String>
15+
Add-AzureRmSqlDatabaseToFailoverGroup [-ServerName] <String> [-FailoverGroupName] <String>
1616
-Database <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Sql.Database.Model.AzureSqlDatabaseModel]>
17-
-ResourceGroupName <String> [<CommonParameters>]
17+
[-ResourceGroupName] <String> [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION

src/ResourceManager/Sql/Commands.Sql/help/AzureRM.Sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Locale: en-US
88

99
# AzureRM.Sql Module
1010
## Description
11-
This topic displays help topics for the [Azure SQL Database](https://docs.microsoft.com/azure/sql-database/) Cmdlets.
11+
This topic displays help topics for the Azure SQL Database Cmdlets.
1212

1313
## AzureRM.Sql Cmdlets
1414
### [Add-AzureRmSqlDatabaseToFailoverGroup](Add-AzureRmSqlDatabaseToFailoverGroup.md)

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlCapability.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,5 +182,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
182182
183183
## RELATED LINKS
184184
185-
186-

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlDatabase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Specifies the name of the database to retrieve.
101101
```yaml
102102
Type: String
103103
Parameter Sets: (All)
104-
Aliases:
104+
Aliases: Name
105105

106106
Required: False
107107
Position: 2

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlDatabaseActivity.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
150150
151151
## RELATED LINKS
152152
153-
154-

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlDatabaseRestorePoints.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
129129
130130
## RELATED LINKS
131131
132-
133-

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlDatabaseSecureConnectionPolicy.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
132132
133133
## RELATED LINKS
134134
135-
136-

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlElasticPool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Specifies the name of the elastic pool that this cmdlet gets.
146146
```yaml
147147
Type: String
148148
Parameter Sets: (All)
149-
Aliases:
149+
Aliases: Name
150150

151151
Required: False
152152
Position: 2

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlElasticPoolRecommendation.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
113113
114114
## RELATED LINKS
115115
116-
117-

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlServer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Specifies the name of the server that this cmdlet gets.
111111
```yaml
112112
Type: String
113113
Parameter Sets: (All)
114-
Aliases:
114+
Aliases: Name
115115

116116
Required: False
117117
Position: 1

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlServerFirewallRule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Specifies the name of the firewall rule.
4949
```yaml
5050
Type: String
5151
Parameter Sets: (All)
52-
Aliases:
52+
Aliases: Name
5353

5454
Required: False
5555
Position: 2

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlServerServiceObjective.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gets service objectives for an Azure SQL Database server.
1414

1515
```
1616
Get-AzureRmSqlServerServiceObjective [[-ServiceObjectiveName] <String>] [-ServerName] <String>
17-
[-DatabaseName] <String> [-ResourceGroupName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
17+
[[-DatabaseName] <String>] [-ResourceGroupName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -55,7 +55,7 @@ Type: String
5555
Parameter Sets: (All)
5656
Aliases:
5757

58-
Required: True
58+
Required: False
5959
Position: 2
6060
Default value: None
6161
Accept pipeline input: True (ByPropertyName)

src/ResourceManager/Sql/Commands.Sql/help/New-AzureRmSqlDatabase.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Specifies the name of the database.
114114
```yaml
115115
Type: String
116116
Parameter Sets: (All)
117-
Aliases:
117+
Aliases: Name
118118

119119
Required: True
120120
Position: Named
@@ -169,7 +169,7 @@ Specifies the maximum size of the database in bytes.
169169
```yaml
170170
Type: Int64
171171
Parameter Sets: (All)
172-
Aliases:
172+
Aliases:
173173

174174
Required: False
175175
Position: Named
@@ -224,6 +224,22 @@ Accept pipeline input: True (ByPropertyName)
224224
Accept wildcard characters: False
225225
```
226226
227+
### -SampleName
228+
The name of the sample schema to apply when creating this database.
229+
230+
```yaml
231+
Type: String
232+
Parameter Sets: (All)
233+
Aliases:
234+
Accepted values: AdventureWorksLT
235+
236+
Required: False
237+
Position: Named
238+
Default value: None
239+
Accept pipeline input: False
240+
Accept wildcard characters: False
241+
```
242+
227243
### -ServerName
228244
Specifies the name of the server that hosts the database.
229245
@@ -285,24 +301,8 @@ Accept pipeline input: False
285301
Accept wildcard characters: False
286302
```
287303
288-
### -SampleName
289-
The name of the sample schema to apply when creating this database.
290-
291-
```yaml
292-
Type: String
293-
Parameter Sets: (All)
294-
Aliases:
295-
296-
Required: False
297-
Position: Named
298-
Default value: None
299-
Accept pipeline input: False
300-
Accept wildcard characters: False
301-
```
302-
303304
### CommonParameters
304-
305-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
305+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
306306
307307
## INPUTS
308308

src/ResourceManager/Sql/Commands.Sql/help/New-AzureRmSqlDatabaseFailoverGroup.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ This command creates a new Azure SQL Database Failover Group.
1212
## SYNTAX
1313

1414
```
15-
New-AzureRmSqlDatabaseFailoverGroup -ServerName <String> -FailoverGroupName <String>
15+
New-AzureRmSqlDatabaseFailoverGroup [-ServerName] <String> -FailoverGroupName <String>
1616
[-PartnerResourceGroupName <String>] -PartnerServerName <String> [-FailoverPolicy <FailoverPolicy>]
17-
[-GracePeriodWithDataLossHours <Int32>] -ResourceGroupName <String> [<CommonParameters>]
17+
[-GracePeriodWithDataLossHours <Int32>] [-AllowReadOnlyFailoverToPrimary <AllowReadOnlyFailoverToPrimary>]
18+
[-ResourceGroupName] <String> [<CommonParameters>]
1819
```
1920

2021
## DESCRIPTION
@@ -51,6 +52,7 @@ Whether an outage on the secondary server should trigger automatic failover of t
5152
Type: AllowReadOnlyFailoverToPrimary
5253
Parameter Sets: (All)
5354
Aliases:
55+
Accepted values: Enabled, Disabled
5456

5557
Required: False
5658
Position: Named

0 commit comments

Comments
 (0)