vantage_sdk.team.crud
Team CRUD SDK using GraphQL API.
Classes
TeamSDK()
SDK for team CRUD operations via GraphQL.
Methods
add_resource(self, ctx: typer.models.Context, team_id: str, resource_id: str, resource_type: str = 'CLUSTER') -> str: Attach a resource to a team and return the API message.add_user(self, ctx: typer.models.Context, team_id: str, user_id: str) -> str: Add a user to a team and return the API message.create(self, ctx: typer.models.Context, resource_data: dict[str, typing.Any], **kwargs: Any) -> dict[str, typing.Any]: Create a team from generic CRUD resource data.create_team(self, ctx: typer.models.Context, name: str, description: str | None = None, sudo_enabled: bool = False) -> dict[str, typing.Any]: Create a team and return the created team payload.delete(self, ctx: typer.models.Context, resource_id: str, **kwargs: Any) -> bool: Delete a team through the generic CRUD interface.delete_team(self, ctx: typer.models.Context, team_id: str) -> str: Delete a team by ID and return the API message.get_team(self, ctx: typer.models.Context, team_id: str) -> dict[str, Any] | None: Fetch a single team by ID.get_team_by_name(self, ctx: typer.models.Context, name: str) -> dict[str, Any] | None: Find a team by name from the list.list_teams(self, ctx: typer.models.Context) -> list[dict[str, typing.Any]]: List all teams visible to the current caller.remove_resource(self, ctx: typer.models.Context, team_id: str, resource_id: str, resource_type: str = 'CLUSTER') -> str: Detach a resource from a team and return the API message.remove_user(self, ctx: typer.models.Context, team_id: str, user_id: str) -> str: Remove a user from a team and return the API message.resolve_team_id(self, ctx: typer.models.Context, name_or_id: str) -> str: Resolve a team name or ID to an ID. UUIDs pass through; names are looked up.update(self, ctx: typer.models.Context, resource_id: str, resource_data: dict[str, typing.Any], **kwargs: Any) -> dict[str, typing.Any]: Reject generic team updates in favor of explicit helper methods.update_roles(self, ctx: typer.models.Context, team_id: str, roles: list[str]) -> dict[str, typing.Any]: Replace the role list for a team.