UpCloud

Object Storage Custom Domains

Custom domains allow you to use your own domain names to access your Object Storage buckets instead of the default UpCloud domain. A maximum of 5 custom domains can be added per service.

DNS Records Setup

To attach a custom domain, public access to the service must be enabled and DNS records must contain the following CNAME records.

Assume the service has public endpoint zzzzz.upcloudobjects.com and custom domain to be attached is objects.example.com, these are the expected records under example.com domain:

TypeHostTarget
CNAMEobjectszzzzz.upcloudobjects.com
CNAME*.objectszzzzz.upcloudobjects.com
CNAME_acme-challenge.objectsDomain obtained from DNS challenge request

POST/1.3/object-storage-2/{service_uuid}/custom-domains

Attach custom domain

Attaches a new custom domain to the service identified by {service_uuid}.

Attributes

  • Name
    domain_name
    Type
    string
    Description

    Custom domain to be added. Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain.

  • Name
    type
    Type
    string
    Description

    Type of the custom domain. Currently only public is accepted.

Request

POST
/1.3/object-storage-2/{service_uuid}/custom-domains
curl -X POST https://api.upcloud.com/1.3/object-storage-2/0ab2f83f-03f3-4c48-9a38-0a3e89c6d024/custom-domains \
  -u your_username:your_password \
  -H "Content-Type: application/json" \
  -d '{
    "domain_name": "objects.example.com",
    "type": "public"
  }'

GET/1.3/object-storage-2/{service_uuid}/custom-domains

List custom domains

Returns a list of custom domains attached to a service by given {service_uuid}.

Request

GET
/1.3/object-storage-2/{service_uuid}/custom-domains
curl -X GET https://api.upcloud.com/1.3/object-storage-2/0ab2f83f-03f3-4c48-9a38-0a3e89c6d024/custom-domains \
  -u your_username:your_password

GET/1.3/object-storage-2/{service_uuid}/custom-domains/{domain_name}

Get custom domain details

Returns custom domain details by given {service_uuid} and {domain_name}.

Request

GET
/1.3/object-storage-2/{service_uuid}/custom-domains/{domain_name}
curl -X GET https://api.upcloud.com/1.3/object-storage-2/0ab2f83f-03f3-4c48-9a38-0a3e89c6d024/custom-domains/objects.example.com \
  -u your_username:your_password

PATCH/1.3/object-storage-2/{service_uuid}/custom-domains/{domain_name}

Modify custom domain

Modifies existing custom domain by given {service_uuid} and {domain_name}.

Attributes

  • Name
    domain_name
    Type
    string
    Description

    New modified custom domain. Must be a subdomain and consist of 3 to 5 parts.

  • Name
    type
    Type
    string
    Description

    Type of the custom domain. Currently only public is accepted.

Request

PATCH
/1.3/object-storage-2/{service_uuid}/custom-domains/{domain_name}
curl -X PATCH https://api.upcloud.com/1.3/object-storage-2/0ab2f83f-03f3-4c48-9a38-0a3e89c6d024/custom-domains/objects.example.com \
  -u your_username:your_password \
  -H "Content-Type: application/json" \
  -d '{
    "domain_name": "new-objects.example.com",
    "type": "public"
  }'

DELETE/1.3/object-storage-2/{service_uuid}/custom-domains/{domain_name}

Delete custom domain

Deletes existing custom domain by given {service_uuid} and {domain_name}.

Request

DELETE
/1.3/object-storage-2/{service_uuid}/custom-domains/{domain_name}
curl -X DELETE https://api.upcloud.com/1.3/object-storage-2/0ab2f83f-03f3-4c48-9a38-0a3e89c6d024/custom-domains/objects.example.com \
  -u your_username:your_password