Skip to main content

traffic_mirror_targets

Creates, updates, deletes or gets a traffic_mirror_target resource or lists traffic_mirror_targets in a region

Overview

Nametraffic_mirror_targets
TypeResource
DescriptionThe description of the Traffic Mirror target.
Idawscc.ec2.traffic_mirror_targets

Fields

NameDatatypeDescription
network_load_balancer_arnstringThe Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
descriptionstringThe description of the Traffic Mirror target.
idstring
network_interface_idstringThe network interface ID that is associated with the target.
gateway_load_balancer_endpoint_idstringThe ID of the Gateway Load Balancer endpoint.
tagsarrayThe tags to assign to the Traffic Mirror target.
regionstringAWS region.

For more information, see AWS::EC2::TrafficMirrorTarget.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual traffic_mirror_target.

SELECT
region,
network_load_balancer_arn,
description,
id,
network_interface_id,
gateway_load_balancer_endpoint_id,
tags
FROM awscc.ec2.traffic_mirror_targets
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

Use the following StackQL query and manifest file to create a new traffic_mirror_target resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ec2.traffic_mirror_targets (
NetworkLoadBalancerArn,
Description,
NetworkInterfaceId,
GatewayLoadBalancerEndpointId,
Tags,
region
)
SELECT
'{{ NetworkLoadBalancerArn }}',
'{{ Description }}',
'{{ NetworkInterfaceId }}',
'{{ GatewayLoadBalancerEndpointId }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.traffic_mirror_targets
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

To operate on the traffic_mirror_targets resource, the following permissions are required:

Create

ec2:CreateTrafficMirrorTarget,
ec2:CreateTags

Read

ec2:DescribeTrafficMirrorTargets,
ec2:DescribeTags

Update

ec2:DescribeTrafficMirrorTargets,
ec2:CreateTags,
ec2:DeleteTags,
ec2:DescribeTags

Delete

ec2:DeleteTrafficMirrorTarget,
ec2:DeleteTags

List

ec2:DescribeTrafficMirrorTargets,
ec2:DescribeTags