@SdkInternalApi
    final ModifySubnetAttributeResult executeModifySubnetAttribute(ModifySubnetAttributeRequest modifySubnetAttributeRequest) {

        ExecutionContext executionContext = createExecutionContext(modifySubnetAttributeRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<ModifySubnetAttributeRequest> request = null;
        Response<ModifySubnetAttributeResult> response = null;

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

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

            StaxResponseHandler<ModifySubnetAttributeResult> responseHandler = new StaxResponseHandler<ModifySubnetAttributeResult>(
                    new ModifySubnetAttributeResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Modifies a subnet attribute. You can only modify one attribute at a time.
</p>
<p>
Use this action to modify subnets on Amazon Web Services Outposts.
</p>
<ul>
<li>
<p>
To modify a subnet on an Outpost rack, set both <code>MapCustomerOwnedIpOnLaunch</code> and
<code>CustomerOwnedIpv4Pool</code>. These two parameters act as a single attribute.
</p>
</li>
<li>
<p>
To modify a subnet on an Outpost server, set either <code>EnableLniAtDeviceIndex</code> or
<code>DisableLniAtDeviceIndex</code>.
</p>
</li>
</ul>
<p>
For more information about Amazon Web Services Outposts, see the following:
</p>
<ul>
<li>
<p>
<a href="https://docs.aws.amazon.com/outposts/latest/userguide/how-servers-work.html">Outpost servers</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/outposts/latest/userguide/how-racks-work.html">Outpost racks</a>
</p>
</li>
</ul>

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