MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / derive_key

Method derive_key

sdk/python/src/dstack_sdk/dstack_client.py:662–679  ·  view source on GitHub ↗

Use ``get_key`` instead (deprecated).

(
        self,
        path: str | None = None,
        subject: str | None = None,
        alt_names: List[str] | None = None,
    )

Source from the content-addressed store, hash-verified

660 self.PATH_PREFIX = "/prpc/Tappd."
661
662 async def derive_key(
663 self,
664 path: str | None = None,
665 subject: str | None = None,
666 alt_names: List[str] | None = None,
667 ) -> GetTlsKeyResponse:
668 """Use ``get_key`` instead (deprecated)."""
669 emit_deprecation_warning("derive_key is deprecated, please use get_key instead")
670
671 data: Dict[str, Any] = {
672 "path": path or "",
673 "subject": subject or path or "",
674 }
675 if alt_names:
676 data["alt_names"] = alt_names
677
678 result = await self._send_rpc_request("DeriveKey", data)
679 return GetTlsKeyResponse(**result)
680
681 async def tdx_quote(
682 self,

Calls 3

emit_deprecation_warningFunction · 0.85
_send_rpc_requestMethod · 0.80
GetTlsKeyResponseClass · 0.70