Add parameter validation
This commit is contained in:
@@ -6,14 +6,17 @@ function Get-ZANetworkVpgStat {
|
|||||||
HelpMessage = "The VPG identifier.",
|
HelpMessage = "The VPG identifier.",
|
||||||
Mandatory
|
Mandatory
|
||||||
)]
|
)]
|
||||||
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$vpgIdentifier,
|
[string]$vpgIdentifier,
|
||||||
[Parameter(
|
[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."
|
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,
|
[string]$startDate,
|
||||||
[Parameter(
|
[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."
|
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
|
[string]$endDate
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,14 +6,17 @@ function Get-ZANetworkVpgSummary {
|
|||||||
HelpMessage = "The VPG identifier.",
|
HelpMessage = "The VPG identifier.",
|
||||||
Mandatory
|
Mandatory
|
||||||
)]
|
)]
|
||||||
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$vpgIdentifier,
|
[string]$vpgIdentifier,
|
||||||
[Parameter(
|
[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."
|
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,
|
[string]$startDate,
|
||||||
[Parameter(
|
[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."
|
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
|
[string]$endDate
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user