describeContainer method
Retrieves the properties of the requested container. This request is
commonly used to retrieve the endpoint of a container. An endpoint is a
value assigned by the service when a new container is created. A
container's endpoint does not change after it has been assigned. The
DescribeContainer
request returns a single
Container
object based on ContainerName
. To
return all Container
objects that are associated with a
specified AWS account, use ListContainers.
May throw ContainerNotFoundException. May throw InternalServerError.
Parameter containerName
:
The name of the container to query.
Implementation
Future<DescribeContainerOutput> describeContainer({
String? containerName,
}) async {
_s.validateStringLength(
'containerName',
containerName,
1,
255,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MediaStore_20170901.DescribeContainer'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (containerName != null) 'ContainerName': containerName,
},
);
return DescribeContainerOutput.fromJson(jsonResponse.body);
}