Property | Type | Description | |
---|---|---|---|
$rangeHeaders | |||
$s3 | Scalr\Service\Aws\S3 | ||
$versiondate | string | ||
$xamzAclAllowedHeaders | array | List allowed x-amz headers for the ACL requests |
Method | Description | |
---|---|---|
__construct ( Scalr\Service\Aws\S3 $s3, Scalr\Service\Aws\Client\QueryClient\S3QueryClient $client ) | Constructor | |
addObject ( string $bucketName, string $objectName, string | SplFileInfo $contentFile, array $requestHeaders = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | PUT Object action | |
copyObject ( string $scrBucketName, string $srcObject, string $destBucketName, string $destObject, array $requestHeaders = null, string $versionId = null ) : |
Copy Object action | |
createBucket ( string $bucketName, string $bucketRegion, array $requestHeaders = null ) : |
Create Bucket action | |
deleteBucket ( string $bucketName ) : boolean | DELETE Bucket | |
deleteBucketCors ( string $bucketName ) : boolean | DELETE Bucket cors action | |
deleteBucketLifecycle ( string $bucketName ) : boolean | DELETE Bucket lifecycle action | |
deleteBucketPolicy ( string $bucketName ) : boolean | DELETE Bucket policy action | |
deleteBucketSubresource ( string $bucketName, string $subresource ) : boolean | Deletes the specified subresource for the bucket. | |
deleteBucketTagging ( string $bucketName ) : boolean | DELETE Bucket tagging action | |
deleteBucketWebsite ( string $bucketName ) : boolean | DELETE Bucket website action | |
deleteObject ( string $bucketName, string $objectName, string $versionId = null, string $xAmfMfa = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | DELETE Object action. | |
getBucketAcl ( string $bucketName ) : Scalr\Service\Aws\S3\DataType\AccessControlPolicyData | Gets a bucket ACL action. | |
getBucketCors ( string $bucketName ) : string | GET Bucket cors action | |
getBucketLifecycle ( string $bucketName ) : string | GET Bucket lifecycle action | |
getBucketLocation ( string $bucketName ) : string | GET Bucket location action | |
getBucketLogging ( string $bucketName ) : string | GET Bucket logging action | |
getBucketNotification ( string $bucketName ) : string | GET Bucket notification action | |
getBucketPolicy ( string $bucketName ) : string | GET Bucket policy action | |
getBucketRequestPayment ( string $bucketName ) : string | GET Bucket requestPayment action | |
getBucketSubresource ( string $bucketName, string $subresource ) : Scalr\Service\Aws\Client\ClientResponseInterface | Gets a specified bucket subresource | |
getBucketTagging ( string $bucketName ) : string | GET Bucket tagging action | |
getBucketWebsite ( |
Returns the web configuration information for the bucket. | |
getEntityManager ( ) : Scalr\Service\Aws\EntityManager | Gets an entity manager | |
getObject ( string $bucketName, string $objectName, array $requestPars = null, array $requestHeaders = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | Gets an object | |
getObjectAcl ( string $bucketName, string $objectName ) : Scalr\Service\Aws\S3\DataType\AccessControlPolicyData | Gets a object ACL action. | |
getObjectMetadata ( string $bucketName, string $objectName, array $requestHeaders = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | HEAD Object action | |
headBucket ( string $bucketName ) : integer | HEAD Bucket action. | |
listAllMyBuckets ( ) : Scalr\Service\Aws\S3\DataType\BucketList | GET Service (ListAllMyBuckets) action | |
listObjects ( string $bucketName, string $delimiter = null, string $marker = null, string $maxKeys = null, string $prefix = null ) : Scalr\Service\Aws\S3\DataType\ObjectList | GET Bucket (List Objects) action | |
setBucketAcl ( string $bucketName, string | array $aclset ) : boolean | PUT Bucket ACL action. | |
setBucketCors ( string $bucketName, string $cors ) : boolean | PUT Bucket cors action | |
setBucketLifecycle ( string $bucketName, string $lifecycle ) : boolean | PUT Bucket lifecycle action | |
setBucketLogging ( string $bucketName, string $bucketLoggingStatus ) : boolean | PUT Bucket logging action | |
setBucketNotification ( string $bucketName, string $notification ) : boolean | PUT Bucket notification action | |
setBucketPolicy ( string $bucketName, string $policy ) : boolean | PUT Bucket policy action | |
setBucketRequestPayment ( string $bucketName, string $requestPayment ) : boolean | PUT Bucket requestPayment action | |
setBucketSubresource ( string $bucketName, string $subresource, string $putData ) : boolean | Puts bucket subresource | |
setBucketTagging ( string $bucketName, string $tagging ) : boolean | PUT Bucket tagging action | |
setBucketWebsite ( string $bucketName, string $website ) : boolean | PUT Bucket website action | |
setObjectAcl ( string $bucketName, string $objectName, string | array $aclset ) : boolean | PUT Object ACL action. |
Method | Description | |
---|---|---|
_getBucketLocationXml ( string $bucketRegion ) : string | Gets Location XML string | |
escapeObjectName ( string $objectName ) : string | Escapes object name | |
getFilteredArray ( array $allowedKeys, array $values, boolean $caseInsensitive = true ) : array | Filter values with allowed keys. | |
getFormattedXml ( string $xml ) : string | Formats output for the given xml document |
public __construct ( Scalr\Service\Aws\S3 $s3, Scalr\Service\Aws\Client\QueryClient\S3QueryClient $client ) | ||
$s3 | Scalr\Service\Aws\S3 | S3 instance |
$client | Scalr\Service\Aws\Client\QueryClient\S3QueryClient | Client Interface |
protected _getBucketLocationXml ( string $bucketRegion ) : string | ||
$bucketRegion | string | A bucket region |
return | string | Returns Location XML |
public addObject ( string $bucketName, string $objectName, string | SplFileInfo $contentFile, array $requestHeaders = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | ||
$bucketName | string | A bucket name. |
$objectName | string | An object name. |
$contentFile | string | SplFileInfo | File content of file that should be uploaded. If you provide a path to the file you should pass SplFileInfo object. |
$requestHeaders | array | optional Request headers |
return | Scalr\Service\Aws\Client\ClientResponseInterface | Returns response on success or throws an exception |
public copyObject ( string $scrBucketName, string $srcObject, string $destBucketName, string $destObject, array $requestHeaders = null, string $versionId = null ) : |
||
$scrBucketName | string | Source bucket name. |
$srcObject | string | Source object name. |
$destBucketName | string | Destination bucket name. |
$destObject | string | Destination object name. |
$requestHeaders | array | optional Request headers array looks like array(header => value) |
$versionId | string | optional Specifies source version id. |
return | Returns CopyObjectResponseData |
public createBucket ( string $bucketName, string $bucketRegion, array $requestHeaders = null ) : |
||
$bucketName | string | A bucket name. |
$bucketRegion | string | AWS Region where bucket have to be located. |
$requestHeaders | array | optional Additional request headers. x-amz-acl|x-amz-grant-read|x-amz-grant-write|x-amz-grant-read-acp| x-amz-grant-write-acp|x-amz-grant-full-control |
return | Returns BucketData object on success or throws an exception. |
public deleteBucket ( string $bucketName ) : boolean | ||
$bucketName | string | A bucket name. |
return | boolean | Returns true on success or throws an exception. |
public deleteBucketCors ( string $bucketName ) : boolean | ||
$bucketName | string | A bucket name. |
return | boolean | Returns true on success or throws an exception. |
public deleteBucketLifecycle ( string $bucketName ) : boolean | ||
$bucketName | string | A bucket name. |
return | boolean | Returns true on success or throws an exception. |
public deleteBucketPolicy ( string $bucketName ) : boolean | ||
$bucketName | string | A bucket name. |
return | boolean | Returns true on success or throws an exception. |
public deleteBucketTagging ( string $bucketName ) : boolean | ||
$bucketName | string | A bucket name. |
return | boolean | Returns true on success or throws an exception. |
public deleteBucketWebsite ( string $bucketName ) : boolean | ||
$bucketName | string | A bucket name. |
return | boolean | Returns true on success or throws an exception. |
public deleteObject ( string $bucketName, string $objectName, string $versionId = null, string $xAmfMfa = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | ||
$bucketName | string | A bucket name. |
$objectName | string | A object name. |
$versionId | string | optional To remove a specific version of the object it must be used. |
$xAmfMfa | string | optional The value is the concatenation of the authentication device's serial number, a space, and the value displayed on your authentication device. |
return | Scalr\Service\Aws\Client\ClientResponseInterface | Returns response on success or throws an exception |
protected static escapeObjectName ( string $objectName ) : string | ||
$objectName | string | |
return | string | Returns objectName without leading slash and url encoded |
public getBucketAcl ( string $bucketName ) : Scalr\Service\Aws\S3\DataType\AccessControlPolicyData | ||
$bucketName | string | A bucket name |
return | Scalr\Service\Aws\S3\DataType\AccessControlPolicyData | Returns object which describes ACL for the bucket. |
public getBucketCors ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns CORSConfiguration XML Document |
public getBucketLifecycle ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns LifecycleConfiguration XML Document |
public getBucketLocation ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns bucket location Valid Values: EU | eu-west-1 | eu-central-1 | us-west-1 | us-west-2 | ap-southeast-1 | ap-northeast-1 | ap-northeast-2 | sa-east-1 | empty string (for the US Classic Region) |
public getBucketLogging ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns XML document |
public getBucketNotification ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns XML document |
public getBucketPolicy ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns bucket policy string (json encoded) |
public getBucketRequestPayment ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns XML document |
public getBucketSubresource ( string $bucketName, string $subresource ) : Scalr\Service\Aws\Client\ClientResponseInterface | ||
$bucketName | string | A bucket name. |
$subresource | string | A bucket subresource name. |
return | Scalr\Service\Aws\Client\ClientResponseInterface | Returns response |
public getBucketTagging ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns XML document |
public getBucketWebsite ( |
||
$bucketName | A bucket name. | |
return | string | Returns CORSConfiguration XML Document |
public getEntityManager ( ) : Scalr\Service\Aws\EntityManager | ||
return | Scalr\Service\Aws\EntityManager |
protected static getFilteredArray ( array $allowedKeys, array $values, boolean $caseInsensitive = true ) : array | ||
$allowedKeys | array | An list of allowed keys. |
$values | array | An associative array of the values looks like array(key => val). |
$caseInsensitive | boolean | optional Case Insencitive comparison |
return | array | Returns filtered array. |
protected static getFormattedXml ( string $xml ) : string | ||
$xml | string | XML Document |
return | string | Returns formatted xml document |
public getObject ( string $bucketName, string $objectName, array $requestPars = null, array $requestHeaders = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | ||
$bucketName | string | An bucket name. |
$objectName | string | An object key name. |
$requestPars | array | optional An additional request query parameters. It accepts only allowed params. |
$requestHeaders | array | opitional An optional request headers. It accepts only allowed headers. |
return | Scalr\Service\Aws\Client\ClientResponseInterface | Returns response |
public getObjectAcl ( string $bucketName, string $objectName ) : Scalr\Service\Aws\S3\DataType\AccessControlPolicyData | ||
$bucketName | string | A bucket name. |
$objectName | string | An object name. |
return | Scalr\Service\Aws\S3\DataType\AccessControlPolicyData | Returns object which describes ACL for the object. |
public getObjectMetadata ( string $bucketName, string $objectName, array $requestHeaders = null ) : Scalr\Service\Aws\Client\ClientResponseInterface | ||
$bucketName | string | A bucket name. |
$objectName | string | An object name. |
$requestHeaders | array | optional Range headers looks like array(header => value) |
return | Scalr\Service\Aws\Client\ClientResponseInterface | Returns response object on success or throws an exception |
public headBucket ( string $bucketName ) : integer | ||
$bucketName | string | A bucket name. |
return | integer | Returns 200, 404 or 403 depends on bucket state. |
public listAllMyBuckets ( ) : Scalr\Service\Aws\S3\DataType\BucketList | ||
return | Scalr\Service\Aws\S3\DataType\BucketList | Returns BucketList |
public listObjects ( string $bucketName, string $delimiter = null, string $marker = null, string $maxKeys = null, string $prefix = null ) : Scalr\Service\Aws\S3\DataType\ObjectList | ||
$bucketName | string | A bucket Name. |
$delimiter | string | optional A delimiter is a character you use to group keys. All keys that contain the same string between the prefix, if specified, and the first occurrence of the delimiter after the prefix are grouped under a single result element, CommonPrefixes. If you don't specify the prefix parameter, then the substring starts at the beginning of the key. The keys that are grouped under CommonPrefixes result element are not returned elsewhere in the response. |
$marker | string | optional Specifies the key to start with when listing objects in a bucket. Amazon S3 lists objects in alphabetical order. |
$maxKeys | string | optional Sets the maximum number of keys returned in the response body.
The response might contain fewer keys but will never contain more.
If there are additional keys that satisfy the search criteria
but were not returned because max-keys was exceeded, the response contains
|
$prefix | string | optional Limits the response to keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) |
return | Scalr\Service\Aws\S3\DataType\ObjectList | Returns list of Objects |
public setBucketSubresource ( string $bucketName, string $subresource, string $putData ) : boolean | ||
$bucketName | string | A bucket name. |
$subresource | string | A subresource name. |
$putData | string | Put data. (xml or json formatted string, depends on subresource configuration) |
return | boolean | Returns true on success or false if failure |
protected static array $xamzAclAllowedHeaders | ||
return | array |