Skip to content

update_cluster_config async

update_cluster_config(
    name: String,
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    resources_vpc_config: Optional[VpcConfigRequest] = None,
    logging: Optional[Logging] = None,
    client_request_token: Optional[String] = None,
    access_config: Optional[UpdateAccessConfigRequest] = None,
    upgrade_policy: Optional[UpgradePolicyRequest] = None,
    zonal_shift_config: Optional[ZonalShiftConfigRequest] = None,
    compute_config: Optional[ComputeConfigRequest] = None,
    kubernetes_network_config: Optional[KubernetesNetworkConfigRequest] = None,
    storage_config: Optional[StorageConfigRequest] = None,
    remote_network_config: Optional[RemoteNetworkConfigRequest] = None,
    deletion_protection: Optional[BoxedBoolean] = None,
    control_plane_scaling_config: Optional[ControlPlaneScalingConfig] = None,
    kube_api_server_config: Optional[KubeApiServerConfigRequest] = None,
    kube_scheduler_config: Optional[KubeSchedulerConfigRequest] = None,
    kube_controller_manager_config: Optional[KubeControllerManagerConfigRequest] = None,
) -> UpdateClusterConfigResponse

Updates an Amazon EKS cluster configuration. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with DescribeUpdate.

You can use this operation to do the following actions:

  • You can use this API operation to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster control plane logs in the Amazon EKS User Guide .

    CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see CloudWatch Pricing.

  • You can also use this API operation to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. For more information, see Cluster API server endpoint in the Amazon EKS User Guide .

  • You can also use this API operation to choose different subnets and security groups for the cluster. You must specify at least two subnets that are in different Availability Zones. You can't change which VPC the subnets are from, the subnets must be in the same VPC as the subnets that the cluster was created with. For more information about the VPC requirements, see https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html in the Amazon EKS User Guide .

  • You can also use this API operation to enable or disable ARC zonal shift. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.

  • You can also use this API operation to add, change, or remove the configuration in the cluster for EKS Hybrid Nodes. To remove the configuration, use the remoteNetworkConfig key with an object containing both subkeys with empty arrays for each. Here is an inline example: "remoteNetworkConfig": { "remoteNodeNetworks": [], "remotePodNetworks": [] }.

Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to UPDATING (this status transition is eventually consistent). When the update is complete (either Failed or Successful), the cluster status moves to Active.

Parameters:

  • name (String) –

    The name of the Amazon EKS cluster to update.

  • resources_vpc_config (Optional[VpcConfigRequest], default: None ) –

    An object representing the VPC configuration to use for the cluster update. You can use this parameter to update the control plane egress mode, the subnets used by the cluster, the security groups, and the endpoint access settings.

  • logging (Optional[Logging], default: None ) –

    Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs . By default, cluster control plane logs aren't exported to CloudWatch Logs . For more information, see Amazon EKS cluster control plane logs in the Amazon EKS User Guide .

    CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see CloudWatch Pricing.

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

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

  • access_config (Optional[UpdateAccessConfigRequest], default: None ) –

    The access configuration for the cluster.

  • upgrade_policy (Optional[UpgradePolicyRequest], default: None ) –

    You can enable or disable extended support for clusters currently on standard support. You cannot disable extended support once it starts. You must enable extended support before your cluster exits standard support.

  • zonal_shift_config (Optional[ZonalShiftConfigRequest], default: None ) –

    Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.

    Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.

    You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you by enabling zonal autoshift. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS in the Amazon EKS User Guide .

  • compute_config (Optional[ComputeConfigRequest], default: None ) –

    Update the configuration of the compute capability of your EKS Auto Mode cluster. For example, enable the capability.

  • storage_config (Optional[StorageConfigRequest], default: None ) –

    Update the configuration of the block storage capability of your EKS Auto Mode cluster. For example, enable the capability.

  • deletion_protection (Optional[BoxedBoolean], default: None ) –

    Specifies whether to enable or disable deletion protection for the cluster. When enabled (true), the cluster cannot be deleted until deletion protection is explicitly disabled. When disabled (false), the cluster can be deleted normally.

  • control_plane_scaling_config (Optional[ControlPlaneScalingConfig], default: None ) –

    The control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.

  • kube_api_server_config (Optional[KubeApiServerConfigRequest], default: None ) –

    The Kubernetes API server configuration for the updated cluster.

  • kube_scheduler_config (Optional[KubeSchedulerConfigRequest], default: None ) –

    The Kubernetes scheduler configuration for the updated cluster.

  • kube_controller_manager_config (Optional[KubeControllerManagerConfigRequest], default: None ) –

    The Kubernetes controller manager configuration for the updated cluster.

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.

  • ThrottlingException –

    The request or operation couldn't be performed because a service is throttling requests.

  • 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 update_cluster_config(
    self,
    name: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    resources_vpc_config: Optional[
        "capo_eks.types.vpc_config_request.VpcConfigRequest"
    ] = None,
    logging: Optional["capo_eks.types.logging.Logging"] = None,
    client_request_token: Optional["capo_eks.types.string.String"] = None,
    access_config: Optional[
        "capo_eks.types.update_access_config_request.UpdateAccessConfigRequest"
    ] = None,
    upgrade_policy: Optional[
        "capo_eks.types.upgrade_policy_request.UpgradePolicyRequest"
    ] = None,
    zonal_shift_config: Optional[
        "capo_eks.types.zonal_shift_config_request.ZonalShiftConfigRequest"
    ] = None,
    compute_config: Optional[
        "capo_eks.types.compute_config_request.ComputeConfigRequest"
    ] = None,
    kubernetes_network_config: Optional[
        "capo_eks.types.kubernetes_network_config_request.KubernetesNetworkConfigRequest"
    ] = None,
    storage_config: Optional[
        "capo_eks.types.storage_config_request.StorageConfigRequest"
    ] = None,
    remote_network_config: Optional[
        "capo_eks.types.remote_network_config_request.RemoteNetworkConfigRequest"
    ] = None,
    deletion_protection: Optional[
        "capo_eks.types.boxed_boolean.BoxedBoolean"
    ] = None,
    control_plane_scaling_config: Optional[
        "capo_eks.types.control_plane_scaling_config.ControlPlaneScalingConfig"
    ] = None,
    kube_api_server_config: Optional[
        "capo_eks.types.kube_api_server_config_request.KubeApiServerConfigRequest"
    ] = None,
    kube_scheduler_config: Optional[
        "capo_eks.types.kube_scheduler_config_request.KubeSchedulerConfigRequest"
    ] = None,
    kube_controller_manager_config: Optional[
        "capo_eks.types.kube_controller_manager_config_request.KubeControllerManagerConfigRequest"
    ] = None,
) -> "capo_eks.types.update_cluster_config_response.UpdateClusterConfigResponse":
    """<p>Updates an Amazon EKS cluster configuration. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with <code>DescribeUpdate</code>.</p> <p>You can use this operation to do the following actions:</p> <ul> <li> <p>You can use this API operation to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon EKS Cluster control plane logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p> <note> <p>CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">CloudWatch Pricing</a>.</p> </note> </li> <li> <p>You can also use this API operation to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html"> Cluster API server endpoint</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p> </li> <li> <p>You can also use this API operation to choose different subnets and security groups for the cluster. You must specify at least two subnets that are in different Availability Zones. You can't change which VPC the subnets are from, the subnets must be in the same VPC as the subnets that the cluster was created with. For more information about the VPC requirements, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html">https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p> </li> <li> <p>You can also use this API operation to enable or disable ARC zonal shift. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p> </li> <li> <p>You can also use this API operation to add, change, or remove the configuration in the cluster for EKS Hybrid Nodes. To remove the configuration, use the <code>remoteNetworkConfig</code> key with an object containing both subkeys with empty arrays for each. Here is an inline example: <code>"remoteNetworkConfig": { "remoteNodeNetworks": [], "remotePodNetworks": [] }</code>.</p> </li> </ul> <p>Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to <code>UPDATING</code> (this status transition is eventually consistent). When the update is complete (either <code>Failed</code> or <code>Successful</code>), the cluster status moves to <code>Active</code>.</p>

    Args:
        name: <p>The name of the Amazon EKS cluster to update.</p>
        resources_vpc_config: <p>An object representing the VPC configuration to use for the cluster update. You can use this parameter to update the control plane egress mode, the subnets used by the cluster, the security groups, and the endpoint access settings.</p>
        logging: <p>Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs . By default, cluster control plane logs aren't exported to CloudWatch Logs . For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon EKS cluster control plane logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p> <note> <p>CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">CloudWatch Pricing</a>.</p> </note>
        client_request_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        access_config: <p>The access configuration for the cluster.</p>
        upgrade_policy: <p>You can enable or disable extended support for clusters currently on standard support. You cannot disable extended support once it starts. You must enable extended support before your cluster exits standard support.</p>
        zonal_shift_config: <p>Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p> <p>Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.</p> <p>You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you by enabling <i>zonal autoshift</i>. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html">Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
        compute_config: <p>Update the configuration of the compute capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
        storage_config: <p>Update the configuration of the block storage capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
        deletion_protection: <p>Specifies whether to enable or disable deletion protection for the cluster. When enabled (<code>true</code>), the cluster cannot be deleted until deletion protection is explicitly disabled. When disabled (<code>false</code>), the cluster can be deleted normally.</p>
        control_plane_scaling_config: <p>The control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.</p>
        kube_api_server_config: <p>The Kubernetes API server configuration for the updated cluster.</p>
        kube_scheduler_config: <p>The Kubernetes scheduler configuration for the updated cluster.</p>
        kube_controller_manager_config: <p>The Kubernetes controller manager configuration for the updated cluster.</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.throttling_exception.ThrottlingException: <p>The request or operation couldn't be performed because a service is throttling requests.</p>
        capo_eks.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eks.types.update_cluster_config_request.UpdateClusterConfigRequest]",
    ) -> AsyncOperationResponse[
        "capo_eks.types.update_cluster_config_response.UpdateClusterConfigResponse"
    ]:
        import capo_eks._operations.aws_wesley_frontend.update_cluster_config

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateClusterConfig")
    )
    input_: capo_eks.types.update_cluster_config_request.UpdateClusterConfigRequest = {
        "name": name
    }
    if resources_vpc_config is not None:
        input_["resources_vpc_config"] = resources_vpc_config
    if logging is not None:
        input_["logging"] = logging
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if access_config is not None:
        input_["access_config"] = access_config
    if upgrade_policy is not None:
        input_["upgrade_policy"] = upgrade_policy
    if zonal_shift_config is not None:
        input_["zonal_shift_config"] = zonal_shift_config
    if compute_config is not None:
        input_["compute_config"] = compute_config
    if kubernetes_network_config is not None:
        input_["kubernetes_network_config"] = kubernetes_network_config
    if storage_config is not None:
        input_["storage_config"] = storage_config
    if remote_network_config is not None:
        input_["remote_network_config"] = remote_network_config
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection
    if control_plane_scaling_config is not None:
        input_["control_plane_scaling_config"] = control_plane_scaling_config
    if kube_api_server_config is not None:
        input_["kube_api_server_config"] = kube_api_server_config
    if kube_scheduler_config is not None:
        input_["kube_scheduler_config"] = kube_scheduler_config
    if kube_controller_manager_config is not None:
        input_["kube_controller_manager_config"] = kube_controller_manager_config

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