R2
Managed Domain
Managed Domain endpoint reference.
Get
Get the managed (r2.dev) domain configuration for a bucket.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. | |
jurisdiction | string|null | No | Jurisdiction where objects in this bucket are guaranteed to be stored. |
php
$response = $client->r2()->managedDomain()->get('ACCOUNT_ID', 'BUCKET_NAME', 'JURISDICTION');
Update
Enable or disable the managed (r2.dev) domain for a bucket.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. | |
enabled | bool | Yes | Whether the managed domain is enabled. | |
jurisdiction | string|null | No | Jurisdiction where objects in this bucket are guaranteed to be stored. |
php
$response = $client->r2()->managedDomain()->update('ACCOUNT_ID', 'BUCKET_NAME', true, 'JURISDICTION');

