> For the complete documentation index, see [llms.txt](https://docs.skeddly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skeddly.com/data-types/actionparameters-object/amazonapplys3bucketpolicyparameters-object.md).

# AmazonApplyS3BucketPolicyParameters Object

## Description

Parameters for the Amazon Apply S3 Bucket Policy action.

## Properties

### applyMethod

Method with which to apply the policy to the bucket.

Type: `string`

Valid Values:

* `always-overwrite`
* `apply-if-not-set`

Required: Yes

### bucketIdentificationMethod

Method of identifying the S3 bucket.

Type: `string`

Valid Values:

* `all-buckets`
* `by-bucket-name`
* `by-resource-tag`

Required: Yes

### bucketNameComparison

Comparison to use when identifying buckets by name. Required when `bucketIdentificationMethod` is `by-bucket-name`.

Type: [BucketNameComparison](/data-types/bucketnamecomparison-object.md) object.

Required: Conditional

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### customPolicy

Policy document text to apply to the bucket. Required when `policyType` is `custom`.

Type: `string`

Required: Conditional

### isTest

Indicates whether Test Mode should be applied to the object.

Type: `boolean`

Required: Yes

### policyType

Type of policy to apply on the bucket.

Type: `string`

Valid Values:

* `custom`
* `enforce-aes256-encryption`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### resourceTagComparison

Comparison to use when identifying buckets by resource tag. Required when `bucketIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1.md) object.

Required: Conditional

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "bucketIdentificationMethod": "by-bucket-name",
    "bucketNameComparison": {
        "compareType": "starts-with",
        "bucketName": "prod-"
    },
    "applyMethod": "always-overwrite",
    "policyType": "enforce-aes256-encryption",
    "isTest": false
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skeddly.com/data-types/actionparameters-object/amazonapplys3bucketpolicyparameters-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
