com.baidubce.services.cdn
Class CdnClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.cdn.CdnClient

public class CdnClient
extends AbstractBceClient

Client for accessing CDN Services. Created by sunyixing on 2016/1/9.


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
CdnClient()
          Constructs a new Document client to invoke service methods on CDN.
CdnClient(BceClientConfiguration clientConfiguration)
          Constructs a new client using the client configuration to access CDN services.
 
Method Summary
 CreateDomainResponse createDomain(CreateDomainRequest request)
          Create a new domain acceleration.
 DeleteDomainResponse deleteDomain(DeleteDomainRequest request)
          Delete an existing domain acceleration
 void deleteDomain(String domain)
          Delete an existing domain acceleration.
 DescribeIpResponse describeIp(DescribeIpRequest request)
          Get the description of certain IP address.
 DescribeIpResponse describeIp(String ip)
          Get the description of certain IP address.
 DisableDomainResponse disableDomain(DisableDomainRequest request)
          Disable an existing domain acceleration.
 void disableDomain(String domain)
          Disable an existing domain acceleration.
 EnableDomainResponse enableDomain(EnableDomainRequest request)
          Enable an existing domain acceleration.
 void enableDomain(String domain)
          Enable an existing domain acceleration.
 GetCacheQuotaResponse getCacheQuota()
          Get cache operation quota.
 GetCacheQuotaResponse getCacheQuota(GetCacheQuotaRequest request)
          Get cache operation quota.
 GetDomainCacheTTLResponse getDomainCacheTTL(GetDomainCacheTTLRequest request)
          Get cache policies of specified domain acceleration.
 GetDomainCacheTTLResponse getDomainCacheTTL(String domain)
          Get cache policies of specified domain acceleration.
 GetDomainConfigResponse getDomainConfig(GetDomainConfigRequest request)
          Get detailed information of a domain.
 GetDomainConfigResponse getDomainConfig(String domain)
          Get detailed information of a domain.
 GetDomainLogResponse getDomainLog(GetDomainLogRequest request)
          Get URLs of log files
 GetPrefetchStatusResponse getPrefetchStatus(GetPrefetchStatusRequest request)
          Get prefetch status with specified attributes.
 GetPurgeStatusResponse getPurgeStatus(GetPurgeStatusRequest request)
          Get purge status with specified attributes.
 GetStatAvgSpeedResponse getStatAvgSpeed(GetStatAvgSpeedRequest request)
          Get average speed statistics with specified attributes.
 GetStatFlowResponse getStatFlow(GetStatFlowRequest request)
          Get flow statistics with specified attributes.
 GetStatHitRateResponse getStatHitRate(GetStatHitRateRequest request)
          Get hit rate statistics with specified attributes.
 GetStatHttpCodeResponse getStatHttpCode(GetStatHttpCodeRequest request)
          Get http code statistics with specified attributes.
 GetStatPvResponse getStatPv(GetStatPvRequest request)
          Get pv statistics with specified attributes.
 GetStatSrcFlowResponse getStatSrcFlow(GetStatSrcFlowRequest request)
          Get origin flow statistics with specified attributes.
 GetStatTopRefererResponse getStatTopReferer(GetStatTopRefererRequest request)
          Get top http referer statistics with specified attributes.
 GetStatTopUrlResponse getStatTopUrl(GetStatTopUrlRequest request)
          Get top url statistics with specified attributes.
 GetStatUvResponse getStatUv(GetStatUvRequest request)
          Get uv statistics with specified attributes.
 ListDomainsResponse listDomains()
          Returns a list of all CDN domains that the authenticated sender of the request owns.
 ListDomainsResponse listDomains(ListDomainsRequest request)
          Returns a list of all CDN domains that the authenticated sender of the request owns.
 PrefetchResponse prefetch(PrefetchRequest request)
          Post prefetch request
 PrefetchResponse prefetch(String url)
          Post prefetch request
 PurgeResponse purge(PurgeRequest request)
          Post purge request
 PurgeResponse purge(String url)
          Post purge request
 PurgeResponse purgeDirectory(String directory)
          Post purge request
 SetDomainCacheFullUrlResponse setDomainCacheFullUrl(SetDomainCacheFullUrlRequest request)
          Update cache policy of specified domain acceleration.
 void setDomainCacheFullUrl(String domain, boolean setting)
          Update cache policy of specified domain acceleration.
 SetDomainCacheTTLResponse setDomainCacheTTL(SetDomainCacheTTLRequest request)
          Update cache policies of specified domain acceleration.
 SetDomainIpACLResponse setDomainIpACL(SetDomainIpACLRequest request)
          Update IpACL rules of specified domain acceleration.
 SetDomainLimitRateResponse setDomainLimitRate(SetDomainLimitRateRequest request)
          Set the rate limit of specified domain acceleration.
 void setDomainLimitRate(String domain, int limitRate)
          Set the rate limit of specified domain acceleration.
 SetDomainOriginResponse setDomainOrigin(SetDomainOriginRequest request)
          Update origin of specified domain acceleration.
 void setDomainOrigin(String domain, String peer)
          Update origin of specified domain acceleration.
 SetDomainRefererACLResponse setDomainRefererACL(SetDomainRefererACLRequest request)
          Update RefererACL rules of specified domain acceleration.
 SetHttpsConfigResponse setHttpsConfig(SetHttpsConfigRequest request)
          Set HTTPS with certain configuration.
 void setHttpsConfig(String domain, HttpsConfig https)
          Set HTTPS with certain configuration.
 SetRequestAuthResponse setRequestAuth(SetRequestAuthRequest request)
          Set the request authentication.
 void setRequestAuth(String domain, RequestAuth requestAuth)
          Set the request authentication.
 
Methods inherited from class com.baidubce.AbstractBceClient
getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CdnClient

public CdnClient()
Constructs a new Document client to invoke service methods on CDN.


CdnClient

public CdnClient(BceClientConfiguration clientConfiguration)
Constructs a new client using the client configuration to access CDN services.

Parameters:
clientConfiguration - The client configuration options controlling how this client connects to Document services (e.g. proxy settings, retry counts, etc).
Method Detail

createDomain

public CreateDomainResponse createDomain(CreateDomainRequest request)
Create a new domain acceleration.

Parameters:
request - The request containing user-defined domain information.
Returns:
Result of the createDomain operation returned by the service.

enableDomain

public void enableDomain(String domain)
Enable an existing domain acceleration.

Parameters:
domain - The specified domain name.

enableDomain

public EnableDomainResponse enableDomain(EnableDomainRequest request)
Enable an existing domain acceleration.

Parameters:
request - The request containing user-defined domain information.
Returns:
Result of the enableDomain operation returned by the service.

disableDomain

public void disableDomain(String domain)
Disable an existing domain acceleration.

Parameters:
domain - Name of the domain.

disableDomain

public DisableDomainResponse disableDomain(DisableDomainRequest request)
Disable an existing domain acceleration.

Parameters:
request - The request containing user-defined domain information.
Returns:
Result of the disableDomain operation returned by the service.

deleteDomain

public void deleteDomain(String domain)
Delete an existing domain acceleration.

Parameters:
domain - Name of the domain.

deleteDomain

public DeleteDomainResponse deleteDomain(DeleteDomainRequest request)
Delete an existing domain acceleration

Parameters:
request - The request containing user-defined domain information.
Returns:
Result of the deleteDomain operation returned by the service.

listDomains

public ListDomainsResponse listDomains()
Returns a list of all CDN domains that the authenticated sender of the request owns.

Returns:
All of the CDN domains owned by the authenticated sender of the request.

listDomains

public ListDomainsResponse listDomains(ListDomainsRequest request)
Returns a list of all CDN domains that the authenticated sender of the request owns.

Parameters:
request - The request containing all of the options related to the listing of domains.
Returns:
All of the CDN domains owned by the authenticated sender of the request.

getDomainConfig

public GetDomainConfigResponse getDomainConfig(String domain)
Get detailed information of a domain.

Parameters:
domain - Name of the domain.
Returns:
getDomainConfig of the getDomainConfig operation returned by the service.

getDomainConfig

public GetDomainConfigResponse getDomainConfig(GetDomainConfigRequest request)
Get detailed information of a domain.

Parameters:
request - The request containing all of the options related to the domain.
Returns:
getDomainConfig of the getDomainConfig operation returned by the service.

setDomainOrigin

public void setDomainOrigin(String domain,
                            String peer)
Update origin of specified domain acceleration.

Parameters:
domain - Name of the domain.
peer - The peer address of new origin.

setDomainOrigin

public SetDomainOriginResponse setDomainOrigin(SetDomainOriginRequest request)
Update origin of specified domain acceleration.

Parameters:
request - The request containing all of the options related to the domain.
Returns:
Result of the setDomainOrigin operation returned by the service.

getDomainCacheTTL

public GetDomainCacheTTLResponse getDomainCacheTTL(String domain)
Get cache policies of specified domain acceleration.

Parameters:
domain - Name of the domain.
Returns:
Detailed information about cache policies.

getDomainCacheTTL

public GetDomainCacheTTLResponse getDomainCacheTTL(GetDomainCacheTTLRequest request)
Get cache policies of specified domain acceleration.

Parameters:
request - The request containing all of the options related to the domain.
Returns:
Detailed information about cache policies.

setDomainCacheTTL

public SetDomainCacheTTLResponse setDomainCacheTTL(SetDomainCacheTTLRequest request)
Update cache policies of specified domain acceleration.

Parameters:
request - The request containing all of the options related to the update request.
Returns:
Result of the setDomainCacheTTL operation returned by the service.

setDomainCacheFullUrl

public void setDomainCacheFullUrl(String domain,
                                  boolean setting)
Update cache policy of specified domain acceleration.

Parameters:
domain - Name of the domain.
setting - For true, treat the full URL as unique cache id, otherwise ignore query string parameters.

setDomainCacheFullUrl

public SetDomainCacheFullUrlResponse setDomainCacheFullUrl(SetDomainCacheFullUrlRequest request)
Update cache policy of specified domain acceleration.

Parameters:
request - The request containing all of the options related to the update request.
Returns:
Result of the setDomainCacheFullUrl operation returned by the service.

setDomainRefererACL

public SetDomainRefererACLResponse setDomainRefererACL(SetDomainRefererACLRequest request)
Update RefererACL rules of specified domain acceleration.

Parameters:
request - The request containing all of the options related to the update request.
Returns:
Result of the setDomainRefererACL operation returned by the service.

setDomainIpACL

public SetDomainIpACLResponse setDomainIpACL(SetDomainIpACLRequest request)
Update IpACL rules of specified domain acceleration.

Parameters:
request - The request containing all of the options related to the update request.
Returns:
Result of the setDomainIpACL operation returned by the service.

setDomainLimitRate

public void setDomainLimitRate(String domain,
                               int limitRate)
Set the rate limit of specified domain acceleration.

Parameters:
domain - Name of the domain.
limitRate - The limit of downloading rate, in Bytes/s.

setDomainLimitRate

public SetDomainLimitRateResponse setDomainLimitRate(SetDomainLimitRateRequest request)
Set the rate limit of specified domain acceleration.

Parameters:
request - The request containing all of the options related to the update request.
Returns:
Result of the setDomainLimitRate operation returned by the service.

setHttpsConfig

public void setHttpsConfig(String domain,
                           HttpsConfig https)
Set HTTPS with certain configuration.

Parameters:
domain - Name of the domain.
https - The configuration of HTTPS.

setHttpsConfig

public SetHttpsConfigResponse setHttpsConfig(SetHttpsConfigRequest request)
Set HTTPS with certain configuration.

Parameters:
request - The request containing all of the options related to the update request.
Returns:
Result of the setHTTPSAcceleration operation returned by the service.

setRequestAuth

public void setRequestAuth(String domain,
                           RequestAuth requestAuth)
Set the request authentication.

Parameters:
domain - Name of the domain.
requestAuth - The configuration of authentication.

setRequestAuth

public SetRequestAuthResponse setRequestAuth(SetRequestAuthRequest request)
Set the request authentication.

Parameters:
request - The request containing all of the options related to the update request.
Returns:
Result of the setHTTPSAcceleration operation returned by the service.

prefetch

public PrefetchResponse prefetch(String url)
Post prefetch request

Parameters:
url - The URL to be prefetched.
Returns:
Result of the prefetch operation returned by the service.

prefetch

public PrefetchResponse prefetch(PrefetchRequest request)
Post prefetch request

Parameters:
request - The request containing all of the URLs to be prefetched.
Returns:
Result of the prefetch operation returned by the service.

purge

public PurgeResponse purge(String url)
Post purge request

Parameters:
url - The URL to be purged.
Returns:
Result of the purge operation returned by the service.

purgeDirectory

public PurgeResponse purgeDirectory(String directory)
Post purge request

Parameters:
directory - The directory to be purged.
Returns:
Result of the purge operation returned by the service.

purge

public PurgeResponse purge(PurgeRequest request)
Post purge request

Parameters:
request - The request containing all of the URLs to be purged.
Returns:
Result of the purge operation returned by the service.

getPurgeStatus

public GetPurgeStatusResponse getPurgeStatus(GetPurgeStatusRequest request)
Get purge status with specified attributes.

Parameters:
request - The request containing the task id returned by purge operation.
Returns:
Details of tasks

getPrefetchStatus

public GetPrefetchStatusResponse getPrefetchStatus(GetPrefetchStatusRequest request)
Get prefetch status with specified attributes.

Parameters:
request - The request containing the task id returned by prefetch operation.
Returns:
Details of tasks

getStatPv

public GetStatPvResponse getStatPv(GetStatPvRequest request)
Get pv statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatFlow

public GetStatFlowResponse getStatFlow(GetStatFlowRequest request)
Get flow statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatSrcFlow

public GetStatSrcFlowResponse getStatSrcFlow(GetStatSrcFlowRequest request)
Get origin flow statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatHitRate

public GetStatHitRateResponse getStatHitRate(GetStatHitRateRequest request)
Get hit rate statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatHttpCode

public GetStatHttpCodeResponse getStatHttpCode(GetStatHttpCodeRequest request)
Get http code statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatTopUrl

public GetStatTopUrlResponse getStatTopUrl(GetStatTopUrlRequest request)
Get top url statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatTopReferer

public GetStatTopRefererResponse getStatTopReferer(GetStatTopRefererRequest request)
Get top http referer statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatUv

public GetStatUvResponse getStatUv(GetStatUvRequest request)
Get uv statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getStatAvgSpeed

public GetStatAvgSpeedResponse getStatAvgSpeed(GetStatAvgSpeedRequest request)
Get average speed statistics with specified attributes.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getCacheQuota

public GetCacheQuotaResponse getCacheQuota()
Get cache operation quota.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getCacheQuota

public GetCacheQuotaResponse getCacheQuota(GetCacheQuotaRequest request)
Get cache operation quota.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

getDomainLog

public GetDomainLogResponse getDomainLog(GetDomainLogRequest request)
Get URLs of log files

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics

describeIp

public DescribeIpResponse describeIp(String ip)
Get the description of certain IP address.

Parameters:
ip - IP address.
Returns:
Details of statistics

describeIp

public DescribeIpResponse describeIp(DescribeIpRequest request)
Get the description of certain IP address.

Parameters:
request - The request containing all the options related to the statistics.
Returns:
Details of statistics


Copyright © 2018. All rights reserved.