Example usage for com.amazonaws AmazonWebServiceRequest getRequestClientOptions

List of usage examples for com.amazonaws AmazonWebServiceRequest getRequestClientOptions

Introduction

In this page you can find the example usage for com.amazonaws AmazonWebServiceRequest getRequestClientOptions.

Prototype

public RequestClientOptions getRequestClientOptions() 

Source Link

Document

Gets the options stored with this request object.

Usage

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);
}

From source file:io.fineo.client.auth.AWSAbstractCognitoIdentityProvider.java

License:Open Source License

/**
 * Append user agent string to the request. The final string is what is set
 * in the ClientCofniguration concatenated with the given userAgent string.
 *
 * @param request the request object to be appended
 * @param userAgent additional user agent string to append
 *///from  ww w. j a va  2  s.  c  om
protected void appendUserAgent(AmazonWebServiceRequest request, String userAgent) {
    request.getRequestClientOptions().appendUserAgent(userAgent);
}

From source file:io.fineo.client.auth.CognitoCredentialsProvider.java

License:Open Source License

/**
 * Append user agent string to the request. The final string is what is set
 * in the ClientCofniguration concatenated with the given userAgent string.
 *
 * @param request the request object to be appended
 * @param userAgent additional user agent string to append
 *//*w w  w. j  a v  a 2s .  com*/
private void appendUserAgent(AmazonWebServiceRequest request, String userAgent) {
    request.getRequestClientOptions().appendUserAgent(userAgent);
}