return (S3Bucket) createBucketImpl(bucketName, location, null); } catch (ServiceException se) { throw new S3ServiceException(se);
return (S3Bucket) createBucketImpl(bucketName, location, acl); } catch (ServiceException se) { throw new S3ServiceException(se);
return (S3Bucket) createBucketImpl(bucketName, location, acl); } catch (ServiceException se) { throw new S3ServiceException(se);
return (S3Bucket) createBucketImpl(bucketName, location, null); } catch (ServiceException se) { throw new S3ServiceException(se);
/** * Creates a bucket in S3 based on the provided bucket object, with the Access Control List * settings and location properties of the bucket object (if any). * <p> * <b>Caution:</b> Performing this operation unnecessarily when a bucket already * exists may cause OperationAborted errors with the message "A conflicting conditional * operation is currently in progress against this resource.". To avoid this error, use the * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist. * <p> * This method cannot be performed by anonymous services. * * @param bucket * an object representing the bucket to create which must be valid, and which may contain * location and ACL settings that will be applied upon creation. * @return * the created bucket object, populated with all metadata made available by the creation operation. * @throws S3ServiceException */ public S3Bucket createBucket(S3Bucket bucket) throws S3ServiceException { try { assertAuthenticatedConnection("Create Bucket"); assertValidBucket(bucket, "Create Bucket"); return (S3Bucket) createBucketImpl(bucket.getName(), bucket.getLocation(), bucket.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Creates a bucket in S3 based on the provided bucket object, with the Access Control List * settings and location properties of the bucket object (if any). * <p> * <b>Caution:</b> Performing this operation unnecessarily when a bucket already * exists may cause OperationAborted errors with the message "A conflicting conditional * operation is currently in progress against this resource.". To avoid this error, use the * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist. * <p> * This method cannot be performed by anonymous services. * * @param bucket * an object representing the bucket to create which must be valid, and which may contain * location and ACL settings that will be applied upon creation. * @return * the created bucket object, populated with all metadata made available by the creation operation. * @throws S3ServiceException */ public S3Bucket createBucket(S3Bucket bucket) throws S3ServiceException { try { assertAuthenticatedConnection("Create Bucket"); assertValidBucket(bucket, "Create Bucket"); return (S3Bucket) createBucketImpl(bucket.getName(), bucket.getLocation(), bucket.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }