def apply(
    name: str,
    description: str | None,
    cluster: str | None,
    type: t.Literal["env", "mountfile"],
    path: str | None,
    key_vals: t.List[t.Tuple[str, str]],
    from_literal: bool,
    from_file: t.List[t.Tuple[str, str]],
    _cloud_client: BentoCloudClient = Provide[BentoMLContainer.bentocloud_client],
):
    """Apply a secret update on BentoCloud.

    Pass key value pairs by key1=value1 key2=value2

    Pass key value from file by key1=@./path_to_file1 key2=@./path_to_file2
    """
    try:
        if from_literal:
            click.echo(
                "--from-literal is deprecated and does not take effect.", err=True
            )

        key_vals.extend(from_file)

        if not key_vals:
            raise click.BadParameter("At least one key-value pair is required")

        if type == "mountfile" and not path:
            path = "$BENTOML_HOME"
        secret = _cloud_client.secret.update(
            name=name,
            type=type,
            cluster=cluster,
            description=description,
            path=path,
            key_vals=key_vals,
        )
        rich.print(f"Secret [green]{secret.name}[/] applied successfully")
    except BentoMLException as e:
        raise_secret_error(e, "apply")
Apply a secret update on BentoCloud.

Pass key value pairs by key1=value1 key2=value2

Pass key value from file by key1=@./path_to_file1 key2=@./path_to_file2
src/bentoml_cli/secret.py