idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
152,600
public ListPresetsResponse listPresets ( ListPresetsRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , PRESET ) ; return invokeHttpClient ( internalRequest , ListPresetsResponse . class ) ; }
List all system and user s preset .
152,601
public CreateWaterMarkResponse createWaterMark ( CreateWaterMarkRequest request ) { checkStringNotEmpty ( request . getBucket ( ) , "The parameter bucket should NOT be null or empty string." ) ; checkStringNotEmpty ( request . getKey ( ) , "The parameter key should NOT be null or empty string." ) ; InternalRequest inte...
Creates a water mark and return water mark ID
152,602
public ListWaterMarkResponse listWaterMark ( ListWaterMarkRequest request ) { InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , WATER_MARK ) ; return invokeHttpClient ( internalRequest , ListWaterMarkResponse . class ) ; }
List all water mark .
152,603
public ModifyInstanceGroupsRequest withInstanceGroup ( ModifyInstanceGroupConfig instanceGroup ) { if ( this . instanceGroups == null ) { this . instanceGroups = new ArrayList < ModifyInstanceGroupConfig > ( ) ; } this . instanceGroups . add ( instanceGroup ) ; return this ; }
Configure the instance group to be modified .
152,604
public CreateClusterRequest withInstanceGroup ( InstanceGroupConfig instanceGroup ) { if ( this . instanceGroups == null ) { this . instanceGroups = new ArrayList < InstanceGroupConfig > ( ) ; } this . instanceGroups . add ( instanceGroup ) ; return this ; }
Configure the instance group for the cluster .
152,605
public CreateClusterRequest withStep ( StepConfig step ) { if ( this . steps == null ) { this . steps = new ArrayList < StepConfig > ( ) ; } this . steps . add ( step ) ; return this ; }
Configure optional step for the cluster . The step will be scheduled and executed after the cluster is ACTIVE . And the step also can be added to the cluster by sending AddStepsRequest .
152,606
public Filters addField ( String field , String value ) { initialFields ( ) ; fields . add ( new FieldFilter ( field , value ) ) ; return this ; }
Add field filter to fields which just append not replace .
152,607
public Filters addTag ( String tagKey , List < String > tagValues ) { addTags ( tagKey , tagValues ) ; return this ; }
Add tag to tags which just append not replace .
152,608
public static ValueFilter createValueFilter ( String operation , String value ) { checkArgument ( STRING_SUPPORTED_OPERATION . contains ( operation ) , "String value only support operations in " + STRING_SUPPORTED_OPERATION . toString ( ) ) ; ValueFilter valueFilter = new ValueFilter ( operation , SINGLE_QUOTATION + va...
Create value filter for String type .
152,609
public static ValueFilter createValueFilter ( String operation , Double value ) { checkArgument ( LONG_DOUBLE_SUPPORTED_OPERATION . contains ( operation ) , "Double value only support operations in " + LONG_DOUBLE_SUPPORTED_OPERATION . toString ( ) ) ; ValueFilter valueFilter = new ValueFilter ( operation , String . va...
Create value filter for Double type .
152,610
public static ValueFilter createValueFilterOfTag ( String operation , String tagKey ) { checkArgument ( TAG_SUPPORTED_OPERATION . contains ( operation ) , "Value of tag key only support operations in " + TAG_SUPPORTED_OPERATION . toString ( ) ) ; ValueFilter valueFilter = new ValueFilter ( operation , tagKey ) ; return...
Create value filter for comparing with the value of tag key .
152,611
public ListSubnetsResponse listSubnets ( ListSubnetsRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , SUBNET_PREFIX ) ; if ( request . getMarker ( ) != null ) { internalRequest . addParameter ( "marker...
Return a list of subnet owned by the authenticated user .
152,612
public GetSubnetResponse getSubnet ( GetSubnetRequest getSubnetRequest ) { checkNotNull ( getSubnetRequest , "request should not be null." ) ; checkNotNull ( getSubnetRequest . getSubnetId ( ) , "request vpcId should not be null." ) ; InternalRequest internalRequest = this . createRequest ( getSubnetRequest , HttpMetho...
Get the detail information of specified subnet .
152,613
public void modifySubnetAttributes ( String subnetId , String name ) { ModifySubnetAttributesRequest request = new ModifySubnetAttributesRequest ( ) ; modifySubnetAttributes ( request . withName ( name ) . withSubnetId ( subnetId ) ) ; }
Modifying the special attribute to new value of the subnet owned by the user .
152,614
public void verifyEmail ( VerifyEmailRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getEmailAddress ( ) , "object emailAddress should not be null or empty" ) ; InternalRequest internalRequest = this . createRequest ( "verifiedEmail" , request...
Verify email address
152,615
public ListVerifiedEmailResponse listVerifiedEmail ( SesRequest request ) { InternalRequest internalRequest = this . createRequest ( "verifiedEmail" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , ListVerifiedEmailResponse . class ) ; }
Get the list of verified email address
152,616
public GetVerifiedEmailResponse getVerifiedEmail ( GetVerifiedEmailRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getEmailAddress ( ) , "object emailAddress should not be null or empty" ) ; checkIsEmail ( request . getEmailAddress ( ) ) ; Int...
Get the detail of verified email address
152,617
public void deleteVerifiedEmail ( DeleteVerifiedEmailRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getEmailAddress ( ) , "object emailAddress should not be null or empty" ) ; checkIsEmail ( request . getEmailAddress ( ) ) ; InternalRequest i...
Delete verified email address
152,618
public ListVerifiedDomainResponse listVerifiedDomain ( SesRequest request ) { InternalRequest internalRequest = this . createRequest ( "verifiedDomain" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , ListVerifiedDomainResponse . class ) ; }
Get the list of verified domain
152,619
public GetVerifiedDomainResponse getVerifiedDomain ( GetVerifiedDomainRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getDomainName ( ) , "object domainName should not be null or empty" ) ; InternalRequest internalRequest = this . createReques...
Get the detail of specifical verified domain
152,620
public void deleteVerifiedDomain ( DeleteVerifiedDomainRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getDomainName ( ) , "object domainName should not be null or empty" ) ; InternalRequest internalRequest = this . createRequest ( "verifiedDo...
Delete the domain
152,621
public ListRecipientBlacklistResponse listRecipientBlacklist ( SesRequest request ) { InternalRequest internalRequest = this . createRequest ( "recipientBlacklist" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , ListRecipientBlacklistResponse . class ) ; }
Get the list of blacklist
152,622
public IsInRecipientBlacklistResponse isInRecipientBlacklist ( IsInRecipientBlacklistRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getEmailAddress ( ) , "object emailAddress should not be null or empty" ) ; InternalRequest internalRequest = ...
Query the special receiver is in blacklist or not
152,623
public GetFailedReasonResponse getFailedReason ( SesRequest request ) { InternalRequest internalRequest = this . createRequest ( "failedReason" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , GetFailedReasonResponse . class ) ; }
Query the failed reason
152,624
private void attachRequestToBody ( AbstractBceRequest request , InternalRequest httpRequest ) { byte [ ] content ; try { content = JsonUtils . toJsonString ( request ) . getBytes ( "utf-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new BceClientException ( "utf-8 encoding not supported!" , e ) ; } httpReque...
put json object into http content for put or post request .
152,625
public static < T > T fromJsonString ( String json , Class < T > clazz ) { if ( json == null ) { return null ; } try { return JsonUtils . objectMapper . readValue ( json , clazz ) ; } catch ( Exception e ) { throw new BceClientException ( "Unable to parse Json String." , e ) ; } }
Returns the deserialized object from the given json string and target class ; or null if the given json string is null .
152,626
public QueryMessageDetailResponse queryMessageDetail ( QueryMessageDetailRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getMessageId ( ) , "object messageId should not be null or empty." ) ; InternalRequest internalRequest = this . createRequ...
Query message detail
152,627
public void deleteTemplate ( DeleteTemplateRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getTemplateId ( ) , "object templateId should not be null or empty." ) ; InternalRequest internalRequest = this . createRequest ( "template" , request ,...
Delete message template
152,628
public GetTemplateDetailResponse getTemplateDetail ( GetTemplateDetailRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getTemplateId ( ) , "object templateId should not be null or empty." ) ; InternalRequest internalRequest = this . createReque...
Get the detail of message template
152,629
public ListTemplateResponse listTemplate ( SmsRequest request ) { checkNotNull ( request , "object request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( "template" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , ListTemplateResponse . class ) ;...
Get the list of message template
152,630
public QueryQuotaResponse queryQuota ( SmsRequest request ) { checkNotNull ( request , "object request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( "quota" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , QueryQuotaResponse . class ) ; }
Query the sending quota
152,631
public StatReceiverResponse statReceiver ( StatReceiverRequest request ) { checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getPhoneNumber ( ) , "object phoneNumber should not be null or empty." ) ; InternalRequest internalRequest = this . createRequest ( "receive...
Get the statistics about receiving message
152,632
public CreateDomainResponse createDomain ( CreateDomainRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . PUT , DOMAIN , request . getDomain ( ) ) ; this . attachRequestToBody ( request , internalReque...
Create a new domain acceleration .
152,633
public EnableDomainResponse enableDomain ( EnableDomainRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . POST , DOMAIN , request . getDomain ( ) ) ; internalRequest . addParameter ( "enable" , "" ) ; ...
Enable an existing domain acceleration .
152,634
public DisableDomainResponse disableDomain ( DisableDomainRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . POST , DOMAIN , request . getDomain ( ) ) ; internalRequest . addParameter ( "disable" , "" ...
Disable an existing domain acceleration .
152,635
public DeleteDomainResponse deleteDomain ( DeleteDomainRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . DELETE , DOMAIN , request . getDomain ( ) ) ; return invokeHttpClient ( internalRequest , Delet...
Delete an existing domain acceleration
152,636
public ListDomainsResponse listDomains ( ListDomainsRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . GET , DOMAIN ) ; return invokeHttpClient ( internalRequest , ListDomainsResponse . class ) ; }
Returns a list of all CDN domains that the authenticated sender of the request owns .
152,637
public GetDomainConfigResponse getDomainConfig ( GetDomainConfigRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . GET , DOMAIN , request . getDomain ( ) , "config" ) ; return invokeHttpClient ( intern...
Get detailed information of a domain .
152,638
public SetDomainCacheTTLResponse setDomainCacheTTL ( SetDomainCacheTTLRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . PUT , DOMAIN , request . getDomain ( ) , "config" ) ; internalRequest . addParam...
Update cache policies of specified domain acceleration .
152,639
public SetDomainRefererACLResponse setDomainRefererACL ( SetDomainRefererACLRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . PUT , DOMAIN , request . getDomain ( ) , "config" ) ; internalRequest . ad...
Update RefererACL rules of specified domain acceleration .
152,640
public SetDomainIpACLResponse setDomainIpACL ( SetDomainIpACLRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . PUT , DOMAIN , request . getDomain ( ) , "config" ) ; internalRequest . addParameter ( "i...
Update IpACL rules of specified domain acceleration .
152,641
public GetPurgeStatusResponse getPurgeStatus ( GetPurgeStatusRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , CACHE , "purge" ) ; if ( request . getId ( ) != null ) { internalRequest . addParameter ( "id" , request . getId ( ) ) ; } if ( request . getStartTim...
Get purge status with specified attributes .
152,642
public GetPrefetchStatusResponse getPrefetchStatus ( GetPrefetchStatusRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , CACHE , "prefetch" ) ; if ( request . getId ( ) != null ) { internalRequest . addParameter ( "id" , request . getId ( ) ) ; } if ( request ....
Get prefetch status with specified attributes .
152,643
public GetStatPvResponse getStatPv ( GetStatPvRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "pv" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso8601Date ( request . getSta...
Get pv statistics with specified attributes .
152,644
public GetStatFlowResponse getStatFlow ( GetStatFlowRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "flow" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso8601Date ( request ...
Get flow statistics with specified attributes .
152,645
public GetStatSrcFlowResponse getStatSrcFlow ( GetStatSrcFlowRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "srcflow" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso8601Dat...
Get origin flow statistics with specified attributes .
152,646
public GetStatHitRateResponse getStatHitRate ( GetStatHitRateRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "hitrate" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso8601Dat...
Get hit rate statistics with specified attributes .
152,647
public GetStatHttpCodeResponse getStatHttpCode ( GetStatHttpCodeRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "httpcode" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso860...
Get http code statistics with specified attributes .
152,648
public GetStatTopUrlResponse getStatTopUrl ( GetStatTopUrlRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "topn" , "url" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso8601D...
Get top url statistics with specified attributes .
152,649
public GetStatTopRefererResponse getStatTopReferer ( GetStatTopRefererRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "topn" , "referer" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatA...
Get top http referer statistics with specified attributes .
152,650
public GetStatUvResponse getStatUv ( GetStatUvRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "uv" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso8601Date ( request . getSta...
Get uv statistics with specified attributes .
152,651
public GetStatAvgSpeedResponse getStatAvgSpeed ( GetStatAvgSpeedRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , STAT , "avgspeed" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlternateIso860...
Get average speed statistics with specified attributes .
152,652
public GetCacheQuotaResponse getCacheQuota ( GetCacheQuotaRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , CACHE , "quota" ) ; return this . invokeHttpClient ( internalRequest , GetCacheQuotaResponse . class ) ; }
Get cache operation quota .
152,653
public GetDomainLogResponse getDomainLog ( GetDomainLogRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , LOG , request . getDomain ( ) , "log" ) ; if ( request . getStartTime ( ) != null ) { internalRequest . addParameter ( "startTime" , DateUtils . formatAlte...
Get URLs of log files
152,654
public CreateEipResponse createEip ( CreateEipRequest request ) { checkNotNull ( request . getBandwidthInMbps ( ) , "bandwidthInMbps should not be null" ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( generateDefaultClientToken ( ) ) ; } if ( null == request . getBilling...
Create an eip with the specified options . This is an asynchronous interface
152,655
public void resizeEip ( ResizeEipRequest request ) { checkNotNull ( request . getNewBandwidthInMbps ( ) , "newBandwidthInMbps should not be null" ) ; checkStringNotEmpty ( request . getEip ( ) , "eip should not be empty" ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( ge...
Resizing eip The Prepaid eip can not be downgrade . This is an asynchronous interface .
152,656
public void purchaseReservedEipInMonth ( String eip , int reservationLength ) { Billing billing = new Billing ( ) ; billing . setReservation ( new Billing . Reservation ( ) . withReservationLength ( reservationLength ) ) ; this . purchaseReservedEip ( new PurchaseReservedEipRequest ( ) . withEip ( eip ) . withBilling (...
PurchaseReserved eip with specified duration in month
152,657
public void purchaseReservedEip ( PurchaseReservedEipRequest request ) { checkStringNotEmpty ( request . getEip ( ) , "eip should not be empty" ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( generateDefaultClientToken ( ) ) ; } if ( null == request . getBilling ( ) ) { ...
PurchaseReserved eip with fixed duration only Prepaid eip can do this
152,658
public void unbindEip ( UnbindEipRequest request ) { checkStringNotEmpty ( request . getEip ( ) , "eip should not be empty" ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( generateDefaultClientToken ( ) ) ; } InternalRequest internalRequest = this . createRequest ( reque...
unbind the eip from a specified instance
152,659
public ListEipsResponse listEips ( ListEipsRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , null ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ( ) ) ) { internalRequest . addParameter ( "marker" , request . getMarker ( ) ) ; } if ( request . getMax...
get a list of eips owned by the authenticated user and specified conditions
152,660
private Billing generateDefaultBilling ( ) { Billing billing = new Billing ( ) ; billing . setPaymentTiming ( "Postpaid" ) ; billing . setBillingMethod ( "ByBandwidth" ) ; return billing ; }
The method to generate a default Billing which is Postpaid .
152,661
protected long getDelayBeforeNextRetryInMillis ( HttpRequestBase method , BceClientException exception , int attempt , RetryPolicy retryPolicy ) { int retries = attempt - 1 ; int maxErrorRetry = retryPolicy . getMaxErrorRetry ( ) ; if ( retries >= maxErrorRetry ) { return - 1 ; } if ( method instanceof HttpEntityEnclos...
Get delay time before next retry .
152,662
private HttpClientConnectionManager createHttpClientConnectionManager ( ) { ConnectionSocketFactory socketFactory = PlainConnectionSocketFactory . getSocketFactory ( ) ; LayeredConnectionSocketFactory sslSocketFactory ; try { sslSocketFactory = new SSLConnectionSocketFactory ( SSLContext . getDefault ( ) , SSLConnectio...
Create connection manager for http client .
152,663
protected NHttpClientConnectionManager createNHttpClientConnectionManager ( ) throws IOReactorException { ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor ( IOReactorConfig . custom ( ) . setSoTimeout ( this . config . getSocketTimeoutInMillis ( ) ) . setTcpNoDelay ( true ) . build ( ) ) ; PoolingNHttpCli...
Create connection manager for asynchronous http client .
152,664
private CloseableHttpClient createHttpClient ( HttpClientConnectionManager connectionManager ) { HttpClientBuilder builder = HttpClients . custom ( ) . setConnectionManager ( connectionManager ) . disableAutomaticRetries ( ) ; int socketBufferSizeInBytes = this . config . getSocketBufferSizeInBytes ( ) ; if ( socketBuf...
Create http client based on connection manager .
152,665
protected CloseableHttpAsyncClient createHttpAsyncClient ( NHttpClientConnectionManager connectionManager ) { HttpAsyncClientBuilder builder = HttpAsyncClients . custom ( ) . setConnectionManager ( connectionManager ) ; int socketBufferSizeInBytes = this . config . getSocketBufferSizeInBytes ( ) ; if ( socketBufferSize...
Create asynchronous http client based on connection manager .
152,666
protected HttpRequestBase createHttpRequest ( InternalRequest request ) { String uri = request . getUri ( ) . toASCIIString ( ) ; String encodedParams = HttpUtils . getCanonicalQueryString ( request . getParameters ( ) , false ) ; if ( encodedParams . length ( ) > 0 ) { uri += "?" + encodedParams ; } HttpRequestBase ht...
Creates HttpClient method object based on the specified request and populates any parameters headers etc . from the internal request .
152,667
protected HttpClientContext createHttpContext ( InternalRequest request ) { HttpClientContext context = HttpClientContext . create ( ) ; context . setRequestConfig ( this . requestConfigBuilder . setExpectContinueEnabled ( request . isExpectContinueEnabled ( ) ) . build ( ) ) ; if ( this . credentialsProvider != null )...
Creates HttpClient Context object based on the internal request .
152,668
public User getBosAccountOwner ( GetBosAccountOwnerRequest request ) { checkNotNull ( request , "request should not be null." ) ; return this . invokeHttpClient ( this . createRequest ( request , HttpMethodName . GET ) , ListBucketsResponse . class ) . getOwner ( ) ; }
Gets the current owner of the Bos account that the authenticated sender of the request is using .
152,669
public ListBucketsResponse listBuckets ( ListBucketsRequest request ) { checkNotNull ( request , "request should not be null." ) ; return this . invokeHttpClient ( this . createRequest ( request , HttpMethodName . GET ) , ListBucketsResponse . class ) ; }
Returns a list of all Bos buckets that the authenticated sender of the request owns .
152,670
public CreateBucketResponse createBucket ( CreateBucketRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT ) ; this . setZeroContentLength ( internalRequest ) ; BosResponse response = this . invokeHttpClie...
Creates a new Bos bucket with the specified name .
152,671
public boolean doesBucketExist ( DoesBucketExistRequest request ) { checkNotNull ( request , "request should not be null." ) ; try { this . invokeHttpClient ( this . createRequest ( request , HttpMethodName . HEAD ) , BosResponse . class ) ; return true ; } catch ( BceServiceException e ) { if ( e . getStatusCode ( ) =...
Checks if the specified bucket exists . Bos buckets are named in a global namespace ; use this method to determine if a specified bucket name already exists and therefore can t be used to create a new bucket .
152,672
public GetBucketAclResponse getBucketAcl ( GetBucketAclRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET ) ; internalRequest . addParameter ( "acl" , null ) ; GetBucketAclResponse response = this . invok...
Gets the ACL for the specified Bos bucket .
152,673
public GetBucketLocationResponse getBucketLocation ( GetBucketLocationRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET ) ; internalRequest . addParameter ( "location" , null ) ; GetBucketLocationRespons...
Gets the Location for the specified Bos bucket .
152,674
public void setBucketAcl ( SetBucketAclRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT ) ; internalRequest . addParameter ( "acl" , null ) ; if ( request . getCannedAcl ( ) != null ) { internalRequest ...
Sets the Acl for the specified Bos bucket .
152,675
public void deleteBucket ( DeleteBucketRequest request ) { checkNotNull ( request , "request should not be null." ) ; this . invokeHttpClient ( this . createRequest ( request , HttpMethodName . DELETE ) , BosResponse . class ) ; }
Deletes the specified bucket . All objects in the bucket must be deleted before the bucket itself can be deleted .
152,676
public ListObjectsResponse listNextBatchOfObjects ( ListObjectsResponse previousResponse ) { checkNotNull ( previousResponse , "previousResponse should not be null." ) ; if ( ! previousResponse . isTruncated ( ) ) { ListObjectsResponse emptyResponse = new ListObjectsResponse ( ) ; emptyResponse . setBucketName ( previo...
Provides an easy way to continue a truncated object listing and retrieve the next page of results .
152,677
public byte [ ] getObjectContent ( GetObjectRequest request ) { BosObjectInputStream content = this . getObject ( request ) . getObjectContent ( ) ; try { return IOUtils . toByteArray ( content ) ; } catch ( IOException e ) { try { content . close ( ) ; } catch ( IOException e1 ) { } throw new BceClientException ( "Fai...
Gets the object content stored in Bos under the specified bucket and key .
152,678
public PutObjectResponse putObject ( String bucketName , String key , File file , ObjectMetadata metadata ) { return this . putObject ( new PutObjectRequest ( bucketName , key , file , metadata ) ) ; }
Uploads the specified file and object metadata to Bos under the specified bucket and key name .
152,679
public PutObjectResponse putObject ( String bucketName , String key , String value ) { try { return this . putObject ( bucketName , key , value . getBytes ( DEFAULT_ENCODING ) , new ObjectMetadata ( ) ) ; } catch ( UnsupportedEncodingException e ) { throw new BceClientException ( "Fail to get bytes." , e ) ; } }
Uploads the specified string to Bos under the specified bucket and key name .
152,680
public PutObjectResponse putObject ( String bucketName , String key , byte [ ] value , ObjectMetadata metadata ) { if ( metadata . getContentLength ( ) == - 1 ) { metadata . setContentLength ( value . length ) ; } return this . putObject ( new PutObjectRequest ( bucketName , key , RestartableInputStream . wrap ( value ...
Uploads the specified bytes and object metadata to Bos under the specified bucket and key name .
152,681
public PutObjectResponse putObject ( String bucketName , String key , InputStream input ) { return this . putObject ( new PutObjectRequest ( bucketName , key , input ) ) ; }
Uploads the specified input stream to Bos under the specified bucket and key name .
152,682
public void deleteObject ( DeleteObjectRequest request ) { checkNotNull ( request , "request should not be null." ) ; assertStringNotNullOrEmpty ( request . getKey ( ) , "object key should not be null or empty" ) ; this . invokeHttpClient ( this . createRequest ( request , HttpMethodName . DELETE ) , BosResponse . clas...
Deletes the specified object in the specified bucket .
152,683
public UploadPartResponse uploadPart ( UploadPartRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkNotNull ( request . getPartSize ( ) , "partSize should not be null" ) ; checkNotNull ( request . getPartNumber ( ) , "partNumber should not be null" ) ; if ( request . getPartSize ( ) > 5...
Uploads a part in a multipart upload . You must initiate a multipart upload before you can upload any part .
152,684
public ListMultipartUploadsResponse listMultipartUploads ( ListMultipartUploadsRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET ) ; internalRequest . addParameter ( "uploads" , null ) ; String keyMarker...
Lists in - progress multipart uploads . An in - progress multipart upload is a multipart upload that has been initiated using the InitiateMultipartUpload request but has not yet been completed or aborted .
152,685
private static void populateRequestMetadata ( InternalRequest request , ObjectMetadata metadata ) { if ( metadata . getContentType ( ) != null ) { request . addHeader ( Headers . CONTENT_TYPE , metadata . getContentType ( ) ) ; } if ( metadata . getContentMd5 ( ) != null ) { request . addHeader ( Headers . CONTENT_MD5 ...
Populates the specified request object with the appropriate headers from the ObjectMetadata object .
152,686
private InternalRequest createRequest ( AbstractBceRequest bceRequest , HttpMethodName httpMethod ) { String bucketName = null ; String key = null ; if ( bceRequest instanceof GenericBucketRequest && ! ( ( BosClientConfiguration ) this . config ) . isCnameEnabled ( ) ) { bucketName = ( ( GenericBucketRequest ) bceReque...
Creates and initializes a new request object for the specified Bos resource . This method is responsible for determining the right way to address resources .
152,687
private void addResponseHeaderParameters ( InternalRequest request , ResponseHeaderOverrides responseHeaders ) { if ( responseHeaders != null ) { if ( responseHeaders . getCacheControl ( ) != null ) { request . addParameter ( ResponseHeaderOverrides . RESPONSE_HEADER_CACHE_CONTROL , responseHeaders . getCacheControl ( ...
Adds response headers parameters to the request given if non - null .
152,688
public AppendObjectResponse appendObject ( String bucketName , String key , File file ) { return this . appendObject ( new AppendObjectRequest ( bucketName , key , file ) ) ; }
Uploads the specified appendable file to Bos under the specified bucket and key name .
152,689
public AppendObjectResponse appendObject ( String bucketName , String key , String value , ObjectMetadata metadata ) { try { return this . appendObject ( bucketName , key , value . getBytes ( DEFAULT_ENCODING ) , metadata ) ; } catch ( UnsupportedEncodingException e ) { throw new BceClientException ( "Fail to get bytes...
Uploads the specified string and object metadata to Bos under the specified bucket and key name .
152,690
public AppendObjectResponse appendObject ( String bucketName , String key , byte [ ] value , ObjectMetadata metadata ) { checkNotNull ( metadata , "metadata should not be null." ) ; if ( metadata . getContentLength ( ) == - 1 ) { metadata . setContentLength ( value . length ) ; } return this . appendObject ( new Append...
Uploads the appendable bytes and object metadata to Bos under the specified bucket and key name .
152,691
public AppendObjectResponse appendObject ( String bucketName , String key , InputStream input ) { return this . appendObject ( new AppendObjectRequest ( bucketName , key , input ) ) ; }
Uploads the appendable input stream to Bos under the specified bucket and key name .
152,692
public GetDedicatedHostResponse getDedicatedHost ( GetDedicatedHostRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkNotNull ( request . getDedicatedHostId ( ) , "request dedicatedHostId should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMet...
Get the detail information of specified dcc .
152,693
public ListDedicatedHostsResponse listDedicatedHosts ( ListDedicatedHostsRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , null ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ( ) ) ) { internalRequest . addParameter ( "marker" , request . getMarker (...
get a list of hosts owned by the authenticated user and specified conditions
152,694
public void setPartETags ( List < PartETag > partETags ) { checkNotNull ( partETags , "partETags should not be null." ) ; for ( int i = 0 ; i < partETags . size ( ) ; ++ i ) { PartETag partETag = partETags . get ( i ) ; checkNotNull ( partETag , "partETags[%s] should not be null." , i ) ; int partNumber = partETag . ge...
Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete .
152,695
public CreatePresetResponse createPreset ( CreatePresetRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; checkStringNotEmpty ( request . getName ( ) , "The parameter name should NOT be null or empty string." ) ; if ( request . getAudio ( ) != null ) { checkNotNull ( request . ...
Create a live preset which contains parameters needed in the live stream service .
152,696
public CreatePresetResponse createPreset ( String name , String description , Audio audio , Video video , Hls hls , Rtmp rtmp , LiveThumbnail thumbnail , Watermarks watermarks ) { CreatePresetRequest request = new CreatePresetRequest ( ) ; request . setForwardOnly ( false ) ; request . setName ( name ) ; request . setD...
Create a live preset which contains parameters needed in the live stream service and not in forward only mode so that the input stream will be transcoded according to audio and video parameters .
152,697
public CreatePresetResponse createForwardOnlyPreset ( String name , String description , Hls hls , Rtmp rtmp , LiveThumbnail thumbnail , Watermarks watermarks ) { CreatePresetRequest request = new CreatePresetRequest ( ) ; request . setForwardOnly ( true ) ; request . setName ( name ) ; request . setDescription ( descr...
Create a live preset which contains parameters needed in the live stream service and in forward only mode in which the input stream s resolution ratio and code rate will be kept unchanged .
152,698
public ListPresetsResponse listPresets ( ) { ListPresetsRequest request = new ListPresetsRequest ( ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , LIVE_PRESET ) ; return invokeHttpClient ( internalRequest , ListPresetsResponse . class ) ; }
List all your live presets .
152,699
public ListSessionsResponse listSessions ( String status ) { ListSessionsRequest request = new ListSessionsRequest ( ) . withStatus ( status ) ; return listSessions ( request ) ; }
List all your live sessions with given status .