@SdkInternalApi
    final GetRuleResult executeGetRule(GetRuleRequest getRuleRequest) {

        ExecutionContext executionContext = createExecutionContext(getRuleRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<GetRuleRequest> request = null;
        Response<GetRuleResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new GetRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRuleRequest));
                // 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, "WAF Regional");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRule");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<note>
<p>
This is <b>AWS WAF Classic</b> documentation. For more information, see <a
href="https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html">AWS WAF Classic</a> in the
developer guide.
</p>
<p>
<b>For the latest version of AWS WAF</b>, use the AWS WAFV2 API and see the <a
href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a>. With
the latest version, AWS WAF has a single set of endpoints for regional and global use.
</p>
</note>
<p>
Returns the <a>Rule</a> that is specified by the <code>RuleId</code> that you included in the
<code>GetRule</code> request.
</p>

@param getRuleRequest
@return Result of the GetRule operation returned by the service.
@throws WAFInternalErrorException
        The operation failed because of a system problem, even though the request was valid. Retry your request.
@throws WAFInvalidAccountException
        The operation failed because you tried to create, update, or delete an object by using an invalid account
        identifier.
@throws WAFNonexistentItemException
        The operation failed because the referenced object doesn't exist.
@sample AWSWAFRegional.GetRule
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRule" target="_top">AWS API
     Documentation</a>
aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/AWSWAFRegionalClient.java