tencent cloud

masukan

Setting Access Domain Names (CDN/Global Acceleration)

Terakhir diperbarui:2024-02-02 14:36:36

    Overview

    This document describes how to request the COS service using a non-default endpoint.

    Custom origin server domain name

    For more information, see Enabling Custom Origin Domain.
    The sample code below shows how to access a COS service using a custom origin server domain name.

    Sample code

    CosXmlConfig config = new CosXmlConfig.Builder()
    .SetRegion("COS_REGION") // Sets the default bucket region
    // Set the requested endpoint to “your.domain.com”
    .SetHost("your.domain.com") // Custom endpoint
    .Build();
    Note:
    For the complete sample, go to GitHub.

    Global acceleration endpoint

    For more information on global acceleration, see Overview.
    The sample code below shows how to access a COS service using a global acceleration endpoint.

    Sample code

    CosXmlConfig config = new CosXmlConfig.Builder()
    .SetEndpointSuffix("cos.accelerate.myqcloud.com")
    .Build();
    Note:
    For the complete sample, go to GitHub.

    Custom CDN domain name

    The sample code below shows how to access a COS service using a custom CDN acceleration domain name.

    Sample code

    CosXmlConfig config = new CosXmlConfig.Builder()
    .SetHost("exampledomain.com")
    .Build();
    Note:
    For the complete sample, go to GitHub.

    Default CDN domain name

    The sample code below shows how to access a COS service using a default CDN acceleration domain name.

    Sample code

    CosXmlConfig config = new CosXmlConfig.Builder()
    .SetEndpointSuffix("file.myqcloud.com")
    .Build();
    Note:
    For the complete sample, go to GitHub.
    Hubungi Kami

    Hubungi tim penjualan atau penasihat bisnis kami untuk membantu bisnis Anda.

    Dukungan Teknis

    Buka tiket jika Anda mencari bantuan lebih lanjut. Tiket kami tersedia 7x24.

    Dukungan Telepon 7x24