getContainerServices method
Returns information about one or more of your Amazon Lightsail container services.
May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw AccessDeniedException. May throw UnauthenticatedException.
Parameter serviceName
:
The name of the container service for which to return information.
When omitted, the response includes all of your container services in the AWS Region where the request is made.
Implementation
Future<ContainerServicesListResult> getContainerServices({
String? serviceName,
}) async {
_s.validateStringLength(
'serviceName',
serviceName,
1,
63,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Lightsail_20161128.GetContainerServices'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (serviceName != null) 'serviceName': serviceName,
},
);
return ContainerServicesListResult.fromJson(jsonResponse.body);
}