aws_sdk_ec2/client/
create_network_acl_entry.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateNetworkAclEntry`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`dry_run(bool)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
7    ///   - [`network_acl_id(impl Into<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::network_acl_id) / [`set_network_acl_id(Option<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_network_acl_id):<br>required: **true**<br><p>The ID of the network ACL.</p><br>
8    ///   - [`rule_number(i32)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::rule_number) / [`set_rule_number(Option<i32>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_rule_number):<br>required: **true**<br><p>The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.</p> <p>Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.</p><br>
9    ///   - [`protocol(impl Into<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::protocol) / [`set_protocol(Option<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_protocol):<br>required: **true**<br><p>The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.</p><br>
10    ///   - [`rule_action(RuleAction)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::rule_action) / [`set_rule_action(Option<RuleAction>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_rule_action):<br>required: **true**<br><p>Indicates whether to allow or deny the traffic that matches the rule.</p><br>
11    ///   - [`egress(bool)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::egress) / [`set_egress(Option<bool>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_egress):<br>required: **true**<br><p>Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).</p><br>
12    ///   - [`cidr_block(impl Into<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::cidr_block) / [`set_cidr_block(Option<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_cidr_block):<br>required: **false**<br><p>The IPv4 network range to allow or deny, in CIDR notation (for example <code>172.16.0.0/24</code>). We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p><br>
13    ///   - [`ipv6_cidr_block(impl Into<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::ipv6_cidr_block) / [`set_ipv6_cidr_block(Option<String>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_ipv6_cidr_block):<br>required: **false**<br><p>The IPv6 network range to allow or deny, in CIDR notation (for example <code>2001:db8:1234:1a00::/64</code>).</p><br>
14    ///   - [`icmp_type_code(IcmpTypeCode)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::icmp_type_code) / [`set_icmp_type_code(Option<IcmpTypeCode>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_icmp_type_code):<br>required: **false**<br><p>ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.</p><br>
15    ///   - [`port_range(PortRange)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::port_range) / [`set_port_range(Option<PortRange>)`](crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::set_port_range):<br>required: **false**<br><p>TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).</p><br>
16    /// - On success, responds with [`CreateNetworkAclEntryOutput`](crate::operation::create_network_acl_entry::CreateNetworkAclEntryOutput)
17    /// - On failure, responds with [`SdkError<CreateNetworkAclEntryError>`](crate::operation::create_network_acl_entry::CreateNetworkAclEntryError)
18    pub fn create_network_acl_entry(&self) -> crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder {
19        crate::operation::create_network_acl_entry::builders::CreateNetworkAclEntryFluentBuilder::new(self.handle.clone())
20    }
21}