Movatterモバイル変換


[0]ホーム

URL:


AWS CLI Command Reference

Navigation

Amazon Web Services logo

Table of Contents

Quick search

Feedback

Did you find this page useful? Do you have a suggestion to improve the documentation?Give us feedback.
If you would like to suggest an improvement or fix for the AWS CLI, check out ourcontributing guide on GitHub.

User Guide

First time using the AWS CLI? See theUser Guide for help getting started.

[aws .s3api ]

list-parts

Description

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

To use this operation, you must provide theuploadID in the request. You obtain this uploadID by sending the initiate multipart upload request throughCreateMultipartUpload .

TheListParts 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 themax-parts request parameter. If your multipart upload consists of more than 1,000 parts, the response returns anIsTruncated field with the value oftrue , and aNextPartNumberMarker element. To list remaining uploaded parts, in subsequentListParts requests, include thepart-number-marker query string parameter and set its value to theNextPartNumberMarker field value from the previous response.

For more information on multipart uploads, seeUploading Objects Using Multipart Upload in theAmazon S3 User Guide .

Note

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://amzn-s3-demo-bucket .s3express-zone-id .*region-code* .amazonaws.com/key-name `` . Path-style requests are not supported. For more information about endpoints in Availability Zones, seeRegional and Zonal endpoints for directory buckets in Availability Zones in theAmazon S3 User Guide . For more information about endpoints in Local Zones, seeConcepts for directory buckets in Local Zones in theAmazon S3 User Guide .

Permissions

  • General purpose bucket permissions - For information about permissions required to use the multipart upload API, seeMultipart Upload and Permissions in theAmazon 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 thekms:Decrypt action for theListParts request to succeed.

  • Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the `CreateSessionhttps://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html`__ API operation for session-based authorization. Specifically, you grant thes3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSession 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 anotherCreateSession 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 `CreateSessionhttps://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html`__ .

    HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is ``Bucket-name .s3express-zone-id .*region-code* .amazonaws.com`` .

The following operations are related toListParts :

Warning

You must URL encode any signed header values that contain spaces. For example, if your header value ismyfile.txt , containing two spaces aftermy , you must URL encode this value tomy%20%20file.txt .

See also:AWS API Documentation

list-parts is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the--no-paginate argument.When using--outputtext and the--query argument on a paginated response, the--query argument must extract data from the results of the following query expressions:Parts

Synopsis

list-parts--bucket<value>--key<value>--upload-id<value>[--request-payer<value>][--expected-bucket-owner<value>][--sse-customer-algorithm<value>][--sse-customer-key<value>][--sse-customer-key-md5<value>][--cli-input-json|--cli-input-yaml][--starting-token<value>][--page-size<value>][--max-items<value>][--generate-cli-skeleton<value>][--debug][--endpoint-url<value>][--no-verify-ssl][--no-paginate][--output<value>][--query<value>][--profile<value>][--region<value>][--version<value>][--color<value>][--no-sign-request][--ca-bundle<value>][--cli-read-timeout<value>][--cli-connect-timeout<value>][--cli-binary-format<value>][--no-cli-pager][--cli-auto-prompt][--no-cli-auto-prompt]

Options

--bucket (string) [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-zone-id .*region-code* .amazonaws.com`` . Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format ``bucket-base-namezone-id –x-s3`` (for example, ``amzn-s3-demo-bucketusw2-az1 –x-s3`` ). For information about bucket naming restrictions, seeDirectory bucket naming rules in theAmazon S3 User Guide .

Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the formAccessPointName -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, seeUsing access points in theAmazon S3 User Guide .

Note

Object Lambda access points are not supported by directory buckets.

S3 on Outposts - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, seeWhat is S3 on Outposts? in theAmazon S3 User Guide .

--key (string) [required]

Object key for which the multipart upload was initiated.

Constraints:

  • min:1

--upload-id (string) [required]

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

--request-payer (string)

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, seeDownloading Objects in Requester Pays Buckets in theAmazon S3 User Guide .

Note

This functionality is not supported for directory buckets.

Possible values:

  • requester

--expected-bucket-owner (string)

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 code403Forbidden (access denied).

--sse-customer-algorithm (string)

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, seeProtecting data using SSE-C keys in theAmazon S3 User Guide .

Note

This functionality is not supported for directory buckets.

--sse-customer-key (string)

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, seeProtecting data using SSE-C keys in theAmazon S3 User Guide .

Note

This functionality is not supported for directory buckets.

--sse-customer-key-md5 (string)

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, seeProtecting data using SSE-C keys in theAmazon S3 User Guide .

Note

This functionality is not supported for directory buckets.

--cli-input-json |--cli-input-yaml (string)Reads arguments from the JSON string provided. The JSON string follows the format provided by--generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with--cli-input-yaml.

--starting-token (string)

A token to specify where to start paginating. This is theNextToken from a previously truncated response.

For usage examples, seePagination in theAWS Command Line Interface User Guide .

--page-size (integer)

The size of each page to get in the AWS service call. This does not affect the number of items returned in the command’s output. Setting a smaller page size results in more calls to the AWS service, retrieving fewer items in each call. This can help prevent the AWS service calls from timing out.

For usage examples, seePagination in theAWS Command Line Interface User Guide .

--max-items (integer)

The total number of items to return in the command’s output. If the total number of items available is more than the value specified, aNextToken is provided in the command’s output. To resume pagination, provide theNextToken value in thestarting-token argument of a subsequent command.Do not use theNextToken response element directly outside of the AWS CLI.

For usage examples, seePagination in theAWS Command Line Interface User Guide .

--generate-cli-skeleton (string)Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the valueinput, prints a sample input JSON that can be used as an argument for--cli-input-json. Similarly, if providedyaml-input it will print a sample input YAML that can be used with--cli-input-yaml. If provided with the valueoutput, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blobfileb:// will always be treated as binary and use the file contents directly regardless of thecli-binary-format setting. When usingfile:// the file contents will need to properly formatted for the configuredcli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

Examples

Note

To use the following examples, you must have the AWS CLI installed and configured. See theGetting started guide in theAWS CLI User Guide for more information.

Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. SeeUsing quotation marks with strings in theAWS CLI User Guide .

The following command lists all of the parts that have been uploaded for a multipart upload with keymultipart/01 in the bucketamzn-s3-demo-bucket:

awss3apilist-parts--bucketamzn-s3-demo-bucket--key'multipart/01'--upload-iddfRtDYU0WWCCcH43C3WFbkRONycyCpTJJvxu2i5GYkZljF.Yxwh6XG7WfS2vC4to6HiV6Yjlx.cph0gtNBtJ8P3URCSbB7rjxI5iEwVDmgaXZOGgkk5nVTW16HOQ5l0R

Output:

{"Owner":{"DisplayName":"aws-account-name","ID":"100719349fc3b6dcd7c820a124bf7aecd408092c3d7b51b38494939801fc248b"},"Initiator":{"DisplayName":"username","ID":"arn:aws:iam::0123456789012:user/username"},"Parts":[{"LastModified":"2015-06-02T18:07:35.000Z","PartNumber":1,"ETag":"\"e868e0f4719e394144ef36531ee6824c\"","Size":5242880},{"LastModified":"2015-06-02T18:07:42.000Z","PartNumber":2,"ETag":"\"6bb2b12753d66fe86da4998aa33fffb0\"","Size":5242880},{"LastModified":"2015-06-02T18:07:47.000Z","PartNumber":3,"ETag":"\"d0a0112e841abec9c9ec83406f0159c8\"","Size":5242880}],"StorageClass":"STANDARD"}

Output

AbortDate -> (timestamp)

If the bucket has a lifecycle rule configured with an action to abort incomplete multipart uploads and the prefix in the lifecycle rule matches the object name in the request, then the response includes this header indicating when the initiated multipart upload will become eligible for abort operation. For more information, seeAborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration .

The response will also include thex-amz-abort-rule-id header that will provide the ID of the lifecycle configuration rule that defines this action.

Note

This functionality is not supported for directory buckets.

AbortRuleId -> (string)

This header is returned along with thex-amz-abort-date header. It identifies applicable lifecycle configuration rule that defines the action to abort incomplete multipart uploads.

Note

This functionality is not supported for directory buckets.

Bucket -> (string)

The name of the bucket to which the multipart upload was initiated. Does not return the access point ARN or access point alias if used.

Key -> (string)

Object key for which the multipart upload was initiated.

Constraints:

  • min:1

UploadId -> (string)

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

PartNumberMarker -> (integer)

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

NextPartNumberMarker -> (integer)

When a list is truncated, this element specifies the last part in the list, as well as the value to use for thepart-number-marker request parameter in a subsequent request.

MaxParts -> (integer)

Maximum number of parts that were allowed in the response.

IsTruncated -> (boolean)

Indicates whether the returned list of parts is truncated. A true value indicates that the list was truncated. A list can be truncated if the number of parts exceeds the limit returned in the MaxParts element.

Parts -> (list)

Container for elements related to a particular part. A response can contain zero or morePart elements.

(structure)

Container for elements related to a part.

PartNumber -> (integer)

Part number identifying the part. This is a positive integer between 1 and 10,000.

LastModified -> (timestamp)

Date and time at which the part was uploaded.

ETag -> (string)

Entity tag returned when the part was uploaded.

Size -> (long)

Size in bytes of the uploaded part data.

ChecksumCRC32 -> (string)

The Base64 encoded, 32-bitCRC32 checksum of the part. This checksum is present if the object was uploaded with theCRC32 checksum algorithm. For more information, seeChecking object integrity in theAmazon S3 User Guide .

ChecksumCRC32C -> (string)

The Base64 encoded, 32-bitCRC32C checksum of the part. This checksum is present if the object was uploaded with theCRC32C checksum algorithm. For more information, seeChecking object integrity in theAmazon S3 User Guide .

ChecksumCRC64NVME -> (string)

The Base64 encoded, 64-bitCRC64NVME checksum of the part. This checksum is present if the multipart upload request was created with theCRC64NVME checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum,CRC64NVME , to the uploaded object). For more information, seeChecking object integrity in theAmazon S3 User Guide .

ChecksumSHA1 -> (string)

The Base64 encoded, 160-bitSHA1 checksum of the part. This checksum is present if the object was uploaded with theSHA1 checksum algorithm. For more information, seeChecking object integrity in theAmazon S3 User Guide .

ChecksumSHA256 -> (string)

The Base64 encoded, 256-bitSHA256 checksum of the part. This checksum is present if the object was uploaded with theSHA256 checksum algorithm. For more information, seeChecking object integrity in theAmazon S3 User Guide .

Initiator -> (structure)

Container element that identifies who initiated the multipart upload. If the initiator is an Amazon Web Services account, this element provides the same information as theOwner element. If the initiator is an IAM User, this element provides the user ARN.

ID -> (string)

If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the principal is an IAM User, it provides a user ARN value.

Note

Directory buckets - If the principal is an Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it provides a user ARN value.

DisplayName -> (string)

Note

This functionality is not supported for directory buckets.

Owner -> (structure)

Container element that identifies the object owner, after the object is created. If multipart upload is initiated by an IAM user, this element provides the parent account ID.

Note

Directory buckets - The bucket owner is returned as the object owner for all the parts.

DisplayName -> (string)

ID -> (string)

Container for the ID of the owner.

StorageClass -> (string)

The class of storage used to store the uploaded object.

Note

Directory buckets - Directory buckets only supportEXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones andONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

Possible values:

  • STANDARD
  • REDUCED_REDUNDANCY
  • STANDARD_IA
  • ONEZONE_IA
  • INTELLIGENT_TIERING
  • GLACIER
  • DEEP_ARCHIVE
  • OUTPOSTS
  • GLACIER_IR
  • SNOW
  • EXPRESS_ONEZONE
  • FSX_OPENZFS
  • FSX_ONTAP

RequestCharged -> (string)

If present, indicates that the requester was successfully charged for the request. For more information, seeUsing Requester Pays buckets for storage transfers and usage in theAmazon Simple Storage Service user guide .

Note

This functionality is not supported for directory buckets.

Possible values:

  • requester

ChecksumAlgorithm -> (string)

The algorithm that was used to create a checksum of the object.

Possible values:

  • CRC32
  • CRC32C
  • SHA1
  • SHA256
  • CRC64NVME

ChecksumType -> (string)

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 inCreateMultipartUpload request. For more information, seeChecking object integrity in the Amazon S3 User Guide .

Possible values:

  • COMPOSITE
  • FULL_OBJECT

Navigation

© Copyright 2025, Amazon Web Services. Created usingSphinx.

[8]ページ先頭

©2009-2025 Movatter.jp