UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

222 lines (221 loc) 8.82 kB
import * as pulumi from "@pulumi/pulumi"; /** * !> **WARNING:** It has been deprecated, use `huaweicloud.Vpc.NetworkAcl` instead. * * Manages a network ACL rule resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * * const rule1 = new huaweicloud.NetworkAcl.AclRule("rule_1", { * action: "deny", * destinationIpAddress: "4.3.2.0/24", * destinationPort: "555", * protocol: "udp", * sourceIpAddress: "1.2.3.4", * sourcePort: "444", * }); * ``` * * ## Import * * network ACL rules can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:NetworkAcl/aclRule:AclRule rule_1 89a84b28-4cc2-4859-9885-c67e802a46a3 * ``` */ export declare class AclRule extends pulumi.CustomResource { /** * Get an existing AclRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AclRuleState, opts?: pulumi.CustomResourceOptions): AclRule; /** * Returns true if the given object is an instance of AclRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AclRule; /** * Specifies the action in the network ACL rule. Currently, the value can be *allow* or * *deny*. */ readonly action: pulumi.Output<string>; /** * Specifies the description for the network ACL rule. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies the destination IP address to which the traffic is allowed. * The default value is *0.0.0.0/0*. For example: xxx.xxx.xxx.xxx (IP address), xxx.xxx.xxx.0/24 (CIDR block). */ readonly destinationIpAddress: pulumi.Output<string | undefined>; /** * Specifies the destination port number or port number range. The value ranges * from `1` to `65,535`. For a port number range, enter two port numbers connected by a colon(:). For example, 1:100. */ readonly destinationPort: pulumi.Output<string | undefined>; /** * Enabled status for the network ACL rule. Defaults to true. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * Specifies the IP version, either 4 (default) or 6. This parameter is available after * the IPv6 function is enabled. */ readonly ipVersion: pulumi.Output<number | undefined>; /** * Specifies a unique name for the network ACL rule. */ readonly name: pulumi.Output<string>; /** * Specifies the protocol supported by the network ACL rule. Valid values are: *tcp*, * *udp*, *icmp* and *any*. */ readonly protocol: pulumi.Output<string>; /** * The region in which to create the network ACL rule resource. If omitted, the * provider-level region will be used. Changing this creates a new network ACL rule resource. */ readonly region: pulumi.Output<string>; /** * Specifies the source IP address that the traffic is allowed from. The default * value is *0.0.0.0/0*. For example: xxx.xxx.xxx.xxx (IP address), xxx.xxx.xxx.0/24 (CIDR block). */ readonly sourceIpAddress: pulumi.Output<string | undefined>; /** * Specifies the source port number or port number range. The value ranges from 1 to * 65535. For a port number range, enter two port numbers connected by a colon(:). For example, 1:100. */ readonly sourcePort: pulumi.Output<string | undefined>; /** * Create a AclRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AclRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AclRule resources. */ export interface AclRuleState { /** * Specifies the action in the network ACL rule. Currently, the value can be *allow* or * *deny*. */ action?: pulumi.Input<string>; /** * Specifies the description for the network ACL rule. */ description?: pulumi.Input<string>; /** * Specifies the destination IP address to which the traffic is allowed. * The default value is *0.0.0.0/0*. For example: xxx.xxx.xxx.xxx (IP address), xxx.xxx.xxx.0/24 (CIDR block). */ destinationIpAddress?: pulumi.Input<string>; /** * Specifies the destination port number or port number range. The value ranges * from `1` to `65,535`. For a port number range, enter two port numbers connected by a colon(:). For example, 1:100. */ destinationPort?: pulumi.Input<string>; /** * Enabled status for the network ACL rule. Defaults to true. */ enabled?: pulumi.Input<boolean>; /** * Specifies the IP version, either 4 (default) or 6. This parameter is available after * the IPv6 function is enabled. */ ipVersion?: pulumi.Input<number>; /** * Specifies a unique name for the network ACL rule. */ name?: pulumi.Input<string>; /** * Specifies the protocol supported by the network ACL rule. Valid values are: *tcp*, * *udp*, *icmp* and *any*. */ protocol?: pulumi.Input<string>; /** * The region in which to create the network ACL rule resource. If omitted, the * provider-level region will be used. Changing this creates a new network ACL rule resource. */ region?: pulumi.Input<string>; /** * Specifies the source IP address that the traffic is allowed from. The default * value is *0.0.0.0/0*. For example: xxx.xxx.xxx.xxx (IP address), xxx.xxx.xxx.0/24 (CIDR block). */ sourceIpAddress?: pulumi.Input<string>; /** * Specifies the source port number or port number range. The value ranges from 1 to * 65535. For a port number range, enter two port numbers connected by a colon(:). For example, 1:100. */ sourcePort?: pulumi.Input<string>; } /** * The set of arguments for constructing a AclRule resource. */ export interface AclRuleArgs { /** * Specifies the action in the network ACL rule. Currently, the value can be *allow* or * *deny*. */ action: pulumi.Input<string>; /** * Specifies the description for the network ACL rule. */ description?: pulumi.Input<string>; /** * Specifies the destination IP address to which the traffic is allowed. * The default value is *0.0.0.0/0*. For example: xxx.xxx.xxx.xxx (IP address), xxx.xxx.xxx.0/24 (CIDR block). */ destinationIpAddress?: pulumi.Input<string>; /** * Specifies the destination port number or port number range. The value ranges * from `1` to `65,535`. For a port number range, enter two port numbers connected by a colon(:). For example, 1:100. */ destinationPort?: pulumi.Input<string>; /** * Enabled status for the network ACL rule. Defaults to true. */ enabled?: pulumi.Input<boolean>; /** * Specifies the IP version, either 4 (default) or 6. This parameter is available after * the IPv6 function is enabled. */ ipVersion?: pulumi.Input<number>; /** * Specifies a unique name for the network ACL rule. */ name?: pulumi.Input<string>; /** * Specifies the protocol supported by the network ACL rule. Valid values are: *tcp*, * *udp*, *icmp* and *any*. */ protocol: pulumi.Input<string>; /** * The region in which to create the network ACL rule resource. If omitted, the * provider-level region will be used. Changing this creates a new network ACL rule resource. */ region?: pulumi.Input<string>; /** * Specifies the source IP address that the traffic is allowed from. The default * value is *0.0.0.0/0*. For example: xxx.xxx.xxx.xxx (IP address), xxx.xxx.xxx.0/24 (CIDR block). */ sourceIpAddress?: pulumi.Input<string>; /** * Specifies the source port number or port number range. The value ranges from 1 to * 65535. For a port number range, enter two port numbers connected by a colon(:). For example, 1:100. */ sourcePort?: pulumi.Input<string>; }