PublicAccessBlock

Blocks public acccess to a Bucket

GetPublicAccessBlock

get

Retrieves the public access configuration for a bucket.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:GetBucketPublicAccessBlock operation using Bucket Policy.

S3 API Compatibility

  • The x-amz-expected-bucket-owner header isn't supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
policyboolean · enumRequiredPossible values:
Responses
200
Successful operation
application/json
get
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?> <PublicAccessBlockConfiguration> <BlockPublicAcls>true</BlockPublicAcls> <IgnorePublicAcls>true</IgnorePublicAcls> <BlockPublicPolicy>true</BlockPublicPolicy> <RestrictPublicBuckets>true</RestrictPublicBuckets> </PublicAccessBlockConfiguration>

PutPublicAccessBlock

put

Blocks public access to an object storage bucket based on the specified parameters.

This operation modifies the bucket's settings to either prevent public access entirely or impose restrictions based on specific conditions.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:PutBucketPublicAccessBlock operation using Bucket Policy. Note: The bucket owner can always perform this operation, even if the policy explicitly denies access to it.

S3 API Compatibility

  • The x-amz-expected-bucket-owner header isn't supported.

  • The x-amz-confirm-remove-self-bucket-access header isn't supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
policyboolean · enumRequiredPossible values:
Header parameters
Content-MD5stringOptional

The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.

Body
BlockPublicAclsbooleanOptional

Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.

Default: false
IgnorePublicAclsbooleanOptional

Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.

Default: false
BlockPublicPolicybooleanOptional

Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.

Default: false
RestrictPublicBucketsbooleanOptional

Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.

Default: false
Responses
200
Successful operation
application/xml
put
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 339

"<?xml version="1.0" encoding="UTF-8"?> <PublicAccessBlockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <BlockPublicAcls>true</BlockPublicAcls> <IgnorePublicAcls>true</IgnorePublicAcls> <BlockPublicPolicy>true</BlockPublicPolicy> <RestrictPublicBuckets>true</RestrictPublicBuckets> </PublicAccessBlockConfiguration>"

No content

DeletePublicAccessBlock

delete

Deletes the public access configuration for an object storage bucket.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:DeleteBucketPublicAccessBlock operation using Bucket Policy.

S3 API Compatibility

  • The x-amz-expected-bucket-owner header isn't supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
policyboolean · enumRequiredPossible values:
Responses
204
Successful operation
application/xml
delete
DELETE /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Was this helpful?