traffic_mirror_filters
Creates, updates, deletes, gets or lists a traffic_mirror_filters resource.
Overview
| Name | traffic_mirror_filters |
| Type | Resource |
| Id | aws.ec2.traffic_mirror_filters |
Fields
The following fields are returned by SELECT queries:
- describe_traffic_mirror_filters
| Name | Datatype | Description |
|---|---|---|
description | string | The description of the Traffic Mirror filter. |
egress_filter_rules | string | Information about the egress rules that are associated with the Traffic Mirror filter. |
ingress_filter_rules | string | Information about the ingress rules that are associated with the Traffic Mirror filter. |
network_services | string | The network service traffic that is associated with the Traffic Mirror filter. |
tags | string | The tags assigned to the Traffic Mirror filter. |
traffic_mirror_filter_id | string | The ID of the Traffic Mirror filter. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_traffic_mirror_filters | select | region | TrafficMirrorFilterId, DryRun, Filter, MaxResults, NextToken | Describes one or more Traffic Mirror filters. |
create_traffic_mirror_filter | insert | region | Description, TagSpecification, DryRun, ClientToken | Creates a Traffic Mirror filter. A Traffic Mirror filter is a set of rules that defines the traffic to mirror. By default, no traffic is mirrored. To mirror traffic, use CreateTrafficMirrorFilterRule to add Traffic Mirror rules to the filter. The rules you add define what traffic gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices to mirror supported network services. |
modify_traffic_mirror_filter_network_services | update | TrafficMirrorFilterId, region | AddNetworkService, RemoveNetworkService, DryRun | Allows or restricts mirroring network services. By default, Amazon DNS network services are not eligible for Traffic Mirror. Use AddNetworkServices to add network services to a Traffic Mirror filter. When a network service is added to the Traffic Mirror filter, all traffic related to that network service will be mirrored. When you no longer want to mirror network services, use RemoveNetworkServices to remove the network services from the Traffic Mirror filter. |
delete_traffic_mirror_filter | delete | TrafficMirrorFilterId, region | DryRun | Deletes the specified Traffic Mirror filter. You cannot delete a Traffic Mirror filter 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 |
|---|---|---|
TrafficMirrorFilterId | string | The ID of the Traffic Mirror filter. |
region | string | AWS region (default: us-east-1) |
AddNetworkService | array | The network service, for example Amazon DNS, that you want to mirror. |
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 filter. |
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 filter description. traffic-mirror-filter-id: The ID of the Traffic Mirror filter. |
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. |
NextToken | string | The token for the next page of results. |
RemoveNetworkService | array | The network service, for example Amazon DNS, that you no longer want to mirror. |
TagSpecification | array | The tags to assign to a Traffic Mirror filter. |
TrafficMirrorFilterId | array | The ID of the Traffic Mirror filter. |
SELECT examples
- describe_traffic_mirror_filters
Describes one or more Traffic Mirror filters.
SELECT
description,
egress_filter_rules,
ingress_filter_rules,
network_services,
tags,
traffic_mirror_filter_id
FROM aws.ec2.traffic_mirror_filters
WHERE region = '{{ region }}' -- required
AND TrafficMirrorFilterId = '{{ TrafficMirrorFilterId }}'
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_traffic_mirror_filter
- Manifest
Creates a Traffic Mirror filter. A Traffic Mirror filter is a set of rules that defines the traffic to mirror. By default, no traffic is mirrored. To mirror traffic, use CreateTrafficMirrorFilterRule to add Traffic Mirror rules to the filter. The rules you add define what traffic gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices to mirror supported network services.
INSERT INTO aws.ec2.traffic_mirror_filters (
region,
Description,
TagSpecification,
DryRun,
ClientToken
)
SELECT
'{{ region }}',
'{{ Description }}',
'{{ TagSpecification }}',
'{{ DryRun }}',
'{{ ClientToken }}'
RETURNING
description,
egress_filter_rules,
ingress_filter_rules,
network_services,
tags,
traffic_mirror_filter_id
;
# Description fields are for documentation purposes
- name: traffic_mirror_filters
props:
- name: region
value: "{{ region }}"
description: Required parameter for the traffic_mirror_filters resource.
- name: Description
value: "{{ Description }}"
description: The description of the Traffic Mirror filter.
description: The description of the Traffic Mirror filter.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to assign to a Traffic Mirror filter.
description: The tags to assign to a Traffic Mirror filter.
- 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.
UPDATE examples
- modify_traffic_mirror_filter_network_services
Allows or restricts mirroring network services. By default, Amazon DNS network services are not eligible for Traffic Mirror. Use AddNetworkServices to add network services to a Traffic Mirror filter. When a network service is added to the Traffic Mirror filter, all traffic related to that network service will be mirrored. When you no longer want to mirror network services, use RemoveNetworkServices to remove the network services from the Traffic Mirror filter.
UPDATE aws.ec2.traffic_mirror_filters
SET
-- No updatable properties
WHERE
TrafficMirrorFilterId = '{{ TrafficMirrorFilterId }}' --required
AND region = '{{ region }}' --required
AND AddNetworkService = '{{ AddNetworkService}}'
AND RemoveNetworkService = '{{ RemoveNetworkService}}'
AND DryRun = {{ DryRun}}
RETURNING
description,
egress_filter_rules,
ingress_filter_rules,
network_services,
tags,
traffic_mirror_filter_id;
DELETE examples
- delete_traffic_mirror_filter
Deletes the specified Traffic Mirror filter. You cannot delete a Traffic Mirror filter that is in use by a Traffic Mirror session.
DELETE FROM aws.ec2.traffic_mirror_filters
WHERE TrafficMirrorFilterId = '{{ TrafficMirrorFilterId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;