import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import type { CreateNetworkAclEntryRequest } from "../models/models_1"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateNetworkAclEntryCommand}. */ export interface CreateNetworkAclEntryCommandInput extends CreateNetworkAclEntryRequest { } /** * @public * * The output of {@link CreateNetworkAclEntryCommand}. */ export interface CreateNetworkAclEntryCommandOutput extends __MetadataBearer { } declare const CreateNetworkAclEntryCommand_base: { new (input: CreateNetworkAclEntryCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateNetworkAclEntryCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules * and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated * with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of * ingress rules and a separate set of egress rules.

*

We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the * other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.

*

After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.

*

For more information about network ACLs, see Network ACLs * in the Amazon VPC User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { EC2Client, CreateNetworkAclEntryCommand } from "@aws-sdk/client-ec2"; // ES Modules import * // const { EC2Client, CreateNetworkAclEntryCommand } = require("@aws-sdk/client-ec2"); // CommonJS import * // import type { EC2ClientConfig } from "@aws-sdk/client-ec2"; * const config = {}; // type is EC2ClientConfig * const client = new EC2Client(config); * const input = { // CreateNetworkAclEntryRequest * DryRun: true || false, * NetworkAclId: "STRING_VALUE", // required * RuleNumber: Number("int"), // required * Protocol: "STRING_VALUE", // required * RuleAction: "allow" || "deny", // required * Egress: true || false, // required * CidrBlock: "STRING_VALUE", * Ipv6CidrBlock: "STRING_VALUE", * IcmpTypeCode: { // IcmpTypeCode * Code: Number("int"), * Type: Number("int"), * }, * PortRange: { // PortRange * From: Number("int"), * To: Number("int"), * }, * }; * const command = new CreateNetworkAclEntryCommand(input); * const response = await client.send(command); * // {}; * * ``` * * @param CreateNetworkAclEntryCommandInput - {@link CreateNetworkAclEntryCommandInput} * @returns {@link CreateNetworkAclEntryCommandOutput} * @see {@link CreateNetworkAclEntryCommandInput} for command's `input` shape. * @see {@link CreateNetworkAclEntryCommandOutput} for command's `response` shape. * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape. * * @throws {@link EC2ServiceException} *

Base exception class for all service exceptions from EC2 service.

* * * @example To create a network ACL entry * ```javascript * // This example creates an entry for the specified network ACL. The rule allows ingress traffic from anywhere (0.0.0.0/0) on UDP port 53 (DNS) into any associated subnet. * const input = { * CidrBlock: "0.0.0.0/0", * Egress: false, * NetworkAclId: "acl-5fb85d36", * PortRange: { * From: 53, * To: 53 * }, * Protocol: "17", * RuleAction: "allow", * RuleNumber: 100 * }; * const command = new CreateNetworkAclEntryCommand(input); * const response = await client.send(command); * /* response is * { /* metadata only *\/ } * *\/ * ``` * * @public */ export declare class CreateNetworkAclEntryCommand extends CreateNetworkAclEntryCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateNetworkAclEntryRequest; output: {}; }; sdk: { input: CreateNetworkAclEntryCommandInput; output: CreateNetworkAclEntryCommandOutput; }; }; }