@SdkInternalApi
    final PutLoggingConfigurationResult executePutLoggingConfiguration(PutLoggingConfigurationRequest putLoggingConfigurationRequest) {

        ExecutionContext executionContext = createExecutionContext(putLoggingConfigurationRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<PutLoggingConfigurationRequest> request = null;
        Response<PutLoggingConfigurationResult> response = null;

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

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

            HttpResponseHandler<AmazonWebServiceResponse<PutLoggingConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
                    new PutLoggingConfigurationResultJsonUnmarshaller());
            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>
Associates a <a>LoggingConfiguration</a> with a specified web ACL.
</p>
<p>
You can access information about all traffic that AWS WAF inspects using the following steps:
</p>
<ol>
<li>
<p>
Create an Amazon Kinesis Data Firehose.
</p>
<p>
Create the data firehose with a PUT source and in the region that you are operating. However, if you are
capturing logs for Amazon CloudFront, always create the firehose in US East (N. Virginia).
</p>
<note>
<p>
Do not create the data firehose using a <code>Kinesis stream</code> as your source.
</p>
</note></li>
<li>
<p>
Associate that firehose to your web ACL using a <code>PutLoggingConfiguration</code> request.
</p>
</li>
</ol>
<p>
When you successfully enable logging using a <code>PutLoggingConfiguration</code> request, AWS WAF will create a
service linked role with the necessary permissions to write logs to the Amazon Kinesis Data Firehose. For more
information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/logging.html">Logging Web ACL
Traffic Information</a> in the <i>AWS WAF Developer Guide</i>.
</p>

@param putLoggingConfigurationRequest
@return Result of the PutLoggingConfiguration 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 WAFNonexistentItemException
        The operation failed because the referenced object doesn't exist.
@throws WAFStaleDataException
        The operation failed because you tried to create, update, or delete an object by using a change token
        that has already been used.
@throws WAFServiceLinkedRoleErrorException
        AWS WAF is not able to access the service linked role. This can be caused by a previous
        <code>PutLoggingConfiguration</code> request, which can lock the service linked role for about 20
        seconds. Please try your request again. The service linked role can also be locked by a previous
        <code>DeleteServiceLinkedRole</code> request, which can lock the role for 15 minutes or more. If you
        recently made a <code>DeleteServiceLinkedRole</code>, wait at least 15 minutes and try the request again.
        If you receive this same exception again, you will have to wait additional time until the role is
        unlocked.
@sample AWSWAFRegional.PutLoggingConfiguration
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration"
     target="_top">AWS API Documentation</a>
aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/AWSWAFRegionalClient.java