Skip to content

delete_capability async

delete_capability(
    cluster_name: String,
    capability_name: String,
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
) -> DeleteCapabilityResponse

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.

Parameters:

  • cluster_name (String) –

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

  • capability_name (String) –

    The name of the capability to delete.

Raises:

  • AccessDeniedException –

    You don't have permissions to perform the requested operation. The IAM principal making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access management in the IAM User Guide.

  • InvalidParameterException –

    The specified parameter is invalid. Review the available parameters for the API request.

  • ResourceInUseException –

    The specified resource is in use.

  • ResourceNotFoundException –

    The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific.

  • ServerException –

    These errors are usually caused by a server-side issue.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_eks/_services/async_eks.py
async def delete_capability(
    self,
    cluster_name: "capo_eks.types.string.String",
    capability_name: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
) -> "capo_eks.types.delete_capability_response.DeleteCapabilityResponse":
    """<p>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.</p> <p>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 <code>kubectl delete</code> or remove them through your GitOps workflow.</p>

    Args:
        cluster_name: <p>The name of the Amazon EKS cluster that contains the capability you want to delete.</p>
        capability_name: <p>The name of the capability to delete.</p>

    Raises:
        capo_eks.errors.access_denied_exception.AccessDeniedException: <p>You don't have permissions to perform the requested operation. The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html">IAM principal</a> making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access management</a> in the <i>IAM User Guide</i>. </p>
        capo_eks.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
        capo_eks.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</p>
        capo_eks.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found. You can view your available clusters with <code>ListClusters</code>. You can view your available managed node groups with <code>ListNodegroups</code>. Amazon EKS clusters and node groups are Amazon Web Services Region specific.</p>
        capo_eks.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_eks.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eks.types.delete_capability_request.DeleteCapabilityRequest]",
    ) -> AsyncOperationResponse[
        "capo_eks.types.delete_capability_response.DeleteCapabilityResponse"
    ]:
        import capo_eks._operations.aws_wesley_frontend.delete_capability

        (
            output,
            http_response,
        ) = await capo_eks._operations.aws_wesley_frontend.delete_capability.async_delete_capability(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteCapability")
    )
    input_: capo_eks.types.delete_capability_request.DeleteCapabilityRequest = {
        "cluster_name": cluster_name,
        "capability_name": capability_name,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output