PutBucketPolicy method
Written by
Updated at March 19, 2025
Applies the access policy to the specified bucket.
For more information on getting started with the API and the general request format, see How to use the S3 API.
Request
PUT /{bucket}?policy HTTP/2
Path parameters
Parameter | Description |
---|---|
bucket |
Bucket name. |
Request parameters
Parameter | Description |
---|---|
policy |
Required parameter that indicates the type of operation. |
Headers
Use the appropriate common headers in your request.
Data schema
Data is transmitted in JSON format. For more information, see Data schema.
Response
Headers
Responses can only contain common headers.
Response codes
For a list of possible responses, see Responses.