deleteService method

Future<DeleteServiceResponse> deleteService({
  1. required String serviceIdentifier,
})

Deletes a service. A service can't be deleted if it's associated with a service network. If you delete a service, all resources related to the service, such as the resource policy, auth policy, listeners, listener rules, and access log subscriptions, are also deleted. For more information, see Delete a service in the Amazon VPC Lattice User Guide.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter serviceIdentifier : The ID or ARN of the service.

Implementation

Future<DeleteServiceResponse> deleteService({
  required String serviceIdentifier,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/services/${Uri.encodeComponent(serviceIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteServiceResponse.fromJson(response);
}