AWS::EC2::TrafficMirrorTarget - AWS CloudFormation

AWS::EC2::TrafficMirrorTarget

Specifies a target for your Traffic Mirror session.

A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in different VPCs connected via VPC peering or a transit gateway.

A Traffic Mirror target can be a network interface, a Network Load Balancer, or a Gateway Load Balancer endpoint.

To use the target in a Traffic Mirror session, use AWS::EC2::TrafficMirrorSession.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::TrafficMirrorTarget", "Properties" : { "Description" : String, "GatewayLoadBalancerEndpointId" : String, "NetworkInterfaceId" : String, "NetworkLoadBalancerArn" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::EC2::TrafficMirrorTarget Properties: Description: String GatewayLoadBalancerEndpointId: String NetworkInterfaceId: String NetworkLoadBalancerArn: String Tags: - Tag

Properties

Description

The description of the Traffic Mirror target.

Required: No

Type: String

Update requires: Replacement

GatewayLoadBalancerEndpointId

The ID of the Gateway Load Balancer endpoint.

Required: No

Type: String

Update requires: Replacement

NetworkInterfaceId

The network interface ID that is associated with the target.

Required: No

Type: String

Update requires: Replacement

NetworkLoadBalancerArn

The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.

Required: No

Type: String

Update requires: Replacement

Tags

The tags to assign to the Traffic Mirror target.

Required: No

Type: Array of Tag

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID of the Traffic Mirror target.

For more information about using the Ref function, see Ref.

Examples

Create a traffic mirror target associated with a Network Load Balancer

This is a traffic mirror target associated with a Network Load Balancer.

JSON

{ "SampleNLBTrafficMirrorTarget": { "Type": "AWS::EC2::TrafficMirrorTarget", "Properties": { "Description": "Example traffic mirror target associated with a network load balancer", "NetworkLoadBalancerArn": "arn:aws:elasticloadbalancing:us-east-1:724145273726:loadbalancer/net/NLB/7cabvhEXAMPLE", "Tags": [ { "Key": "Name", "Value": "SampleNLBTarget" } ] } } }

YAML

SampleNLBTrafficMirrorTarget: Type: "AWS::EC2::TrafficMirrorTarget" Properties: Description: "Example traffic mirror target associated with a network load balancer", NetworkLoadBalancerArn: "arn:aws:elasticloadbalancing:us-east-1:724145273726:loadbalancer/net/NLB/7cabvhEXAMPLE" Tags: - Key: "Name" Value: "SampleNLBTarget"

Create a traffic mirror target associated with a network interface

This is a traffic mirror target associated with a network interface.

JSON

{ "SampleNetworkInterfaceTarget": { "Type": "AWS::EC2::TrafficMirrorTarget", "Properties": { "Description": "Example traffic mirror target associated with a network interface", "NetworkInterfaceId": "eni-070203a001EXAMPLE", "Tags": [ { "Key": "Name", "Value": "SampleNetworkInterfaceTarget" } ] } } }

YAML

SampleNetworkInterfaceTarget: Type: "AWS::EC2::TrafficMirrorTarget" Properties: Description: "Example traffic mirror target associated with a network interface" NetworkInterfaceId: "eni-070203a001EXAMPLE" Tags: - Key: "Name" Value: "SampleNetworkInterfaceTarget"

See also