@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
266 lines (265 loc) • 10.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a VPC traffic mirror filter rule resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const trafficMirrorFilterId = config.requireObject("trafficMirrorFilterId");
* const test = new huaweicloud.vpc.TrafficMirrorFilterRule("test", {
* trafficMirrorFilterId: trafficMirrorFilterId,
* direction: "ingress",
* protocol: "tcp",
* ethertype: "IPv4",
* action: "accept",
* priority: 1,
* sourceCidrBlock: "10.0.0.0/8",
* sourcePortRange: "80-90",
* destinationCidrBlock: "192.168.1.0/24",
* destinationPortRange: "10-65535",
* });
* ```
*
* ## Import
*
* The traffic mirror filter rule can be imported using `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Vpc/trafficMirrorFilterRule:TrafficMirrorFilterRule test <id>
* ```
*/
export declare class TrafficMirrorFilterRule extends pulumi.CustomResource {
/**
* Get an existing TrafficMirrorFilterRule 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?: TrafficMirrorFilterRuleState, opts?: pulumi.CustomResourceOptions): TrafficMirrorFilterRule;
/**
* Returns true if the given object is an instance of TrafficMirrorFilterRule. 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 TrafficMirrorFilterRule;
/**
* Specifies the policy of in the traffic mirror filter rule.
* Valid values are **accept** or **reject**.
*/
readonly action: pulumi.Output<string>;
/**
* The creation time of the traffic mirror filter rule.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Specifies the description of the traffic mirror filter rule.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the destination IP address of the traffic traffic mirror filter
* rule.
*/
readonly destinationCidrBlock: pulumi.Output<string | undefined>;
/**
* Specifies the destination port number range of the traffic mirror filter
* rule. The value ranges from `1` to `65,535`, enter two port numbers connected by a hyphen (-). For example, **80-200**.
*/
readonly destinationPortRange: pulumi.Output<string | undefined>;
/**
* Specifies the direction of the traffic mirror filter rule.
* Valid values are **ingress** or **egress**. Changing this creates a new resource.
*/
readonly direction: pulumi.Output<string>;
/**
* Specifies the IP address protocol type of the traffic mirror filter rule.
* Valid values are **IPv4** or **IPv6**.
*/
readonly ethertype: pulumi.Output<string>;
/**
* Specifies the priority number of the traffic mirror filter rule.
* Valid value ranges from `1` to `65,535`.
* The smaller the priority number, the higher the priority.
*/
readonly priority: pulumi.Output<number>;
/**
* Specifies the protocol of the traffic mirror filter rule.
* Valid value are **tcp**, **udp**, **icmp**, **icmpv6**, **all**.
*/
readonly protocol: pulumi.Output<string>;
/**
* 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>;
/**
* Specifies the source IP address of the traffic traffic mirror filter rule.
*/
readonly sourceCidrBlock: pulumi.Output<string | undefined>;
/**
* Specifies the source port number range of the traffic mirror filter rule.
* The value ranges from `1` to `65,535`, enter two port numbers connected by a hyphen (-). For example, **80-200**.
*/
readonly sourcePortRange: pulumi.Output<string | undefined>;
/**
* Specifies an ID of the traffic mirror filter to which
* the rule belongs. Changing this creates a new resource.
*/
readonly trafficMirrorFilterId: pulumi.Output<string>;
/**
* The latest update time of the traffic mirror filter rule.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a TrafficMirrorFilterRule 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: TrafficMirrorFilterRuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering TrafficMirrorFilterRule resources.
*/
export interface TrafficMirrorFilterRuleState {
/**
* Specifies the policy of in the traffic mirror filter rule.
* Valid values are **accept** or **reject**.
*/
action?: pulumi.Input<string>;
/**
* The creation time of the traffic mirror filter rule.
*/
createdAt?: pulumi.Input<string>;
/**
* Specifies the description of the traffic mirror filter rule.
*/
description?: pulumi.Input<string>;
/**
* Specifies the destination IP address of the traffic traffic mirror filter
* rule.
*/
destinationCidrBlock?: pulumi.Input<string>;
/**
* Specifies the destination port number range of the traffic mirror filter
* rule. The value ranges from `1` to `65,535`, enter two port numbers connected by a hyphen (-). For example, **80-200**.
*/
destinationPortRange?: pulumi.Input<string>;
/**
* Specifies the direction of the traffic mirror filter rule.
* Valid values are **ingress** or **egress**. Changing this creates a new resource.
*/
direction?: pulumi.Input<string>;
/**
* Specifies the IP address protocol type of the traffic mirror filter rule.
* Valid values are **IPv4** or **IPv6**.
*/
ethertype?: pulumi.Input<string>;
/**
* Specifies the priority number of the traffic mirror filter rule.
* Valid value ranges from `1` to `65,535`.
* The smaller the priority number, the higher the priority.
*/
priority?: pulumi.Input<number>;
/**
* Specifies the protocol of the traffic mirror filter rule.
* Valid value are **tcp**, **udp**, **icmp**, **icmpv6**, **all**.
*/
protocol?: pulumi.Input<string>;
/**
* 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>;
/**
* Specifies the source IP address of the traffic traffic mirror filter rule.
*/
sourceCidrBlock?: pulumi.Input<string>;
/**
* Specifies the source port number range of the traffic mirror filter rule.
* The value ranges from `1` to `65,535`, enter two port numbers connected by a hyphen (-). For example, **80-200**.
*/
sourcePortRange?: pulumi.Input<string>;
/**
* Specifies an ID of the traffic mirror filter to which
* the rule belongs. Changing this creates a new resource.
*/
trafficMirrorFilterId?: pulumi.Input<string>;
/**
* The latest update time of the traffic mirror filter rule.
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a TrafficMirrorFilterRule resource.
*/
export interface TrafficMirrorFilterRuleArgs {
/**
* Specifies the policy of in the traffic mirror filter rule.
* Valid values are **accept** or **reject**.
*/
action: pulumi.Input<string>;
/**
* Specifies the description of the traffic mirror filter rule.
*/
description?: pulumi.Input<string>;
/**
* Specifies the destination IP address of the traffic traffic mirror filter
* rule.
*/
destinationCidrBlock?: pulumi.Input<string>;
/**
* Specifies the destination port number range of the traffic mirror filter
* rule. The value ranges from `1` to `65,535`, enter two port numbers connected by a hyphen (-). For example, **80-200**.
*/
destinationPortRange?: pulumi.Input<string>;
/**
* Specifies the direction of the traffic mirror filter rule.
* Valid values are **ingress** or **egress**. Changing this creates a new resource.
*/
direction: pulumi.Input<string>;
/**
* Specifies the IP address protocol type of the traffic mirror filter rule.
* Valid values are **IPv4** or **IPv6**.
*/
ethertype: pulumi.Input<string>;
/**
* Specifies the priority number of the traffic mirror filter rule.
* Valid value ranges from `1` to `65,535`.
* The smaller the priority number, the higher the priority.
*/
priority: pulumi.Input<number>;
/**
* Specifies the protocol of the traffic mirror filter rule.
* Valid value are **tcp**, **udp**, **icmp**, **icmpv6**, **all**.
*/
protocol: pulumi.Input<string>;
/**
* 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>;
/**
* Specifies the source IP address of the traffic traffic mirror filter rule.
*/
sourceCidrBlock?: pulumi.Input<string>;
/**
* Specifies the source port number range of the traffic mirror filter rule.
* The value ranges from `1` to `65,535`, enter two port numbers connected by a hyphen (-). For example, **80-200**.
*/
sourcePortRange?: pulumi.Input<string>;
/**
* Specifies an ID of the traffic mirror filter to which
* the rule belongs. Changing this creates a new resource.
*/
trafficMirrorFilterId: pulumi.Input<string>;
}