@@ -231,7 +231,7 @@ public void processRequest(final InputStream inputStream, final OutputStream out
231
231
} finally {
232
232
// A response will be output on all paths, though CloudFormation will
233
233
// not block on invoking the handlers, but rather listen for callbacks
234
- writeResponse (outputStream , handlerResponse , request );
234
+ writeResponse (outputStream , handlerResponse );
235
235
publishExceptionCodeAndCountMetrics (request == null ? null : request .getAction (), handlerResponse .getErrorCode ());
236
236
}
237
237
}
@@ -376,9 +376,7 @@ public void processRequest(final InputStream inputStream, final OutputStream out
376
376
377
377
}
378
378
379
- protected void writeResponse (final OutputStream outputStream ,
380
- final ProgressEvent <ResourceT , CallbackT > response ,
381
- final HandlerRequest <ResourceT , CallbackT > request )
379
+ protected void writeResponse (final OutputStream outputStream , final ProgressEvent <ResourceT , CallbackT > response )
382
380
throws IOException {
383
381
if (response .getResourceModel () != null ) {
384
382
// strip write only properties on final results, we will need the intact model
@@ -389,21 +387,10 @@ protected void writeResponse(final OutputStream outputStream,
389
387
}
390
388
391
389
String output = this .serializer .serialize (response );
392
- if (response .getStatus () != OperationStatus .IN_PROGRESS ) {
393
- // if status is not IN_PROGRESS, it means the response has been sanitized
394
- final String logicalResourceId = getLogicalResourceId (request );
395
- final String stackId = getStackId (request );
396
- this .log (String .format ("StackId=%s LogicalResourceId=%s Response=%s" , stackId , logicalResourceId , output ));
397
- }
398
390
outputStream .write (output .getBytes (StandardCharsets .UTF_8 ));
399
391
outputStream .flush ();
400
392
}
401
393
402
- protected void writeResponse (final OutputStream outputStream , final ProgressEvent <ResourceT , CallbackT > response )
403
- throws IOException {
404
- this .writeResponse (outputStream , response , null );
405
- }
406
-
407
394
protected ResourceT sanitizeModel (final ResourceT model ) throws IOException {
408
395
// strip write only properties on final results, we will need the intact model
409
396
// while provisioning
@@ -587,15 +574,6 @@ protected String getStackId(final HandlerRequest<ResourceT, CallbackT> request)
587
574
return null ;
588
575
}
589
576
590
- @ VisibleForTesting
591
- protected String getLogicalResourceId (final HandlerRequest <ResourceT , CallbackT > request ) {
592
- if (request != null && request .getRequestData () != null ) {
593
- return request .getRequestData ().getLogicalResourceId ();
594
- }
595
-
596
- return null ;
597
- }
598
-
599
577
private void replaceInMap (final Map <String , String > targetMap , final Map <String , String > sourceMap ) {
600
578
if (targetMap == null ) {
601
579
return ;
0 commit comments