AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Returns information about the HeadObject response and response metadata.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.S3.Model.GetObjectMetadataResponse

Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z

Syntax

C#
public class GetObjectMetadataResponse : AmazonWebServiceResponse

The GetObjectMetadataResponse type exposes the following members

Constructors

NameDescription
Public Method GetObjectMetadataResponse()

Properties

NameTypeDescription
Public Property AcceptRanges System.String

Gets and sets the property AcceptRanges.

Indicates that a range of bytes was specified.

Public Property ArchiveStatus Amazon.S3.ArchiveStatus

Gets and sets the property ArchiveStatus.

The archive state of the head object.

This functionality is not supported for directory buckets.

Public Property BucketKeyEnabled System.Nullable<System.Boolean>

Gets and sets the property BucketKeyEnabled.

Indicates whether the object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).

Public Property CacheControl System.String

Gets and sets the property CacheControl.

Specifies caching behavior along the request/reply chain.

Public Property ChecksumCRC32 System.String

Gets and sets the property ChecksumCRC32.

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Public Property ChecksumCRC32C System.String

Gets and sets the property ChecksumCRC32C.

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Public Property ChecksumCRC64NVME System.String

Gets and sets the property ChecksumCRC64NVME.

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

Public Property ChecksumSHA1 System.String

Gets and sets the property ChecksumSHA1.

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Public Property ChecksumSHA256 System.String

Gets and sets the property ChecksumSHA256.

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Public Property ChecksumType Amazon.S3.ChecksumType

Gets and sets the property ChecksumType.

The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header response to verify that the checksum type that is received is the same checksum type that was specified in CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

Public Property ContentDisposition System.String

Gets and sets the property ContentDisposition.

Specifies presentational information for the object.

Public Property ContentEncoding System.String

Gets and sets the property ContentEncoding.

Indicates what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.

Public Property ContentLanguage System.String

Gets and sets the property ContentLanguage.

The language the content is in.

Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ContentRange System.String

Gets and sets the property ContentRange.

The portion of the object returned in the response for a GET request.

Public Property ContentType System.String

Gets and sets the property ContentType.

A standard MIME type describing the format of the object data.

Public Property DeleteMarker System.String

Gets and sets the property DeleteMarker.

Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.

This functionality is not supported for directory buckets.

Public Property ETag System.String

Gets and sets the property ETag.

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.

Public Property Expiration Amazon.S3.Model.Expiration

Gets and sets the property Expiration.

If the object expiration is configured (see PutBucketLifecycleConfiguration), the response includes this header. It includes the expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL-encoded.

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

Public Property ExpiresString System.String

The date and time at which the object is no longer cacheable.

Public Property Headers Amazon.S3.Model.HeadersCollection

The collection of headers for the request.

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property LastModified System.Nullable<System.DateTime>

Gets and sets the property LastModified.

Date and time when the object was last modified.

Public Property Metadata Amazon.S3.Model.MetadataCollection

The collection of meta data for the request.

Public Property MissingMeta System.Nullable<System.Int32>

Gets and sets the property MissingMeta.

This is set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.

This functionality is not supported for directory buckets.

Public Property ObjectLockLegalHoldStatus Amazon.S3.ObjectLockLegalHoldStatus

Gets and sets the property ObjectLockLegalHoldStatus.

Specifies whether a legal hold is in effect for this object. This header is only returned if the requester has the s3:GetObjectLegalHold permission. This header is not returned if the specified version of this object has never had a legal hold applied. For more information about S3 Object Lock, see Object Lock.

This functionality is not supported for directory buckets.

Public Property ObjectLockMode Amazon.S3.ObjectLockMode

Gets and sets the property ObjectLockMode.

The Object Lock mode, if any, that's in effect for this object. This header is only returned if the requester has the s3:GetObjectRetention permission. For more information about S3 Object Lock, see Object Lock.

This functionality is not supported for directory buckets.

Public Property ObjectLockRetainUntilDate System.Nullable<System.DateTime>

Gets and sets the property ObjectLockRetainUntilDate.

The date and time when the Object Lock retention period expires. This header is only returned if the requester has the s3:GetObjectRetention permission.

This functionality is not supported for directory buckets.

Public Property PartsCount System.Nullable<System.Int32>

Gets and sets the property PartsCount.

The count of parts this object has. This value is only returned if you specify partNumber in your request and the object was uploaded as a multipart upload.

Public Property ReplicationStatus Amazon.S3.ReplicationStatus

Gets and sets the property ReplicationStatus.

Amazon S3 can return this header if your request involves a bucket that is either a source or a destination in a replication rule.

In replication, you have a source bucket on which you configure replication and destination bucket or buckets where Amazon S3 stores object replicas. When you request an object (GetObject) or object metadata (HeadObject) from these buckets, Amazon S3 will return the x-amz-replication-status header in the response as follows:

  • If requesting an object from the source bucket, Amazon S3 will return the x-amz-replication-status header if the object in your request is eligible for replication.

    For example, suppose that in your replication configuration, you specify object prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix TaxDocs. Any objects you upload with this key name prefix, for example TaxDocs/document1.pdf, are eligible for replication. For any object request with this key name prefix, Amazon S3 will return the x-amz-replication-status header with value PENDING, COMPLETED or FAILED indicating object replication status.

  • If requesting an object from a destination bucket, Amazon S3 will return the x-amz-replication-status header with value REPLICA if the object in your request is a replica that Amazon S3 created and there is no replica modification replication in progress.

  • When replicating objects to multiple destination buckets, the x-amz-replication-status header acts differently. The header of the source object will only return a value of COMPLETED when replication is successful to all destinations. The header will remain at value PENDING until replication has completed for all destinations. If one or more destinations fails replication the header will return FAILED.

For more information, see Replication.

This functionality is not supported for directory buckets.

Public Property RequestCharged Amazon.S3.RequestCharged

Gets and sets the property RequestCharged.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property RestoreExpiration System.Nullable<System.DateTime>

Gets and sets the RestoreExpiration property.

RestoreExpiration will be set for objects that have been restored from Amazon Glacier. It indicates for those objects how long the restored object will exist.

This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

Public Property RestoreInProgress System.Nullable<System.Boolean>

Gets and sets the RestoreInProgress

Will be true when the object is in the process of being restored from Amazon Glacier.

This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

Public Property ServerSideEncryptionCustomerMethod Amazon.S3.ServerSideEncryptionCustomerMethod

The Server-side encryption algorithm to be used with the customer provided key.

For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) is supported.

Public Property ServerSideEncryptionCustomerProvidedKeyMD5 System.String

Gets and sets the property ServerSideEncryptionCustomerProvidedKeyMD5.

If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.

This functionality is not supported for directory buckets.

Public Property ServerSideEncryptionKeyManagementServiceKeyId System.String

Gets and sets the property ServerSideEncryptionKeyManagementServiceKeyId.

If present, indicates the ID of the KMS key that was used for object encryption.

Public Property ServerSideEncryptionMethod Amazon.S3.ServerSideEncryptionMethod

The server-side encryption algorithm used when storing this object in Amazon S3 or Amazon FSx.

The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.

When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is aws:fsx.

Public Property StorageClass Amazon.S3.S3StorageClass

Gets and sets the property StorageClass.

Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.

For more information, see Storage Classes.

Directory buckets - Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

Public Property TagsCount System.Nullable<System.Int32>

Gets and sets the property TagsCount.

The number of tags, if any, on the object, when you have the relevant permission to read object tags.

You can use GetObjectTagging to retrieve the tag set associated with an object.

This functionality is not supported for directory buckets.

Public Property VersionId System.String

Gets and sets the property VersionId.

Version ID of the object.

This functionality is not supported for directory buckets.

Public Property WebsiteRedirectLocation System.String

Gets and sets the property WebsiteRedirectLocation.

If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.

This functionality is not supported for directory buckets.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer