alicloud.vpc.TrafficMirrorSession
Explore with Pulumi AI
Provides a VPC Traffic Mirror Session resource. Traffic mirroring session.
For information about VPC Traffic Mirror Session and how to use it, see What is Traffic Mirror Session.
NOTE: Available since v1.142.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") || "tf-example";
const default = alicloud.ecs.getInstanceTypes({
instanceTypeFamily: "ecs.g7",
});
const defaultGetZones = _default.then(_default => alicloud.getZones({
availableResourceCreation: "Instance",
availableInstanceType: _default.instanceTypes?.[0]?.id,
}));
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
cidrBlock: "10.4.0.0/24",
vpcId: defaultNetwork.id,
zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: name,
description: name,
vpcId: defaultNetwork.id,
});
const defaultGetImages = alicloud.ecs.getImages({
nameRegex: "^ubuntu_[0-9]+_[0-9]+_x64*",
mostRecent: true,
owners: "system",
});
const defaultInstance: alicloud.ecs.Instance[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
defaultInstance.push(new alicloud.ecs.Instance(`default-${range.value}`, {
availabilityZone: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
instanceName: name,
hostName: name,
imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
instanceType: _default.then(_default => _default.instanceTypes?.[0]?.id),
securityGroups: [defaultSecurityGroup.id],
vswitchId: defaultSwitch.id,
systemDiskCategory: "cloud_essd",
}));
}
const defaultEcsNetworkInterface: alicloud.ecs.EcsNetworkInterface[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
defaultEcsNetworkInterface.push(new alicloud.ecs.EcsNetworkInterface(`default-${range.value}`, {
networkInterfaceName: name,
vswitchId: defaultSwitch.id,
securityGroupIds: [defaultSecurityGroup.id],
}));
}
const defaultEcsNetworkInterfaceAttachment: alicloud.ecs.EcsNetworkInterfaceAttachment[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
defaultEcsNetworkInterfaceAttachment.push(new alicloud.ecs.EcsNetworkInterfaceAttachment(`default-${range.value}`, {
instanceId: defaultInstance[range.value].id,
networkInterfaceId: defaultEcsNetworkInterface[range.value].id,
}));
}
const defaultTrafficMirrorFilter = new alicloud.vpc.TrafficMirrorFilter("default", {
trafficMirrorFilterName: name,
trafficMirrorFilterDescription: name,
});
const defaultTrafficMirrorSession = new alicloud.vpc.TrafficMirrorSession("default", {
priority: 1,
virtualNetworkId: 10,
trafficMirrorSessionDescription: name,
trafficMirrorSessionName: name,
trafficMirrorTargetId: defaultEcsNetworkInterfaceAttachment[0].networkInterfaceId,
trafficMirrorSourceIds: [defaultEcsNetworkInterfaceAttachment[1].networkInterfaceId],
trafficMirrorFilterId: defaultTrafficMirrorFilter.id,
trafficMirrorTargetType: "NetworkInterface",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.ecs.get_instance_types(instance_type_family="ecs.g7")
default_get_zones = alicloud.get_zones(available_resource_creation="Instance",
available_instance_type=default.instance_types[0].id)
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="10.4.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
cidr_block="10.4.0.0/24",
vpc_id=default_network.id,
zone_id=default_get_zones.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=name,
description=name,
vpc_id=default_network.id)
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
most_recent=True,
owners="system")
default_instance = []
for range in [{"value": i} for i in range(0, 2)]:
default_instance.append(alicloud.ecs.Instance(f"default-{range['value']}",
availability_zone=default_get_zones.zones[0].id,
instance_name=name,
host_name=name,
image_id=default_get_images.images[0].id,
instance_type=default.instance_types[0].id,
security_groups=[default_security_group.id],
vswitch_id=default_switch.id,
system_disk_category="cloud_essd"))
default_ecs_network_interface = []
for range in [{"value": i} for i in range(0, 2)]:
default_ecs_network_interface.append(alicloud.ecs.EcsNetworkInterface(f"default-{range['value']}",
network_interface_name=name,
vswitch_id=default_switch.id,
security_group_ids=[default_security_group.id]))
default_ecs_network_interface_attachment = []
for range in [{"value": i} for i in range(0, 2)]:
default_ecs_network_interface_attachment.append(alicloud.ecs.EcsNetworkInterfaceAttachment(f"default-{range['value']}",
instance_id=default_instance[range["value"]].id,
network_interface_id=default_ecs_network_interface[range["value"]].id))
default_traffic_mirror_filter = alicloud.vpc.TrafficMirrorFilter("default",
traffic_mirror_filter_name=name,
traffic_mirror_filter_description=name)
default_traffic_mirror_session = alicloud.vpc.TrafficMirrorSession("default",
priority=1,
virtual_network_id=10,
traffic_mirror_session_description=name,
traffic_mirror_session_name=name,
traffic_mirror_target_id=default_ecs_network_interface_attachment[0].network_interface_id,
traffic_mirror_source_ids=[default_ecs_network_interface_attachment[1].network_interface_id],
traffic_mirror_filter_id=default_traffic_mirror_filter.id,
traffic_mirror_target_type="NetworkInterface")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"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 := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
InstanceTypeFamily: pulumi.StringRef("ecs.g7"),
}, nil)
if err != nil {
return err
}
defaultGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("Instance"),
AvailableInstanceType: pulumi.StringRef(_default.InstanceTypes[0].Id),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/24"),
VpcId: defaultNetwork.ID(),
ZoneId: pulumi.String(defaultGetZones.Zones[0].Id),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
Description: pulumi.String(name),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
NameRegex: pulumi.StringRef("^ubuntu_[0-9]+_[0-9]+_x64*"),
MostRecent: pulumi.BoolRef(true),
Owners: pulumi.StringRef("system"),
}, nil)
if err != nil {
return err
}
var defaultInstance []*ecs.Instance
for index := 0; index < 2; index++ {
key0 := index
_ := index
__res, err := ecs.NewInstance(ctx, fmt.Sprintf("default-%v", key0), &ecs.InstanceArgs{
AvailabilityZone: pulumi.String(defaultGetZones.Zones[0].Id),
InstanceName: pulumi.String(name),
HostName: pulumi.String(name),
ImageId: pulumi.String(defaultGetImages.Images[0].Id),
InstanceType: pulumi.String(_default.InstanceTypes[0].Id),
SecurityGroups: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
VswitchId: defaultSwitch.ID(),
SystemDiskCategory: pulumi.String("cloud_essd"),
})
if err != nil {
return err
}
defaultInstance = append(defaultInstance, __res)
}
var defaultEcsNetworkInterface []*ecs.EcsNetworkInterface
for index := 0; index < 2; index++ {
key0 := index
_ := index
__res, err := ecs.NewEcsNetworkInterface(ctx, fmt.Sprintf("default-%v", key0), &ecs.EcsNetworkInterfaceArgs{
NetworkInterfaceName: pulumi.String(name),
VswitchId: defaultSwitch.ID(),
SecurityGroupIds: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
})
if err != nil {
return err
}
defaultEcsNetworkInterface = append(defaultEcsNetworkInterface, __res)
}
var defaultEcsNetworkInterfaceAttachment []*ecs.EcsNetworkInterfaceAttachment
for index := 0; index < 2; index++ {
key0 := index
val0 := index
__res, err := ecs.NewEcsNetworkInterfaceAttachment(ctx, fmt.Sprintf("default-%v", key0), &ecs.EcsNetworkInterfaceAttachmentArgs{
InstanceId: defaultInstance[val0].ID(),
NetworkInterfaceId: defaultEcsNetworkInterface[val0].ID(),
})
if err != nil {
return err
}
defaultEcsNetworkInterfaceAttachment = append(defaultEcsNetworkInterfaceAttachment, __res)
}
defaultTrafficMirrorFilter, err := vpc.NewTrafficMirrorFilter(ctx, "default", &vpc.TrafficMirrorFilterArgs{
TrafficMirrorFilterName: pulumi.String(name),
TrafficMirrorFilterDescription: pulumi.String(name),
})
if err != nil {
return err
}
_, err = vpc.NewTrafficMirrorSession(ctx, "default", &vpc.TrafficMirrorSessionArgs{
Priority: pulumi.Int(1),
VirtualNetworkId: pulumi.Int(10),
TrafficMirrorSessionDescription: pulumi.String(name),
TrafficMirrorSessionName: pulumi.String(name),
TrafficMirrorTargetId: defaultEcsNetworkInterfaceAttachment[0].NetworkInterfaceId,
TrafficMirrorSourceIds: pulumi.StringArray{
defaultEcsNetworkInterfaceAttachment[1].NetworkInterfaceId,
},
TrafficMirrorFilterId: defaultTrafficMirrorFilter.ID(),
TrafficMirrorTargetType: pulumi.String("NetworkInterface"),
})
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") ?? "tf-example";
var @default = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
InstanceTypeFamily = "ecs.g7",
});
var defaultGetZones = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "Instance",
AvailableInstanceType = @default.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
CidrBlock = "10.4.0.0/24",
VpcId = defaultNetwork.Id,
ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
Description = name,
VpcId = defaultNetwork.Id,
});
var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
{
NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
MostRecent = true,
Owners = "system",
});
var defaultInstance = new List<AliCloud.Ecs.Instance>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
defaultInstance.Add(new AliCloud.Ecs.Instance($"default-{range.Value}", new()
{
AvailabilityZone = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
InstanceName = name,
HostName = name,
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = @default.Apply(@default => @default.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id)),
SecurityGroups = new[]
{
defaultSecurityGroup.Id,
},
VswitchId = defaultSwitch.Id,
SystemDiskCategory = "cloud_essd",
}));
}
var defaultEcsNetworkInterface = new List<AliCloud.Ecs.EcsNetworkInterface>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
defaultEcsNetworkInterface.Add(new AliCloud.Ecs.EcsNetworkInterface($"default-{range.Value}", new()
{
NetworkInterfaceName = name,
VswitchId = defaultSwitch.Id,
SecurityGroupIds = new[]
{
defaultSecurityGroup.Id,
},
}));
}
var defaultEcsNetworkInterfaceAttachment = new List<AliCloud.Ecs.EcsNetworkInterfaceAttachment>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
defaultEcsNetworkInterfaceAttachment.Add(new AliCloud.Ecs.EcsNetworkInterfaceAttachment($"default-{range.Value}", new()
{
InstanceId = defaultInstance[range.Value].Id,
NetworkInterfaceId = defaultEcsNetworkInterface[range.Value].Id,
}));
}
var defaultTrafficMirrorFilter = new AliCloud.Vpc.TrafficMirrorFilter("default", new()
{
TrafficMirrorFilterName = name,
TrafficMirrorFilterDescription = name,
});
var defaultTrafficMirrorSession = new AliCloud.Vpc.TrafficMirrorSession("default", new()
{
Priority = 1,
VirtualNetworkId = 10,
TrafficMirrorSessionDescription = name,
TrafficMirrorSessionName = name,
TrafficMirrorTargetId = defaultEcsNetworkInterfaceAttachment[0].NetworkInterfaceId,
TrafficMirrorSourceIds = new[]
{
defaultEcsNetworkInterfaceAttachment[1].NetworkInterfaceId,
},
TrafficMirrorFilterId = defaultTrafficMirrorFilter.Id,
TrafficMirrorTargetType = "NetworkInterface",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.ecs.EcsNetworkInterface;
import com.pulumi.alicloud.ecs.EcsNetworkInterfaceArgs;
import com.pulumi.alicloud.ecs.EcsNetworkInterfaceAttachment;
import com.pulumi.alicloud.ecs.EcsNetworkInterfaceAttachmentArgs;
import com.pulumi.alicloud.vpc.TrafficMirrorFilter;
import com.pulumi.alicloud.vpc.TrafficMirrorFilterArgs;
import com.pulumi.alicloud.vpc.TrafficMirrorSession;
import com.pulumi.alicloud.vpc.TrafficMirrorSessionArgs;
import com.pulumi.codegen.internal.KeyedValue;
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("tf-example");
final var default = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.instanceTypeFamily("ecs.g7")
.build());
final var defaultGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("Instance")
.availableInstanceType(default_.instanceTypes()[0].id())
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.4.0.0/24")
.vpcId(defaultNetwork.id())
.zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.description(name)
.vpcId(defaultNetwork.id())
.build());
final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
.nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
.mostRecent(true)
.owners("system")
.build());
for (var i = 0; i < 2; i++) {
new Instance("defaultInstance-" + i, InstanceArgs.builder()
.availabilityZone(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.instanceName(name)
.hostName(name)
.imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType(default_.instanceTypes()[0].id())
.securityGroups(defaultSecurityGroup.id())
.vswitchId(defaultSwitch.id())
.systemDiskCategory("cloud_essd")
.build());
}
for (var i = 0; i < 2; i++) {
new EcsNetworkInterface("defaultEcsNetworkInterface-" + i, EcsNetworkInterfaceArgs.builder()
.networkInterfaceName(name)
.vswitchId(defaultSwitch.id())
.securityGroupIds(defaultSecurityGroup.id())
.build());
}
for (var i = 0; i < 2; i++) {
new EcsNetworkInterfaceAttachment("defaultEcsNetworkInterfaceAttachment-" + i, EcsNetworkInterfaceAttachmentArgs.builder()
.instanceId(defaultInstance[range.value()].id())
.networkInterfaceId(defaultEcsNetworkInterface[range.value()].id())
.build());
}
var defaultTrafficMirrorFilter = new TrafficMirrorFilter("defaultTrafficMirrorFilter", TrafficMirrorFilterArgs.builder()
.trafficMirrorFilterName(name)
.trafficMirrorFilterDescription(name)
.build());
var defaultTrafficMirrorSession = new TrafficMirrorSession("defaultTrafficMirrorSession", TrafficMirrorSessionArgs.builder()
.priority(1)
.virtualNetworkId(10)
.trafficMirrorSessionDescription(name)
.trafficMirrorSessionName(name)
.trafficMirrorTargetId(defaultEcsNetworkInterfaceAttachment[0].networkInterfaceId())
.trafficMirrorSourceIds(defaultEcsNetworkInterfaceAttachment[1].networkInterfaceId())
.trafficMirrorFilterId(defaultTrafficMirrorFilter.id())
.trafficMirrorTargetType("NetworkInterface")
.build());
}
}
Coming soon!
Create TrafficMirrorSession Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrafficMirrorSession(name: string, args: TrafficMirrorSessionArgs, opts?: CustomResourceOptions);
@overload
def TrafficMirrorSession(resource_name: str,
args: TrafficMirrorSessionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrafficMirrorSession(resource_name: str,
opts: Optional[ResourceOptions] = None,
traffic_mirror_filter_id: Optional[str] = None,
priority: Optional[int] = None,
traffic_mirror_source_ids: Optional[Sequence[str]] = None,
traffic_mirror_target_id: Optional[str] = None,
traffic_mirror_target_type: Optional[str] = None,
enabled: Optional[bool] = None,
packet_length: Optional[int] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
dry_run: Optional[bool] = None,
traffic_mirror_session_description: Optional[str] = None,
traffic_mirror_session_name: Optional[str] = None,
virtual_network_id: Optional[int] = None)
func NewTrafficMirrorSession(ctx *Context, name string, args TrafficMirrorSessionArgs, opts ...ResourceOption) (*TrafficMirrorSession, error)
public TrafficMirrorSession(string name, TrafficMirrorSessionArgs args, CustomResourceOptions? opts = null)
public TrafficMirrorSession(String name, TrafficMirrorSessionArgs args)
public TrafficMirrorSession(String name, TrafficMirrorSessionArgs args, CustomResourceOptions options)
type: alicloud:vpc:TrafficMirrorSession
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 TrafficMirrorSessionArgs
- 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 TrafficMirrorSessionArgs
- 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 TrafficMirrorSessionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrafficMirrorSessionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrafficMirrorSessionArgs
- 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 trafficMirrorSessionResource = new AliCloud.Vpc.TrafficMirrorSession("trafficMirrorSessionResource", new()
{
TrafficMirrorFilterId = "string",
Priority = 0,
TrafficMirrorSourceIds = new[]
{
"string",
},
TrafficMirrorTargetId = "string",
TrafficMirrorTargetType = "string",
Enabled = false,
PacketLength = 0,
ResourceGroupId = "string",
Tags =
{
{ "string", "any" },
},
DryRun = false,
TrafficMirrorSessionDescription = "string",
TrafficMirrorSessionName = "string",
VirtualNetworkId = 0,
});
example, err := vpc.NewTrafficMirrorSession(ctx, "trafficMirrorSessionResource", &vpc.TrafficMirrorSessionArgs{
TrafficMirrorFilterId: pulumi.String("string"),
Priority: pulumi.Int(0),
TrafficMirrorSourceIds: pulumi.StringArray{
pulumi.String("string"),
},
TrafficMirrorTargetId: pulumi.String("string"),
TrafficMirrorTargetType: pulumi.String("string"),
Enabled: pulumi.Bool(false),
PacketLength: pulumi.Int(0),
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
DryRun: pulumi.Bool(false),
TrafficMirrorSessionDescription: pulumi.String("string"),
TrafficMirrorSessionName: pulumi.String("string"),
VirtualNetworkId: pulumi.Int(0),
})
var trafficMirrorSessionResource = new TrafficMirrorSession("trafficMirrorSessionResource", TrafficMirrorSessionArgs.builder()
.trafficMirrorFilterId("string")
.priority(0)
.trafficMirrorSourceIds("string")
.trafficMirrorTargetId("string")
.trafficMirrorTargetType("string")
.enabled(false)
.packetLength(0)
.resourceGroupId("string")
.tags(Map.of("string", "any"))
.dryRun(false)
.trafficMirrorSessionDescription("string")
.trafficMirrorSessionName("string")
.virtualNetworkId(0)
.build());
traffic_mirror_session_resource = alicloud.vpc.TrafficMirrorSession("trafficMirrorSessionResource",
traffic_mirror_filter_id="string",
priority=0,
traffic_mirror_source_ids=["string"],
traffic_mirror_target_id="string",
traffic_mirror_target_type="string",
enabled=False,
packet_length=0,
resource_group_id="string",
tags={
"string": "any",
},
dry_run=False,
traffic_mirror_session_description="string",
traffic_mirror_session_name="string",
virtual_network_id=0)
const trafficMirrorSessionResource = new alicloud.vpc.TrafficMirrorSession("trafficMirrorSessionResource", {
trafficMirrorFilterId: "string",
priority: 0,
trafficMirrorSourceIds: ["string"],
trafficMirrorTargetId: "string",
trafficMirrorTargetType: "string",
enabled: false,
packetLength: 0,
resourceGroupId: "string",
tags: {
string: "any",
},
dryRun: false,
trafficMirrorSessionDescription: "string",
trafficMirrorSessionName: "string",
virtualNetworkId: 0,
});
type: alicloud:vpc:TrafficMirrorSession
properties:
dryRun: false
enabled: false
packetLength: 0
priority: 0
resourceGroupId: string
tags:
string: any
trafficMirrorFilterId: string
trafficMirrorSessionDescription: string
trafficMirrorSessionName: string
trafficMirrorSourceIds:
- string
trafficMirrorTargetId: string
trafficMirrorTargetType: string
virtualNetworkId: 0
TrafficMirrorSession 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 TrafficMirrorSession resource accepts the following input properties:
- Priority int
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - Traffic
Mirror stringFilter Id - The ID of the filter.
- Traffic
Mirror List<string>Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- Traffic
Mirror stringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- Traffic
Mirror stringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - Dry
Run bool - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- Enabled bool
- Specifies whether to enable traffic mirror sessions. default to
false
. - Packet
Length int - Maximum Transmission Unit (MTU).
- Resource
Group stringId - The ID of the resource group.
- Dictionary<string, object>
- The tags of this resource.
- Traffic
Mirror stringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - Traffic
Mirror stringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Virtual
Network intId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- Priority int
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - Traffic
Mirror stringFilter Id - The ID of the filter.
- Traffic
Mirror []stringSource Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- Traffic
Mirror stringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- Traffic
Mirror stringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - Dry
Run bool - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- Enabled bool
- Specifies whether to enable traffic mirror sessions. default to
false
. - Packet
Length int - Maximum Transmission Unit (MTU).
- Resource
Group stringId - The ID of the resource group.
- map[string]interface{}
- The tags of this resource.
- Traffic
Mirror stringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - Traffic
Mirror stringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Virtual
Network intId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- priority Integer
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - traffic
Mirror StringFilter Id - The ID of the filter.
- traffic
Mirror List<String>Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic
Mirror StringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic
Mirror StringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - dry
Run Boolean - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled Boolean
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet
Length Integer - Maximum Transmission Unit (MTU).
- resource
Group StringId - The ID of the resource group.
- Map<String,Object>
- The tags of this resource.
- traffic
Mirror StringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic
Mirror StringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - virtual
Network IntegerId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- priority number
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - traffic
Mirror stringFilter Id - The ID of the filter.
- traffic
Mirror string[]Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic
Mirror stringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic
Mirror stringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - dry
Run boolean - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled boolean
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet
Length number - Maximum Transmission Unit (MTU).
- resource
Group stringId - The ID of the resource group.
- {[key: string]: any}
- The tags of this resource.
- traffic
Mirror stringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic
Mirror stringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - virtual
Network numberId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- priority int
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - traffic_
mirror_ strfilter_ id - The ID of the filter.
- traffic_
mirror_ Sequence[str]source_ ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic_
mirror_ strtarget_ id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic_
mirror_ strtarget_ type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - dry_
run bool - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled bool
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet_
length int - Maximum Transmission Unit (MTU).
- resource_
group_ strid - The ID of the resource group.
- Mapping[str, Any]
- The tags of this resource.
- traffic_
mirror_ strsession_ description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic_
mirror_ strsession_ name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - virtual_
network_ intid - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- priority Number
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - traffic
Mirror StringFilter Id - The ID of the filter.
- traffic
Mirror List<String>Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic
Mirror StringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic
Mirror StringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - dry
Run Boolean - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled Boolean
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet
Length Number - Maximum Transmission Unit (MTU).
- resource
Group StringId - The ID of the resource group.
- Map<Any>
- The tags of this resource.
- traffic
Mirror StringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic
Mirror StringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - virtual
Network NumberId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrafficMirrorSession resource produces the following output properties:
Look up Existing TrafficMirrorSession Resource
Get an existing TrafficMirrorSession 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?: TrafficMirrorSessionState, opts?: CustomResourceOptions): TrafficMirrorSession
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dry_run: Optional[bool] = None,
enabled: Optional[bool] = None,
packet_length: Optional[int] = None,
priority: Optional[int] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
traffic_mirror_filter_id: Optional[str] = None,
traffic_mirror_session_description: Optional[str] = None,
traffic_mirror_session_name: Optional[str] = None,
traffic_mirror_source_ids: Optional[Sequence[str]] = None,
traffic_mirror_target_id: Optional[str] = None,
traffic_mirror_target_type: Optional[str] = None,
virtual_network_id: Optional[int] = None) -> TrafficMirrorSession
func GetTrafficMirrorSession(ctx *Context, name string, id IDInput, state *TrafficMirrorSessionState, opts ...ResourceOption) (*TrafficMirrorSession, error)
public static TrafficMirrorSession Get(string name, Input<string> id, TrafficMirrorSessionState? state, CustomResourceOptions? opts = null)
public static TrafficMirrorSession get(String name, Output<String> id, TrafficMirrorSessionState 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: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- Enabled bool
- Specifies whether to enable traffic mirror sessions. default to
false
. - Packet
Length int - Maximum Transmission Unit (MTU).
- Priority int
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the resource.
- Dictionary<string, object>
- The tags of this resource.
- Traffic
Mirror stringFilter Id - The ID of the filter.
- Traffic
Mirror stringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - Traffic
Mirror stringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Traffic
Mirror List<string>Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- Traffic
Mirror stringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- Traffic
Mirror stringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - Virtual
Network intId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- Dry
Run bool - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- Enabled bool
- Specifies whether to enable traffic mirror sessions. default to
false
. - Packet
Length int - Maximum Transmission Unit (MTU).
- Priority int
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the resource.
- map[string]interface{}
- The tags of this resource.
- Traffic
Mirror stringFilter Id - The ID of the filter.
- Traffic
Mirror stringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - Traffic
Mirror stringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Traffic
Mirror []stringSource Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- Traffic
Mirror stringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- Traffic
Mirror stringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - Virtual
Network intId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- dry
Run Boolean - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled Boolean
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet
Length Integer - Maximum Transmission Unit (MTU).
- priority Integer
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - resource
Group StringId - The ID of the resource group.
- status String
- The status of the resource.
- Map<String,Object>
- The tags of this resource.
- traffic
Mirror StringFilter Id - The ID of the filter.
- traffic
Mirror StringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic
Mirror StringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - traffic
Mirror List<String>Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic
Mirror StringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic
Mirror StringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - virtual
Network IntegerId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- dry
Run boolean - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled boolean
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet
Length number - Maximum Transmission Unit (MTU).
- priority number
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - resource
Group stringId - The ID of the resource group.
- status string
- The status of the resource.
- {[key: string]: any}
- The tags of this resource.
- traffic
Mirror stringFilter Id - The ID of the filter.
- traffic
Mirror stringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic
Mirror stringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - traffic
Mirror string[]Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic
Mirror stringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic
Mirror stringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - virtual
Network numberId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- dry_
run bool - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled bool
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet_
length int - Maximum Transmission Unit (MTU).
- priority int
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - resource_
group_ strid - The ID of the resource group.
- status str
- The status of the resource.
- Mapping[str, Any]
- The tags of this resource.
- traffic_
mirror_ strfilter_ id - The ID of the filter.
- traffic_
mirror_ strsession_ description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic_
mirror_ strsession_ name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - traffic_
mirror_ Sequence[str]source_ ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic_
mirror_ strtarget_ id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic_
mirror_ strtarget_ type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - virtual_
network_ intid - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
- dry
Run Boolean - Whether to PreCheck only this request, value:
- true: sends a check request and does not create a mirror session. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): Sends a normal request and directly creates a mirror session after checking.
- enabled Boolean
- Specifies whether to enable traffic mirror sessions. default to
false
. - packet
Length Number - Maximum Transmission Unit (MTU).
- priority Number
- The priority of the traffic mirror session. Valid values:
1
to32766
. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account. - resource
Group StringId - The ID of the resource group.
- status String
- The status of the resource.
- Map<Any>
- The tags of this resource.
- traffic
Mirror StringFilter Id - The ID of the filter.
- traffic
Mirror StringSession Description - The description of the traffic mirror session. The description must be
2
to256
characters in length and cannot start withhttp://
orhttps://
. - traffic
Mirror StringSession Name - The name of the traffic mirror session. The name must be
2
to128
characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - traffic
Mirror List<String>Source Ids - The ID of the image source instance. Currently, the Eni is supported as the image source. The default value of N is 1, that is, only one mirror source can be added to a mirror session.
- traffic
Mirror StringTarget Id - The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
- traffic
Mirror StringTarget Type - The type of the mirror destination. Valid values:
NetworkInterface
orSLB
.NetworkInterface
: an ENI.SLB
: an internal-facing SLB instance. - virtual
Network NumberId - The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values:
0
to16777215
. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.
Import
VPC Traffic Mirror Session can be imported using the id, e.g.
$ pulumi import alicloud:vpc/trafficMirrorSession:TrafficMirrorSession 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.