Module
Utility functions for project operations.resolve_project_id
project_id
(Optional[str]
): The project ID. If provided, returns it (optionally validating it exists).project_name
(Optional[str]
): The project name. If provided, looks up and returns the project ID.allow_none
(bool
): If True, allows both parameters to be None and returns None. If False, raises ValueError when both are None. Defaults to False.validate
(bool
): If True, validates that the project exists. If False, skips validation. Defaults to True.
ValueError
: If both project_id and project_name are provided, or if neither is provided and allow_none=False, or if the project doesn’t exist (when validate=True).
Optional[str]
: The resolved project ID, or None if neither was provided and allow_none=True.