getContainerServiceDeployments method

Future<GetContainerServiceDeploymentsResult> getContainerServiceDeployments({
  1. required String serviceName,
})

Returns the deployments for your Amazon Lightsail container service

A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.

The deployments are ordered by version in ascending order. The newest version is listed at the top of the response.

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 deployments.

Implementation

Future<GetContainerServiceDeploymentsResult> getContainerServiceDeployments({
  required String serviceName,
}) async {
  ArgumentError.checkNotNull(serviceName, 'serviceName');
  _s.validateStringLength(
    'serviceName',
    serviceName,
    1,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Lightsail_20161128.GetContainerServiceDeployments'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'serviceName': serviceName,
    },
  );

  return GetContainerServiceDeploymentsResult.fromJson(jsonResponse.body);
}