@SdkInternalApi
    final InvokeDeviceMethodResult executeInvokeDeviceMethod(InvokeDeviceMethodRequest invokeDeviceMethodRequest) {

        ExecutionContext executionContext = createExecutionContext(invokeDeviceMethodRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<InvokeDeviceMethodRequest> request = null;
        Response<InvokeDeviceMethodResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new InvokeDeviceMethodRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(invokeDeviceMethodRequest));
                // 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, "IoT 1Click Devices Service");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "InvokeDeviceMethod");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Given a device ID, issues a request to invoke a named device method (with possible parameters). See the
"Example POST" code snippet below.
</p>

@param invokeDeviceMethodRequest
@return Result of the InvokeDeviceMethod operation returned by the service.
@throws InvalidRequestException
        400 response
@throws PreconditionFailedException
        412 response
@throws InternalFailureException
        500 response
@throws ResourceNotFoundException
        404 response
@throws RangeNotSatisfiableException
        416 response
@throws ResourceConflictException
        409 response
@sample AWSIoT1ClickDevices.InvokeDeviceMethod
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InvokeDeviceMethod" target="_top">AWS API
     Documentation</a>
aws-java-sdk-iot1clickdevices/src/main/java/com/amazonaws/services/iot1clickdevices/AWSIoT1ClickDevicesClient.java