@SdkInternalApi
    final DescribeDeviceEc2InstancesResult executeDescribeDeviceEc2Instances(DescribeDeviceEc2InstancesRequest describeDeviceEc2InstancesRequest) {

        ExecutionContext executionContext = createExecutionContext(describeDeviceEc2InstancesRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DescribeDeviceEc2InstancesRequest> request = null;
        Response<DescribeDeviceEc2InstancesResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new DescribeDeviceEc2InstancesRequestProtocolMarshaller(protocolFactory).marshall(super
                        .beforeMarshalling(describeDeviceEc2InstancesRequest));
                // 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, "Snow Device Management");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDeviceEc2Instances");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            HttpResponseHandler<AmazonWebServiceResponse<DescribeDeviceEc2InstancesResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
                    new DescribeDeviceEc2InstancesResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Checks the current state of the Amazon EC2 instances. The output is similar to <code>describeDevice</code>, but
the results are sourced from the device cache in the Amazon Web Services Cloud and include a subset of the
available fields.
</p>

@param describeDeviceEc2InstancesRequest
@return Result of the DescribeDeviceEc2Instances operation returned by the service.
@throws ThrottlingException
        The request was denied due to request throttling.
@throws InternalServerException
        An unexpected error occurred while processing the request.
@throws ResourceNotFoundException
        The request references a resource that doesn't exist.
@throws ValidationException
        The input fails to satisfy the constraints specified by an Amazon Web Services service.
@throws AccessDeniedException
        You don't have sufficient access to perform this action.
@sample AWSSnowDeviceManagement.DescribeDeviceEc2Instances
@see <a
     href="http://docs.aws.amazon.com/goto/WebAPI/snow-device-management-2021-08-04/DescribeDeviceEc2Instances"
     target="_top">AWS API Documentation</a>
aws-java-sdk-snowdevicemanagement/src/main/java/com/amazonaws/services/snowdevicemanagement/AWSSnowDeviceManagementClient.java