Creates bucket,The ACL of the bucket created by default is OssClient::OSS_ACL_TYPE_PRIVATE

@param string $bucket
@param string $acl
@param array $options
@param string $storageType
@return null
761063
public function createBucket($bucket, $acl = self::OSS_ACL_TYPE_PRIVATE, $options = NULL)
    {
        $this->precheckCommon($bucket, NULL, $options, false);
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
        $options[self::OSS_OBJECT] = '/';
        $options[self::OSS_HEADERS] = array(self::OSS_ACL => $acl);
        if (isset($options[self::OSS_STORAGE])) {
            $this->precheckStorage($options[self::OSS_STORAGE]);
            $options[self::OSS_CONTENT] = OssUtil::createBucketXmlBody($options[self::OSS_STORAGE]);
            unset($options[self::OSS_STORAGE]);
        }
        $response = $this->auth($options);
        $result = new PutSetDeleteResult($response);
        return $result->getData();
    }
985630
public function updateBucket(array $options)
    {
        if (!in_array($options['BucketType'], [Bucket::TYPE_PUBLIC, Bucket::TYPE_PRIVATE])) {
            throw new ValidationException(
                sprintf('Bucket type must be %s or %s', Bucket::TYPE_PRIVATE, Bucket::TYPE_PUBLIC)
            );
        }

        if (!isset($options['BucketId']) && isset($options['BucketName'])) {
            $options['BucketId'] = $this->getBucketIdFromName($options['BucketName']);
        }

        $response = $this->generateAuthenticatedClient([
            'accountId'  => $this->accountId,
            'bucketId'   => $options['BucketId'],
            'bucketType' => $options['BucketType'],
        ])->request('POST', '/b2_update_bucket');

        return new Bucket($response['bucketId'], $response['bucketName'], $response['bucketType']);
    }
1015484
public static function setObjectACL($key, $bucket, $acl = 'public-read')
    {
        $s3c = self::getS3C();
        if ($s3c->doesObjectExist($bucket, $key)) {
            $result = $s3c->putObjectAcl(array(
                'ACL' => $acl,
                'Bucket' => $bucket,
                'Key' => $key,
            ));
            if ($result) {
                return true;
            }
        }

        return false;
    }
839070
def set_acl(self, acl_or_str, key_name='', validate=True, headers=None,
                version_id=None):
        """"""
        if not self.bucket_name:
            raise InvalidUriError('set_acl on bucket-less URI (%s)' %
                                  self.uri)
        self.get_bucket(validate, headers).set_acl(acl_or_str, key_name,
                                                   headers, version_id)
727026
protected function buildKeysPath($type, $bucket)
    {
        if ($type === null) {
            return sprintf('/buckets/%s/keys', $bucket);
        }

        return sprintf('/types/%s/buckets/%s/keys', $type, $bucket);
    }
173719
public void setObjectAcl(String bucketName, String key, String versionId,
            CannedAccessControlList acl,
            RequestMetricCollector requestMetricCollector) {
        setObjectAcl(new SetObjectAclRequest(bucketName, key, versionId, acl)
                .<SetObjectAclRequest> withRequestMetricCollector(requestMetricCollector));
    }
867554
public function listBucketAccessControls($bucket, $optParams = array())
  {
    $params = array('bucket' => $bucket);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Google_Service_Storage_BucketAccessControls");
  }
958998
public function createBucket($bucketName, array $options = [])
    {
        $this->openManager();

        $this->manager->createBucket($bucketName, $options);

        // ToDo: https://github.com/matrozov/yii2-couchbase/issues/1
        sleep(5);
    }
447450
public function insureACL($key, $acl) {
		if(!$this->client) {
			throw new InvalidStorageSettingsException('Storage settings are invalid');
		}

		try {
			$this->client->putObjectAcl(['Bucket' => $this->bucket, 'Key' => $key, 'ACL' => $acl]);
		} catch (AwsException $ex) {
			throw new StorageException($ex->getMessage(), $ex->getStatusCode(), $ex);
		}
	}
600677
public function appendObject($bucket, $object, $content, $position, $options = NULL)
    {
        $this->precheckCommon($bucket, $object, $options);

        OssUtil::validateContent($content);
        $options[self::OSS_CONTENT] = $content;
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = self::OSS_HTTP_POST;
        $options[self::OSS_OBJECT] = $object;
        $options[self::OSS_SUB_RESOURCE] = 'append';
        $options[self::OSS_POSITION] = strval($position);

        if (!isset($options[self::OSS_LENGTH])) {
            $options[self::OSS_CONTENT_LENGTH] = strlen($options[self::OSS_CONTENT]);
        } else {
            $options[self::OSS_CONTENT_LENGTH] = $options[self::OSS_LENGTH];
        }

        if (!isset($options[self::OSS_CONTENT_TYPE])) {
            $options[self::OSS_CONTENT_TYPE] = $this->getMimeType($object);
        }
        $response = $this->auth($options);
        $result = new AppendResult($response);
        return $result->getData();
    }
612213
public function create($bucketType, $bucketParams)
    {
        if (!isset($this->factories[$bucketType])) {
            throw new \LogicException("No factory found for aggregation of type {$bucketType}");
        }

        return $this->factories[$bucketType]->create($bucketParams);
    }
35799
private function createIdentities(AccessControlList $acl)
    {
        $securityResolver = $this->get('phlexible_access_control.security_resolver');

        $identities = array();

        $oi = $acl->getObjectIdentity();
        if ($oi instanceof HierarchicalObjectIdentity) {
            $map = array();
            foreach ($oi->getHierarchicalIdentifiers() as $identifier) {
                foreach ($acl->getEntries() as $entry) {
                    if ($entry->getObjectIdentifier() === $identifier) {
                        $map[$entry->getSecurityType()][$entry->getSecurityIdentifier()][$entry->getObjectIdentifier()] = $entry;
                    }
                }
            }

            $maskResolver = new HierarchyMaskResolver();

            foreach ($map as $securityType => $securityIdentifiers) {
                foreach ($securityIdentifiers as $securityIdentifier => $entries) {
                    $resolvedMasks = $maskResolver->resolve($entries, $oi->getIdentifier());
                    $identities[] = array(
                        'id' => 0, //$ace->getId(),
                        'objectType' => $oi->getType(),
                        'objectId' => $oi->getIdentifier(),
                        'effectiveMask' => $resolvedMasks['effectiveMask'],
                        'mask' => $resolvedMasks['mask'],
                        'stopMask' => $resolvedMasks['stopMask'],
                        'noInheritMask' => $resolvedMasks['noInheritMask'],
                        'parentMask' => $resolvedMasks['parentMask'],
                        'parentStopMask' => $resolvedMasks['parentStopMask'],
                        'parentNoInheritMask' => $resolvedMasks['parentNoInheritMask'],
                        'objectLanguage' => null,
                        'securityType' => $securityType,
                        'securityId' => $securityIdentifier,
                        'securityName' => $securityResolver->resolveName($securityType, $securityIdentifier),
                    );
                }
            }
        } else {
            // TODO: implement
        }

        return $identities;
    }
777352
public function putObject($bucket, $object, $content, $options = NULL)
    {
        $this->precheckCommon($bucket, $object, $options);

        OssUtil::validateContent($content);
        $options[self::OSS_CONTENT] = $content;
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
        $options[self::OSS_OBJECT] = $object;

        if (!isset($options[self::OSS_LENGTH])) {
            $options[self::OSS_CONTENT_LENGTH] = strlen($options[self::OSS_CONTENT]);
        } else {
            $options[self::OSS_CONTENT_LENGTH] = $options[self::OSS_LENGTH];
        }

        if (!isset($options[self::OSS_CONTENT_TYPE])) {
            $options[self::OSS_CONTENT_TYPE] = $this->getMimeType($object);
        }
        $response = $this->auth($options);
        
        if (isset($options[self::OSS_CALLBACK]) && !empty($options[self::OSS_CALLBACK])) {
            $result = new CallbackResult($response);
        } else {
            $result = new PutSetDeleteResult($response);
        }
            
        return $result->getData();
    }
542472
public function getBucketLocation($bucketName, $options = array())
    {
        list($config) = $this->parseOptions($options, BosOptions::CONFIG);
        $response = $this->sendRequest(
            HttpMethod::GET,
            array(
                BosOptions::CONFIG => $config,
                'bucket_name' => $bucketName,
                'params' => array(
                    BosOptions::LOCATION => '',
                ),
            )
        );
        return $response->locationConstraint;
    }
285597
public function listDefaultObjectAccessControls($bucket, $optParams = array()) {
      $params = array('bucket' => $bucket);
      $params = array_merge($params, $optParams);
      $data = $this->__call('list', array($params));
      if ($this->useObjects()) {
        return new Google_ObjectAccessControls($data);
      } else {
        return $data;
      }
    }
343941
def get_acl(self, validate=True, headers=None, version_id=None):
        """"""
        if not self.bucket_name:
            raise InvalidUriError('get_acl on bucket-less URI (%s)' % self.uri)
        bucket = self.get_bucket(validate, headers)
        # This works for both bucket- and object- level ACLs (former passes
        # key_name=None):
        acl = bucket.get_acl(self.object_name, headers, version_id)
        self.check_response(acl, 'acl', self.uri)
        return acl
733562
public function putObjectAcl($bucket, $object, $acl)
    {
        $this->precheckCommon($bucket, $object, $options, true);
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
        $options[self::OSS_OBJECT] = $object;
        $options[self::OSS_HEADERS] = array(self::OSS_OBJECT_ACL => $acl);
        $options[self::OSS_SUB_RESOURCE] = 'acl';
        $response = $this->auth($options);
        $result = new PutSetDeleteResult($response);
        return $result->getData();
    }