Skip to content

describe_traffic_mirror_targets async

describe_traffic_mirror_targets(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    traffic_mirror_target_ids: Optional[TrafficMirrorTargetIdList] = None,
    dry_run: Optional[Boolean] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[TrafficMirroringMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeTrafficMirrorTargetsResult

Information about one or more Traffic Mirror targets.

Parameters:

  • traffic_mirror_target_ids (Optional[TrafficMirrorTargetIdList], default: None ) –

    The ID of the Traffic Mirror targets.

  • dry_run (Optional[Boolean], default: 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.

  • filters (Optional[FilterList], default: None ) –

    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.

  • max_results (Optional[TrafficMirroringMaxResults], default: None ) –

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next page of results.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_traffic_mirror_targets(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    traffic_mirror_target_ids: Optional[
        "capo_ec2.types.traffic_mirror_target_id_list.TrafficMirrorTargetIdList"
    ] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional[
        "capo_ec2.types.traffic_mirroring_max_results.TrafficMirroringMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.next_token.NextToken"] = None,
) -> "capo_ec2.types.describe_traffic_mirror_targets_result.DescribeTrafficMirrorTargetsResult":
    """<p>Information about one or more Traffic Mirror targets.</p>

    Args:
        traffic_mirror_target_ids: <p>The ID of the Traffic Mirror targets.</p>
        dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        filters: <p>One or more filters. The possible values are:</p> <ul> <li> <p> <code>description</code>: The Traffic Mirror target description.</p> </li> <li> <p> <code>network-interface-id</code>: The ID of the Traffic Mirror session network interface.</p> </li> <li> <p> <code>network-load-balancer-arn</code>: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session.</p> </li> <li> <p> <code>owner-id</code>: The ID of the account that owns the Traffic Mirror session.</p> </li> <li> <p> <code>traffic-mirror-target-id</code>: The ID of the Traffic Mirror target.</p> </li> </ul>
        max_results: <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
        next_token: <p>The token for the next page of results.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.describe_traffic_mirror_targets_request.DescribeTrafficMirrorTargetsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_traffic_mirror_targets_result.DescribeTrafficMirrorTargetsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_traffic_mirror_targets

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.describe_traffic_mirror_targets.async_describe_traffic_mirror_targets(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTrafficMirrorTargets")
    )
    input_: capo_ec2.types.describe_traffic_mirror_targets_request.DescribeTrafficMirrorTargetsRequest = {}
    if traffic_mirror_target_ids is not None:
        input_["traffic_mirror_target_ids"] = traffic_mirror_target_ids
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output