@SdkInternalApi
    final ModifyImageAttributeResult executeModifyImageAttribute(ModifyImageAttributeRequest modifyImageAttributeRequest) {

        ExecutionContext executionContext = createExecutionContext(modifyImageAttributeRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<ModifyImageAttributeRequest> request = null;
        Response<ModifyImageAttributeResult> response = null;

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

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

            StaxResponseHandler<ModifyImageAttributeResult> responseHandler = new StaxResponseHandler<ModifyImageAttributeResult>(
                    new ModifyImageAttributeResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
</p>
<p>
To specify the attribute, you can use the <code>Attribute</code> parameter, or one of the following parameters:
<code>Description</code>, <code>ImdsSupport</code>, or <code>LaunchPermission</code>.
</p>
<p>
Images with an Amazon Web Services Marketplace product code cannot be made public.
</p>
<p>
To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance
and create an AMI from the instance.
</p>

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