listContainers method
Lists the properties of all containers in AWS Elemental MediaStore.
You can query to receive all the containers in one response. Or you can
include the MaxResults
parameter to receive a limited number
of containers in each response. In this case, the response includes a
token. To get the next set of containers, send the command again, this
time with the NextToken
parameter (with the returned token as
its value). The next set of responses appears, with a token if there are
still more containers to receive.
See also DescribeContainer, which gets the properties of one container.
May throw InternalServerError.
Parameter maxResults
:
Enter the maximum number of containers in the response. Use from 1 to 255
characters.
Parameter nextToken
:
Only if you used MaxResults
in the first command, enter the
token (which was included in the previous response) to obtain the next set
of containers. This token is included in a response only if there actually
are more containers to list.
Implementation
Future<ListContainersOutput> listContainers({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MediaStore_20170901.ListContainers'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListContainersOutput.fromJson(jsonResponse.body);
}