import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
 * Manages a CFW ACL rule resource within HuaweiCloud.
 *
 * ## Example Usage
 * ### Create a basic rule
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const name = config.requireObject("name");
 * const description = config.requireObject("description");
 * const objectId = config.requireObject("objectId");
 * const test = new huaweicloud.cfw.AclRule("test", {
 *     objectId: objectId,
 *     description: description,
 *     type: 0,
 *     addressType: 0,
 *     actionType: 0,
 *     longConnectEnable: 0,
 *     status: 1,
 *     sourceAddresses: ["1.1.1.1"],
 *     destinationAddresses: ["1.1.1.2"],
 *     customServices: [{
 *         protocol: 6,
 *         sourcePort: "81",
 *         destPort: "82",
 *     }],
 *     sequence: {
 *         top: 1,
 *     },
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 * ### Create a rule with the source address using the region list
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const name = config.requireObject("name");
 * const description = config.requireObject("description");
 * const objectId = config.requireObject("objectId");
 * const test = new huaweicloud.cfw.AclRule("test", {
 *     objectId: objectId,
 *     description: description,
 *     type: 0,
 *     addressType: 0,
 *     actionType: 0,
 *     longConnectEnable: 0,
 *     status: 1,
 *     sourceRegionLists: [{
 *         descriptionCn: "中国",
 *         descriptionEn: "Chinese Mainland",
 *         regionId: "CN",
 *         regionType: 0,
 *     }],
 *     destinationAddresses: ["1.1.1.2"],
 *     customServices: [{
 *         protocol: 6,
 *         sourcePort: "81",
 *         destPort: "82",
 *     }],
 *     sequence: {
 *         top: 1,
 *     },
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 * ### Create a rule with the custom service groups
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const name = config.requireObject("name");
 * const description = config.requireObject("description");
 * const objectId = config.requireObject("objectId");
 * const serviceGroupId = config.requireObject("serviceGroupId");
 * const protocol = config.requireObject("protocol");
 * const test = new huaweicloud.cfw.AclRule("test", {
 *     objectId: objectId,
 *     description: description,
 *     type: 0,
 *     addressType: 0,
 *     actionType: 0,
 *     longConnectEnable: 0,
 *     status: 1,
 *     sourceAddresses: ["1.1.1.1"],
 *     destinationAddresses: ["1.1.1.2"],
 *     customServiceGroups: {
 *         protocols: [protocol],
 *         groupIds: [serviceGroupId],
 *     },
 *     sequence: {
 *         top: 1,
 *     },
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 * ### Create a rule with any service
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const name = config.requireObject("name");
 * const description = config.requireObject("description");
 * const objectId = config.requireObject("objectId");
 * const serviceGroupId = config.requireObject("serviceGroupId");
 * const protocol = config.requireObject("protocol");
 * const test = new huaweicloud.cfw.AclRule("test", {
 *     objectId: objectId,
 *     description: description,
 *     type: 0,
 *     addressType: 0,
 *     actionType: 0,
 *     longConnectEnable: 0,
 *     status: 1,
 *     sourceAddresses: ["1.1.1.1"],
 *     destinationAddresses: ["1.1.1.2"],
 *     sequence: {
 *         top: 1,
 *     },
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 * ### Create a rule with any source address
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const name = config.requireObject("name");
 * const description = config.requireObject("description");
 * const objectId = config.requireObject("objectId");
 * const serviceGroupId = config.requireObject("serviceGroupId");
 * const protocol = config.requireObject("protocol");
 * const test = new huaweicloud.cfw.AclRule("test", {
 *     objectId: objectId,
 *     description: description,
 *     type: 0,
 *     addressType: 0,
 *     actionType: 0,
 *     longConnectEnable: 0,
 *     status: 1,
 *     destinationAddresses: ["1.1.1.2"],
 *     customServices: [{
 *         protocol: 6,
 *         sourcePort: "81",
 *         destPort: "82",
 *     }],
 *     sequence: {
 *         top: 1,
 *     },
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * The ACL rule can be imported using `object_id`, `id`, separated by a slash, e.g. bash
 *
 * ```sh
 *  $ pulumi import huaweicloud:Cfw/aclRule:AclRule test <object_id>/<id>
 * ```
 *
 *  Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`sequence`, `type`, `predefined_service_groups` and `source_predefined_groups`. It is generally recommended running `terraform plan` after importing the resource. You can then decide if changes should be applied to the instance, or the resource definition should be updated to align with the instance. Also you can ignore changes as below. hcl resource "huaweicloud_cfw_acl_rule" "test" {
 *
 *  ...
 *
 *  lifecycle {
 *
 *  ignore_changes = [
 *
 *  sequence, type, predefined_service_groups, source_predefined_groups,
 *
 *  ]
 *
 *  } }
 */
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;
    /**
     * The action type.
     * The value can be `0` (allow), `1` (deny).
     */
    readonly actionType: pulumi.Output<number>;
    /**
     * The address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    readonly addressType: pulumi.Output<number>;
    /**
     * The application list.
     * The valid value can be **HTTP**, **HTTPS**, **TLS1**, **DNS**, **SSH**, **MYSQL**, **SMTP**, **RDP**, **RDPS**,
     * **VNC**, **POP3**, **IMAP4**, **SMTPS**, **POP3S**, **FTPS**, **ANY**, **BGP** and so on.
     */
    readonly applications: pulumi.Output<string[] | undefined>;
    /**
     * The custom service group list.
     * The customServiceGroups structure is documented below.
     */
    readonly customServiceGroups: pulumi.Output<outputs.Cfw.AclRuleCustomServiceGroups | undefined>;
    /**
     * The custom service configuration.
     * The customServices structure is documented below.
     */
    readonly customServices: pulumi.Output<outputs.Cfw.AclRuleCustomService[] | undefined>;
    /**
     * The rule description.
     */
    readonly description: pulumi.Output<string>;
    /**
     * The destination address group list.
     */
    readonly destinationAddressGroups: pulumi.Output<string[] | undefined>;
    /**
     * The destination address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    readonly destinationAddressType: pulumi.Output<number | undefined>;
    /**
     * The destination IP address list.
     */
    readonly destinationAddresses: pulumi.Output<string[] | undefined>;
    /**
     * The destination domain address name.
     */
    readonly destinationDomainAddressName: pulumi.Output<string | undefined>;
    /**
     * The destination domain group ID.
     */
    readonly destinationDomainGroupId: pulumi.Output<string | undefined>;
    /**
     * The destination domain group name.
     */
    readonly destinationDomainGroupName: pulumi.Output<string | undefined>;
    /**
     * The destination domain group type.
     * The options are as follows:
     * + **4**: application domain name group;
     * + **6**: network domain name group;
     */
    readonly destinationDomainGroupType: pulumi.Output<number | undefined>;
    /**
     * The destination region list.
     * The destinationRegionList structure is documented below.
     */
    readonly destinationRegionLists: pulumi.Output<outputs.Cfw.AclRuleDestinationRegionList[] | undefined>;
    /**
     * The rule direction. The options are as follows:
     * + **0**: inbound;
     * + **1**: outbound;
     */
    readonly direction: pulumi.Output<number>;
    readonly enableForceNew: pulumi.Output<string | undefined>;
    /**
     * Whether to support persistent connections.
     */
    readonly longConnectEnable: pulumi.Output<number>;
    /**
     * The persistent connection duration (hour).
     */
    readonly longConnectTimeHour: pulumi.Output<number>;
    /**
     * The persistent connection duration (minute).
     */
    readonly longConnectTimeMinute: pulumi.Output<number>;
    /**
     * The persistent Connection Duration (second).
     */
    readonly longConnectTimeSecond: pulumi.Output<number>;
    /**
     * The rule name.
     */
    readonly name: pulumi.Output<string>;
    /**
     * The protected object ID.
     */
    readonly objectId: pulumi.Output<string>;
    /**
     * The predefined service group list.
     * The predefinedServiceGroups structure is documented below.
     */
    readonly predefinedServiceGroups: pulumi.Output<outputs.Cfw.AclRulePredefinedServiceGroups | undefined>;
    /**
     * Specifies the region in which to create the resource.
     * If omitted, the provider-level region will be used.
     * Changing this creates a new resource.
     */
    readonly region: pulumi.Output<string>;
    /**
     * The number of times the ACL rule is hit.
     * Setting the value to **0** will clear the hit count. Value options: **0**.
     */
    readonly ruleHitCount: pulumi.Output<string>;
    /**
     * The sequence configuration.
     * The sequence structure is documented below.
     */
    readonly sequence: pulumi.Output<outputs.Cfw.AclRuleSequence>;
    /**
     * The source address group list.
     */
    readonly sourceAddressGroups: pulumi.Output<string[] | undefined>;
    /**
     * The source address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    readonly sourceAddressType: pulumi.Output<number | undefined>;
    /**
     * The source IP address list.
     */
    readonly sourceAddresses: pulumi.Output<string[] | undefined>;
    /**
     * The source predefined address group list.
     */
    readonly sourcePredefinedGroups: pulumi.Output<string[] | undefined>;
    /**
     * The source region list.
     * The sourceRegionList structure is documented below.
     */
    readonly sourceRegionLists: pulumi.Output<outputs.Cfw.AclRuleSourceRegionList[] | undefined>;
    /**
     * The rule status. The options are as follows:
     * + **0**: disabled;
     * + **1**: enabled;
     */
    readonly status: pulumi.Output<number>;
    /**
     * The key/value pairs to associate with the ACL rule.
     */
    readonly tags: pulumi.Output<{
        [key: string]: string;
    } | undefined>;
    /**
     * The rule type.
     * The value can be `0` (Internet rule), `1` (VPC rule), or `2` (NAT rule).
     */
    readonly type: pulumi.Output<number>;
    /**
     * 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 {
    /**
     * The action type.
     * The value can be `0` (allow), `1` (deny).
     */
    actionType?: pulumi.Input<number>;
    /**
     * The address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    addressType?: pulumi.Input<number>;
    /**
     * The application list.
     * The valid value can be **HTTP**, **HTTPS**, **TLS1**, **DNS**, **SSH**, **MYSQL**, **SMTP**, **RDP**, **RDPS**,
     * **VNC**, **POP3**, **IMAP4**, **SMTPS**, **POP3S**, **FTPS**, **ANY**, **BGP** and so on.
     */
    applications?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The custom service group list.
     * The customServiceGroups structure is documented below.
     */
    customServiceGroups?: pulumi.Input<inputs.Cfw.AclRuleCustomServiceGroups>;
    /**
     * The custom service configuration.
     * The customServices structure is documented below.
     */
    customServices?: pulumi.Input<pulumi.Input<inputs.Cfw.AclRuleCustomService>[]>;
    /**
     * The rule description.
     */
    description?: pulumi.Input<string>;
    /**
     * The destination address group list.
     */
    destinationAddressGroups?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The destination address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    destinationAddressType?: pulumi.Input<number>;
    /**
     * The destination IP address list.
     */
    destinationAddresses?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The destination domain address name.
     */
    destinationDomainAddressName?: pulumi.Input<string>;
    /**
     * The destination domain group ID.
     */
    destinationDomainGroupId?: pulumi.Input<string>;
    /**
     * The destination domain group name.
     */
    destinationDomainGroupName?: pulumi.Input<string>;
    /**
     * The destination domain group type.
     * The options are as follows:
     * + **4**: application domain name group;
     * + **6**: network domain name group;
     */
    destinationDomainGroupType?: pulumi.Input<number>;
    /**
     * The destination region list.
     * The destinationRegionList structure is documented below.
     */
    destinationRegionLists?: pulumi.Input<pulumi.Input<inputs.Cfw.AclRuleDestinationRegionList>[]>;
    /**
     * The rule direction. The options are as follows:
     * + **0**: inbound;
     * + **1**: outbound;
     */
    direction?: pulumi.Input<number>;
    enableForceNew?: pulumi.Input<string>;
    /**
     * Whether to support persistent connections.
     */
    longConnectEnable?: pulumi.Input<number>;
    /**
     * The persistent connection duration (hour).
     */
    longConnectTimeHour?: pulumi.Input<number>;
    /**
     * The persistent connection duration (minute).
     */
    longConnectTimeMinute?: pulumi.Input<number>;
    /**
     * The persistent Connection Duration (second).
     */
    longConnectTimeSecond?: pulumi.Input<number>;
    /**
     * The rule name.
     */
    name?: pulumi.Input<string>;
    /**
     * The protected object ID.
     */
    objectId?: pulumi.Input<string>;
    /**
     * The predefined service group list.
     * The predefinedServiceGroups structure is documented below.
     */
    predefinedServiceGroups?: pulumi.Input<inputs.Cfw.AclRulePredefinedServiceGroups>;
    /**
     * Specifies the region in which to create the resource.
     * If omitted, the provider-level region will be used.
     * Changing this creates a new resource.
     */
    region?: pulumi.Input<string>;
    /**
     * The number of times the ACL rule is hit.
     * Setting the value to **0** will clear the hit count. Value options: **0**.
     */
    ruleHitCount?: pulumi.Input<string>;
    /**
     * The sequence configuration.
     * The sequence structure is documented below.
     */
    sequence?: pulumi.Input<inputs.Cfw.AclRuleSequence>;
    /**
     * The source address group list.
     */
    sourceAddressGroups?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The source address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    sourceAddressType?: pulumi.Input<number>;
    /**
     * The source IP address list.
     */
    sourceAddresses?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The source predefined address group list.
     */
    sourcePredefinedGroups?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The source region list.
     * The sourceRegionList structure is documented below.
     */
    sourceRegionLists?: pulumi.Input<pulumi.Input<inputs.Cfw.AclRuleSourceRegionList>[]>;
    /**
     * The rule status. The options are as follows:
     * + **0**: disabled;
     * + **1**: enabled;
     */
    status?: pulumi.Input<number>;
    /**
     * The key/value pairs to associate with the ACL rule.
     */
    tags?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The rule type.
     * The value can be `0` (Internet rule), `1` (VPC rule), or `2` (NAT rule).
     */
    type?: pulumi.Input<number>;
}
/**
 * The set of arguments for constructing a AclRule resource.
 */
export interface AclRuleArgs {
    /**
     * The action type.
     * The value can be `0` (allow), `1` (deny).
     */
    actionType: pulumi.Input<number>;
    /**
     * The address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    addressType: pulumi.Input<number>;
    /**
     * The application list.
     * The valid value can be **HTTP**, **HTTPS**, **TLS1**, **DNS**, **SSH**, **MYSQL**, **SMTP**, **RDP**, **RDPS**,
     * **VNC**, **POP3**, **IMAP4**, **SMTPS**, **POP3S**, **FTPS**, **ANY**, **BGP** and so on.
     */
    applications?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The custom service group list.
     * The customServiceGroups structure is documented below.
     */
    customServiceGroups?: pulumi.Input<inputs.Cfw.AclRuleCustomServiceGroups>;
    /**
     * The custom service configuration.
     * The customServices structure is documented below.
     */
    customServices?: pulumi.Input<pulumi.Input<inputs.Cfw.AclRuleCustomService>[]>;
    /**
     * The rule description.
     */
    description?: pulumi.Input<string>;
    /**
     * The destination address group list.
     */
    destinationAddressGroups?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The destination address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    destinationAddressType?: pulumi.Input<number>;
    /**
     * The destination IP address list.
     */
    destinationAddresses?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The destination domain address name.
     */
    destinationDomainAddressName?: pulumi.Input<string>;
    /**
     * The destination domain group ID.
     */
    destinationDomainGroupId?: pulumi.Input<string>;
    /**
     * The destination domain group name.
     */
    destinationDomainGroupName?: pulumi.Input<string>;
    /**
     * The destination domain group type.
     * The options are as follows:
     * + **4**: application domain name group;
     * + **6**: network domain name group;
     */
    destinationDomainGroupType?: pulumi.Input<number>;
    /**
     * The destination region list.
     * The destinationRegionList structure is documented below.
     */
    destinationRegionLists?: pulumi.Input<pulumi.Input<inputs.Cfw.AclRuleDestinationRegionList>[]>;
    /**
     * The rule direction. The options are as follows:
     * + **0**: inbound;
     * + **1**: outbound;
     */
    direction?: pulumi.Input<number>;
    enableForceNew?: pulumi.Input<string>;
    /**
     * Whether to support persistent connections.
     */
    longConnectEnable: pulumi.Input<number>;
    /**
     * The persistent connection duration (hour).
     */
    longConnectTimeHour?: pulumi.Input<number>;
    /**
     * The persistent connection duration (minute).
     */
    longConnectTimeMinute?: pulumi.Input<number>;
    /**
     * The persistent Connection Duration (second).
     */
    longConnectTimeSecond?: pulumi.Input<number>;
    /**
     * The rule name.
     */
    name?: pulumi.Input<string>;
    /**
     * The protected object ID.
     */
    objectId: pulumi.Input<string>;
    /**
     * The predefined service group list.
     * The predefinedServiceGroups structure is documented below.
     */
    predefinedServiceGroups?: pulumi.Input<inputs.Cfw.AclRulePredefinedServiceGroups>;
    /**
     * Specifies the region in which to create the resource.
     * If omitted, the provider-level region will be used.
     * Changing this creates a new resource.
     */
    region?: pulumi.Input<string>;
    /**
     * The number of times the ACL rule is hit.
     * Setting the value to **0** will clear the hit count. Value options: **0**.
     */
    ruleHitCount?: pulumi.Input<string>;
    /**
     * The sequence configuration.
     * The sequence structure is documented below.
     */
    sequence: pulumi.Input<inputs.Cfw.AclRuleSequence>;
    /**
     * The source address group list.
     */
    sourceAddressGroups?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The source address type.
     * The value can be `0` (IPv4), `1` (IPv6).
     */
    sourceAddressType?: pulumi.Input<number>;
    /**
     * The source IP address list.
     */
    sourceAddresses?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The source predefined address group list.
     */
    sourcePredefinedGroups?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The source region list.
     * The sourceRegionList structure is documented below.
     */
    sourceRegionLists?: pulumi.Input<pulumi.Input<inputs.Cfw.AclRuleSourceRegionList>[]>;
    /**
     * The rule status. The options are as follows:
     * + **0**: disabled;
     * + **1**: enabled;
     */
    status: pulumi.Input<number>;
    /**
     * The key/value pairs to associate with the ACL rule.
     */
    tags?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The rule type.
     * The value can be `0` (Internet rule), `1` (VPC rule), or `2` (NAT rule).
     */
    type: pulumi.Input<number>;
}
