AWS SDK for .NET Documentation
ListPartsResponse Class
AmazonAmazon.S3.ModelListPartsResponse Did this page help you?   Yes   No    Tell us about it...
The ListPartsResponse contains all the information about the ListParts method.
Declaration Syntax
C#
public class ListPartsResponse : S3Response
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
ListPartsResponse()()()()
Initializes a new instance of the ListPartsResponse class

AmazonId2
Gets and sets the AmazonId2 property. This property corresponds to the x-amz-id-2 header in the HTTP response from the Amazon S3 service. The value of this header is used for internal troubleshooting purposes.
(Inherited from S3Response.)
BucketName
Gets and sets the name of the bucket to which the multipart upload was initiated.

Dispose()()()()
Disposes of all managed and unmanaged resources.
(Inherited from S3Response.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
Headers
Gets and sets the Headers property. Information like the request-id, the amz-id-2 are retrieved fro the Headers and presented to the user via properties of the response object.
(Inherited from S3Response.)
Initiator
Gets and sets the Initiator property.

IsTruncated
Gets and sets the IsTruncated property.

Indicates whether the returned list of parts is truncated. A value true indicates the list was truncated. A list may be truncated if the number of parts exceeds the limit specified by MaxParts.


Key
Gets and sets the object key for which the multipart upload was initiated.

MaxParts
Gets and sets the maximum number of parts allowed in a response.

Metadata
Gets and sets the Metadata property.
(Inherited from S3Response.)
NextPartNumberMarker
Gets and sets the NextPartNumberMarker property.

When a list is truncated, specifies the last part that should be skipped over to resume listing. Use this value for the PartNumberMarker request property in a subsequent request.


Owner
Gets and sets the Owner property.

PartNumberMarker
Gets and sets the part number after which listing begins.

Parts
Gets and sets the Parts property.

PartDetails is a container for elements related to a particular part. A response can contain zero or more Part elements.


RequestId
Gets and sets the RequestId property.
(Inherited from S3Response.)
ResponseStream
Gets and sets the ResponseStream property. This property only has a valid value for GetObjectResponses. In order to use this stream without leaking the underlying resource, please wrap access to the stream within a using block.
CopyC#
(Inherited from S3Response.)
ResponseXml
Gets and sets the ResponseXml property. This is the original xml response received from S3
(Inherited from S3Response.)
StatusCode
Gets the HTTP Status code from the service response.
(Inherited from S3Response.)
StorageClass
Gets and sets the class of storage used to store the uploaded object.

ToString()()()()
String Representation of this object. Overrides Object.ToString()
(Inherited from S3Response.)
UploadId
Gets and sets the upload ID identifying the multipart upload whose parts are being listed.

Examples

This example shows how to upload 13MB of data using mutlipart upload.
The data is contained in a stream and the upload is done in 3 parts: 5MB, 5MB, then the remainder.

CopyMultipart Upload Sample
int MB = (int)Math.Pow(2, 20);

// Create a client
AmazonS3Client client = new AmazonS3Client();

// Define input stream
Stream inputStream = Create13MBDataStream();

// Initiate multipart upload
InitiateMultipartUploadRequest initRequest = new InitiateMultipartUploadRequest
{
    BucketName = "SampleBucket",
    Key = "Item1"
};
InitiateMultipartUploadResponse initResponse = client.InitiateMultipartUpload(initRequest);

// Upload part 1
UploadPartRequest uploadRequest = new UploadPartRequest
{
    BucketName = "SampleBucket",
    Key = "Item1",
    UploadId = initResponse.UploadId,
    PartNumber = 1,
    PartSize = 5 * MB,
    InputStream = inputStream
};
UploadPartResponse up1Response = client.UploadPart(uploadRequest);

// Upload part 2
uploadRequest = new UploadPartRequest
{
    BucketName = "SampleBucket",
    Key = "Item1",
    UploadId = initResponse.UploadId,
    PartNumber = 2,
    PartSize = 5 * MB,
    InputStream = inputStream
};
UploadPartResponse up2Response = client.UploadPart(uploadRequest);

// Upload part 3
uploadRequest = new UploadPartRequest
{
    BucketName = "SampleBucket",
    Key = "Item1",
    UploadId = initResponse.UploadId,
    PartNumber = 3,
    InputStream = inputStream
};
UploadPartResponse up3Response = client.UploadPart(uploadRequest);

// List parts for current upload
ListPartsRequest listPartRequest = new ListPartsRequest
{
    BucketName = "SampleBucket",
    Key = "Item1",
    UploadId = initResponse.UploadId
};
ListPartsResponse listPartResponse = client.ListParts(listPartRequest);
Debug.Assert(listPartResponse.Parts.Count == 3);

// Complete the multipart upload
CompleteMultipartUploadRequest compRequest = new CompleteMultipartUploadRequest
{
    BucketName = "SampleBucket",
    Key = "Item1",
    UploadId = initResponse.UploadId,
    PartETags = new List<PartETag>
    {
        new PartETag { ETag = up1Response.ETag, PartNumber = 1 },
        new PartETag { ETag = up2Response.ETag, PartNumber = 2 },
        new PartETag { ETag = up3Response.ETag, PartNumber = 3 }
    }
};
CompleteMultipartUploadResponse compResponse = client.CompleteMultipartUpload(compRequest);
Inheritance Hierarchy
Object
S3Response
 ListPartsResponse

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)