> For the complete documentation index, see [llms.txt](https://docs.ionos.com/terraform-provider/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/terraform-provider/data-sources/s3_bucket_policy.md).

# ionoscloud\_s3\_bucket\_policy

The **Bucket Policy data source** can be used to search for and return existing bucket policies. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

## Example Usage

```hcl

data "ionoscloud_s3_bucket_policy" "example" {
  bucket = "example"
}

```

## Argument Reference

The following arguments are supported:

* `bucket` - (Required)\[string] The name of the bucket where the object will be stored.

## Attributes Reference

The following attributes are returned by the datasource:

* `policy` - The policy of the bucket.
