@@ -1467,7 +1467,7 @@ pub enum RouterRouteKind {
14671467/// its destination.
14681468#[ derive( ObjectIdentity , Clone , Debug , Deserialize , Serialize , JsonSchema ) ]
14691469pub struct RouterRoute {
1470- /// common identifying metadata
1470+ /// Common identifying metadata
14711471 #[ serde( flatten) ]
14721472 pub identity : IdentityMetadata ,
14731473 /// The ID of the VPC Router to which the route belongs
@@ -1483,22 +1483,22 @@ pub struct RouterRoute {
14831483/// A single rule in a VPC firewall
14841484#[ derive( ObjectIdentity , Clone , Debug , Deserialize , Serialize , JsonSchema ) ]
14851485pub struct VpcFirewallRule {
1486- /// common identifying metadata
1486+ /// Common identifying metadata
14871487 #[ serde( flatten) ]
14881488 pub identity : IdentityMetadata ,
1489- /// whether this rule is in effect
1489+ /// Whether this rule is in effect
14901490 pub status : VpcFirewallRuleStatus ,
1491- /// whether this rule is for incoming or outgoing traffic
1491+ /// Whether this rule is for incoming or outgoing traffic
14921492 pub direction : VpcFirewallRuleDirection ,
1493- /// list of sets of instances that the rule applies to
1493+ /// Determine the set of instances that the rule applies to
14941494 pub targets : Vec < VpcFirewallRuleTarget > ,
1495- /// reductions on the scope of the rule
1495+ /// Reductions on the scope of the rule
14961496 pub filters : VpcFirewallRuleFilter ,
1497- /// whether traffic matching the rule should be allowed or dropped
1497+ /// Whether traffic matching the rule should be allowed or dropped
14981498 pub action : VpcFirewallRuleAction ,
1499- /// the relative priority of this rule
1499+ /// The relative priority of this rule
15001500 pub priority : VpcFirewallRulePriority ,
1501- /// the VPC to which this rule belongs
1501+ /// The VPC to which this rule belongs
15021502 pub vpc_id : Uuid ,
15031503}
15041504
@@ -1511,29 +1511,29 @@ pub struct VpcFirewallRules {
15111511/// A single rule in a VPC firewall
15121512#[ derive( Clone , Debug , Deserialize , PartialEq , Serialize , JsonSchema ) ]
15131513pub struct VpcFirewallRuleUpdate {
1514- /// name of the rule, unique to this VPC
1514+ /// Name of the rule, unique to this VPC
15151515 pub name : Name ,
1516- /// human -readable free-form text about a resource
1516+ /// Human -readable free-form text about a resource
15171517 pub description : String ,
1518- /// whether this rule is in effect
1518+ /// Whether this rule is in effect
15191519 pub status : VpcFirewallRuleStatus ,
1520- /// whether this rule is for incoming or outgoing traffic
1520+ /// Whether this rule is for incoming or outgoing traffic
15211521 pub direction : VpcFirewallRuleDirection ,
1522- /// list of sets of instances that the rule applies to
1522+ /// Determine the set of instances that the rule applies to
1523+ #[ schemars( length( max = 256 ) ) ]
15231524 pub targets : Vec < VpcFirewallRuleTarget > ,
1524- /// reductions on the scope of the rule
1525+ /// Reductions on the scope of the rule
15251526 pub filters : VpcFirewallRuleFilter ,
1526- /// whether traffic matching the rule should be allowed or dropped
1527+ /// Whether traffic matching the rule should be allowed or dropped
15271528 pub action : VpcFirewallRuleAction ,
1528- /// the relative priority of this rule
1529+ /// The relative priority of this rule
15291530 pub priority : VpcFirewallRulePriority ,
15301531}
15311532
1532- /// Updateable properties of a `Vpc`'s firewall
1533- /// Note that VpcFirewallRules are implicitly created along with a Vpc,
1534- /// so there is no explicit creation.
1533+ /// Updated list of firewall rules. Will replace all existing rules.
15351534#[ derive( Clone , Debug , Deserialize , Serialize , JsonSchema ) ]
15361535pub struct VpcFirewallRuleUpdateParams {
1536+ #[ schemars( length( max = 1024 ) ) ]
15371537 pub rules : Vec < VpcFirewallRuleUpdate > ,
15381538}
15391539
@@ -1553,19 +1553,24 @@ pub struct VpcFirewallRuleUpdateParams {
15531553#[ repr( transparent) ]
15541554pub struct VpcFirewallRulePriority ( pub u16 ) ;
15551555
1556- /// Filter for a firewall rule. A given packet must match every field that is
1557- /// present for the rule to apply to it. A packet matches a field if any entry
1558- /// in that field matches the packet.
1556+ /// Filters reduce the scope of a firewall rule. Without filters, the rule
1557+ /// applies to all packets to the targets (or from the targets, if it's an
1558+ /// outbound rule). With multiple filters, the rule applies only to packets
1559+ /// matching ALL filters. The maximum number of each type of filter is 256.
15591560#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize , JsonSchema ) ]
15601561pub struct VpcFirewallRuleFilter {
1561- /// If present, the sources (if incoming) or destinations (if outgoing)
1562- /// this rule applies to.
1562+ /// If present, host filters match the "other end" of traffic from the
1563+ /// target’s perspective: for an inbound rule, they match the source of
1564+ /// traffic. For an outbound rule, they match the destination.
1565+ #[ schemars( length( max = 256 ) ) ]
15631566 pub hosts : Option < Vec < VpcFirewallRuleHostFilter > > ,
15641567
15651568 /// If present, the networking protocols this rule applies to.
1569+ #[ schemars( length( max = 256 ) ) ]
15661570 pub protocols : Option < Vec < VpcFirewallRuleProtocol > > ,
15671571
1568- /// If present, the destination ports this rule applies to.
1572+ /// If present, the destination ports or port ranges this rule applies to.
1573+ #[ schemars( length( max = 256 ) ) ]
15691574 pub ports : Option < Vec < L4PortRange > > ,
15701575}
15711576
@@ -1599,8 +1604,11 @@ pub enum VpcFirewallRuleAction {
15991604 Deny ,
16001605}
16011606
1602- /// A `VpcFirewallRuleTarget` is used to specify the set of `Instance`s to
1603- /// which a firewall rule applies.
1607+ /// A `VpcFirewallRuleTarget` is used to specify the set of instances to which
1608+ /// a firewall rule applies. You can target instances directly by name, or
1609+ /// specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to
1610+ /// traffic going to all matching instances. Targets are additive: the rule
1611+ /// applies to instances matching ANY target.
16041612#[ derive(
16051613 Clone ,
16061614 Debug ,
@@ -1760,7 +1768,7 @@ impl JsonSchema for L4PortRange {
17601768 title : Some ( "A range of IP ports" . to_string ( ) ) ,
17611769 description : Some (
17621770 "An inclusive-inclusive range of IP ports. The second port \
1763- may be omitted to represent a single port"
1771+ may be omitted to represent a single port. "
17641772 . to_string ( ) ,
17651773 ) ,
17661774 examples : vec ! [ "22" . into( ) , "6667-7000" . into( ) ] ,
0 commit comments