private AWSCredentials resolveCredentials ( PutMediaRequest request ) { AWSCredentialsProvider resolvedProvider = CredentialUtils . getCredentialsProvider ( request , credentialsProvider ) ; AWSCredentials resolvedCredentials = resolvedProvider == null ? null : resolvedProvider . getCredentials ( ) ; if ( resolvedCredentials == null ) { throw new SdkClientException ( "Credentials must be provided via the builder or present in the environment. " + "See http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html" ) ; } return resolvedCredentials ; }
Resolve credentials which may be overridden at a per request level .