Skip to content

List Parts

s3_list_parts R Documentation

Lists the parts that have been uploaded for a specific multipart upload

Description

Lists the parts that have been uploaded for a specific multipart upload.

To use this operation, you must provide the ⁠upload ID⁠ in the request. You obtain this uploadID by sending the initiate multipart upload request through create_multipart_upload.

The list_parts request returns a maximum of 1,000 uploaded parts. The limit of 1,000 parts is also the default value. You can restrict the number of parts in a response by specifying the max-parts request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an IsTruncated field with the value of true, and a NextPartNumberMarker element. To list remaining uploaded parts, in subsequent list_parts requests, include the part-number-marker query string parameter and set its value to the NextPartNumberMarker field value from the previous response.

For more information on multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format ⁠https://bucket_name.s3express-az_id.region.amazonaws.com/key-name ⁠. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.

Permissions

  • General purpose bucket permissions - For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions in the Amazon S3 User Guide.

    If the upload was created using server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the kms:Decrypt action for the list_parts request to succeed.

  • Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the create_session API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the create_session API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another create_session API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see create_session .

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com.

The following operations are related to list_parts:

  • create_multipart_upload

  • upload_part

  • complete_multipart_upload

  • abort_multipart_upload

  • get_object_attributes

  • list_multipart_uploads

Usage

s3_list_parts(Bucket, Key, MaxParts, PartNumberMarker, UploadId,
  RequestPayer, ExpectedBucketOwner, SSECustomerAlgorithm, SSECustomerKey,
  SSECustomerKeyMD5)

Arguments

Bucket

[required] The name of the bucket to which the parts are being uploaded.

Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide.

Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

Access points and Object Lambda access points are not supported by directory buckets.

S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

Key

[required] Object key for which the multipart upload was initiated.

MaxParts

Sets the maximum number of parts to return.

PartNumberMarker

Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.

UploadId

[required] Upload ID identifying the multipart upload whose parts are being listed.

RequestPayer
ExpectedBucketOwner

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code ⁠403 Forbidden⁠ (access denied).

SSECustomerAlgorithm

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

This functionality is not supported for directory buckets.

SSECustomerKey

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

This functionality is not supported for directory buckets.

SSECustomerKeyMD5

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

This functionality is not supported for directory buckets.

Value

A list with the following syntax:

list(
  AbortDate = as.POSIXct(
    "2015-01-01"
  ),
  AbortRuleId = "string",
  Bucket = "string",
  Key = "string",
  UploadId = "string",
  PartNumberMarker = 123,
  NextPartNumberMarker = 123,
  MaxParts = 123,
  IsTruncated = TRUE|FALSE,
  Parts = list(
    list(
      PartNumber = 123,
      LastModified = as.POSIXct(
        "2015-01-01"
      ),
      ETag = "string",
      Size = 123,
      ChecksumCRC32 = "string",
      ChecksumCRC32C = "string",
      ChecksumSHA1 = "string",
      ChecksumSHA256 = "string"
    )
  ),
  Initiator = list(
    ID = "string",
    DisplayName = "string"
  ),
  Owner = list(
    DisplayName = "string",
    ID = "string"
  ),
  StorageClass = "STANDARD"|"REDUCED_REDUNDANCY"|"STANDARD_IA"|"ONEZONE_IA"|"INTELLIGENT_TIERING"|"GLACIER"|"DEEP_ARCHIVE"|"OUTPOSTS"|"GLACIER_IR"|"SNOW"|"EXPRESS_ONEZONE",
  RequestCharged = "requester",
  ChecksumAlgorithm = "CRC32"|"CRC32C"|"SHA1"|"SHA256"
)

Request syntax

svc$list_parts(
  Bucket = "string",
  Key = "string",
  MaxParts = 123,
  PartNumberMarker = 123,
  UploadId = "string",
  RequestPayer = "requester",
  ExpectedBucketOwner = "string",
  SSECustomerAlgorithm = "string",
  SSECustomerKey = raw,
  SSECustomerKeyMD5 = "string"
)

Examples

## Not run: 
# The following example lists parts uploaded for a specific multipart
# upload.
svc$list_parts(
  Bucket = "examplebucket",
  Key = "bigobject",
  UploadId = "example7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LA..."
)

## End(Not run)