/** * Deletes an object from a bucket in S3. * <p> * This method can be performed by anonymous services. Anonymous services * can delete objects from publicly-writable buckets. * * @param bucket * the bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * @throws S3ServiceException */ public void deleteObject(S3Bucket bucket, String objectKey) throws S3ServiceException { try { assertValidBucket(bucket, "deleteObject"); assertValidObject(objectKey, "deleteObject"); deleteObject(bucket.getName(), objectKey); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Deletes an object from a bucket in S3. * <p> * This method can be performed by anonymous services. Anonymous services * can delete objects from publicly-writable buckets. * * @param bucket * the bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * @throws S3ServiceException */ public void deleteObject(S3Bucket bucket, String objectKey) throws S3ServiceException { try { assertValidBucket(bucket, "deleteObject"); assertValidObject(objectKey, "deleteObject"); deleteObject(bucket.getName(), objectKey); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Deletes a object version from a bucket in S3. This will delete only the specific * version identified and will not affect any other Version or DeleteMarkers related * to the object. * <p> * This operation can only be performed by the owner of the S3 bucket. * * @param versionId * the identifier of an object version that will be deleted. * @param bucketName * the name of the versioned bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * @throws S3ServiceException */ public void deleteVersionedObject(String versionId, String bucketName, String objectKey) throws S3ServiceException { try { assertValidObject(objectKey, "deleteVersionedObject"); MxDelegate.getInstance().registerStorageObjectDeleteEvent(bucketName, objectKey); deleteObjectImpl(bucketName, objectKey, versionId, null, null); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucketName * the name of the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(String bucketName, S3Object object) throws S3ServiceException { try { assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucketName, object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Deletes a object version from a bucket in S3. This will delete only the specific * version identified and will not affect any other Version or DeleteMarkers related * to the object. * <p> * This operation can only be performed by the owner of the S3 bucket. * * @param versionId * the identifier of an object version that will be deleted. * @param bucketName * the name of the versioned bucket containing the object to be deleted. * @param objectKey * the key representing the object in S3. * @throws S3ServiceException */ public void deleteVersionedObject(String versionId, String bucketName, String objectKey) throws S3ServiceException { try { assertValidObject(objectKey, "deleteVersionedObject"); MxDelegate.getInstance().registerStorageObjectDeleteEvent(bucketName, objectKey); deleteObjectImpl(bucketName, objectKey, versionId, null, null); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucketName * the name of the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(String bucketName, S3Object object) throws S3ServiceException { try { assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucketName, object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
assertValidObject(objectKey, "deleteVersionedObjectWithMFA"); MxDelegate.getInstance().registerStorageObjectDeleteEvent(bucketName, objectKey); deleteObjectImpl(bucketName, objectKey, versionId,
assertValidObject(objectKey, "deleteVersionedObjectWithMFA"); MxDelegate.getInstance().registerStorageObjectDeleteEvent(bucketName, objectKey); deleteObjectImpl(bucketName, objectKey, versionId,
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucket * the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(S3Bucket bucket, S3Object object) throws S3ServiceException { try { assertValidBucket(bucket, "Put Object Access Control List"); assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucket.getName(), object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucket * the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(S3Bucket bucket, S3Object object) throws S3ServiceException { try { assertValidBucket(bucket, "Put Object Access Control List"); assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucket.getName(), object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
assertValidObject(object, "Put Versioned Object Access Control List"); String objectKey = object.getKey(); AccessControlList acl = object.getAcl();
assertValidObject(object, "Put Versioned Object Access Control List"); String objectKey = object.getKey(); AccessControlList acl = object.getAcl();