amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.S3.ListObjectVersions

Description

Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions.

To use this operation, you must have permissions to perform the s3:ListBucketVersions action. Be aware of the name difference.

A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.

To use this operation, you must have READ access to the bucket.

This action is not supported by Amazon S3 on Outposts.

The following operations are related to ListObjectVersions:

This operation returns paginated results.

Synopsis

Creating a Request

data ListObjectVersions Source #

See: newListObjectVersions smart constructor.

Constructors

ListObjectVersions' 

Fields

  • delimiter :: Maybe Delimiter

    A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.

  • encodingType :: Maybe EncodingType
     
  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • keyMarker :: Maybe Text

    Specifies the key to start with when listing objects in a bucket.

  • maxKeys :: Maybe Int

    Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains <isTruncated>true</isTruncated>. To return the additional keys, see key-marker and version-id-marker.

  • prefix :: Maybe Text

    Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes.

  • versionIdMarker :: Maybe Text

    Specifies the object version you want to start listing from.

  • bucket :: BucketName

    The bucket name that contains the objects.

Instances

Instances details
ToHeaders ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

ToPath ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

ToQuery ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

AWSPager ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

AWSRequest ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Associated Types

type AWSResponse ListObjectVersions #

Generic ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Associated Types

type Rep ListObjectVersions :: Type -> Type #

Read ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Show ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

NFData ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Methods

rnf :: ListObjectVersions -> () #

Eq ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Hashable ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

type AWSResponse ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

type Rep ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

newListObjectVersions Source #

Create a value of ListObjectVersions with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ListObjectVersions, listObjectVersions_delimiter - A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.

ListObjectVersions, listObjectVersions_encodingType - Undocumented member.

$sel:expectedBucketOwner:ListObjectVersions', listObjectVersions_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

ListObjectVersions, listObjectVersions_keyMarker - Specifies the key to start with when listing objects in a bucket.

ListObjectVersions, listObjectVersions_maxKeys - Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains <isTruncated>true</isTruncated>. To return the additional keys, see key-marker and version-id-marker.

ListObjectVersions, listObjectVersions_prefix - Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes.

ListObjectVersions, listObjectVersions_versionIdMarker - Specifies the object version you want to start listing from.

ListObjectVersions, listObjectVersions_bucket - The bucket name that contains the objects.

Request Lenses

listObjectVersions_delimiter :: Lens' ListObjectVersions (Maybe Delimiter) Source #

A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.

listObjectVersions_expectedBucketOwner :: Lens' ListObjectVersions (Maybe Text) Source #

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

listObjectVersions_keyMarker :: Lens' ListObjectVersions (Maybe Text) Source #

Specifies the key to start with when listing objects in a bucket.

listObjectVersions_maxKeys :: Lens' ListObjectVersions (Maybe Int) Source #

Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains <isTruncated>true</isTruncated>. To return the additional keys, see key-marker and version-id-marker.

listObjectVersions_prefix :: Lens' ListObjectVersions (Maybe Text) Source #

Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes.

listObjectVersions_versionIdMarker :: Lens' ListObjectVersions (Maybe Text) Source #

Specifies the object version you want to start listing from.

listObjectVersions_bucket :: Lens' ListObjectVersions BucketName Source #

The bucket name that contains the objects.

Destructuring the Response

data ListObjectVersionsResponse Source #

See: newListObjectVersionsResponse smart constructor.

Constructors

ListObjectVersionsResponse' 

Fields

  • commonPrefixes :: Maybe [CommonPrefix]

    All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.

  • deleteMarkers :: Maybe [DeleteMarkerEntry]

    Container for an object that is a delete marker.

  • delimiter :: Maybe Delimiter

    The delimiter grouping the included keys. A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.

  • encodingType :: Maybe EncodingType

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    If you specify encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:

    KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

  • isTruncated :: Maybe Bool

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.

  • keyMarker :: Maybe Text

    Marks the last key returned in a truncated response.

  • maxKeys :: Maybe Int

    Specifies the maximum number of objects to return.

  • name :: Maybe BucketName

    The bucket name.

  • nextKeyMarker :: Maybe Text

    When the number of responses exceeds the value of MaxKeys, NextKeyMarker specifies the first key not returned that satisfies the search criteria. Use this value for the key-marker request parameter in a subsequent request.

  • nextVersionIdMarker :: Maybe Text

    When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker specifies the first object version not returned that satisfies the search criteria. Use this value for the version-id-marker request parameter in a subsequent request.

  • prefix :: Maybe Text

    Selects objects that start with the value supplied by this parameter.

  • versionIdMarker :: Maybe Text

    Marks the last version of the key returned in a truncated response.

  • versions :: Maybe [ObjectVersion]

    Container for version information.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Associated Types

type Rep ListObjectVersionsResponse :: Type -> Type #

Read ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Show ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

NFData ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Eq ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

type Rep ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

type Rep ListObjectVersionsResponse = D1 ('MetaData "ListObjectVersionsResponse" "Amazonka.S3.ListObjectVersions" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "ListObjectVersionsResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "commonPrefixes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [CommonPrefix])) :*: (S1 ('MetaSel ('Just "deleteMarkers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DeleteMarkerEntry])) :*: S1 ('MetaSel ('Just "delimiter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Delimiter)))) :*: ((S1 ('MetaSel ('Just "encodingType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EncodingType)) :*: S1 ('MetaSel ('Just "isTruncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "keyMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "maxKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))) :*: ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BucketName)) :*: (S1 ('MetaSel ('Just "nextKeyMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "nextVersionIdMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "prefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "versionIdMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "versions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ObjectVersion])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))))

newListObjectVersionsResponse Source #

Create a value of ListObjectVersionsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:commonPrefixes:ListObjectVersionsResponse', listObjectVersionsResponse_commonPrefixes - All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.

$sel:deleteMarkers:ListObjectVersionsResponse', listObjectVersionsResponse_deleteMarkers - Container for an object that is a delete marker.

ListObjectVersions, listObjectVersionsResponse_delimiter - The delimiter grouping the included keys. A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.

ListObjectVersions, listObjectVersionsResponse_encodingType - Encoding type used by Amazon S3 to encode object key names in the XML response.

If you specify encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:

KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

ListObjectVersionsResponse, listObjectVersionsResponse_isTruncated - A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.

ListObjectVersions, listObjectVersionsResponse_keyMarker - Marks the last key returned in a truncated response.

ListObjectVersions, listObjectVersionsResponse_maxKeys - Specifies the maximum number of objects to return.

ListObjectVersionsResponse, listObjectVersionsResponse_name - The bucket name.

$sel:nextKeyMarker:ListObjectVersionsResponse', listObjectVersionsResponse_nextKeyMarker - When the number of responses exceeds the value of MaxKeys, NextKeyMarker specifies the first key not returned that satisfies the search criteria. Use this value for the key-marker request parameter in a subsequent request.

$sel:nextVersionIdMarker:ListObjectVersionsResponse', listObjectVersionsResponse_nextVersionIdMarker - When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker specifies the first object version not returned that satisfies the search criteria. Use this value for the version-id-marker request parameter in a subsequent request.

ListObjectVersions, listObjectVersionsResponse_prefix - Selects objects that start with the value supplied by this parameter.

ListObjectVersions, listObjectVersionsResponse_versionIdMarker - Marks the last version of the key returned in a truncated response.

$sel:versions:ListObjectVersionsResponse', listObjectVersionsResponse_versions - Container for version information.

$sel:httpStatus:ListObjectVersionsResponse', listObjectVersionsResponse_httpStatus - The response's http status code.

Response Lenses

listObjectVersionsResponse_commonPrefixes :: Lens' ListObjectVersionsResponse (Maybe [CommonPrefix]) Source #

All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.

listObjectVersionsResponse_delimiter :: Lens' ListObjectVersionsResponse (Maybe Delimiter) Source #

The delimiter grouping the included keys. A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.

listObjectVersionsResponse_encodingType :: Lens' ListObjectVersionsResponse (Maybe EncodingType) Source #

Encoding type used by Amazon S3 to encode object key names in the XML response.

If you specify encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:

KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

listObjectVersionsResponse_isTruncated :: Lens' ListObjectVersionsResponse (Maybe Bool) Source #

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.

listObjectVersionsResponse_keyMarker :: Lens' ListObjectVersionsResponse (Maybe Text) Source #

Marks the last key returned in a truncated response.

listObjectVersionsResponse_maxKeys :: Lens' ListObjectVersionsResponse (Maybe Int) Source #

Specifies the maximum number of objects to return.

listObjectVersionsResponse_nextKeyMarker :: Lens' ListObjectVersionsResponse (Maybe Text) Source #

When the number of responses exceeds the value of MaxKeys, NextKeyMarker specifies the first key not returned that satisfies the search criteria. Use this value for the key-marker request parameter in a subsequent request.

listObjectVersionsResponse_nextVersionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text) Source #

When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker specifies the first object version not returned that satisfies the search criteria. Use this value for the version-id-marker request parameter in a subsequent request.

listObjectVersionsResponse_prefix :: Lens' ListObjectVersionsResponse (Maybe Text) Source #

Selects objects that start with the value supplied by this parameter.

listObjectVersionsResponse_versionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text) Source #

Marks the last version of the key returned in a truncated response.