Class TrafficMirrorSession
Provides an Traffic mirror session.
Read limits and considerations for traffic mirroring
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var filter = new Aws.Ec2.TrafficMirrorFilter("filter", new Aws.Ec2.TrafficMirrorFilterArgs
{
Description = "traffic mirror filter - example",
NetworkServices =
{
"amazon-dns",
},
});
var target = new Aws.Ec2.TrafficMirrorTarget("target", new Aws.Ec2.TrafficMirrorTargetArgs
{
NetworkLoadBalancerArn = aws_lb.Lb.Arn,
});
var session = new Aws.Ec2.TrafficMirrorSession("session", new Aws.Ec2.TrafficMirrorSessionArgs
{
Description = "traffic mirror session - example",
NetworkInterfaceId = aws_instance.Test.Primary_network_interface_id,
TrafficMirrorFilterId = filter.Id,
TrafficMirrorTargetId = target.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class TrafficMirrorSession : CustomResource
Constructors
View SourceTrafficMirrorSession(String, TrafficMirrorSessionArgs, CustomResourceOptions)
Create a TrafficMirrorSession resource with the given unique name, arguments, and options.
Declaration
public TrafficMirrorSession(string name, TrafficMirrorSessionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| TrafficMirrorSessionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDescription
A description of the traffic mirror session.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NetworkInterfaceId
ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
Declaration
public Output<string> NetworkInterfaceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PacketLength
The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
Declaration
public Output<int?> PacketLength { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
SessionNumber
- The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
Declaration
public Output<int> SessionNumber { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Tags
Key-value map of resource tags.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
TrafficMirrorFilterId
ID of the traffic mirror filter to be used
Declaration
public Output<string> TrafficMirrorFilterId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TrafficMirrorTargetId
ID of the traffic mirror target to be used
Declaration
public Output<string> TrafficMirrorTargetId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VirtualNetworkId
- The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
Declaration
public Output<int> VirtualNetworkId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Methods
View SourceGet(String, Input<String>, TrafficMirrorSessionState, CustomResourceOptions)
Get an existing TrafficMirrorSession resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static TrafficMirrorSession Get(string name, Input<string> id, TrafficMirrorSessionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| TrafficMirrorSessionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| TrafficMirrorSession |