UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

223 lines (222 loc) 9.04 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a network ACL rule resource within HuaweiCloud IEC. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const aclTest = new huaweicloud.iec.NetworkAcl("aclTest", {}); * const ruleTest = new huaweicloud.iec.NetworkAclRule("ruleTest", { * networkAclId: aclTest.id, * direction: "ingress", * protocol: "tcp", * action: "allow", * sourceIpAddress: "152.16.30.0/24", * destinationIpAddress: "192.168.128.0/18", * destinationPort: "445", * enabled: true, * }); * ``` */ export declare class NetworkAclRule extends pulumi.CustomResource { /** * Get an existing NetworkAclRule 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?: NetworkAclRuleState, opts?: pulumi.CustomResourceOptions): NetworkAclRule; /** * Returns true if the given object is an instance of NetworkAclRule. 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 NetworkAclRule; /** * Specifies the action in the iec network ACL rule. Currently, the value can be **allow** * or **deny**. */ readonly action: pulumi.Output<string | undefined>; /** * Specifies the description for the iec 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 hyphen (-). For example, 1-100. */ readonly destinationPort: pulumi.Output<string | undefined>; /** * Specifies the direction of the rule, valid values are **ingress** or **egress**. * Changing this parameter creates a new iec network ACL rule resource. */ readonly direction: pulumi.Output<string>; /** * Specifies the Enabled status for the iec network ACL rule. The default value is true. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * The version of elastic IP address. IEC services only support IPv4(4) now. */ readonly ipVersion: pulumi.Output<number | undefined>; /** * Specifies a unique id for the iec network ACL. */ readonly networkAclId: pulumi.Output<string>; /** * The ID of the firewall policy for the iec network ACL. */ readonly policyId: pulumi.Output<string>; /** * Specifies the protocol supported by the iec network ACL rule.Valid values are: **tcp**, * **udp**, **icmp** and **any**. */ readonly protocol: pulumi.Output<string | undefined>; /** * 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 hyphen (-). For example, 1-100. */ readonly sourcePort: pulumi.Output<string | undefined>; /** * Create a NetworkAclRule 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: NetworkAclRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NetworkAclRule resources. */ export interface NetworkAclRuleState { /** * Specifies the action in the iec network ACL rule. Currently, the value can be **allow** * or **deny**. */ action?: pulumi.Input<string>; /** * Specifies the description for the iec 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 hyphen (-). For example, 1-100. */ destinationPort?: pulumi.Input<string>; /** * Specifies the direction of the rule, valid values are **ingress** or **egress**. * Changing this parameter creates a new iec network ACL rule resource. */ direction?: pulumi.Input<string>; /** * Specifies the Enabled status for the iec network ACL rule. The default value is true. */ enabled?: pulumi.Input<boolean>; /** * The version of elastic IP address. IEC services only support IPv4(4) now. */ ipVersion?: pulumi.Input<number>; /** * Specifies a unique id for the iec network ACL. */ networkAclId?: pulumi.Input<string>; /** * The ID of the firewall policy for the iec network ACL. */ policyId?: pulumi.Input<string>; /** * Specifies the protocol supported by the iec network ACL rule.Valid values are: **tcp**, * **udp**, **icmp** and **any**. */ protocol?: 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 hyphen (-). For example, 1-100. */ sourcePort?: pulumi.Input<string>; } /** * The set of arguments for constructing a NetworkAclRule resource. */ export interface NetworkAclRuleArgs { /** * Specifies the action in the iec network ACL rule. Currently, the value can be **allow** * or **deny**. */ action?: pulumi.Input<string>; /** * Specifies the description for the iec 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 hyphen (-). For example, 1-100. */ destinationPort?: pulumi.Input<string>; /** * Specifies the direction of the rule, valid values are **ingress** or **egress**. * Changing this parameter creates a new iec network ACL rule resource. */ direction: pulumi.Input<string>; /** * Specifies the Enabled status for the iec network ACL rule. The default value is true. */ enabled?: pulumi.Input<boolean>; /** * The version of elastic IP address. IEC services only support IPv4(4) now. */ ipVersion?: pulumi.Input<number>; /** * Specifies a unique id for the iec network ACL. */ networkAclId: pulumi.Input<string>; /** * Specifies the protocol supported by the iec network ACL rule.Valid values are: **tcp**, * **udp**, **icmp** and **any**. */ protocol?: 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 hyphen (-). For example, 1-100. */ sourcePort?: pulumi.Input<string>; }