code: protected Request<CreateBucketRequest> addIAMHeaders(Request<CreateBucketRequest> request, CreateBucketRequest createBucketRequest){  
    
      	if ((null != this.awsCredentialsProvider ) && (this.awsCredentialsProvider.getCredentials() instanceof IBMOAuthCredentials)) {  
      		if (null != createBucketRequest.getServiceInstanceId()) {  
      			request.addHeader(Headers.IBM_SERVICE_INSTANCE_ID, createBucketRequest.getServiceInstanceId());  
              	if (null != createBucketRequest.getEncryptionType()) {
  	            	request.addHeader(Headers.IBM_SSE_KP_ENCRYPTION_ALGORITHM, createBucketRequest.getEncryptionType().getKmsEncryptionAlgorithm());
  	            	request.addHeader(Headers.IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN, createBucketRequest.getEncryptionType().getIBMSSEKMSCustomerRootKeyCrn());
              	}
      		} else {  
  	    		IBMOAuthCredentials oAuthCreds = (IBMOAuthCredentials)this.awsCredentialsProvider.getCredentials();  
  	    		if (oAuthCreds.getServiceInstanceId() != null) {  
  	            	request.addHeader(Headers.IBM_SERVICE_INSTANCE_ID, oAuthCreds.getServiceInstanceId());	
  	            	if (null != createBucketRequest.getEncryptionType()) {
  		            	request.addHeader(Headers.IBM_SSE_KP_ENCRYPTION_ALGORITHM, createBucketRequest.getEncryptionType().getKmsEncryptionAlgorithm());
  		            	request.addHeader(Headers.IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN, createBucketRequest.getEncryptionType().getIBMSSEKMSCustomerRootKeyCrn());
  	            	}  
  	    		}  
      		}  
      	}  
      	  
      	return request;  
      }
docs: Add IAM specific headers based on the credentials set & any optional
  parameters added to the CreateBucketRequest object
  
  @param request
  @param createBucketRequest
  @return Request<CreateBucketRequest>