Skip to content

update_nodegroup_config

update_nodegroup_config(
    cluster_name: String,
    nodegroup_name: String,
    *,
    config_overrides: Optional[EKSClientConfig] = None,
    labels: Optional[UpdateLabelsPayload] = None,
    taints: Optional[UpdateTaintsPayload] = None,
    scaling_config: Optional[NodegroupScalingConfig] = None,
    update_config: Optional[NodegroupUpdateConfig] = None,
    node_repair_config: Optional[NodeRepairConfig] = None,
    warm_pool_config: Optional[WarmPoolConfig] = None,
    client_request_token: Optional[String] = None,
) -> UpdateNodegroupConfigResponse

Updates an Amazon EKS managed node group configuration. Your node group continues to function during the update. The response output includes an update ID that you can use to track the status of your node group update with the DescribeUpdate API operation. You can update the Kubernetes labels and taints for a node group and the scaling and version update configuration.

Parameters:

  • cluster_name (String) –

    The name of your cluster.

  • nodegroup_name (String) –

    The name of the managed node group to update.

  • labels (Optional[UpdateLabelsPayload], default: None ) –

    The Kubernetes labels to apply to the nodes in the node group after the update.

  • taints (Optional[UpdateTaintsPayload], default: None ) –

    The Kubernetes taints to be applied to the nodes in the node group after the update. For more information, see Node taints on managed node groups.

  • scaling_config (Optional[NodegroupScalingConfig], default: None ) –

    The scaling configuration details for the Auto Scaling group after the update.

  • update_config (Optional[NodegroupUpdateConfig], default: None ) –

    The node group update configuration.

  • node_repair_config (Optional[NodeRepairConfig], default: None ) –

    The node auto repair configuration for the node group.

  • warm_pool_config (Optional[WarmPoolConfig], default: None ) –

    The warm pool configuration to apply to the node group. You can use this to add a warm pool to an existing node group or modify the settings of an existing warm pool.

  • client_request_token (Optional[String], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

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.

  • InvalidRequestException –

    The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.

  • 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/eks.py
def update_nodegroup_config(
    self,
    cluster_name: "capo_eks.types.string.String",
    nodegroup_name: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[EKSClientConfig] = None,
    labels: Optional[
        "capo_eks.types.update_labels_payload.UpdateLabelsPayload"
    ] = None,
    taints: Optional[
        "capo_eks.types.update_taints_payload.UpdateTaintsPayload"
    ] = None,
    scaling_config: Optional[
        "capo_eks.types.nodegroup_scaling_config.NodegroupScalingConfig"
    ] = None,
    update_config: Optional[
        "capo_eks.types.nodegroup_update_config.NodegroupUpdateConfig"
    ] = None,
    node_repair_config: Optional[
        "capo_eks.types.node_repair_config.NodeRepairConfig"
    ] = None,
    warm_pool_config: Optional[
        "capo_eks.types.warm_pool_config.WarmPoolConfig"
    ] = None,
    client_request_token: Optional["capo_eks.types.string.String"] = None,
) -> (
    "capo_eks.types.update_nodegroup_config_response.UpdateNodegroupConfigResponse"
):
    """<p>Updates an Amazon EKS managed node group configuration. Your node group continues to function during the update. The response output includes an update ID that you can use to track the status of your node group update with the <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeUpdate.html"> <code>DescribeUpdate</code> </a> API operation. You can update the Kubernetes labels and taints for a node group and the scaling and version update configuration.</p>

    Args:
        cluster_name: <p>The name of your cluster.</p>
        nodegroup_name: <p>The name of the managed node group to update.</p>
        labels: <p>The Kubernetes <code>labels</code> to apply to the nodes in the node group after the update.</p>
        taints: <p>The Kubernetes taints to be applied to the nodes in the node group after the update. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html">Node taints on managed node groups</a>.</p>
        scaling_config: <p>The scaling configuration details for the Auto Scaling group after the update.</p>
        update_config: <p>The node group update configuration.</p>
        node_repair_config: <p>The node auto repair configuration for the node group.</p>
        warm_pool_config: <p>The warm pool configuration to apply to the node group. You can use this to add a warm pool to an existing node group or modify the settings of an existing warm pool.</p>
        client_request_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</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.invalid_request_exception.InvalidRequestException: <p>The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.</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.
    """

    def _handler(
        req: "OperationRequest[capo_eks.types.update_nodegroup_config_request.UpdateNodegroupConfigRequest]",
    ) -> OperationResponse[
        "capo_eks.types.update_nodegroup_config_response.UpdateNodegroupConfigResponse"
    ]:
        import capo_eks._operations.aws_wesley_frontend.update_nodegroup_config

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateNodegroupConfig")
    )
    input_: capo_eks.types.update_nodegroup_config_request.UpdateNodegroupConfigRequest = {
        "cluster_name": cluster_name,
        "nodegroup_name": nodegroup_name,
    }
    if labels is not None:
        input_["labels"] = labels
    if taints is not None:
        input_["taints"] = taints
    if scaling_config is not None:
        input_["scaling_config"] = scaling_config
    if update_config is not None:
        input_["update_config"] = update_config
    if node_repair_config is not None:
        input_["node_repair_config"] = node_repair_config
    if warm_pool_config is not None:
        input_["warm_pool_config"] = warm_pool_config
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token

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