@@ -51,9 +51,9 @@ public class NewAzureFirewallNetworkRuleCommand : NetworkBaseCmdlet
51
51
52
52
[ Parameter (
53
53
Mandatory = false ,
54
- HelpMessage = "The destination FQDNs of the rule" ) ]
54
+ HelpMessage = "The destination FQDN of the rule" ) ]
55
55
[ ValidateNotNullOrEmpty ]
56
- public string [ ] DestinationFqdns { get ; set ; }
56
+ public string [ ] DestinationFqdn { get ; set ; }
57
57
58
58
[ Parameter (
59
59
Mandatory = true ,
@@ -76,22 +76,22 @@ public override void Execute()
76
76
{
77
77
base . Execute ( ) ;
78
78
79
- if ( DestinationFqdns != null )
79
+ if ( DestinationFqdn != null )
80
80
{
81
- foreach ( string fqdn in DestinationFqdns )
81
+ foreach ( string fqdn in DestinationFqdn )
82
82
{
83
83
ValidateIsFqdn ( fqdn ) ;
84
84
}
85
85
}
86
86
87
87
// Only one of DestinationAddress or DestinationFqdns is allowed
88
- if ( ( DestinationAddress != null ) && ( DestinationFqdns != null ) )
88
+ if ( ( DestinationAddress != null ) && ( DestinationFqdn != null ) )
89
89
{
90
90
throw new ArgumentException ( "Both DestinationAddress and DestinationFqdns not allowed" ) ;
91
91
}
92
92
93
93
// One of DestinationAddress or DestinationFqdns must be present
94
- if ( ( DestinationAddress == null ) && ( DestinationFqdns == null ) )
94
+ if ( ( DestinationAddress == null ) && ( DestinationFqdn == null ) )
95
95
{
96
96
throw new ArgumentException ( "Either DestinationAddress or DestinationFqdns is required" ) ;
97
97
}
@@ -103,7 +103,7 @@ public override void Execute()
103
103
Protocols = this . Protocol ? . ToList ( ) ,
104
104
SourceAddresses = this . SourceAddress ? . ToList ( ) ,
105
105
DestinationAddresses = this . DestinationAddress ? . ToList ( ) ,
106
- DestinationFqdns = this . DestinationFqdns ? . ToList ( ) ,
106
+ DestinationFqdns = this . DestinationFqdn ? . ToList ( ) ,
107
107
DestinationPorts = this . DestinationPort ? . ToList ( )
108
108
} ;
109
109
WriteObject ( networkRule ) ;
0 commit comments