Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data ListObjectVersions = ListObjectVersions' {}
- newListObjectVersions :: BucketName -> ListObjectVersions
- listObjectVersions_delimiter :: Lens' ListObjectVersions (Maybe Delimiter)
- listObjectVersions_encodingType :: Lens' ListObjectVersions (Maybe EncodingType)
- listObjectVersions_expectedBucketOwner :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_keyMarker :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_maxKeys :: Lens' ListObjectVersions (Maybe Int)
- listObjectVersions_prefix :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_versionIdMarker :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_bucket :: Lens' ListObjectVersions BucketName
- data ListObjectVersionsResponse = ListObjectVersionsResponse' {
- commonPrefixes :: Maybe [CommonPrefix]
- deleteMarkers :: Maybe [DeleteMarkerEntry]
- delimiter :: Maybe Delimiter
- encodingType :: Maybe EncodingType
- isTruncated :: Maybe Bool
- keyMarker :: Maybe Text
- maxKeys :: Maybe Int
- name :: Maybe BucketName
- nextKeyMarker :: Maybe Text
- nextVersionIdMarker :: Maybe Text
- prefix :: Maybe Text
- versionIdMarker :: Maybe Text
- versions :: Maybe [ObjectVersion]
- httpStatus :: Int
- newListObjectVersionsResponse :: Int -> ListObjectVersionsResponse
- listObjectVersionsResponse_commonPrefixes :: Lens' ListObjectVersionsResponse (Maybe [CommonPrefix])
- listObjectVersionsResponse_deleteMarkers :: Lens' ListObjectVersionsResponse (Maybe [DeleteMarkerEntry])
- listObjectVersionsResponse_delimiter :: Lens' ListObjectVersionsResponse (Maybe Delimiter)
- listObjectVersionsResponse_encodingType :: Lens' ListObjectVersionsResponse (Maybe EncodingType)
- listObjectVersionsResponse_isTruncated :: Lens' ListObjectVersionsResponse (Maybe Bool)
- listObjectVersionsResponse_keyMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_maxKeys :: Lens' ListObjectVersionsResponse (Maybe Int)
- listObjectVersionsResponse_name :: Lens' ListObjectVersionsResponse (Maybe BucketName)
- listObjectVersionsResponse_nextKeyMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_nextVersionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_prefix :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_versionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_versions :: Lens' ListObjectVersionsResponse (Maybe [ObjectVersion])
- listObjectVersionsResponse_httpStatus :: Lens' ListObjectVersionsResponse Int
Creating a Request
data ListObjectVersions Source #
See: newListObjectVersions
smart constructor.
ListObjectVersions' | |
|
Instances
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_encodingType :: Lens' ListObjectVersions (Maybe EncodingType) Source #
Undocumented member.
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.
ListObjectVersionsResponse' | |
|
Instances
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_deleteMarkers :: Lens' ListObjectVersionsResponse (Maybe [DeleteMarkerEntry]) Source #
Container for an object that is a delete marker.
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_name :: Lens' ListObjectVersionsResponse (Maybe BucketName) Source #
The bucket name.
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.
listObjectVersionsResponse_versions :: Lens' ListObjectVersionsResponse (Maybe [ObjectVersion]) Source #
Container for version information.
listObjectVersionsResponse_httpStatus :: Lens' ListObjectVersionsResponse Int Source #
The response's http status code.