@SdkInternalApi
    final DeleteResolverRuleResult executeDeleteResolverRule(DeleteResolverRuleRequest deleteResolverRuleRequest) {

        ExecutionContext executionContext = createExecutionContext(deleteResolverRuleRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeleteResolverRuleRequest> request = null;
        Response<DeleteResolverRuleResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new DeleteResolverRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteResolverRuleRequest));
                // 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, "Route53Resolver");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResolverRule");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Deletes a Resolver rule. Before you can delete a Resolver rule, you must disassociate it from all the VPCs that
you associated the Resolver rule with. For more information, see <a href=
"https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DisassociateResolverRule.html"
>DisassociateResolverRule</a>.
</p>

@param deleteResolverRuleRequest
@return Result of the DeleteResolverRule operation returned by the service.
@throws InvalidParameterException
        One or more parameters in this request are not valid.
@throws ResourceNotFoundException
        The specified resource doesn't exist.
@throws ResourceInUseException
        The resource that you tried to update or delete is currently in use.
@throws InternalServiceErrorException
        We encountered an unknown error. Try again in a few minutes.
@throws ThrottlingException
        The request was throttled. Try again in a few minutes.
@sample AmazonRoute53Resolver.DeleteResolverRule
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverRule"
     target="_top">AWS API Documentation</a>
aws-java-sdk-route53resolver/src/main/java/com/amazonaws/services/route53resolver/AmazonRoute53ResolverClient.java