@SdkInternalApi
    final CreateTrafficMirrorSessionResult executeCreateTrafficMirrorSession(CreateTrafficMirrorSessionRequest createTrafficMirrorSessionRequest) {

        ExecutionContext executionContext = createExecutionContext(createTrafficMirrorSessionRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CreateTrafficMirrorSessionRequest> request = null;
        Response<CreateTrafficMirrorSessionResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new CreateTrafficMirrorSessionRequestMarshaller().marshall(super.beforeMarshalling(createTrafficMirrorSessionRequest));
                // 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, "CreateTrafficMirrorSession");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            StaxResponseHandler<CreateTrafficMirrorSessionResult> responseHandler = new StaxResponseHandler<CreateTrafficMirrorSessionResult>(
                    new CreateTrafficMirrorSessionResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Creates a Traffic Mirror session.
</p>
<p>
A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create
a filter, and then assign it to the session to define a subset of the traffic to mirror, for example all TCP
traffic.
</p>
<p>
The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a
different VPC connected via VPC peering or a transit gateway.
</p>
<p>
By default, no traffic is mirrored. Use <a
href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilter.htm"
>CreateTrafficMirrorFilter</a> to create filter rules that specify the traffic to mirror.
</p>

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