Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.amazonaws.services.s3.model
Class GetObjectMetadataRequest

    java.lang.Object
      com.amazonaws.AmazonWebServiceRequest
          com.amazonaws.services.s3.model.GetObjectMetadataRequest

    public class GetObjectMetadataRequest

extends AmazonWebServiceRequest

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

### GetObjectMetadataRequest

    public GetObjectMetadataRequest(String bucketName,
                                    String key)

  Constructs a new GetObjectMetadataRequest to retrieve the specified object's metadata.

  Parameters:
    `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.

### GetObjectMetadataRequest

    public 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.

  Parameters:
    `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

### getBucketName

    public String getBucketName()

  Returns the name of the bucket containing the object's whose metadata is being retrieved.

  Returns:
    The name of the bucket containing the object's whose metadata is being retrieved.

### setBucketName

    public void setBucketName(String bucketName)

  Sets the name of the bucket containing the object's whose metadata is being retrieved.

  Parameters:
    `bucketName` - The name of the bucket containing the object's whose metadata is being retrieved.

### withBucketName

    public 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.

  Parameters:
    `bucketName` - The name of the bucket containing the object's whose metadata is being retrieved.
  Returns:
    The updated request object so that additional method calls may be chained together.

### getKey

    public String getKey()

  Returns the key of the object whose metadata is being retrieved.

  Returns:
    The key of the object whose metadata is being retrieved.

### setKey

    public void setKey(String key)

  Sets the key of the object whose metadata is being retrieved.

  Parameters:
    `key` - The key of the object whose metadata is being retrieved.

### withKey

    public 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.

  Parameters:
    `key` - The key of the object whose metadata is being retrieved.
  Returns:
    The updated request object so that additional method calls may be chained together.

### getVersionId

    public String getVersionId()

  Returns the optional version ID of the object version whose metadata is being retrieved. If not specified, the latest version will be used.

  Returns:
    The optional version ID of the object version whose metadata is being retrieved. If not specified, the latest version will be used.

### setVersionId

    public void setVersionId(String versionId)

  Sets the optional version ID of the object version whose metadata is being retrieved. If not specified, the latest version will be used.

  Parameters:
    `versionId` - The optional version ID of the object version whose metadata is being retrieved. If not specified, the latest version will be used.

### withVersionId

    public 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.

  If not specified, the latest version will be used.

  Parameters:
    `versionId` - The optional version ID of the object version whose metadata is being retrieved.
  Returns:
    The updated request object so that additional method calls may be chained together.

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.