@SdkInternalApi
    final CreateTrafficMirrorFilterResult executeCreateTrafficMirrorFilter(CreateTrafficMirrorFilterRequest createTrafficMirrorFilterRequest) {

        ExecutionContext executionContext = createExecutionContext(createTrafficMirrorFilterRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CreateTrafficMirrorFilterRequest> request = null;
        Response<CreateTrafficMirrorFilterResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new CreateTrafficMirrorFilterRequestMarshaller().marshall(super.beforeMarshalling(createTrafficMirrorFilterRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTrafficMirrorFilter");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            StaxResponseHandler<CreateTrafficMirrorFilterResult> responseHandler = new StaxResponseHandler<CreateTrafficMirrorFilterResult>(
                    new CreateTrafficMirrorFilterResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Creates a Traffic Mirror filter.
</p>
<p>
A Traffic Mirror filter is a set of rules that defines the traffic to mirror.
</p>
<p>
By default, no traffic is mirrored. To mirror traffic, use <a
href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilterRule.htm"
>CreateTrafficMirrorFilterRule</a> to add Traffic Mirror rules to the filter. The rules you add define what
traffic gets mirrored. You can also use <a
href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyTrafficMirrorFilterNetworkServices.html"
>ModifyTrafficMirrorFilterNetworkServices</a> to mirror supported network services.
</p>

@param createTrafficMirrorFilterRequest
@return Result of the CreateTrafficMirrorFilter operation returned by the service.
@sample AmazonEC2.CreateTrafficMirrorFilter
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorFilter" target="_top">AWS
     API Documentation</a>
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java