List of usage examples for com.amazonaws AmazonWebServiceRequest clone
@Override
public AmazonWebServiceRequest clone()
From source file:com.netflix.spinnaker.clouddriver.aws.security.AddSpinnakerUserToUserAgentRequestHandler.java
License:Apache License
@Override public AmazonWebServiceRequest beforeMarshalling(AmazonWebServiceRequest request) { final String userAgent = String.format("spinnaker-user/%s spinnaker-executionId/%s", AuthenticatedRequest.getSpinnakerUser().orElse("unknown"), AuthenticatedRequest.getSpinnakerExecutionId().orElse("unknown")); final AmazonWebServiceRequest cloned = request.clone(); cloned.getRequestClientOptions().appendUserAgent(userAgent); return super.beforeMarshalling(cloned); }