|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.s3.model.GetObjectMetadataRequest
public class GetObjectMetadataRequest
Retrieves the metadata for the specified Amazon S3 object (with an optional version ID) without actually fetching the object contents. This is useful if you're only interested in the object metadata, and don't want to waste bandwidth on the object data.
The object metadata contains information such as content type, content disposition, etc., as well as custom user metadata that can be associated with an object in S3.
See
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
for more information about enabling versioning for a bucket.
Constructor Summary | |
---|---|
GetObjectMetadataRequest(String bucketName,
String key)
Constructs a new GetObjectMetadataRequest to retrieve the specified object's metadata. |
|
GetObjectMetadataRequest(String bucketName,
String key,
String versionId)
Constructs a new GetObjectMetadataRequest to retrieve the object metadata of a specific version of an object stored in Amazon S3. |
Method Summary | |
---|---|
String |
getBucketName()
Returns the name of the bucket containing the object's whose metadata is being retrieved. |
String |
getKey()
Returns the key of the object whose metadata is being retrieved. |
String |
getVersionId()
Returns the optional version ID of the object version whose metadata is being retrieved. |
void |
setBucketName(String bucketName)
Sets the name of the bucket containing the object's whose metadata is being retrieved. |
void |
setKey(String key)
Sets the key of the object whose metadata is being retrieved. |
void |
setVersionId(String versionId)
Sets the optional version ID of the object version whose metadata is being retrieved. |
GetObjectMetadataRequest |
withBucketName(String bucketName)
Sets the name of the bucket containing the object's whose metadata is being retrieved, and returns the updated request object so that additional calls may be chained together. |
GetObjectMetadataRequest |
withKey(String key)
Sets the key of the object whose metadata is being retrieved, and returns the updated request object so that additional calls may be chained together. |
GetObjectMetadataRequest |
withVersionId(String versionId)
Sets the optional version ID of the object version whose metadata is being retrieved , and returns the updated request object so that additional calls may be chained together. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GetObjectMetadataRequest(String bucketName, String key)
bucketName
- The name of the bucket containing the object's whose metadata
is being retrieved.key
- The key of the object whose metadata is being retrieved.public GetObjectMetadataRequest(String bucketName, String key, String versionId)
bucketName
- The name of the bucket containing the object's whose metadata
is being retrieved.key
- The key of the object whose metadata is being retrieved.versionId
- The version ID of the object version whose metadata is being
retrieved.Method Detail |
---|
public String getBucketName()
public void setBucketName(String bucketName)
bucketName
- The name of the bucket containing the object's whose metadata
is being retrieved.public GetObjectMetadataRequest withBucketName(String bucketName)
bucketName
- The name of the bucket containing the object's whose metadata
is being retrieved.
public String getKey()
public void setKey(String key)
key
- The key of the object whose metadata is being retrieved.public GetObjectMetadataRequest withKey(String key)
key
- The key of the object whose metadata is being retrieved.
public String getVersionId()
public void setVersionId(String versionId)
versionId
- The optional version ID of the object version whose metadata
is being retrieved. If not specified, the latest version will
be used.public GetObjectMetadataRequest withVersionId(String versionId)
If not specified, the latest version will be used.
versionId
- The optional version ID of the object version whose metadata
is being retrieved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |