Skip to content

ResourceNameCompleter for KeyVault, Sql, and Websites #7753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 7, 2018
Merged

ResourceNameCompleter for KeyVault, Sql, and Websites #7753

merged 4 commits into from
Nov 7, 2018

Conversation

maddieclayton
Copy link
Contributor

Description

Checklist

@@ -46,6 +46,7 @@ public class GetAppServicePlanCmdlet : WebAppBaseClientCmdLet
public string ResourceGroupName { get; set; }

[Parameter(ParameterSetName = ParameterSet1, Position = 1, Mandatory = false, HelpMessage = "The name of the app service plan.")]
[ResourceNameCompleter("Microsoft.Web/serverfarms", new string[] { "ResourceGroupName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/serverfarms", new string[] { "ResourceGroupName" })]
[ResourceNameCompleter("Microsoft.Web/serverfarms", "ResourceGroupName")]

@@ -35,6 +35,7 @@ public class GetAzureDeletedWebApp : WebAppBaseClientCmdLet
public string ResourceGroupName { get; set; }

[Parameter(Position = 1, Mandatory = false, HelpMessage = "The name of the web app.")]
[ResourceNameCompleter("Microsoft.Web/deletedSites", new string[] { "ResourceGroupName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/deletedSites", new string[] { "ResourceGroupName" })]
[ResourceNameCompleter("Microsoft.Web/deletedSites", "ResourceGroupName")]

@@ -38,6 +39,7 @@ public class RestoreAzureDeletedWebApp : WebAppBaseClientCmdLet
public string ResourceGroupName { get; set; }

[Parameter(Position = 1, ParameterSetName = FromDeletedResourceNameParameterSet, Mandatory = true, HelpMessage = "The name of the deleted Azure Web App.")]
[ResourceNameCompleter("Microsoft.Web/deletedSites", new string[] { "ResourceGroupName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/deletedSites", new string[] { "ResourceGroupName" })]
[ResourceNameCompleter("Microsoft.Web/deletedSites", "ResourceGroupName")]

@@ -35,6 +36,7 @@ public class RestoreAzureWebAppBackup : WebAppOptionalSlotBaseCmdlet
public string BlobName;

[Parameter(Mandatory = false, HelpMessage = "The name of the App Service Plan for the restored app. If left empty, the app's current App Service Plan is used.", ValueFromPipelineByPropertyName = true)]
[ResourceNameCompleter("Microsoft.Web/serverfarms", new string[] { "DoNotFilter" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/serverfarms", new string[] { "DoNotFilter" })]
[ResourceNameCompleter("Microsoft.Web/serverfarms", "DoNotFilter")]

@@ -50,11 +50,13 @@ public class NewAzureWebAppSSLBinding : WebAppBaseClientCmdLet

[Parameter(ParameterSetName = ParameterSet1Name, Position = 1, Mandatory = true, HelpMessage = "The name of the web app.")]
[Parameter(ParameterSetName = ParameterSet2Name, Position = 1, Mandatory = true, HelpMessage = "The name of the web app.")]
[ResourceNameCompleter("Microsoft.Web/sites", new string[] { "ResourceGroupName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/sites", new string[] { "ResourceGroupName" })]
[ResourceNameCompleter("Microsoft.Web/sites", "ResourceGroupName")]

[ValidateNotNullOrEmpty]
public string Name { get; set; }

[Parameter(ParameterSetName = ParameterSet1Name, Position = 2, Mandatory = false,
HelpMessage = "The name of the web app slot.", ValueFromPipelineByPropertyName = true)]
[ResourceNameCompleter("Microsoft.Web/sites/slots", new string[] { "ResourceGroupName", "Name" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/sites/slots", new string[] { "ResourceGroupName", "Name" })]
[ResourceNameCompleter("Microsoft.Web/sites/slots", "ResourceGroupName", "Name")]

@@ -35,10 +35,12 @@ public abstract class WebAppSSLBindingBaseCmdlet : WebAppBaseClientCmdLet
public string ResourceGroupName { get; set; }

[Parameter(ParameterSetName = ParameterSet1Name, Position = 1, Mandatory = true, HelpMessage = "The name of the web app.")]
[ResourceNameCompleter("Microsoft.Web/sites", new string[] { "ResourceGroupName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/sites", new string[] { "ResourceGroupName" })]
[ResourceNameCompleter("Microsoft.Web/sites", "ResourceGroupName")]

[ValidateNotNullOrEmpty]
public string WebAppName { get; set; }

[Parameter(ParameterSetName = ParameterSet1Name, Position = 2, Mandatory = false, HelpMessage = "The name of the web app slot.")]
[ResourceNameCompleter("Microsoft.Web/sites/slots", new string[] { "ResourceGroupName", "WebAppName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/sites/slots", new string[] { "ResourceGroupName", "WebAppName" })]
[ResourceNameCompleter("Microsoft.Web/sites/slots", "ResourceGroupName", "WebAppName")]

@@ -31,10 +31,12 @@ public class WebAppSlotBaseCmdlet : WebAppBaseClientCmdLet
public string ResourceGroupName { get; set; }

[Parameter(ParameterSetName = ParameterSet1Name, Position = 1, Mandatory = true, HelpMessage = "The name of the web app.", ValueFromPipelineByPropertyName = true)]
[ResourceNameCompleter("Microsoft.Web/sites", new string[] { "ResourceGroupName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/sites", new string[] { "ResourceGroupName" })]
[ResourceNameCompleter("Microsoft.Web/sites", "ResourceGroupName")]

[ValidateNotNullOrEmpty]
public string Name { get; set; }

[Parameter(ParameterSetName = ParameterSet1Name, Position = 2, Mandatory = true, HelpMessage = "The name of the web app slot.")]
[ResourceNameCompleter("Microsoft.Web/sites/slots", new string[] { "ResourceGroupName", "Name" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be:

Suggested change
[ResourceNameCompleter("Microsoft.Web/sites/slots", new string[] { "ResourceGroupName", "Name" })]
[ResourceNameCompleter("Microsoft.Web/sites/slots", "ResourceGroupName", "Name")]

Copy link
Contributor

@MiYanni MiYanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maddieclayton maddieclayton merged commit c655391 into Azure:preview Nov 7, 2018
@maddieclayton maddieclayton deleted the completer branch November 7, 2018 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants