Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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_keyMarker :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_prefix :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_encodingType :: Lens' ListObjectVersions (Maybe EncodingType)
- listObjectVersions_versionIdMarker :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_maxKeys :: Lens' ListObjectVersions (Maybe Int)
- listObjectVersions_delimiter :: Lens' ListObjectVersions (Maybe Delimiter)
- listObjectVersions_expectedBucketOwner :: Lens' ListObjectVersions (Maybe Text)
- listObjectVersions_bucket :: Lens' ListObjectVersions BucketName
- data ListObjectVersionsResponse = ListObjectVersionsResponse' {
- nextVersionIdMarker :: Maybe Text
- keyMarker :: Maybe Text
- deleteMarkers :: Maybe [DeleteMarkerEntry]
- prefix :: Maybe Text
- commonPrefixes :: Maybe [CommonPrefix]
- encodingType :: Maybe EncodingType
- versions :: Maybe [ObjectVersion]
- name :: Maybe BucketName
- nextKeyMarker :: Maybe Text
- versionIdMarker :: Maybe Text
- maxKeys :: Maybe Int
- isTruncated :: Maybe Bool
- delimiter :: Maybe Delimiter
- httpStatus :: Int
- newListObjectVersionsResponse :: Int -> ListObjectVersionsResponse
- listObjectVersionsResponse_nextVersionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_keyMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_deleteMarkers :: Lens' ListObjectVersionsResponse (Maybe [DeleteMarkerEntry])
- listObjectVersionsResponse_prefix :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_commonPrefixes :: Lens' ListObjectVersionsResponse (Maybe [CommonPrefix])
- listObjectVersionsResponse_encodingType :: Lens' ListObjectVersionsResponse (Maybe EncodingType)
- listObjectVersionsResponse_versions :: Lens' ListObjectVersionsResponse (Maybe [ObjectVersion])
- listObjectVersionsResponse_name :: Lens' ListObjectVersionsResponse (Maybe BucketName)
- listObjectVersionsResponse_nextKeyMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_versionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text)
- listObjectVersionsResponse_maxKeys :: Lens' ListObjectVersionsResponse (Maybe Int)
- listObjectVersionsResponse_isTruncated :: Lens' ListObjectVersionsResponse (Maybe Bool)
- listObjectVersionsResponse_delimiter :: Lens' ListObjectVersionsResponse (Maybe Delimiter)
- 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:
$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_encodingType :: Lens' ListObjectVersions (Maybe EncodingType) Source #
Undocumented member.
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.
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: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_deleteMarkers :: Lens' ListObjectVersionsResponse (Maybe [DeleteMarkerEntry]) Source #
Container for an object that is a delete marker.
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_versions :: Lens' ListObjectVersionsResponse (Maybe [ObjectVersion]) Source #
Container for version information.
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_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.
listObjectVersionsResponse_httpStatus :: Lens' ListObjectVersionsResponse Int Source #
The response's http status code.