UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

407 lines (406 loc) 16.7 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to manage cfw nat firewall control policy * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const fooCfwAddressBook = new volcengine.cloud_firewall.CfwAddressBook("fooCfwAddressBook", { * groupName: "acc-test-address-book", * description: "acc-test", * groupType: "ip", * addressLists: [ * "192.168.1.1", * "192.168.2.2", * ], * }); * const fooCfwNatFirewallControlPolicy = new volcengine.cloud_firewall.CfwNatFirewallControlPolicy("fooCfwNatFirewallControlPolicy", { * direction: "in", * natFirewallId: "nfw-ydmkayvjsw2vsavx****", * action: "accept", * destinationType: "group", * destination: fooCfwAddressBook.id, * proto: "TCP", * sourceType: "net", * source: "0.0.0.0/0", * description: "acc-test-control-policy", * destPortType: "port", * destPort: "300", * repeatType: "Weekly", * repeatStartTime: "01:00", * repeatEndTime: "11:00", * repeatDays: [ * 2, * 5, * 4, * ], * startTime: 1736092800, * endTime: 1738339140, * priority: 1, * status: true, * }); * ``` * * ## Import * * NatFirewallControlPolicy can be imported using the direction_nat_firewall_id:rule_id, e.g. * * ```sh * $ pulumi import volcengine:cloud_firewall/cfwNatFirewallControlPolicy:CfwNatFirewallControlPolicy default resource_id * ``` */ export declare class CfwNatFirewallControlPolicy extends pulumi.CustomResource { /** * Get an existing CfwNatFirewallControlPolicy 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?: CfwNatFirewallControlPolicyState, opts?: pulumi.CustomResourceOptions): CfwNatFirewallControlPolicy; /** * Returns true if the given object is an instance of CfwNatFirewallControlPolicy. 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 CfwNatFirewallControlPolicy; /** * The account id of the nat firewall control policy. */ readonly accountId: pulumi.Output<string>; /** * The action of the nat firewall control policy. Valid values: `accept`, `deny`, `monitor`. */ readonly action: pulumi.Output<string>; /** * The description of the nat firewall control policy. */ readonly description: pulumi.Output<string | undefined>; /** * The dest port of the nat firewall control policy. */ readonly destPort: pulumi.Output<string>; /** * The dest port type of the nat firewall control policy. Valid values: `port`, `group`. */ readonly destPortType: pulumi.Output<string>; /** * The destination of the nat firewall control policy. */ readonly destination: pulumi.Output<string>; /** * The destination type of the nat firewall control policy. Valid values: `net`, `group`, `location`, `domain`. */ readonly destinationType: pulumi.Output<string>; /** * The direction of the nat firewall control policy. Valid values: `in`, `out`. */ readonly direction: pulumi.Output<string>; /** * The effect status of the nat firewall control policy. 1: Not yet effective, 2: Issued in progress, 3: Effective. */ readonly effectStatus: pulumi.Output<number>; /** * The end time of the nat firewall control policy. Unix timestamp, fields need to be precise to 23:59:00 of the set date. * When the value of repeatType is one of `Once`, `Daily`, `Weekly`, `Monthly`, this field is required. */ readonly endTime: pulumi.Output<number | undefined>; /** * The hit count of the nat firewall control policy. */ readonly hitCnt: pulumi.Output<number>; /** * Whether the nat firewall control policy is effected. */ readonly isEffected: pulumi.Output<boolean>; /** * The id of the nat firewall. */ readonly natFirewallId: pulumi.Output<string>; /** * The name of the nat firewall. */ readonly natFirewallName: pulumi.Output<string>; /** * The priority of the nat firewall control policy. */ readonly prio: pulumi.Output<number>; /** * The priority of the nat firewall control policy. Default is 0. This field is only effective when creating a control policy.0 means lowest priority, 1 means highest priority. The priority increases in order from 1, with lower priority indicating higher priority. */ readonly priority: pulumi.Output<number | undefined>; /** * The proto of the nat firewall control policy. Valid values: `TCP`, `ICMP`, `UDP`, `ANY`. When the destinationType is `domain`, The proto must be `TCP`. */ readonly proto: pulumi.Output<string>; /** * The repeat days of the nat firewall control policy. When the value of repeatType is one of `Weekly`, `Monthly`, this field is required. * When the repeatType is `Weekly`, the valid value range is 0~6. * When the repeatType is `Monthly`, the valid value range is 1~31. */ readonly repeatDays: pulumi.Output<number[] | undefined>; /** * The repeat end time of the nat firewall control policy. Accurate to the minute, in the format of hh: mm. For example: 12:00. * When the value of repeatType is one of `Daily`, `Weekly`, `Monthly`, this field is required. */ readonly repeatEndTime: pulumi.Output<string | undefined>; /** * The repeat start time of the nat firewall control policy. Accurate to the minute, in the format of hh: mm. For example: 12:00. * When the value of repeatType is one of `Daily`, `Weekly`, `Monthly`, this field is required. */ readonly repeatStartTime: pulumi.Output<string | undefined>; /** * The repeat type of the nat firewall control policy. Valid values: `Permanent`, `Once`, `Daily`, `Weekly`, `Monthly`. */ readonly repeatType: pulumi.Output<string>; /** * The rule id of the nat firewall control policy. */ readonly ruleId: pulumi.Output<string>; /** * The source of the nat firewall control policy. */ readonly source: pulumi.Output<string>; /** * The source type of the nat firewall control policy. Valid values: `net`, `group`. */ readonly sourceType: pulumi.Output<string>; /** * The start time of the nat firewall control policy. Unix timestamp, fields need to be precise to 23:59:00 of the set date. * When the value of repeatType is one of `Once`, `Daily`, `Weekly`, `Monthly`, this field is required. */ readonly startTime: pulumi.Output<number | undefined>; /** * Whether to enable the nat firewall control policy. Default is false. */ readonly status: pulumi.Output<boolean>; /** * The update time of the nat firewall control policy. */ readonly updateTime: pulumi.Output<number>; /** * The use count of the nat firewall control policy. */ readonly useCount: pulumi.Output<number>; /** * Create a CfwNatFirewallControlPolicy 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: CfwNatFirewallControlPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CfwNatFirewallControlPolicy resources. */ export interface CfwNatFirewallControlPolicyState { /** * The account id of the nat firewall control policy. */ accountId?: pulumi.Input<string>; /** * The action of the nat firewall control policy. Valid values: `accept`, `deny`, `monitor`. */ action?: pulumi.Input<string>; /** * The description of the nat firewall control policy. */ description?: pulumi.Input<string>; /** * The dest port of the nat firewall control policy. */ destPort?: pulumi.Input<string>; /** * The dest port type of the nat firewall control policy. Valid values: `port`, `group`. */ destPortType?: pulumi.Input<string>; /** * The destination of the nat firewall control policy. */ destination?: pulumi.Input<string>; /** * The destination type of the nat firewall control policy. Valid values: `net`, `group`, `location`, `domain`. */ destinationType?: pulumi.Input<string>; /** * The direction of the nat firewall control policy. Valid values: `in`, `out`. */ direction?: pulumi.Input<string>; /** * The effect status of the nat firewall control policy. 1: Not yet effective, 2: Issued in progress, 3: Effective. */ effectStatus?: pulumi.Input<number>; /** * The end time of the nat firewall control policy. Unix timestamp, fields need to be precise to 23:59:00 of the set date. * When the value of repeatType is one of `Once`, `Daily`, `Weekly`, `Monthly`, this field is required. */ endTime?: pulumi.Input<number>; /** * The hit count of the nat firewall control policy. */ hitCnt?: pulumi.Input<number>; /** * Whether the nat firewall control policy is effected. */ isEffected?: pulumi.Input<boolean>; /** * The id of the nat firewall. */ natFirewallId?: pulumi.Input<string>; /** * The name of the nat firewall. */ natFirewallName?: pulumi.Input<string>; /** * The priority of the nat firewall control policy. */ prio?: pulumi.Input<number>; /** * The priority of the nat firewall control policy. Default is 0. This field is only effective when creating a control policy.0 means lowest priority, 1 means highest priority. The priority increases in order from 1, with lower priority indicating higher priority. */ priority?: pulumi.Input<number>; /** * The proto of the nat firewall control policy. Valid values: `TCP`, `ICMP`, `UDP`, `ANY`. When the destinationType is `domain`, The proto must be `TCP`. */ proto?: pulumi.Input<string>; /** * The repeat days of the nat firewall control policy. When the value of repeatType is one of `Weekly`, `Monthly`, this field is required. * When the repeatType is `Weekly`, the valid value range is 0~6. * When the repeatType is `Monthly`, the valid value range is 1~31. */ repeatDays?: pulumi.Input<pulumi.Input<number>[]>; /** * The repeat end time of the nat firewall control policy. Accurate to the minute, in the format of hh: mm. For example: 12:00. * When the value of repeatType is one of `Daily`, `Weekly`, `Monthly`, this field is required. */ repeatEndTime?: pulumi.Input<string>; /** * The repeat start time of the nat firewall control policy. Accurate to the minute, in the format of hh: mm. For example: 12:00. * When the value of repeatType is one of `Daily`, `Weekly`, `Monthly`, this field is required. */ repeatStartTime?: pulumi.Input<string>; /** * The repeat type of the nat firewall control policy. Valid values: `Permanent`, `Once`, `Daily`, `Weekly`, `Monthly`. */ repeatType?: pulumi.Input<string>; /** * The rule id of the nat firewall control policy. */ ruleId?: pulumi.Input<string>; /** * The source of the nat firewall control policy. */ source?: pulumi.Input<string>; /** * The source type of the nat firewall control policy. Valid values: `net`, `group`. */ sourceType?: pulumi.Input<string>; /** * The start time of the nat firewall control policy. Unix timestamp, fields need to be precise to 23:59:00 of the set date. * When the value of repeatType is one of `Once`, `Daily`, `Weekly`, `Monthly`, this field is required. */ startTime?: pulumi.Input<number>; /** * Whether to enable the nat firewall control policy. Default is false. */ status?: pulumi.Input<boolean>; /** * The update time of the nat firewall control policy. */ updateTime?: pulumi.Input<number>; /** * The use count of the nat firewall control policy. */ useCount?: pulumi.Input<number>; } /** * The set of arguments for constructing a CfwNatFirewallControlPolicy resource. */ export interface CfwNatFirewallControlPolicyArgs { /** * The action of the nat firewall control policy. Valid values: `accept`, `deny`, `monitor`. */ action: pulumi.Input<string>; /** * The description of the nat firewall control policy. */ description?: pulumi.Input<string>; /** * The dest port of the nat firewall control policy. */ destPort?: pulumi.Input<string>; /** * The dest port type of the nat firewall control policy. Valid values: `port`, `group`. */ destPortType?: pulumi.Input<string>; /** * The destination of the nat firewall control policy. */ destination: pulumi.Input<string>; /** * The destination type of the nat firewall control policy. Valid values: `net`, `group`, `location`, `domain`. */ destinationType: pulumi.Input<string>; /** * The direction of the nat firewall control policy. Valid values: `in`, `out`. */ direction: pulumi.Input<string>; /** * The end time of the nat firewall control policy. Unix timestamp, fields need to be precise to 23:59:00 of the set date. * When the value of repeatType is one of `Once`, `Daily`, `Weekly`, `Monthly`, this field is required. */ endTime?: pulumi.Input<number>; /** * The id of the nat firewall. */ natFirewallId: pulumi.Input<string>; /** * The priority of the nat firewall control policy. Default is 0. This field is only effective when creating a control policy.0 means lowest priority, 1 means highest priority. The priority increases in order from 1, with lower priority indicating higher priority. */ priority?: pulumi.Input<number>; /** * The proto of the nat firewall control policy. Valid values: `TCP`, `ICMP`, `UDP`, `ANY`. When the destinationType is `domain`, The proto must be `TCP`. */ proto: pulumi.Input<string>; /** * The repeat days of the nat firewall control policy. When the value of repeatType is one of `Weekly`, `Monthly`, this field is required. * When the repeatType is `Weekly`, the valid value range is 0~6. * When the repeatType is `Monthly`, the valid value range is 1~31. */ repeatDays?: pulumi.Input<pulumi.Input<number>[]>; /** * The repeat end time of the nat firewall control policy. Accurate to the minute, in the format of hh: mm. For example: 12:00. * When the value of repeatType is one of `Daily`, `Weekly`, `Monthly`, this field is required. */ repeatEndTime?: pulumi.Input<string>; /** * The repeat start time of the nat firewall control policy. Accurate to the minute, in the format of hh: mm. For example: 12:00. * When the value of repeatType is one of `Daily`, `Weekly`, `Monthly`, this field is required. */ repeatStartTime?: pulumi.Input<string>; /** * The repeat type of the nat firewall control policy. Valid values: `Permanent`, `Once`, `Daily`, `Weekly`, `Monthly`. */ repeatType?: pulumi.Input<string>; /** * The source of the nat firewall control policy. */ source: pulumi.Input<string>; /** * The source type of the nat firewall control policy. Valid values: `net`, `group`. */ sourceType: pulumi.Input<string>; /** * The start time of the nat firewall control policy. Unix timestamp, fields need to be precise to 23:59:00 of the set date. * When the value of repeatType is one of `Once`, `Daily`, `Weekly`, `Monthly`, this field is required. */ startTime?: pulumi.Input<number>; /** * Whether to enable the nat firewall control policy. Default is false. */ status?: pulumi.Input<boolean>; }