Is your feature request related to a problem? Please describe.
While the module functions within a pipeline context in a script, some users prefer manual interaction with PowerShell. To provide user comfort to these users, Azure PowerShell their argument completers and some default values could be used to improve their user experience.
Describe the solution you'd like
Please implement the following for the resourceId's:
# This attribute will allow the user to autocomplete resource-ids for the specified resource type
[Parameter()]
[Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters.ResourceIdCompleter(
"Microsoft.OperationalInsights/workspaces"
)]
[string]$ResourceId
and specifically for the tenantID parameter of the following function, as a default:
(Get-AzContext | Select-Object -ExpandProperty Tenant | Select-Object -ExpandProperty Id)
Describe alternatives you've considered
The alternative is either custom scripting it with argument completers or not doing it
Additional context
|
[Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true)] |
|
[array]$ResourceId |
And for the WorkspaceName and ResourceGroupName param:
# This attribute will allow the user to autocomplete with valid resource groups
[Parameter()]
[Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters.ResourceGroupCompleterAttribute()]
[string]
$ResourceGroupName,
# This attribute will allow the user to autocomplete resourcenames within the supplied resourcegroups
[Parameter()]
[String]
[Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters.ResourceNameCompleterAttribute(
"Microsoft.OperationalInsights/workspaces",
"ResourceGroupName"
)]
$WorkspaceName
)
|
[string]$WorkspaceName, # //TODO: Add validation for workspace name |