创建Google存储桶时出现错误消息。我已经创建了一个服务帐户并分配了角色“ Storage Admin”。我还有其他配置吗?
我的代码是:
$projectId = 'my project id';
$serviceAccountPath =
'my/path/to/file.json';
$storage = new StorageClient([
'projectId' => $projectId,
'keyFilePath' => $serviceAccountPath
]);
$bucketName = 'new bucket name';
$bucket = $storage->createBucket($bucketName);`