-
Notifications
You must be signed in to change notification settings - Fork 1
CreateBucket
Craig edited this page Jan 1, 2024
·
2 revisions
<?php
use TechKat\BackBlazeB2\Bucket;
use TechKat\BackBlazeB2\Client;
$keyID = '...';
$applicationKey = '...';
$client = new Client($keyID, $applicationKey);
$response = $client->createBucket([
'bucketName' => 'This-Bucket-Is-So-Cool',
'bucketType' => Bucket::TYPE_PRIVATE,
]);
return $response;
After the successful creation of a bucket, instead of a typical JSON response from the API, a new Bucket
model will be created, providing the use of the methods listed here:
https://github.com/TechKat/backblaze-b2-php-sdk/wiki/BucketModel
Below is a list of all the available native API endpoints that this library currently supports:
- cancelLargeFile
- copyFile
- copyPart
- createBucket
- createKey
- deleteBucket
- deleteFileVersion
- deleteKey
- downloadFileById
- downloadFileByName
- finishLargeFile
- getDownloadAuthorization
- getFileInfo
- getUploadPartUrl
- getUploadUrl
- hideFile
- listBuckets
- listFileNames
- listFileVersions
- listKeys
- listParts
- listUnfinishedLargeFiles
- startLargeFile
- updateBucket
- updateFileLegalHold
- updateFileRetention
- uploadFile
- uploadPart