idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
28,900 | public Datapoint addTag ( String tagKey , String tagValue ) { initialTags ( ) ; tags . put ( tagKey , tagValue ) ; return this ; } | Add tag for the datapoint . |
28,901 | public static String hmacSha256 ( String input , String secretKey ) { if ( input == null ) { throw new NullPointerException ( "input" ) ; } else if ( secretKey == null ) { throw new NullPointerException ( "secretKey" ) ; } return hmacSha256 ( input . getBytes ( CHARSET_UTF8 ) , secretKey . getBytes ( CHARSET_UTF8 ) ) ;... | Encodes the input String using the UTF8 charset and calls hmacSha256 ; |
28,902 | public String getEndpoint ( ) { String url = this . endpoint ; if ( this . endpoint != null && this . endpoint . length ( ) > 0 && endpoint . indexOf ( "://" ) < 0 ) { url = protocol . toString ( ) . toLowerCase ( ) + "://" + endpoint ; } return url ; } | Returns the service endpoint URL to which the client will connect . |
28,903 | public void sign ( InternalRequest request , BceCredentials credentials , SignOptions options ) { checkNotNull ( request , "request should not be null." ) ; if ( credentials == null ) { return ; } if ( options == null ) { if ( request . getSignOptions ( ) != null ) { options = request . getSignOptions ( ) ; } else { op... | Sign the given request with the given set of credentials . Modifies the passed - in request to apply the signature . |
28,904 | public void deleteRouteRule ( DeleteRouteRequest deleteRouteRequest ) { checkNotNull ( deleteRouteRequest , "request should not be null." ) ; checkNotNull ( deleteRouteRequest . getRouteRuleId ( ) , "request routeRuleId should not be null." ) ; if ( Strings . isNullOrEmpty ( deleteRouteRequest . getClientToken ( ) ) ) ... | Delete the specific route rule |
28,905 | public void setResponses ( Map < String , List < Map < String , AttributeValue > > > responses ) { this . responses = responses ; } | Set the processed items content for this BatchGetItem request . |
28,906 | public CreateTranscodingJobResponse createTranscodingJob ( String pipelineName , String sourceKey , String targetKey , String presetName , String watermarkId , DelogoArea delogoArea ) { CreateTranscodingJobRequest request = new CreateTranscodingJobRequest ( ) ; request . setPipelineName ( pipelineName ) ; Source source... | Creates a new transcoder job which converts media files in BOS buckets with specified preset watermarkId and delogoArea . |
28,907 | public ListPipelinesResponse listPipelines ( ListPipelinesRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , PIPELINE ) ; return invokeHttpClient ( internalRequest , ListPipelinesResponse . class... | List all your pipelines . |
28,908 | public void deletePipeline ( DeletePipelineRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; checkStringNotEmpty ( request . getPipelineName ( ) , "The parameter pipelineName should NOT be null or empty string." ) ; InternalRequest internalRequest = createRequest ( HttpMethodN... | Deletes a pipeline with the specified pipeline name . |
28,909 | public CreatePresetResponse createPreset ( String presetName , String container ) { return createPreset ( presetName , null , container , true , null , null , null , null , null ) ; } | Create a preset which only convert source media file to a different container format without changing the file contents . |
28,910 | 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 . |
28,911 | 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 |
28,912 | public ListWaterMarkResponse listWaterMark ( ListWaterMarkRequest request ) { InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , WATER_MARK ) ; return invokeHttpClient ( internalRequest , ListWaterMarkResponse . class ) ; } | List all water mark . |
28,913 | 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 . |
28,914 | 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 . |
28,915 | 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 . |
28,916 | 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 . |
28,917 | public Filters addTag ( String tagKey , List < String > tagValues ) { addTags ( tagKey , tagValues ) ; return this ; } | Add tag to tags which just append not replace . |
28,918 | 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 . |
28,919 | 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 . |
28,920 | 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 . |
28,921 | 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 . |
28,922 | 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 . |
28,923 | 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 . |
28,924 | 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 |
28,925 | 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 |
28,926 | 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 |
28,927 | 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 |
28,928 | 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 |
28,929 | 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 |
28,930 | 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 |
28,931 | public ListRecipientBlacklistResponse listRecipientBlacklist ( SesRequest request ) { InternalRequest internalRequest = this . createRequest ( "recipientBlacklist" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , ListRecipientBlacklistResponse . class ) ; } | Get the list of blacklist |
28,932 | 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 |
28,933 | public GetFailedReasonResponse getFailedReason ( SesRequest request ) { InternalRequest internalRequest = this . createRequest ( "failedReason" , request , HttpMethodName . GET ) ; return this . invokeHttpClient ( internalRequest , GetFailedReasonResponse . class ) ; } | Query the failed reason |
28,934 | 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 . |
28,935 | 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 . |
28,936 | 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 |
28,937 | 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 |
28,938 | 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 |
28,939 | 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 |
28,940 | 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 |
28,941 | 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 |
28,942 | 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 . |
28,943 | 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 . |
28,944 | 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 . |
28,945 | 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 |
28,946 | 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 . |
28,947 | 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 . |
28,948 | 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 . |
28,949 | 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 . |
28,950 | 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 . |
28,951 | 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 . |
28,952 | 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 . |
28,953 | 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 . |
28,954 | 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 . |
28,955 | 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 . |
28,956 | 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 . |
28,957 | 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 . |
28,958 | 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 . |
28,959 | 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 . |
28,960 | 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 . |
28,961 | 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 . |
28,962 | public GetCacheQuotaResponse getCacheQuota ( GetCacheQuotaRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , CACHE , "quota" ) ; return this . invokeHttpClient ( internalRequest , GetCacheQuotaResponse . class ) ; } | Get cache operation quota . |
28,963 | 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 |
28,964 | 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 |
28,965 | 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 . |
28,966 | 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 |
28,967 | 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 |
28,968 | 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 |
28,969 | 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 |
28,970 | 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 . |
28,971 | 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 . |
28,972 | private HttpClientConnectionManager createHttpClientConnectionManager ( ) { ConnectionSocketFactory socketFactory = PlainConnectionSocketFactory . getSocketFactory ( ) ; LayeredConnectionSocketFactory sslSocketFactory ; try { sslSocketFactory = new SSLConnectionSocketFactory ( SSLContext . getDefault ( ) , SSLConnectio... | Create connection manager for http client . |
28,973 | 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 . |
28,974 | 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 . |
28,975 | 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 . |
28,976 | 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 . |
28,977 | 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 . |
28,978 | 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 . |
28,979 | 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 . |
28,980 | 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 . |
28,981 | 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 . |
28,982 | 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 . |
28,983 | 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 . |
28,984 | 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 . |
28,985 | 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 . |
28,986 | 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 . |
28,987 | 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 . |
28,988 | 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 . |
28,989 | 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 . |
28,990 | 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 . |
28,991 | 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 . |
28,992 | 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 . |
28,993 | 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 . |
28,994 | 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 . |
28,995 | 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 . |
28,996 | 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 . |
28,997 | 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 . |
28,998 | 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 . |
28,999 | 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 . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.