traffic_mirror_targets
Creates, updates, deletes, gets or lists a traffic_mirror_targets resource.
Overview
| Name | traffic_mirror_targets |
| Type | Resource |
| Id | aws.ec2.traffic_mirror_targets |
Fields
The following fields are returned by SELECT queries:
- describe_traffic_mirror_targets
| Name | Datatype | Description |
|---|---|---|
description | string | Information about the Traffic Mirror target. |
gateway_load_balancer_endpoint_id | string | The ID of the Gateway Load Balancer endpoint. |
network_interface_id | string | The network interface ID that is attached to the target. |
network_load_balancer_arn | string | The Amazon Resource Name (ARN) of the Network Load Balancer. |
owner_id | string | The ID of the account that owns the Traffic Mirror target. |
tags | string | The tags assigned to the Traffic Mirror target. |
traffic_mirror_target_id | string | The ID of the Traffic Mirror target. |
type | string | The type of Traffic Mirror target. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_traffic_mirror_targets | select | region | TrafficMirrorTargetId, DryRun, Filter, MaxResults, NextToken | Information about one or more Traffic Mirror targets. |
create_traffic_mirror_target | insert | region | NetworkInterfaceId, NetworkLoadBalancerArn, Description, TagSpecification, DryRun, ClientToken, GatewayLoadBalancerEndpointId | Creates 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 CreateTrafficMirrorSession. |
delete_traffic_mirror_target | delete | TrafficMirrorTargetId, region | DryRun | Deletes the specified Traffic Mirror target. You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror session. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
TrafficMirrorTargetId | string | The ID of the Traffic Mirror target. |
region | string | AWS region (default: us-east-1) |
ClientToken | string | Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency. |
Description | string | The description of the Traffic Mirror target. |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
Filter | array | One or more filters. The possible values are: description: The Traffic Mirror target description. network-interface-id: The ID of the Traffic Mirror session network interface. network-load-balancer-arn: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session. owner-id: The ID of the account that owns the Traffic Mirror session. traffic-mirror-target-id: The ID of the Traffic Mirror target. |
GatewayLoadBalancerEndpointId | string | The ID of the Gateway Load Balancer endpoint. |
MaxResults | integer | The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. |
NetworkInterfaceId | string | The network interface ID that is associated with the target. |
NetworkLoadBalancerArn | string | The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target. |
NextToken | string | The token for the next page of results. |
TagSpecification | array | The tags to assign to the Traffic Mirror target. |
TrafficMirrorTargetId | array | The ID of the Traffic Mirror targets. |
SELECT examples
- describe_traffic_mirror_targets
Information about one or more Traffic Mirror targets.
SELECT
description,
gateway_load_balancer_endpoint_id,
network_interface_id,
network_load_balancer_arn,
owner_id,
tags,
traffic_mirror_target_id,
type
FROM aws.ec2.traffic_mirror_targets
WHERE region = '{{ region }}' -- required
AND TrafficMirrorTargetId = '{{ TrafficMirrorTargetId }}'
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_traffic_mirror_target
- Manifest
Creates 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 CreateTrafficMirrorSession.
INSERT INTO aws.ec2.traffic_mirror_targets (
region,
NetworkInterfaceId,
NetworkLoadBalancerArn,
Description,
TagSpecification,
DryRun,
ClientToken,
GatewayLoadBalancerEndpointId
)
SELECT
'{{ region }}',
'{{ NetworkInterfaceId }}',
'{{ NetworkLoadBalancerArn }}',
'{{ Description }}',
'{{ TagSpecification }}',
'{{ DryRun }}',
'{{ ClientToken }}',
'{{ GatewayLoadBalancerEndpointId }}'
RETURNING
description,
gateway_load_balancer_endpoint_id,
network_interface_id,
network_load_balancer_arn,
owner_id,
tags,
traffic_mirror_target_id,
type
;
# Description fields are for documentation purposes
- name: traffic_mirror_targets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the traffic_mirror_targets resource.
- name: NetworkInterfaceId
value: "{{ NetworkInterfaceId }}"
description: The network interface ID that is associated with the target.
description: The network interface ID that is associated with the target.
- name: NetworkLoadBalancerArn
value: "{{ NetworkLoadBalancerArn }}"
description: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
description: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
- name: Description
value: "{{ Description }}"
description: The description of the Traffic Mirror target.
description: The description of the Traffic Mirror target.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to assign to the Traffic Mirror target.
description: The tags to assign to the Traffic Mirror target.
- name: DryRun
value: {{ DryRun }}
description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
- name: ClientToken
value: "{{ ClientToken }}"
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
- name: GatewayLoadBalancerEndpointId
value: "{{ GatewayLoadBalancerEndpointId }}"
description: The ID of the Gateway Load Balancer endpoint.
description: The ID of the Gateway Load Balancer endpoint.
DELETE examples
- delete_traffic_mirror_target
Deletes the specified Traffic Mirror target. You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror session.
DELETE FROM aws.ec2.traffic_mirror_targets
WHERE TrafficMirrorTargetId = '{{ TrafficMirrorTargetId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;