libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

  • keyMarker :: Maybe Text

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

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

  • encodingType :: Maybe EncodingType
     
  • versionIdMarker :: Maybe Text

    Specifies the object version you want to start listing from.

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

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

  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

  • bucket :: BucketName

    The bucket name that contains the objects.

Instances

Instances details
Eq ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Read ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Show ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Generic ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Associated Types

type Rep ListObjectVersions :: Type -> Type #

NFData ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Methods

rnf :: ListObjectVersions -> () #

Hashable 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 #

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

type Rep ListObjectVersions Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

type AWSResponse 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:

$sel:keyMarker:ListObjectVersions', listObjectVersions_keyMarker - Specifies the key to start with when listing objects in a bucket.

$sel:prefix: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.

$sel:encodingType:ListObjectVersions', listObjectVersions_encodingType - Undocumented member.

$sel:versionIdMarker:ListObjectVersions', listObjectVersions_versionIdMarker - Specifies the object version you want to start listing from.

$sel:maxKeys: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.

$sel:delimiter: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.

$sel:expectedBucketOwner:ListObjectVersions', listObjectVersions_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

$sel:bucket:ListObjectVersions', listObjectVersions_bucket - The bucket name that contains the objects.

Request Lenses

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

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

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_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_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 will fail with an HTTP 403 (Access Denied) error.

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

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

  • keyMarker :: Maybe Text

    Marks the last key returned in a truncated response.

  • deleteMarkers :: Maybe [DeleteMarkerEntry]

    Container for an object that is a delete marker.

  • prefix :: Maybe Text

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

  • commonPrefixes :: Maybe [CommonPrefix]

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

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

  • versions :: Maybe [ObjectVersion]

    Container for version information.

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

  • versionIdMarker :: Maybe Text

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

  • maxKeys :: Maybe Int

    Specifies the maximum number of objects to return.

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

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

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Read ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Show ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Generic ListObjectVersionsResponse Source # 
Instance details

Defined in Amazonka.S3.ListObjectVersions

Associated Types

type Rep ListObjectVersionsResponse :: Type -> Type #

NFData 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" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "ListObjectVersionsResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "nextVersionIdMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "keyMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "deleteMarkers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DeleteMarkerEntry])))) :*: ((S1 ('MetaSel ('Just "prefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "commonPrefixes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [CommonPrefix]))) :*: (S1 ('MetaSel ('Just "encodingType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EncodingType)) :*: S1 ('MetaSel ('Just "versions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ObjectVersion]))))) :*: ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BucketName)) :*: (S1 ('MetaSel ('Just "nextKeyMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "versionIdMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "maxKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "isTruncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "delimiter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Delimiter)) :*: 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: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.

$sel:keyMarker:ListObjectVersions', listObjectVersionsResponse_keyMarker - Marks the last key returned in a truncated response.

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

$sel:prefix:ListObjectVersions', listObjectVersionsResponse_prefix - Selects objects that start with the value supplied by this parameter.

$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:encodingType: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.

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

$sel:name: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:versionIdMarker:ListObjectVersions', listObjectVersionsResponse_versionIdMarker - Marks the last version of the key returned in a truncated response.

$sel:maxKeys:ListObjectVersions', listObjectVersionsResponse_maxKeys - Specifies the maximum number of objects to return.

$sel:isTruncated: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.

$sel:delimiter: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.

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

Response Lenses

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_keyMarker :: Lens' ListObjectVersionsResponse (Maybe Text) Source #

Marks the last key returned in a truncated response.

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

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

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_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_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_versionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text) Source #

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

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

Specifies the maximum number of objects to return.

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