public class Bucket extends GenericResult
Bucket name is globally unique in OSS and is immutable. Every object must belong to a bucket. An application such as picture sharing website could be mapped to one or multiple buckets. An OSS account could only create up to 10 bucket. And there's no limit on the files count or size under a bucket.
Bucket naming rules:构造器和说明 |
---|
Bucket()
Default constructor.
|
Bucket(String name)
Constructor with the bucket name parameter.
|
Bucket(String name,
String requestId) |
限定符和类型 | 方法和说明 |
---|---|
Date |
getCreationDate()
Gets the bucket's creation time.
|
String |
getExtranetEndpoint()
Gets the external endpoint.
|
String |
getIntranetEndpoint()
Gets the internal endpoint.
|
String |
getLocation()
Gets the bucket location.
|
String |
getName()
Gets the bucket name
|
Owner |
getOwner()
Gets the
Owner . |
StorageClass |
getStorageClass()
Gets the storage class
|
void |
setCreationDate(Date creationDate)
Sets teh bucket's creation time.
|
void |
setExtranetEndpoint(String endpoint)
Sets the external endpoint.
|
void |
setIntranetEndpoint(String endpoint)
Sets the internal endpoint.
|
void |
setLocation(String location)
Sets the bucket location.
|
void |
setName(String name)
Sets the bucket name (should only be used by the SDK itself).
|
void |
setOwner(Owner owner)
Sets the bucket owner (only used by SDK itself).
|
void |
setStorageClass(StorageClass storageClass)
Sets the bucket's storage class
|
String |
toString()
The override of toString().
|
getClientCRC, getRequestId, getResponse, getServerCRC, setClientCRC, setRequestId, setResponse, setServerCRC
public Bucket()
public Bucket(String name)
name
- Bucket name.public String toString()
public Owner getOwner()
Owner
.public void setOwner(Owner owner)
owner
- Bucket owner.public Date getCreationDate()
public void setCreationDate(Date creationDate)
creationDate
- Bucket's creation time.public String getName()
public void setName(String name)
name
- Bucket name.public String getLocation()
public void setLocation(String location)
location
- public StorageClass getStorageClass()
public void setStorageClass(StorageClass storageClass)
storageClass
- public String getExtranetEndpoint()
public void setExtranetEndpoint(String endpoint)
endpoint
- external endpointpublic String getIntranetEndpoint()
public void setIntranetEndpoint(String endpoint)
endpoint
- Internal endpointCopyright © 2019. All Rights Reserved.