alicloud.vpc.TrafficMirrorFilter
Explore with Pulumi AI
Provides a VPC Traffic Mirror Filter resource. Traffic mirror filter criteria.
For information about VPC Traffic Mirror Filter and how to use it, see What is Traffic Mirror Filter.
NOTE: Available in v1.140.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const default3iXhoa = new alicloud.resourcemanager.ResourceGroup("default3iXhoa", {
displayName: "testname03",
resourceGroupName: name,
});
const defaultdNz2qk = new alicloud.resourcemanager.ResourceGroup("defaultdNz2qk", {
displayName: "testname04",
resourceGroupName: `${name}1`,
});
const _default = new alicloud.vpc.TrafficMirrorFilter("default", {
trafficMirrorFilterDescription: "test",
trafficMirrorFilterName: name,
resourceGroupId: default3iXhoa.id,
egressRules: [{
priority: 1,
protocol: "TCP",
action: "accept",
destinationCidrBlock: "32.0.0.0/4",
destinationPortRange: "80/80",
sourceCidrBlock: "16.0.0.0/4",
sourcePortRange: "80/80",
}],
ingressRules: [{
priority: 1,
protocol: "TCP",
action: "accept",
destinationCidrBlock: "10.64.0.0/10",
destinationPortRange: "80/80",
sourceCidrBlock: "10.0.0.0/8",
sourcePortRange: "80/80",
}],
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default3i_xhoa = alicloud.resourcemanager.ResourceGroup("default3iXhoa",
display_name="testname03",
resource_group_name=name)
defaultd_nz2qk = alicloud.resourcemanager.ResourceGroup("defaultdNz2qk",
display_name="testname04",
resource_group_name=f"{name}1")
default = alicloud.vpc.TrafficMirrorFilter("default",
traffic_mirror_filter_description="test",
traffic_mirror_filter_name=name,
resource_group_id=default3i_xhoa.id,
egress_rules=[alicloud.vpc.TrafficMirrorFilterEgressRuleArgs(
priority=1,
protocol="TCP",
action="accept",
destination_cidr_block="32.0.0.0/4",
destination_port_range="80/80",
source_cidr_block="16.0.0.0/4",
source_port_range="80/80",
)],
ingress_rules=[alicloud.vpc.TrafficMirrorFilterIngressRuleArgs(
priority=1,
protocol="TCP",
action="accept",
destination_cidr_block="10.64.0.0/10",
destination_port_range="80/80",
source_cidr_block="10.0.0.0/8",
source_port_range="80/80",
)])
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
default3iXhoa, err := resourcemanager.NewResourceGroup(ctx, "default3iXhoa", &resourcemanager.ResourceGroupArgs{
DisplayName: pulumi.String("testname03"),
ResourceGroupName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = resourcemanager.NewResourceGroup(ctx, "defaultdNz2qk", &resourcemanager.ResourceGroupArgs{
DisplayName: pulumi.String("testname04"),
ResourceGroupName: pulumi.String(fmt.Sprintf("%v1", name)),
})
if err != nil {
return err
}
_, err = vpc.NewTrafficMirrorFilter(ctx, "default", &vpc.TrafficMirrorFilterArgs{
TrafficMirrorFilterDescription: pulumi.String("test"),
TrafficMirrorFilterName: pulumi.String(name),
ResourceGroupId: default3iXhoa.ID(),
EgressRules: vpc.TrafficMirrorFilterEgressRuleTypeArray{
&vpc.TrafficMirrorFilterEgressRuleTypeArgs{
Priority: pulumi.Int(1),
Protocol: pulumi.String("TCP"),
Action: pulumi.String("accept"),
DestinationCidrBlock: pulumi.String("32.0.0.0/4"),
DestinationPortRange: pulumi.String("80/80"),
SourceCidrBlock: pulumi.String("16.0.0.0/4"),
SourcePortRange: pulumi.String("80/80"),
},
},
IngressRules: vpc.TrafficMirrorFilterIngressRuleTypeArray{
&vpc.TrafficMirrorFilterIngressRuleTypeArgs{
Priority: pulumi.Int(1),
Protocol: pulumi.String("TCP"),
Action: pulumi.String("accept"),
DestinationCidrBlock: pulumi.String("10.64.0.0/10"),
DestinationPortRange: pulumi.String("80/80"),
SourceCidrBlock: pulumi.String("10.0.0.0/8"),
SourcePortRange: pulumi.String("80/80"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var default3iXhoa = new AliCloud.ResourceManager.ResourceGroup("default3iXhoa", new()
{
DisplayName = "testname03",
ResourceGroupName = name,
});
var defaultdNz2qk = new AliCloud.ResourceManager.ResourceGroup("defaultdNz2qk", new()
{
DisplayName = "testname04",
ResourceGroupName = $"{name}1",
});
var @default = new AliCloud.Vpc.TrafficMirrorFilter("default", new()
{
TrafficMirrorFilterDescription = "test",
TrafficMirrorFilterName = name,
ResourceGroupId = default3iXhoa.Id,
EgressRules = new[]
{
new AliCloud.Vpc.Inputs.TrafficMirrorFilterEgressRuleArgs
{
Priority = 1,
Protocol = "TCP",
Action = "accept",
DestinationCidrBlock = "32.0.0.0/4",
DestinationPortRange = "80/80",
SourceCidrBlock = "16.0.0.0/4",
SourcePortRange = "80/80",
},
},
IngressRules = new[]
{
new AliCloud.Vpc.Inputs.TrafficMirrorFilterIngressRuleArgs
{
Priority = 1,
Protocol = "TCP",
Action = "accept",
DestinationCidrBlock = "10.64.0.0/10",
DestinationPortRange = "80/80",
SourceCidrBlock = "10.0.0.0/8",
SourcePortRange = "80/80",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourceGroup;
import com.pulumi.alicloud.resourcemanager.ResourceGroupArgs;
import com.pulumi.alicloud.vpc.TrafficMirrorFilter;
import com.pulumi.alicloud.vpc.TrafficMirrorFilterArgs;
import com.pulumi.alicloud.vpc.inputs.TrafficMirrorFilterEgressRuleArgs;
import com.pulumi.alicloud.vpc.inputs.TrafficMirrorFilterIngressRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default3iXhoa = new ResourceGroup("default3iXhoa", ResourceGroupArgs.builder()
.displayName("testname03")
.resourceGroupName(name)
.build());
var defaultdNz2qk = new ResourceGroup("defaultdNz2qk", ResourceGroupArgs.builder()
.displayName("testname04")
.resourceGroupName(String.format("%s1", name))
.build());
var default_ = new TrafficMirrorFilter("default", TrafficMirrorFilterArgs.builder()
.trafficMirrorFilterDescription("test")
.trafficMirrorFilterName(name)
.resourceGroupId(default3iXhoa.id())
.egressRules(TrafficMirrorFilterEgressRuleArgs.builder()
.priority(1)
.protocol("TCP")
.action("accept")
.destinationCidrBlock("32.0.0.0/4")
.destinationPortRange("80/80")
.sourceCidrBlock("16.0.0.0/4")
.sourcePortRange("80/80")
.build())
.ingressRules(TrafficMirrorFilterIngressRuleArgs.builder()
.priority(1)
.protocol("TCP")
.action("accept")
.destinationCidrBlock("10.64.0.0/10")
.destinationPortRange("80/80")
.sourceCidrBlock("10.0.0.0/8")
.sourcePortRange("80/80")
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default3iXhoa:
type: alicloud:resourcemanager:ResourceGroup
properties:
displayName: testname03
resourceGroupName: ${name}
defaultdNz2qk:
type: alicloud:resourcemanager:ResourceGroup
properties:
displayName: testname04
resourceGroupName: ${name}1
default:
type: alicloud:vpc:TrafficMirrorFilter
properties:
trafficMirrorFilterDescription: test
trafficMirrorFilterName: ${name}
resourceGroupId: ${default3iXhoa.id}
egressRules:
- priority: 1
protocol: TCP
action: accept
destinationCidrBlock: 32.0.0.0/4
destinationPortRange: 80/80
sourceCidrBlock: 16.0.0.0/4
sourcePortRange: 80/80
ingressRules:
- priority: 1
protocol: TCP
action: accept
destinationCidrBlock: 10.64.0.0/10
destinationPortRange: 80/80
sourceCidrBlock: 10.0.0.0/8
sourcePortRange: 80/80
Create TrafficMirrorFilter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrafficMirrorFilter(name: string, args?: TrafficMirrorFilterArgs, opts?: CustomResourceOptions);
@overload
def TrafficMirrorFilter(resource_name: str,
args: Optional[TrafficMirrorFilterArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def TrafficMirrorFilter(resource_name: str,
opts: Optional[ResourceOptions] = None,
dry_run: Optional[bool] = None,
egress_rules: Optional[Sequence[TrafficMirrorFilterEgressRuleArgs]] = None,
ingress_rules: Optional[Sequence[TrafficMirrorFilterIngressRuleArgs]] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
traffic_mirror_filter_description: Optional[str] = None,
traffic_mirror_filter_name: Optional[str] = None)
func NewTrafficMirrorFilter(ctx *Context, name string, args *TrafficMirrorFilterArgs, opts ...ResourceOption) (*TrafficMirrorFilter, error)
public TrafficMirrorFilter(string name, TrafficMirrorFilterArgs? args = null, CustomResourceOptions? opts = null)
public TrafficMirrorFilter(String name, TrafficMirrorFilterArgs args)
public TrafficMirrorFilter(String name, TrafficMirrorFilterArgs args, CustomResourceOptions options)
type: alicloud:vpc:TrafficMirrorFilter
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TrafficMirrorFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TrafficMirrorFilterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TrafficMirrorFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrafficMirrorFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrafficMirrorFilterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var trafficMirrorFilterResource = new AliCloud.Vpc.TrafficMirrorFilter("trafficMirrorFilterResource", new()
{
DryRun = false,
EgressRules = new[]
{
new AliCloud.Vpc.Inputs.TrafficMirrorFilterEgressRuleArgs
{
Action = "string",
Protocol = "string",
DestinationCidrBlock = "string",
DestinationPortRange = "string",
Priority = 0,
SourceCidrBlock = "string",
SourcePortRange = "string",
TrafficMirrorFilterRuleStatus = "string",
},
},
IngressRules = new[]
{
new AliCloud.Vpc.Inputs.TrafficMirrorFilterIngressRuleArgs
{
Action = "string",
Protocol = "string",
DestinationCidrBlock = "string",
DestinationPortRange = "string",
Priority = 0,
SourceCidrBlock = "string",
SourcePortRange = "string",
TrafficMirrorFilterRuleStatus = "string",
},
},
ResourceGroupId = "string",
Tags =
{
{ "string", "any" },
},
TrafficMirrorFilterDescription = "string",
TrafficMirrorFilterName = "string",
});
example, err := vpc.NewTrafficMirrorFilter(ctx, "trafficMirrorFilterResource", &vpc.TrafficMirrorFilterArgs{
DryRun: pulumi.Bool(false),
EgressRules: vpc.TrafficMirrorFilterEgressRuleTypeArray{
&vpc.TrafficMirrorFilterEgressRuleTypeArgs{
Action: pulumi.String("string"),
Protocol: pulumi.String("string"),
DestinationCidrBlock: pulumi.String("string"),
DestinationPortRange: pulumi.String("string"),
Priority: pulumi.Int(0),
SourceCidrBlock: pulumi.String("string"),
SourcePortRange: pulumi.String("string"),
TrafficMirrorFilterRuleStatus: pulumi.String("string"),
},
},
IngressRules: vpc.TrafficMirrorFilterIngressRuleTypeArray{
&vpc.TrafficMirrorFilterIngressRuleTypeArgs{
Action: pulumi.String("string"),
Protocol: pulumi.String("string"),
DestinationCidrBlock: pulumi.String("string"),
DestinationPortRange: pulumi.String("string"),
Priority: pulumi.Int(0),
SourceCidrBlock: pulumi.String("string"),
SourcePortRange: pulumi.String("string"),
TrafficMirrorFilterRuleStatus: pulumi.String("string"),
},
},
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
TrafficMirrorFilterDescription: pulumi.String("string"),
TrafficMirrorFilterName: pulumi.String("string"),
})
var trafficMirrorFilterResource = new TrafficMirrorFilter("trafficMirrorFilterResource", TrafficMirrorFilterArgs.builder()
.dryRun(false)
.egressRules(TrafficMirrorFilterEgressRuleArgs.builder()
.action("string")
.protocol("string")
.destinationCidrBlock("string")
.destinationPortRange("string")
.priority(0)
.sourceCidrBlock("string")
.sourcePortRange("string")
.trafficMirrorFilterRuleStatus("string")
.build())
.ingressRules(TrafficMirrorFilterIngressRuleArgs.builder()
.action("string")
.protocol("string")
.destinationCidrBlock("string")
.destinationPortRange("string")
.priority(0)
.sourceCidrBlock("string")
.sourcePortRange("string")
.trafficMirrorFilterRuleStatus("string")
.build())
.resourceGroupId("string")
.tags(Map.of("string", "any"))
.trafficMirrorFilterDescription("string")
.trafficMirrorFilterName("string")
.build());
traffic_mirror_filter_resource = alicloud.vpc.TrafficMirrorFilter("trafficMirrorFilterResource",
dry_run=False,
egress_rules=[alicloud.vpc.TrafficMirrorFilterEgressRuleArgs(
action="string",
protocol="string",
destination_cidr_block="string",
destination_port_range="string",
priority=0,
source_cidr_block="string",
source_port_range="string",
traffic_mirror_filter_rule_status="string",
)],
ingress_rules=[alicloud.vpc.TrafficMirrorFilterIngressRuleArgs(
action="string",
protocol="string",
destination_cidr_block="string",
destination_port_range="string",
priority=0,
source_cidr_block="string",
source_port_range="string",
traffic_mirror_filter_rule_status="string",
)],
resource_group_id="string",
tags={
"string": "any",
},
traffic_mirror_filter_description="string",
traffic_mirror_filter_name="string")
const trafficMirrorFilterResource = new alicloud.vpc.TrafficMirrorFilter("trafficMirrorFilterResource", {
dryRun: false,
egressRules: [{
action: "string",
protocol: "string",
destinationCidrBlock: "string",
destinationPortRange: "string",
priority: 0,
sourceCidrBlock: "string",
sourcePortRange: "string",
trafficMirrorFilterRuleStatus: "string",
}],
ingressRules: [{
action: "string",
protocol: "string",
destinationCidrBlock: "string",
destinationPortRange: "string",
priority: 0,
sourceCidrBlock: "string",
sourcePortRange: "string",
trafficMirrorFilterRuleStatus: "string",
}],
resourceGroupId: "string",
tags: {
string: "any",
},
trafficMirrorFilterDescription: "string",
trafficMirrorFilterName: "string",
});
type: alicloud:vpc:TrafficMirrorFilter
properties:
dryRun: false
egressRules:
- action: string
destinationCidrBlock: string
destinationPortRange: string
priority: 0
protocol: string
sourceCidrBlock: string
sourcePortRange: string
trafficMirrorFilterRuleStatus: string
ingressRules:
- action: string
destinationCidrBlock: string
destinationPortRange: string
priority: 0
protocol: string
sourceCidrBlock: string
sourcePortRange: string
trafficMirrorFilterRuleStatus: string
resourceGroupId: string
tags:
string: any
trafficMirrorFilterDescription: string
trafficMirrorFilterName: string
TrafficMirrorFilter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TrafficMirrorFilter resource accepts the following input properties:
- Dry
Run bool - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- Egress
Rules List<Pulumi.Ali Cloud. Vpc. Inputs. Traffic Mirror Filter Egress Rule> - Information about the outbound rule. See the following
Block EgressRules
. - Ingress
Rules List<Pulumi.Ali Cloud. Vpc. Inputs. Traffic Mirror Filter Ingress Rule> - Inward direction rule information. See the following
Block IngressRules
. - Resource
Group stringId - The ID of the resource group to which the VPC belongs.
- Dictionary<string, object>
- The tags of this resource.
- Traffic
Mirror stringFilter Description - The description of the TrafficMirrorFilter.
- Traffic
Mirror stringFilter Name - The name of the TrafficMirrorFilter.
- Dry
Run bool - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- Egress
Rules []TrafficMirror Filter Egress Rule Type Args - Information about the outbound rule. See the following
Block EgressRules
. - Ingress
Rules []TrafficMirror Filter Ingress Rule Type Args - Inward direction rule information. See the following
Block IngressRules
. - Resource
Group stringId - The ID of the resource group to which the VPC belongs.
- map[string]interface{}
- The tags of this resource.
- Traffic
Mirror stringFilter Description - The description of the TrafficMirrorFilter.
- Traffic
Mirror stringFilter Name - The name of the TrafficMirrorFilter.
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress
Rules List<TrafficMirror Filter Egress Rule> - Information about the outbound rule. See the following
Block EgressRules
. - ingress
Rules List<TrafficMirror Filter Ingress Rule> - Inward direction rule information. See the following
Block IngressRules
. - resource
Group StringId - The ID of the resource group to which the VPC belongs.
- Map<String,Object>
- The tags of this resource.
- traffic
Mirror StringFilter Description - The description of the TrafficMirrorFilter.
- traffic
Mirror StringFilter Name - The name of the TrafficMirrorFilter.
- dry
Run boolean - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress
Rules TrafficMirror Filter Egress Rule[] - Information about the outbound rule. See the following
Block EgressRules
. - ingress
Rules TrafficMirror Filter Ingress Rule[] - Inward direction rule information. See the following
Block IngressRules
. - resource
Group stringId - The ID of the resource group to which the VPC belongs.
- {[key: string]: any}
- The tags of this resource.
- traffic
Mirror stringFilter Description - The description of the TrafficMirrorFilter.
- traffic
Mirror stringFilter Name - The name of the TrafficMirrorFilter.
- dry_
run bool - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress_
rules Sequence[TrafficMirror Filter Egress Rule Args] - Information about the outbound rule. See the following
Block EgressRules
. - ingress_
rules Sequence[TrafficMirror Filter Ingress Rule Args] - Inward direction rule information. See the following
Block IngressRules
. - resource_
group_ strid - The ID of the resource group to which the VPC belongs.
- Mapping[str, Any]
- The tags of this resource.
- traffic_
mirror_ strfilter_ description - The description of the TrafficMirrorFilter.
- traffic_
mirror_ strfilter_ name - The name of the TrafficMirrorFilter.
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress
Rules List<Property Map> - Information about the outbound rule. See the following
Block EgressRules
. - ingress
Rules List<Property Map> - Inward direction rule information. See the following
Block IngressRules
. - resource
Group StringId - The ID of the resource group to which the VPC belongs.
- Map<Any>
- The tags of this resource.
- traffic
Mirror StringFilter Description - The description of the TrafficMirrorFilter.
- traffic
Mirror StringFilter Name - The name of the TrafficMirrorFilter.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrafficMirrorFilter resource produces the following output properties:
Look up Existing TrafficMirrorFilter Resource
Get an existing TrafficMirrorFilter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TrafficMirrorFilterState, opts?: CustomResourceOptions): TrafficMirrorFilter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dry_run: Optional[bool] = None,
egress_rules: Optional[Sequence[TrafficMirrorFilterEgressRuleArgs]] = None,
ingress_rules: Optional[Sequence[TrafficMirrorFilterIngressRuleArgs]] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
traffic_mirror_filter_description: Optional[str] = None,
traffic_mirror_filter_name: Optional[str] = None) -> TrafficMirrorFilter
func GetTrafficMirrorFilter(ctx *Context, name string, id IDInput, state *TrafficMirrorFilterState, opts ...ResourceOption) (*TrafficMirrorFilter, error)
public static TrafficMirrorFilter Get(string name, Input<string> id, TrafficMirrorFilterState? state, CustomResourceOptions? opts = null)
public static TrafficMirrorFilter get(String name, Output<String> id, TrafficMirrorFilterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Dry
Run bool - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- Egress
Rules List<Pulumi.Ali Cloud. Vpc. Inputs. Traffic Mirror Filter Egress Rule> - Information about the outbound rule. See the following
Block EgressRules
. - Ingress
Rules List<Pulumi.Ali Cloud. Vpc. Inputs. Traffic Mirror Filter Ingress Rule> - Inward direction rule information. See the following
Block IngressRules
. - Resource
Group stringId - The ID of the resource group to which the VPC belongs.
- Status string
- The status of the resource.
- Dictionary<string, object>
- The tags of this resource.
- Traffic
Mirror stringFilter Description - The description of the TrafficMirrorFilter.
- Traffic
Mirror stringFilter Name - The name of the TrafficMirrorFilter.
- Dry
Run bool - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- Egress
Rules []TrafficMirror Filter Egress Rule Type Args - Information about the outbound rule. See the following
Block EgressRules
. - Ingress
Rules []TrafficMirror Filter Ingress Rule Type Args - Inward direction rule information. See the following
Block IngressRules
. - Resource
Group stringId - The ID of the resource group to which the VPC belongs.
- Status string
- The status of the resource.
- map[string]interface{}
- The tags of this resource.
- Traffic
Mirror stringFilter Description - The description of the TrafficMirrorFilter.
- Traffic
Mirror stringFilter Name - The name of the TrafficMirrorFilter.
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress
Rules List<TrafficMirror Filter Egress Rule> - Information about the outbound rule. See the following
Block EgressRules
. - ingress
Rules List<TrafficMirror Filter Ingress Rule> - Inward direction rule information. See the following
Block IngressRules
. - resource
Group StringId - The ID of the resource group to which the VPC belongs.
- status String
- The status of the resource.
- Map<String,Object>
- The tags of this resource.
- traffic
Mirror StringFilter Description - The description of the TrafficMirrorFilter.
- traffic
Mirror StringFilter Name - The name of the TrafficMirrorFilter.
- dry
Run boolean - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress
Rules TrafficMirror Filter Egress Rule[] - Information about the outbound rule. See the following
Block EgressRules
. - ingress
Rules TrafficMirror Filter Ingress Rule[] - Inward direction rule information. See the following
Block IngressRules
. - resource
Group stringId - The ID of the resource group to which the VPC belongs.
- status string
- The status of the resource.
- {[key: string]: any}
- The tags of this resource.
- traffic
Mirror stringFilter Description - The description of the TrafficMirrorFilter.
- traffic
Mirror stringFilter Name - The name of the TrafficMirrorFilter.
- dry_
run bool - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress_
rules Sequence[TrafficMirror Filter Egress Rule Args] - Information about the outbound rule. See the following
Block EgressRules
. - ingress_
rules Sequence[TrafficMirror Filter Ingress Rule Args] - Inward direction rule information. See the following
Block IngressRules
. - resource_
group_ strid - The ID of the resource group to which the VPC belongs.
- status str
- The status of the resource.
- Mapping[str, Any]
- The tags of this resource.
- traffic_
mirror_ strfilter_ description - The description of the TrafficMirrorFilter.
- traffic_
mirror_ strfilter_ name - The name of the TrafficMirrorFilter.
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
- egress
Rules List<Property Map> - Information about the outbound rule. See the following
Block EgressRules
. - ingress
Rules List<Property Map> - Inward direction rule information. See the following
Block IngressRules
. - resource
Group StringId - The ID of the resource group to which the VPC belongs.
- status String
- The status of the resource.
- Map<Any>
- The tags of this resource.
- traffic
Mirror StringFilter Description - The description of the TrafficMirrorFilter.
- traffic
Mirror StringFilter Name - The name of the TrafficMirrorFilter.
Supporting Types
TrafficMirrorFilterEgressRule, TrafficMirrorFilterEgressRuleArgs
- Action string
- Protocol string
- Destination
Cidr stringBlock - Destination
Port stringRange - Priority int
- Source
Cidr stringBlock - Source
Port stringRange - Traffic
Mirror stringFilter Rule Status
- Action string
- Protocol string
- Destination
Cidr stringBlock - Destination
Port stringRange - Priority int
- Source
Cidr stringBlock - Source
Port stringRange - Traffic
Mirror stringFilter Rule Status
- action String
- protocol String
- destination
Cidr StringBlock - destination
Port StringRange - priority Integer
- source
Cidr StringBlock - source
Port StringRange - traffic
Mirror StringFilter Rule Status
- action string
- protocol string
- destination
Cidr stringBlock - destination
Port stringRange - priority number
- source
Cidr stringBlock - source
Port stringRange - traffic
Mirror stringFilter Rule Status
- action String
- protocol String
- destination
Cidr StringBlock - destination
Port StringRange - priority Number
- source
Cidr StringBlock - source
Port StringRange - traffic
Mirror StringFilter Rule Status
TrafficMirrorFilterIngressRule, TrafficMirrorFilterIngressRuleArgs
- Action string
- Protocol string
- Destination
Cidr stringBlock - Destination
Port stringRange - Priority int
- Source
Cidr stringBlock - Source
Port stringRange - Traffic
Mirror stringFilter Rule Status
- Action string
- Protocol string
- Destination
Cidr stringBlock - Destination
Port stringRange - Priority int
- Source
Cidr stringBlock - Source
Port stringRange - Traffic
Mirror stringFilter Rule Status
- action String
- protocol String
- destination
Cidr StringBlock - destination
Port StringRange - priority Integer
- source
Cidr StringBlock - source
Port StringRange - traffic
Mirror StringFilter Rule Status
- action string
- protocol string
- destination
Cidr stringBlock - destination
Port stringRange - priority number
- source
Cidr stringBlock - source
Port stringRange - traffic
Mirror stringFilter Rule Status
- action String
- protocol String
- destination
Cidr StringBlock - destination
Port StringRange - priority Number
- source
Cidr StringBlock - source
Port StringRange - traffic
Mirror StringFilter Rule Status
Import
VPC Traffic Mirror Filter can be imported using the id, e.g.
$ pulumi import alicloud:vpc/trafficMirrorFilter:TrafficMirrorFilter example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.