Skip to content

update_capability

update_capability(
    cluster_name: String,
    capability_name: String,
    *,
    config_overrides: Optional[EKSClientConfig] = None,
    role_arn: Optional[String] = None,
    configuration: Optional[UpdateCapabilityConfiguration] = None,
    client_request_token: Optional[String] = None,
    delete_propagation_policy: Optional[CapabilityDeletePropagationPolicy] = None,
) -> UpdateCapabilityResponse

Updates the configuration of a managed capability in your Amazon EKS cluster. You can update the IAM role, configuration settings, and delete propagation policy for a capability.

When you update a capability, Amazon EKS applies the changes and may restart capability components as needed. The capability remains available during the update process, but some operations may be temporarily unavailable.

Parameters:

  • cluster_name (String) –

    The name of the Amazon EKS cluster that contains the capability you want to update configuration for.

  • capability_name (String) –

    The name of the capability to update configuration for.

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

    The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.

  • configuration (Optional[UpdateCapabilityConfiguration], default: None ) –

    The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.

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

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.

  • delete_propagation_policy (Optional[CapabilityDeletePropagationPolicy], default: None ) –

    The updated delete propagation policy for the capability. Currently, the only supported value is RETAIN.

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/eks.py
def update_capability(
    self,
    cluster_name: "capo_eks.types.string.String",
    capability_name: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[EKSClientConfig] = None,
    role_arn: Optional["capo_eks.types.string.String"] = None,
    configuration: Optional[
        "capo_eks.types.update_capability_configuration.UpdateCapabilityConfiguration"
    ] = None,
    client_request_token: Optional["capo_eks.types.string.String"] = None,
    delete_propagation_policy: Optional[
        "capo_eks.types.capability_delete_propagation_policy.CapabilityDeletePropagationPolicy"
    ] = None,
) -> "capo_eks.types.update_capability_response.UpdateCapabilityResponse":
    """<p>Updates the configuration of a managed capability in your Amazon EKS cluster. You can update the IAM role, configuration settings, and delete propagation policy for a capability.</p> <p>When you update a capability, Amazon EKS applies the changes and may restart capability components as needed. The capability remains available during the update process, but some operations may be temporarily unavailable.</p>

    Args:
        cluster_name: <p>The name of the Amazon EKS cluster that contains the capability you want to update configuration for.</p>
        capability_name: <p>The name of the capability to update configuration for.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.</p>
        configuration: <p>The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.</p>
        client_request_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.</p>
        delete_propagation_policy: <p>The updated delete propagation policy for the capability. Currently, the only supported value is <code>RETAIN</code>.</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.
    """

    def _handler(
        req: "OperationRequest[capo_eks.types.update_capability_request.UpdateCapabilityRequest]",
    ) -> OperationResponse[
        "capo_eks.types.update_capability_response.UpdateCapabilityResponse"
    ]:
        import capo_eks._operations.aws_wesley_frontend.update_capability

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateCapability")
    )
    input_: capo_eks.types.update_capability_request.UpdateCapabilityRequest = {
        "cluster_name": cluster_name,
        "capability_name": capability_name,
    }
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if configuration is not None:
        input_["configuration"] = configuration
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if delete_propagation_policy is not None:
        input_["delete_propagation_policy"] = delete_propagation_policy

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