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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System.Collections;
using Microsoft.Azure.Commands.KeyVault.Models;
using System.Management.Automation;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand All @@ -33,6 +34,7 @@ public class AddAzureKeyVaultCertificate : KeyVaultCmdletBase
[Parameter(Mandatory = true,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.KeyVault.Models;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using System;
Expand Down Expand Up @@ -46,6 +47,7 @@ public class AddAzureKeyVaultCertificateContact : KeyVaultCmdletBase
ParameterSetName = InteractiveParameterSet,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.KeyVault.WebKey;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using System;
Expand Down Expand Up @@ -66,6 +67,7 @@ public class AddAzureKeyVaultKey : KeyVaultCmdletBase
ParameterSetName = InteractiveImportParameterSet,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand Down Expand Up @@ -46,6 +47,7 @@ public class BackupAzureKeyVaultCertificate : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByCertificateNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand Down Expand Up @@ -46,6 +47,7 @@ public class BackupAzureKeyVaultKey : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByKeyNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand Down Expand Up @@ -46,6 +47,7 @@ public class BackupAzureKeyVaultSecret : KeyVaultCmdletBase
Position = 0,
ParameterSetName = BySecretNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment." )]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class GetAzureKeyVault : KeyVaultManagementCmdletBase
Position = 0,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "ResourceGroupName")]
[Alias(Constants.Name)]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.KeyVault.Models;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;

Expand Down Expand Up @@ -61,6 +62,7 @@ public class GetAzureKeyVaultCertificate : KeyVaultCmdletBase
ParameterSetName = ByCertificateVersionsParameterSet,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.KeyVault.Models;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using System.Collections.Generic;
Expand Down Expand Up @@ -44,6 +45,7 @@ public class GetAzureKeyVaultCertificateContact : KeyVaultCmdletBase
ParameterSetName = ByVaultNameParameterSet,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Microsoft.Azure.Commands.KeyVault.Models;
using System.Collections.Generic;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand Down Expand Up @@ -43,6 +44,7 @@ public class GetAzureKeyVaultCertificateIssuer : KeyVaultCmdletBase
ParameterSetName = ByNameParameterSet,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.KeyVault
Expand Down Expand Up @@ -40,6 +41,7 @@ public class GetAzureKeyVaultCertificateOperation : KeyVaultCmdletBase
ParameterSetName = ByNameParameterSet,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.KeyVault.Models;
using System.Management.Automation;

Expand Down Expand Up @@ -41,6 +42,7 @@ public class GetAzureKeyVaultCertificatePolicy : KeyVaultCmdletBase
ParameterSetName = ByVaultAndCertNameParameterSet,
Position = 0,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -58,7 +59,7 @@ public class GetAzureKeyVaultKey : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByKeyVersionsParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]

[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -57,6 +58,7 @@ public class GetAzureKeyVaultSecret : KeyVaultCmdletBase
Position = 0,
ParameterSetName = BySecretVersionsParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Microsoft.Azure.Commands.KeyVault.Models;
using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand Down Expand Up @@ -53,6 +54,7 @@ public class ImportAzureKeyVaultCertificate : KeyVaultCmdletBase
Position = 0,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using System;
using System.Collections;
using System.Management.Automation;
Expand All @@ -28,6 +29,7 @@ public class AddAzureKeyVaultManagedStorageAccount : KeyVaultCmdletBase
Position = 0,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand Down Expand Up @@ -46,6 +47,7 @@ public class BackupAzureKeyVaultManagedStorageAccount : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByStorageAccountNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using System.Management.Automation;
using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand All @@ -42,6 +43,7 @@ public class GetAzureKeyVaultManagedStorageAccount : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByAccountNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment." )]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using System;
using System.Collections.Generic;
using System.Management.Automation;
Expand Down Expand Up @@ -40,6 +41,7 @@ public class GetAzureKeyVaultManagedStorageSasDefinition : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByDefinitionNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment." )]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using System.Management.Automation;
using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand All @@ -36,6 +37,7 @@ public class RemoveAzureKeyVaultManagedStorageAccount : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByDefinitionNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment." )]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using System.Globalization;
using System.Management.Automation;
using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties;
Expand All @@ -35,6 +36,7 @@ public class RemoveAzureKeyVaultSasDefinition : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByDefinitionNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment." )]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;

namespace Microsoft.Azure.Commands.KeyVault
Expand Down Expand Up @@ -45,6 +46,7 @@ public class RestoreAzureKeyVaultManagedStorageAccount : KeyVaultCmdletBase
Position = 0,
ParameterSetName = ByVaultNameParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using System.Management.Automation;
using System.Xml;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand All @@ -36,6 +37,7 @@ public class SetAzureKeyVaultManagedStorageSasDefinition : KeyVaultCmdletBase
Position = 0,
ParameterSetName = DefaultParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment." )]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

using System.Management.Automation;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand All @@ -37,6 +38,7 @@ public class UndoAzureKeyVaultManagedStorageAccountRemoval : KeyVaultCmdletBase
Position = 0,
ParameterSetName = DefaultParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

using System.Management.Automation;
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;

namespace Microsoft.Azure.Commands.KeyVault
{
Expand All @@ -37,6 +38,7 @@ public class UndoAzureKeyVaultManagedStorageSasDefinitionRemoval : KeyVaultCmdle
Position = 0,
ParameterSetName = DefaultParameterSet,
HelpMessage = "Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.")]
[ResourceNameCompleter("Microsoft.KeyVault/vaults", "FakeResourceGroupName")]
[ValidateNotNullOrEmpty]
public string VaultName { get; set; }

Expand Down
Loading