Skip to content

EC2  >  Operations  >  create_traffic_mirror_target

create_traffic_mirror_target

Operation

create_traffic_mirror_target async

create_traffic_mirror_target(request: CreateTrafficMirrorTargetInput | CreateTrafficMirrorTargetInputDict, /, *, plugins: list[Plugin] | None = None) -> CreateTrafficMirrorTargetOutput
create_traffic_mirror_target(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateTrafficMirrorTargetInputDict]) -> CreateTrafficMirrorTargetOutput

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.

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateTrafficMirrorTargetOutput

An instance of CreateTrafficMirrorTargetOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

CreateTrafficMirrorTargetInput dataclass

Bases: _SerdeShape

Dataclass for CreateTrafficMirrorTargetInput structure.

Attributes
client_token class-attribute instance-attribute
client_token: str | None = ...

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

This field is autopopulated if not provided.

description class-attribute instance-attribute
description: str | None = ...

The description of the Traffic Mirror target.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

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.

gateway_load_balancer_endpoint_id class-attribute instance-attribute
gateway_load_balancer_endpoint_id: str | None = ...

The ID of the Gateway Load Balancer endpoint.

network_interface_id class-attribute instance-attribute
network_interface_id: str | None = ...

The network interface ID that is associated with the target.

network_load_balancer_arn class-attribute instance-attribute
network_load_balancer_arn: str | None = ...

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

tag_specifications class-attribute instance-attribute
tag_specifications: list[TagSpecification] | None = ...

The tags to assign to the Traffic Mirror target.

Dictionaries

CreateTrafficMirrorTargetInputDict

Bases: TypedDict

Dictionary form of CreateTrafficMirrorTargetInput.

Attributes
client_token instance-attribute
client_token: str | None

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

This field is autopopulated if not provided.

description instance-attribute
description: str | None

The description of the Traffic Mirror target.

dry_run instance-attribute
dry_run: bool | None

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.

gateway_load_balancer_endpoint_id instance-attribute
gateway_load_balancer_endpoint_id: str | None

The ID of the Gateway Load Balancer endpoint.

network_interface_id instance-attribute
network_interface_id: str | None

The network interface ID that is associated with the target.

network_load_balancer_arn instance-attribute
network_load_balancer_arn: str | None

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

tag_specifications instance-attribute
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | None

The tags to assign to the Traffic Mirror target.

Output

CreateTrafficMirrorTargetOutput dataclass

Bases: _SerdeShape

Dataclass for CreateTrafficMirrorTargetOutput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

traffic_mirror_target class-attribute instance-attribute
traffic_mirror_target: TrafficMirrorTarget | None = ...

Information about the Traffic Mirror target.