    def update(
        self,
        name: str,
        type: str,
        cluster: str | None = None,
        description: str | None = None,
        path: str | None = None,
        key_vals: t.List[t.Tuple[str, str]] = [],
    ) -> Secret:
        """
        Update an existing secret.

        Args:
            name (str | None): Name of the secret to update.
            description (str | None): New description of the secret.
            type (str | None): New type of the secret.
            path (str | None): New path of the secret.
            key_vals (List[Tuple[str, str]]): New list of key-value pairs for the secret content.

        Returns:
            SecretInfo: A SecretInfo object representing the updated secret.
        """
        secret_schema = UpdateSecretSchema(
            content=SecretContentSchema(
                type=type,
                path=path,
                items=[
                    SecretItem(key=key_val[0], value=key_val[1]) for key_val in key_vals
                ],
            ),
            description=description,
        )
        secret = self._client.v1.update_secret(name, secret_schema, cluster)
        return Secret.from_secret_schema(secret)
Update an existing secret.

Args:
name (str | None): Name of the secret to update.
description (str | None): New description of the secret.
type (str | None): New type of the secret.
path (str | None): New path of the secret.
key_vals (List[Tuple[str, str]]): New list of key-value pairs for the secret content.

Returns:
SecretInfo: A SecretInfo object representing the updated secret.
src/bentoml/_internal/cloud/secret.py