deleteContainerImage method

Future<void> deleteContainerImage({
  1. required String image,
  2. required String serviceName,
})

Deletes a container image that is registered to your Amazon Lightsail container service.

May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw AccessDeniedException. May throw UnauthenticatedException.

Parameter image : The name of the container image to delete from the container service.

Use the GetContainerImages action to get the name of the container images that are registered to a container service.

Parameter serviceName : The name of the container service for which to delete a registered container image.

Implementation

Future<void> deleteContainerImage({
  required String image,
  required String serviceName,
}) async {
  ArgumentError.checkNotNull(image, 'image');
  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.DeleteContainerImage'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'image': image,
      'serviceName': serviceName,
    },
  );
}