deleteCapability method

Future<DeleteCapabilityResponse> deleteCapability({
  1. required String capabilityName,
  2. required String clusterName,
})

Deletes a managed capability from your Amazon EKS cluster. When you delete a capability, Amazon EKS removes the capability infrastructure but retains all resources that were managed by the capability.

Before deleting a capability, you should delete all Kubernetes resources that were created by the capability. After the capability is deleted, these resources become difficult to manage because the controller that managed them is no longer available. To delete resources before removing the capability, use kubectl delete or remove them through your GitOps workflow.

May throw AccessDeniedException. May throw InvalidParameterException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw ServerException.

Parameter capabilityName : The name of the capability to delete.

Parameter clusterName : The name of the Amazon EKS cluster that contains the capability you want to delete.

Implementation

Future<DeleteCapabilityResponse> deleteCapability({
  required String capabilityName,
  required String clusterName,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/clusters/${Uri.encodeComponent(clusterName)}/capabilities/${Uri.encodeComponent(capabilityName)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteCapabilityResponse.fromJson(response);
}