Skip to content

delete_fargate_profile

delete_fargate_profile(
    cluster_name: String,
    fargate_profile_name: String,
    *,
    config_overrides: Optional[EKSClientConfig] = None,
) -> DeleteFargateProfileResponse

Deletes an Fargate profile.

When you delete a Fargate profile, any Pod running on Fargate that was created with the profile is deleted. If the Pod matches another Fargate profile, then it is scheduled on Fargate with that profile. If it no longer matches any Fargate profiles, then it's not scheduled on Fargate and may remain in a pending state.

Only one Fargate profile in a cluster can be in the DELETING status at a time. You must wait for a Fargate profile to finish deleting before you can delete any other profiles in that cluster.

Parameters:

  • cluster_name (String) –

    The name of your cluster.

  • fargate_profile_name (String) –

    The name of the Fargate profile to delete.

Raises:

  • ClientException –

    These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an IAM principal that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.

  • InvalidParameterException –

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

  • 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/eks.py
def delete_fargate_profile(
    self,
    cluster_name: "capo_eks.types.string.String",
    fargate_profile_name: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[EKSClientConfig] = None,
) -> "capo_eks.types.delete_fargate_profile_response.DeleteFargateProfileResponse":
    """<p>Deletes an Fargate profile.</p> <p>When you delete a Fargate profile, any <code>Pod</code> running on Fargate that was created with the profile is deleted. If the <code>Pod</code> matches another Fargate profile, then it is scheduled on Fargate with that profile. If it no longer matches any Fargate profiles, then it's not scheduled on Fargate and may remain in a pending state.</p> <p>Only one Fargate profile in a cluster can be in the <code>DELETING</code> status at a time. You must wait for a Fargate profile to finish deleting before you can delete any other profiles in that cluster.</p>

    Args:
        cluster_name: <p>The name of your cluster.</p>
        fargate_profile_name: <p>The name of the Fargate profile to delete.</p>

    Raises:
        capo_eks.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html">IAM principal</a> that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.</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_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.
    """

    def _handler(
        req: "OperationRequest[capo_eks.types.delete_fargate_profile_request.DeleteFargateProfileRequest]",
    ) -> OperationResponse[
        "capo_eks.types.delete_fargate_profile_response.DeleteFargateProfileResponse"
    ]:
        import capo_eks._operations.aws_wesley_frontend.delete_fargate_profile

        output, http_response = (
            capo_eks._operations.aws_wesley_frontend.delete_fargate_profile.delete_fargate_profile(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteFargateProfile")
    )
    input_: capo_eks.types.delete_fargate_profile_request.DeleteFargateProfileRequest = {
        "cluster_name": cluster_name,
        "fargate_profile_name": fargate_profile_name,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output