Skip to content
Start here

Domains

DomainsCustom

List Custom Domains of Bucket
r2.buckets.domains.custom.list(strbucket_name, CustomListParams**kwargs) -> CustomListResponse
GET/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom
Get Custom Domain Settings
r2.buckets.domains.custom.get(strdomain, CustomGetParams**kwargs) -> CustomGetResponse
GET/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}
Attach Custom Domain To Bucket
r2.buckets.domains.custom.create(strbucket_name, CustomCreateParams**kwargs) -> CustomCreateResponse
POST/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom
Configure Custom Domain Settings
r2.buckets.domains.custom.update(strdomain, CustomUpdateParams**kwargs) -> CustomUpdateResponse
PUT/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}
Remove Custom Domain From Bucket
r2.buckets.domains.custom.delete(strdomain, CustomDeleteParams**kwargs) -> CustomDeleteResponse
DELETE/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}
ModelsExpand Collapse
class CustomListResponse:
domains: List[Domain]
domain: str

Domain name of the custom domain to be added.

enabled: bool

Whether this bucket is publicly accessible at the specified custom domain.

status: DomainStatus
ownership: Literal["pending", "active", "deactivated", 3 more]

Ownership status of the domain.

One of the following:
"pending"
"active"
"deactivated"
"blocked"
"error"
"unknown"
ssl: Literal["initializing", "pending", "active", 3 more]

SSL certificate status.

One of the following:
"initializing"
"pending"
"active"
"deactivated"
"error"
"unknown"
ciphers: Optional[List[str]]

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

min_tls: Optional[Literal["1.0", "1.1", "1.2", "1.3"]]

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
zone_id: Optional[str]

Zone ID of the custom domain resides in.

zone_name: Optional[str]

Zone that the custom domain resides in.

class CustomGetResponse:
domain: str

Domain name of the custom domain to be added.

enabled: bool

Whether this bucket is publicly accessible at the specified custom domain.

status: Status
ownership: Literal["pending", "active", "deactivated", 3 more]

Ownership status of the domain.

One of the following:
"pending"
"active"
"deactivated"
"blocked"
"error"
"unknown"
ssl: Literal["initializing", "pending", "active", 3 more]

SSL certificate status.

One of the following:
"initializing"
"pending"
"active"
"deactivated"
"error"
"unknown"
ciphers: Optional[List[str]]

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

min_tls: Optional[Literal["1.0", "1.1", "1.2", "1.3"]]

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
zone_id: Optional[str]

Zone ID of the custom domain resides in.

zone_name: Optional[str]

Zone that the custom domain resides in.

class CustomCreateResponse:
domain: str

Domain name of the affected custom domain.

enabled: bool

Whether this bucket is publicly accessible at the specified custom domain.

ciphers: Optional[List[str]]

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

min_tls: Optional[Literal["1.0", "1.1", "1.2", "1.3"]]

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
class CustomUpdateResponse:
domain: str

Domain name of the affected custom domain.

ciphers: Optional[List[str]]

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

enabled: Optional[bool]

Whether this bucket is publicly accessible at the specified custom domain.

min_tls: Optional[Literal["1.0", "1.1", "1.2", "1.3"]]

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
class CustomDeleteResponse:
domain: str

Name of the removed custom domain.

DomainsManaged

Get r2.dev Domain of Bucket
r2.buckets.domains.managed.list(strbucket_name, ManagedListParams**kwargs) -> ManagedListResponse
GET/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed
Update r2.dev Domain of Bucket
r2.buckets.domains.managed.update(strbucket_name, ManagedUpdateParams**kwargs) -> ManagedUpdateResponse
PUT/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed
ModelsExpand Collapse
class ManagedListResponse:
bucket_id: str

Bucket ID.

maxLength32
domain: str

Domain name of the bucket’s r2.dev domain.

enabled: bool

Whether this bucket is publicly accessible at the r2.dev domain.

class ManagedUpdateResponse:
bucket_id: str

Bucket ID.

maxLength32
domain: str

Domain name of the bucket’s r2.dev domain.

enabled: bool

Whether this bucket is publicly accessible at the r2.dev domain.