---
title: Buckets
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[R2](https://developers.cloudflare.com/api/python/resources/r2)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Buckets

##### [List Buckets](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/methods/list)

r2.buckets.list(BucketListParams\*\*kwargs) -> [BucketListResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets%20%3E%20(model)%20bucket_list_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets

##### [Get Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/methods/get)

r2.buckets.get(strbucket\_name, BucketGetParams\*\*kwargs) -> [Bucket](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}

##### [Create Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/methods/create)

r2.buckets.create(BucketCreateParams\*\*kwargs) -> [Bucket](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)>)

POST/accounts/{account\_id}/r2/buckets

##### [Patch Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/methods/edit)

r2.buckets.edit(strbucket\_name, BucketEditParams\*\*kwargs) -> [Bucket](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)>)

PATCH/accounts/{account\_id}/r2/buckets/{bucket\_name}

##### [Delete Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/methods/delete)

r2.buckets.delete(strbucket\_name, BucketDeleteParams\*\*kwargs) -> object

DELETE/accounts/{account\_id}/r2/buckets/{bucket\_name}

##### ModelsExpand Collapse

<details>

<summary>

class Bucket: …

A single R2 bucket.

</summary>

creation\_date: Optional\[str]

Creation timestamp.

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20creation_date">Link to this property</a>

<details>

<summary>

jurisdiction: Optional\[Literal\["default", "eu", "us", 2 more]]

Jurisdiction where objects in this bucket are guaranteed to be stored.

</summary>

One of the following:

"default"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%200">Link to this property</a>

"eu"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%201">Link to this property</a>

"us"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%202">Link to this property</a>

"fedramp"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%203">Link to this property</a>

"fedramp-high"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction">Link to this property</a>

<details>

<summary>

location: Optional\[Literal\["apac", "eeur", "enam", 3 more]]

Location of the bucket.

</summary>

One of the following:

"apac"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%200">Link to this property</a>

"eeur"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%201">Link to this property</a>

"enam"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%202">Link to this property</a>

"weur"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%203">Link to this property</a>

"wnam"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%204">Link to this property</a>

"oc"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location">Link to this property</a>

name: Optional\[str]

Name of the bucket.

maxLength64

minLength3

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

storage\_class: Optional\[Literal\["Standard", "InfrequentAccess"]]

Storage class for newly uploaded objects, unless specified otherwise.

</summary>

One of the following:

"Standard"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%200">Link to this property</a>

"InfrequentAccess"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)>)

<details>

<summary>

class BucketListResponse: …

</summary>

<details>

<summary>

buckets: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)">Bucket</a>]]

</summary>

creation\_date: Optional\[str]

Creation timestamp.

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20creation_date">Link to this property</a>

<details>

<summary>

jurisdiction: Optional\[Literal\["default", "eu", "us", 2 more]]

Jurisdiction where objects in this bucket are guaranteed to be stored.

</summary>

One of the following:

"default"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%200">Link to this property</a>

"eu"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%201">Link to this property</a>

"us"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%202">Link to this property</a>

"fedramp"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%203">Link to this property</a>

"fedramp-high"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction">Link to this property</a>

<details>

<summary>

location: Optional\[Literal\["apac", "eeur", "enam", 3 more]]

Location of the bucket.

</summary>

One of the following:

"apac"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%200">Link to this property</a>

"eeur"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%201">Link to this property</a>

"enam"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%202">Link to this property</a>

"weur"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%203">Link to this property</a>

"wnam"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%204">Link to this property</a>

"oc"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location">Link to this property</a>

name: Optional\[str]

Name of the bucket.

maxLength64

minLength3

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

storage\_class: Optional\[Literal\["Standard", "InfrequentAccess"]]

Storage class for newly uploaded objects, unless specified otherwise.

</summary>

One of the following:

"Standard"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%200">Link to this property</a>

"InfrequentAccess"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket_list_response%20%3E%20(schema)%20%3E%20(property)%20buckets">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets%20%3E%20(model)%20bucket_list_response%20%3E%20(schema)>)

#### BucketsLifecycle

##### [Get Object Lifecycle Rules](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/lifecycle/methods/get)

r2.buckets.lifecycle.get(strbucket\_name, LifecycleGetParams\*\*kwargs) -> [LifecycleGetResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/lifecycle

##### [Set Object Lifecycle Rules](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/lifecycle/methods/update)

r2.buckets.lifecycle.update(strbucket\_name, LifecycleUpdateParams\*\*kwargs) -> object

PUT/accounts/{account\_id}/r2/buckets/{bucket\_name}/lifecycle

##### ModelsExpand Collapse

<details>

<summary>

class LifecycleGetResponse: …

</summary>

<details>

<summary>

rules: Optional\[List\[Rule]]

</summary>

id: str

Unique identifier for this rule.

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

conditions: RuleConditions

Conditions that apply to all transitions of this rule.

</summary>

prefix: str

Transitions will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(property)%20prefix">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions">Link to this property</a>

enabled: bool

Whether or not this rule is in effect.

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

abort\_multipart\_uploads\_transition: Optional\[RuleAbortMultipartUploadsTransition]

Transition to abort ongoing multipart uploads.

</summary>

<details>

<summary>

condition: Optional\[RuleAbortMultipartUploadsTransitionCondition]

Condition for lifecycle transitions to apply after an object reaches an age in seconds.

</summary>

max\_age: int

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20abortMultipartUploadsTransition%20%3E%20(property)%20condition%20%3E%20(property)%20maxAge">Link to this property</a>

type: Literal\["Age"]

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20abortMultipartUploadsTransition%20%3E%20(property)%20condition%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20abortMultipartUploadsTransition%20%3E%20(property)%20condition">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20abortMultipartUploadsTransition">Link to this property</a>

<details>

<summary>

delete\_objects\_transition: Optional\[RuleDeleteObjectsTransition]

Transition to delete objects.

</summary>

<details>

<summary>

condition: Optional\[RuleDeleteObjectsTransitionCondition]

Condition for lifecycle transitions to apply after an object reaches an age in seconds.

</summary>

One of the following:

<details>

<summary>

class RuleDeleteObjectsTransitionConditionR2LifecycleAgeCondition: …

Condition for lifecycle transitions to apply after an object reaches an age in seconds.

</summary>

max\_age: int

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition%20%3E%20(property)%20condition%20%3E%20(variant)%200%20%3E%20(property)%20maxAge">Link to this property</a>

type: Literal\["Age"]

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition%20%3E%20(property)%20condition%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition%20%3E%20(property)%20condition%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class RuleDeleteObjectsTransitionConditionR2LifecycleDateCondition: …

Condition for lifecycle transitions to apply on a specific date.

</summary>

date: datetime

formatdate-time

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition%20%3E%20(property)%20condition%20%3E%20(variant)%201%20%3E%20(property)%20date">Link to this property</a>

type: Literal\["Date"]

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition%20%3E%20(property)%20condition%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition%20%3E%20(property)%20condition%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition%20%3E%20(property)%20condition">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20deleteObjectsTransition">Link to this property</a>

<details>

<summary>

storage\_class\_transitions: Optional\[List\[RuleStorageClassTransition]]

Transitions to change the storage class of objects.

</summary>

<details>

<summary>

condition: RuleStorageClassTransitionCondition

Condition for lifecycle transitions to apply after an object reaches an age in seconds.

</summary>

One of the following:

<details>

<summary>

class RuleStorageClassTransitionConditionR2LifecycleAgeCondition: …

Condition for lifecycle transitions to apply after an object reaches an age in seconds.

</summary>

max\_age: int

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%200%20%3E%20(property)%20maxAge">Link to this property</a>

type: Literal\["Age"]

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class RuleStorageClassTransitionConditionR2LifecycleDateCondition: …

Condition for lifecycle transitions to apply on a specific date.

</summary>

date: datetime

formatdate-time

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%201%20%3E%20(property)%20date">Link to this property</a>

type: Literal\["Date"]

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20condition">Link to this property</a>

storage\_class: Literal\["InfrequentAccess"]

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions%20%3E%20(items)%20%3E%20(property)%20storageClass">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20storageClassTransitions">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)%20%3E%20(property)%20rules">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.lifecycle%20%3E%20(model)%20lifecycle_get_response%20%3E%20(schema)>)

#### BucketsCORS

##### [Get Bucket CORS Policy](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/cors/methods/get)

r2.buckets.cors.get(strbucket\_name, CORSGetParams\*\*kwargs) -> [CORSGetResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/cors

##### [Set Bucket CORS Policy](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/cors/methods/update)

r2.buckets.cors.update(strbucket\_name, CORSUpdateParams\*\*kwargs) -> object

PUT/accounts/{account\_id}/r2/buckets/{bucket\_name}/cors

##### [Delete Bucket CORS Policy](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/cors/methods/delete)

r2.buckets.cors.delete(strbucket\_name, CORSDeleteParams\*\*kwargs) -> object

DELETE/accounts/{account\_id}/r2/buckets/{bucket\_name}/cors

##### ModelsExpand Collapse

<details>

<summary>

class CORSGetResponse: …

</summary>

<details>

<summary>

rules: Optional\[List\[Rule]]

</summary>

<details>

<summary>

allowed: RuleAllowed

Object specifying allowed origins, methods and headers for this CORS rule.

</summary>

<details>

<summary>

methods: List\[Literal\["GET", "PUT", "POST", 2 more]]

Specifies the value for the Access-Control-Allow-Methods header R2 sets when requesting objects in a bucket from a browser.

</summary>

One of the following:

"GET"

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20methods%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"PUT"

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20methods%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"POST"

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20methods%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"DELETE"

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20methods%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"HEAD"

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20methods%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20methods">Link to this property</a>

origins: List\[str]

Specifies the value for the Access-Control-Allow-Origin header R2 sets when requesting objects in a bucket from a browser.

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20origins">Link to this property</a>

headers: Optional\[List\[str]]

Specifies the value for the Access-Control-Allow-Headers header R2 sets when requesting objects in this bucket from a browser. Cross-origin requests that include custom headers (e.g. x-user-id) should specify these headers as AllowedHeaders.

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed%20%3E%20(property)%20headers">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20allowed">Link to this property</a>

id: Optional\[str]

Identifier for this rule.

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

expose\_headers: Optional\[List\[str]]

Specifies the headers that can be exposed back, and accessed by, the JavaScript making the cross-origin request. If you need to access headers beyond the safelisted response headers, such as Content-Encoding or cf-cache-status, you must specify it here.

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20exposeHeaders">Link to this property</a>

max\_age\_seconds: Optional\[float]

Specifies the amount of time (in seconds) browsers are allowed to cache CORS preflight responses. Browsers may limit this to 2 hours or less, even if the maximum value (86400) is specified.

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20maxAgeSeconds">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)%20%3E%20(property)%20rules">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.cors%20%3E%20(model)%20cors_get_response%20%3E%20(schema)>)

#### BucketsDomains

#### BucketsDomainsCustom

##### [List Custom Domains of Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/list)

r2.buckets.domains.custom.list(strbucket\_name, CustomListParams\*\*kwargs) -> [CustomListResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/domains/custom

##### [Get Custom Domain Settings](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/get)

r2.buckets.domains.custom.get(strdomain, CustomGetParams\*\*kwargs) -> [CustomGetResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/domains/custom/{domain}

##### [Attach Custom Domain To Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/create)

r2.buckets.domains.custom.create(strbucket\_name, CustomCreateParams\*\*kwargs) -> [CustomCreateResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/r2/buckets/{bucket\_name}/domains/custom

##### [Configure Custom Domain Settings](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/update)

r2.buckets.domains.custom.update(strdomain, CustomUpdateParams\*\*kwargs) -> [CustomUpdateResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)>)

PUT/accounts/{account\_id}/r2/buckets/{bucket\_name}/domains/custom/{domain}

##### [Remove Custom Domain From Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/delete)

r2.buckets.domains.custom.delete(strdomain, CustomDeleteParams\*\*kwargs) -> [CustomDeleteResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/r2/buckets/{bucket\_name}/domains/custom/{domain}

##### ModelsExpand Collapse

<details>

<summary>

class CustomListResponse: …

</summary>

<details>

<summary>

domains: List\[Domain]

</summary>

domain: str

Domain name of the custom domain to be added.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20domain">Link to this property</a>

enabled: bool

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

status: DomainStatus

</summary>

<details>

<summary>

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

Ownership status of the domain.

</summary>

One of the following:

"pending"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%200">Link to this property</a>

"active"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%201">Link to this property</a>

"deactivated"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%202">Link to this property</a>

"blocked"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%203">Link to this property</a>

"error"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%204">Link to this property</a>

"unknown"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ownership">Link to this property</a>

<details>

<summary>

ssl: Literal\["initializing", "pending", "active", 3 more]

SSL certificate status.

</summary>

One of the following:

"initializing"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%200">Link to this property</a>

"pending"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%201">Link to this property</a>

"active"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%202">Link to this property</a>

"deactivated"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%203">Link to this property</a>

"error"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%204">Link to this property</a>

"unknown"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(property)%20ssl">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20status">Link to this property</a>

ciphers: Optional\[List\[str]]

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20ciphers">Link to this property</a>

<details>

<summary>

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.

</summary>

One of the following:

"1.0"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20minTLS%20%3E%20(member)%200">Link to this property</a>

"1.1"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20minTLS%20%3E%20(member)%201">Link to this property</a>

"1.2"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20minTLS%20%3E%20(member)%202">Link to this property</a>

"1.3"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20minTLS%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20minTLS">Link to this property</a>

zone\_id: Optional\[str]

Zone ID of the custom domain resides in.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20zoneId">Link to this property</a>

zone\_name: Optional\[str]

Zone that the custom domain resides in.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains%20%3E%20(items)%20%3E%20(property)%20zoneName">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)%20%3E%20(property)%20domains">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_list_response%20%3E%20(schema)>)

<details>

<summary>

class CustomGetResponse: …

</summary>

domain: str

Domain name of the custom domain to be added.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20domain">Link to this property</a>

enabled: bool

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

status: Status

</summary>

<details>

<summary>

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

Ownership status of the domain.

</summary>

One of the following:

"pending"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%200">Link to this property</a>

"active"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%201">Link to this property</a>

"deactivated"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%202">Link to this property</a>

"blocked"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%203">Link to this property</a>

"error"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%204">Link to this property</a>

"unknown"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ownership%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ownership">Link to this property</a>

<details>

<summary>

ssl: Literal\["initializing", "pending", "active", 3 more]

SSL certificate status.

</summary>

One of the following:

"initializing"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%200">Link to this property</a>

"pending"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%201">Link to this property</a>

"active"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%202">Link to this property</a>

"deactivated"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%203">Link to this property</a>

"error"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%204">Link to this property</a>

"unknown"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ssl%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20ssl">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

ciphers: Optional\[List\[str]]

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20ciphers">Link to this property</a>

<details>

<summary>

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.

</summary>

One of the following:

"1.0"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%200">Link to this property</a>

"1.1"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%201">Link to this property</a>

"1.2"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%202">Link to this property</a>

"1.3"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20minTLS">Link to this property</a>

zone\_id: Optional\[str]

Zone ID of the custom domain resides in.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20zoneId">Link to this property</a>

zone\_name: Optional\[str]

Zone that the custom domain resides in.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)%20%3E%20(property)%20zoneName">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_get_response%20%3E%20(schema)>)

<details>

<summary>

class CustomCreateResponse: …

</summary>

domain: str

Domain name of the affected custom domain.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20domain">Link to this property</a>

enabled: bool

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

zone\_id: str

Zone ID of the custom domain.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20zoneId">Link to this property</a>

ciphers: Optional\[List\[str]]

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20ciphers">Link to this property</a>

<details>

<summary>

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.

</summary>

One of the following:

"1.0"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%200">Link to this property</a>

"1.1"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%201">Link to this property</a>

"1.2"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%202">Link to this property</a>

"1.3"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)%20%3E%20(property)%20minTLS">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_create_response%20%3E%20(schema)>)

<details>

<summary>

class CustomUpdateResponse: …

</summary>

domain: str

Domain name of the affected custom domain.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20domain">Link to this property</a>

ciphers: Optional\[List\[str]]

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20ciphers">Link to this property</a>

enabled: Optional\[bool]

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

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

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.

</summary>

One of the following:

"1.0"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%200">Link to this property</a>

"1.1"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%201">Link to this property</a>

"1.2"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%202">Link to this property</a>

"1.3"

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20minTLS%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)%20%3E%20(property)%20minTLS">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_update_response%20%3E%20(schema)>)

<details>

<summary>

class CustomDeleteResponse: …

</summary>

domain: str

Name of the removed custom domain.

<a href="#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_delete_response%20%3E%20(schema)%20%3E%20(property)%20domain">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.domains.custom%20%3E%20(model)%20custom_delete_response%20%3E%20(schema)>)

#### BucketsDomainsManaged

##### [Get r2.dev Domain of Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/domains/subresources/managed/methods/list)

r2.buckets.domains.managed.list(strbucket\_name, ManagedListParams\*\*kwargs) -> [ManagedListResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_list_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/domains/managed

##### [Update r2.dev Domain of Bucket](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/domains/subresources/managed/methods/update)

r2.buckets.domains.managed.update(strbucket\_name, ManagedUpdateParams\*\*kwargs) -> [ManagedUpdateResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_update_response%20%3E%20(schema)>)

PUT/accounts/{account\_id}/r2/buckets/{bucket\_name}/domains/managed

##### ModelsExpand Collapse

<details>

<summary>

class ManagedListResponse: …

</summary>

bucket\_id: str

Bucket ID.

maxLength32

<a href="#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_list_response%20%3E%20(schema)%20%3E%20(property)%20bucketId">Link to this property</a>

domain: str

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

<a href="#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_list_response%20%3E%20(schema)%20%3E%20(property)%20domain">Link to this property</a>

enabled: bool

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

<a href="#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_list_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_list_response%20%3E%20(schema)>)

<details>

<summary>

class ManagedUpdateResponse: …

</summary>

bucket\_id: str

Bucket ID.

maxLength32

<a href="#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_update_response%20%3E%20(schema)%20%3E%20(property)%20bucketId">Link to this property</a>

domain: str

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

<a href="#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_update_response%20%3E%20(schema)%20%3E%20(property)%20domain">Link to this property</a>

enabled: bool

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

<a href="#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_update_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.domains.managed%20%3E%20(model)%20managed_update_response%20%3E%20(schema)>)

#### BucketsEvent Notifications

##### [List Event Notification Rules](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/event_notifications/methods/list)

r2.buckets.event\_notifications.list(strbucket\_name, EventNotificationListParams\*\*kwargs) -> [EventNotificationListResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/event\_notifications/r2/{bucket\_name}/configuration

##### [Get Event Notification Rules for a Queue](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/event_notifications/methods/get)

r2.buckets.event\_notifications.get(strqueue\_id, EventNotificationGetParams\*\*kwargs) -> [EventNotificationGetResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/event\_notifications/r2/{bucket\_name}/configuration/queues/{queue\_id}

##### [Create Event Notification Rules](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/event_notifications/methods/update)

r2.buckets.event\_notifications.update(strqueue\_id, EventNotificationUpdateParams\*\*kwargs) -> object

PUT/accounts/{account\_id}/event\_notifications/r2/{bucket\_name}/configuration/queues/{queue\_id}

##### [Delete Event Notification Rules](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/event_notifications/methods/delete)

r2.buckets.event\_notifications.delete(strqueue\_id, EventNotificationDeleteParams\*\*kwargs) -> object

DELETE/accounts/{account\_id}/event\_notifications/r2/{bucket\_name}/configuration/queues/{queue\_id}

##### ModelsExpand Collapse

<details>

<summary>

class EventNotificationListResponse: …

</summary>

bucket\_name: Optional\[str]

Name of the bucket.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20bucketName">Link to this property</a>

<details>

<summary>

queues: Optional\[List\[Queue]]

List of queues associated with the bucket.

</summary>

queue\_id: Optional\[str]

Queue ID.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20queueId">Link to this property</a>

queue\_name: Optional\[str]

Name of the queue.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20queueName">Link to this property</a>

<details>

<summary>

rules: Optional\[List\[QueueRule]]

</summary>

<details>

<summary>

actions: List\[Literal\["PutObject", "CopyObject", "DeleteObject", 2 more]]

Array of R2 object actions that will trigger notifications.

</summary>

One of the following:

"PutObject"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"CopyObject"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"DeleteObject"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"CompleteMultipartUpload"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"LifecycleDeletion"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions">Link to this property</a>

created\_at: Optional\[str]

Timestamp when the rule was created.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20createdAt">Link to this property</a>

description: Optional\[str]

A description that can be used to identify the event notification rule after creation.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20description">Link to this property</a>

prefix: Optional\[str]

Notifications will be sent only for objects with this prefix.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20prefix">Link to this property</a>

rule\_id: Optional\[str]

Rule ID.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20ruleId">Link to this property</a>

suffix: Optional\[str]

Notifications will be sent only for objects with this suffix.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20suffix">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues%20%3E%20(items)%20%3E%20(property)%20rules">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)%20%3E%20(property)%20queues">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_list_response%20%3E%20(schema)>)

<details>

<summary>

class EventNotificationGetResponse: …

</summary>

queue\_id: Optional\[str]

Queue ID.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20queueId">Link to this property</a>

queue\_name: Optional\[str]

Name of the queue.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20queueName">Link to this property</a>

<details>

<summary>

rules: Optional\[List\[Rule]]

</summary>

<details>

<summary>

actions: List\[Literal\["PutObject", "CopyObject", "DeleteObject", 2 more]]

Array of R2 object actions that will trigger notifications.

</summary>

One of the following:

"PutObject"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"CopyObject"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"DeleteObject"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"CompleteMultipartUpload"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"LifecycleDeletion"

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20actions">Link to this property</a>

created\_at: Optional\[str]

Timestamp when the rule was created.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20createdAt">Link to this property</a>

description: Optional\[str]

A description that can be used to identify the event notification rule after creation.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20description">Link to this property</a>

prefix: Optional\[str]

Notifications will be sent only for objects with this prefix.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20prefix">Link to this property</a>

rule\_id: Optional\[str]

Rule ID.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20ruleId">Link to this property</a>

suffix: Optional\[str]

Notifications will be sent only for objects with this suffix.

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20suffix">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)%20%3E%20(property)%20rules">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.event_notifications%20%3E%20(model)%20event_notification_get_response%20%3E%20(schema)>)

#### BucketsLocks

##### [Get Bucket Lock Rules](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/locks/methods/get)

r2.buckets.locks.get(strbucket\_name, LockGetParams\*\*kwargs) -> [LockGetResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/lock

##### [Set Bucket Lock Rules](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/locks/methods/update)

r2.buckets.locks.update(strbucket\_name, LockUpdateParams\*\*kwargs) -> object

PUT/accounts/{account\_id}/r2/buckets/{bucket\_name}/lock

##### ModelsExpand Collapse

<details>

<summary>

class LockGetResponse: …

</summary>

<details>

<summary>

rules: Optional\[List\[Rule]]

</summary>

id: str

Unique identifier for this rule.

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

condition: RuleCondition

Condition to apply a lock rule to an object for how long in seconds.

</summary>

One of the following:

<details>

<summary>

class RuleConditionR2LockRuleAgeCondition: …

Condition to apply a lock rule to an object for how long in seconds.

</summary>

max\_age\_seconds: int

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%200%20%3E%20(property)%20maxAgeSeconds">Link to this property</a>

type: Literal\["Age"]

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class RuleConditionR2LockRuleDateCondition: …

Condition to apply a lock rule to an object until a specific date.

</summary>

date: datetime

formatdate-time

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%201%20%3E%20(property)%20date">Link to this property</a>

type: Literal\["Date"]

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class RuleConditionR2LockRuleIndefiniteCondition: …

Condition to apply a lock rule indefinitely.

</summary>

type: Literal\["Indefinite"]

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%202%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition%20%3E%20(variant)%202">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20condition">Link to this property</a>

enabled: bool

Whether or not this rule is in effect.

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20enabled">Link to this property</a>

prefix: Optional\[str]

Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20prefix">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)%20%3E%20(property)%20rules">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.locks%20%3E%20(model)%20lock_get_response%20%3E%20(schema)>)

#### BucketsMetrics

##### [Get Account-Level Metrics](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/metrics/methods/list)

r2.buckets.metrics.list(MetricListParams\*\*kwargs) -> [MetricListResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/metrics

##### ModelsExpand Collapse

<details>

<summary>

class MetricListResponse: …

Metrics based on the class they belong to.

</summary>

<details>

<summary>

infrequent\_access: Optional\[InfrequentAccess]

Metrics based on what state they are in(uploaded or published).

</summary>

<details>

<summary>

published: Optional\[InfrequentAccessPublished]

Metrics on number of objects/amount of storage used.

</summary>

metadata\_size: Optional\[float]

Amount of.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20published%20%3E%20(property)%20metadataSize">Link to this property</a>

objects: Optional\[float]

Number of objects stored.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20published%20%3E%20(property)%20objects">Link to this property</a>

payload\_size: Optional\[float]

Amount of storage used by object data.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20published%20%3E%20(property)%20payloadSize">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20published">Link to this property</a>

<details>

<summary>

uploaded: Optional\[InfrequentAccessUploaded]

Metrics on number of objects/amount of storage used.

</summary>

metadata\_size: Optional\[float]

Amount of.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20uploaded%20%3E%20(property)%20metadataSize">Link to this property</a>

objects: Optional\[float]

Number of objects stored.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20uploaded%20%3E%20(property)%20objects">Link to this property</a>

payload\_size: Optional\[float]

Amount of storage used by object data.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20uploaded%20%3E%20(property)%20payloadSize">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess%20%3E%20(property)%20uploaded">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20infrequentAccess">Link to this property</a>

<details>

<summary>

standard: Optional\[Standard]

Metrics based on what state they are in(uploaded or published).

</summary>

<details>

<summary>

published: Optional\[StandardPublished]

Metrics on number of objects/amount of storage used.

</summary>

metadata\_size: Optional\[float]

Amount of.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20published%20%3E%20(property)%20metadataSize">Link to this property</a>

objects: Optional\[float]

Number of objects stored.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20published%20%3E%20(property)%20objects">Link to this property</a>

payload\_size: Optional\[float]

Amount of storage used by object data.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20published%20%3E%20(property)%20payloadSize">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20published">Link to this property</a>

<details>

<summary>

uploaded: Optional\[StandardUploaded]

Metrics on number of objects/amount of storage used.

</summary>

metadata\_size: Optional\[float]

Amount of.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20uploaded%20%3E%20(property)%20metadataSize">Link to this property</a>

objects: Optional\[float]

Number of objects stored.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20uploaded%20%3E%20(property)%20objects">Link to this property</a>

payload\_size: Optional\[float]

Amount of storage used by object data.

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20uploaded%20%3E%20(property)%20payloadSize">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard%20%3E%20(property)%20uploaded">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)%20%3E%20(property)%20standard">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.metrics%20%3E%20(model)%20metric_list_response%20%3E%20(schema)>)

#### BucketsSippy

##### [Get Sippy Configuration](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/sippy/methods/get)

r2.buckets.sippy.get(strbucket\_name, SippyGetParams\*\*kwargs) -> [Sippy](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/sippy

##### [Enable Sippy](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/sippy/methods/update)

r2.buckets.sippy.update(strbucket\_name, SippyUpdateParams\*\*kwargs) -> [Sippy](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)>)

PUT/accounts/{account\_id}/r2/buckets/{bucket\_name}/sippy

##### [Disable Sippy](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/sippy/methods/delete)

r2.buckets.sippy.delete(strbucket\_name, SippyDeleteParams\*\*kwargs) -> [SippyDeleteResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/r2/buckets/{bucket\_name}/sippy

##### ModelsExpand Collapse

Literal\["r2"]

[Link to this property](<#(resource)%20r2.buckets.sippy%20%3E%20(model)%20provider%20%3E%20(schema)>)

<details>

<summary>

class Sippy: …

</summary>

<details>

<summary>

destination: Optional\[Destination]

Details about the configured destination bucket.

</summary>

access\_key\_id: Optional\[str]

ID of the Cloudflare API token used when writing objects to this bucket.

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20destination%20%3E%20(property)%20accessKeyId">Link to this property</a>

account: Optional\[str]

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20destination%20%3E%20(property)%20account">Link to this property</a>

bucket: Optional\[str]

Name of the bucket on the provider.

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20destination%20%3E%20(property)%20bucket">Link to this property</a>

provider: Optional\[Provider]

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20destination%20%3E%20(property)%20provider">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20destination">Link to this property</a>

enabled: Optional\[bool]

State of Sippy for this bucket.

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

source: Optional\[Source]

Details about the configured source bucket.

</summary>

bucket: Optional\[str]

Name of the bucket on the provider (AWS, GCS only).

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20bucket">Link to this property</a>

bucket\_url: Optional\[str]

S3-compatible URL (Generic S3-compatible providers only).

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20bucketUrl">Link to this property</a>

container: Optional\[str]

Name of the Azure Blob Storage container (Azure only).

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20container">Link to this property</a>

<details>

<summary>

provider: Optional\[Literal\["aws", "gcs", "s3", "azure"]]

</summary>

One of the following:

"aws"

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20provider%20%3E%20(member)%200">Link to this property</a>

"gcs"

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20provider%20%3E%20(member)%201">Link to this property</a>

"s3"

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20provider%20%3E%20(member)%202">Link to this property</a>

"azure"

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20provider%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20provider">Link to this property</a>

region: Optional\[str]

Region where the bucket resides (AWS only).

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20region">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy%20%3E%20(schema)>)

<details>

<summary>

class SippyDeleteResponse: …

</summary>

enabled: Optional\[Literal\[false]]

<a href="#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy_delete_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.sippy%20%3E%20(model)%20sippy_delete_response%20%3E%20(schema)>)

#### BucketsObjects

##### [List Objects](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/objects/methods/list)

r2.buckets.objects.list(strbucket\_name, ObjectListParams\*\*kwargs) -> SyncCursorPagination\[[ObjectListResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/objects

##### [Get Object](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/objects/methods/get)

r2.buckets.objects.get(strobject\_key, ObjectGetParams\*\*kwargs) -> BinaryResponseContent

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}/objects/{object\_key}

##### [Upload Object](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/objects/methods/upload)

r2.buckets.objects.upload(strobject\_key, [object](<https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/objects/methods/upload#(resource)%20r2.buckets.objects%20%3E%20(method)%20upload%20%3E%20(params)%20default%20%3E%20(param)%20body%20%3E%20(schema)>)body, ObjectUploadParams\*\*kwargs) -> [ObjectUploadResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)>)

PUT/accounts/{account\_id}/r2/buckets/{bucket\_name}/objects/{object\_key}

##### [Delete Object](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets/subresources/objects/methods/delete)

r2.buckets.objects.delete(strobject\_key, ObjectDeleteParams\*\*kwargs) -> [ObjectDeleteResponse](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/r2/buckets/{bucket\_name}/objects/{object\_key}

##### ModelsExpand Collapse

<details>

<summary>

class ObjectListResponse: …

Metadata for an R2 object.

</summary>

custom\_metadata: Optional\[Dict\[str, str]]

Custom metadata key-value pairs associated with the object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20custom_metadata">Link to this property</a>

etag: Optional\[str]

The entity tag for the object. In JSON list/get responses this is the raw hex digest (without surrounding quotes). The HTTP <code>ETag</code> response header on Get Object follows RFC 7232 and IS wrapped in surrounding double-quotes.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20etag">Link to this property</a>

<details>

<summary>

http\_metadata: Optional\[HTTPMetadata]

HTTP metadata associated with an R2 object.

</summary>

cache\_control: Optional\[str]

Specifies caching behavior for the object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20http_metadata%20%3E%20(property)%20cacheControl">Link to this property</a>

cache\_expiry: Optional\[datetime]

The date and time at which the object’s cache entry expires.

formatdate-time

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20http_metadata%20%3E%20(property)%20cacheExpiry">Link to this property</a>

content\_disposition: Optional\[str]

Specifies presentational information for the object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20http_metadata%20%3E%20(property)%20contentDisposition">Link to this property</a>

content\_encoding: Optional\[str]

Specifies the content encoding applied to the object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20http_metadata%20%3E%20(property)%20contentEncoding">Link to this property</a>

content\_language: Optional\[str]

The language of the object content.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20http_metadata%20%3E%20(property)%20contentLanguage">Link to this property</a>

content\_type: Optional\[str]

The MIME type of the object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20http_metadata%20%3E%20(property)%20contentType">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20http_metadata">Link to this property</a>

key: Optional\[str]

The object key (name).

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20key">Link to this property</a>

last\_modified: Optional\[datetime]

The date and time the object was last modified.

formatdate-time

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20last_modified">Link to this property</a>

size: Optional\[int]

The size of the object in bytes.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20size">Link to this property</a>

ssec: Optional\[bool]

Whether the object is encrypted with a customer-supplied encryption key.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20ssec">Link to this property</a>

<details>

<summary>

storage\_class: Optional\[Literal\["Standard", "InfrequentAccess"]]

Storage class for newly uploaded objects, unless specified otherwise.

</summary>

One of the following:

"Standard"

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%200">Link to this property</a>

"InfrequentAccess"

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)%20%3E%20(property)%20storage_class">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_list_response%20%3E%20(schema)>)

<details>

<summary>

class ObjectUploadResponse: …

Result of a successful object upload.

</summary>

etag: Optional\[str]

The entity tag for the uploaded object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20etag">Link to this property</a>

key: Optional\[str]

The key (name) of the uploaded object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20key">Link to this property</a>

size: Optional\[str]

The size of the uploaded object in bytes (as a string).

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20size">Link to this property</a>

<details>

<summary>

storage\_class: Optional\[Literal\["Standard", "InfrequentAccess"]]

Storage class for newly uploaded objects, unless specified otherwise.

</summary>

One of the following:

"Standard"

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%200">Link to this property</a>

"InfrequentAccess"

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20storage_class">Link to this property</a>

uploaded: Optional\[datetime]

The date and time the object was uploaded.

formatdate-time

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20uploaded">Link to this property</a>

version: Optional\[str]

The version UUID of the uploaded object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_upload_response%20%3E%20(schema)>)

<details>

<summary>

class ObjectDeleteResponse: …

Result of a successful object deletion.

</summary>

key: Optional\[str]

The key (name) of the deleted object.

<a href="#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_delete_response%20%3E%20(schema)%20%3E%20(property)%20key">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets.objects%20%3E%20(model)%20object_delete_response%20%3E%20(schema)>)