AWS SDK Version 3 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 AcceptRanges.

Public Property ArchiveStatus Amazon.S3.ArchiveStatus

The archive state of the head object.

Public Property BucketKeyEnabled System.Boolean

Gets and sets the property BucketKeyEnabled.

Indicates whether the object uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

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

Gets and sets the ContentRange.

Public Property DeleteMarker System.String

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.

Public Property ETag System.String

An 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 Expiration property. Specifies the expiration date for the object and the rule governing the expiration. Is null if expiration is not applicable.

Public Property Expires System.DateTime

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

Last modified date of the object

Public Property Metadata Amazon.S3.Model.MetadataCollection

The collection of meta data for the request.

Public Property MissingMeta System.Int32

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.

Public Property ObjectLockLegalHoldStatus Amazon.S3.ObjectLockLegalHoldStatus

Gets and sets the property ObjectLockLegalHoldStatus.

The Legal Hold status for the specified object.

Public Property ObjectLockMode Amazon.S3.ObjectLockMode

Gets and sets the property ObjectLockMode.

The Object Lock mode currently in place for this object.

Public Property ObjectLockRetainUntilDate System.DateTime

Gets and sets the property ObjectLockRetainUntilDate.

The date and time when this object's Object Lock will expire.

Public Property PartsCount System.Nullable<System.Int32>

The count of parts this object has.

Public Property ReplicationStatus Amazon.S3.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.

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

Public Property RequestCharged Amazon.S3.RequestCharged

If present, indicates that the requester was successfully charged for the request.

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 indiciates for those objects how long the restored object will exist.

Public Property RestoreInProgress System.Boolean

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

Public Property ServerSideEncryptionCustomerMethod Amazon.S3.ServerSideEncryptionCustomerMethod

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

Public Property ServerSideEncryptionKeyManagementServiceKeyId System.String

The id of the AWS Key Management Service key that Amazon S3 uses to encrypt and decrypt the object.

If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.

Public Property ServerSideEncryptionMethod Amazon.S3.ServerSideEncryptionMethod

The Server-side encryption algorithm used when storing this object in S3.

If the object is stored using server-side encryption either with an Amazon Web Services KMS key or an Amazon S3-managed encryption key, the response includes this header with the value of the server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).

Public Property StorageClass Amazon.S3.S3StorageClass

The class of storage used to store the object.

Public Property VersionId System.String

Version of the object.

Public Property WebsiteRedirectLocation System.String

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.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5