Add parameter validation
This commit is contained in:
@@ -6,14 +6,17 @@ function Get-ZANetworkVpgStat {
|
||||
HelpMessage = "The VPG identifier.",
|
||||
Mandatory
|
||||
)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$vpgIdentifier,
|
||||
[Parameter(
|
||||
HelpMessage = "Start date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the start date is omitted, the default start date is 7 days before the end date."
|
||||
)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$startDate,
|
||||
[Parameter(
|
||||
HelpMessage = "End date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the end date is omitted, the default end date is the current time."
|
||||
)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$endDate
|
||||
)
|
||||
|
||||
|
||||
@@ -6,14 +6,17 @@ function Get-ZANetworkVpgSummary {
|
||||
HelpMessage = "The VPG identifier.",
|
||||
Mandatory
|
||||
)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$vpgIdentifier,
|
||||
[Parameter(
|
||||
HelpMessage = "Start date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the start date is omitted, the default start date is 7 days before the end date."
|
||||
)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$startDate,
|
||||
[Parameter(
|
||||
HelpMessage = "End date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the end date is omitted, the default end date is the current time."
|
||||
)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$endDate
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user