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

NameResourceAccessible byRequired Params
create_resourcetraffic_mirror_targetsINSERTregion
delete_resourcetraffic_mirror_targetsDELETEIdentifier, region
update_resourcetraffic_mirror_targetsUPDATEIdentifier, PatchDocument, region
list_resourcestraffic_mirror_targets_list_onlySELECTregion
get_resourcetraffic_mirror_targetsSELECTIdentifier, 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
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
'{{ network_load_balancer_arn }}',
'{{ description }}',
'{{ network_interface_id }}',
'{{ gateway_load_balancer_endpoint_id }}',
'{{ tags }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.ec2.traffic_mirror_targets
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.traffic_mirror_targets
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

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

ec2:CreateTrafficMirrorTarget,
ec2:CreateTags