## MarkEnvironmentActive `environments.mark_active(EnvironmentMarkActiveParams**kwargs) -> object` **post** `/gitpod.v1.EnvironmentService/MarkEnvironmentActive` Records environment activity to prevent automatic shutdown. Activity signals should be sent every 5 minutes while the environment is actively being used. The source must be between 3-80 characters. ### Examples - Signal VS Code activity: Records VS Code editor activity to prevent environment shutdown. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" activitySignal: source: "VS Code" timestamp: "2025-02-12T14:30:00Z" ``` ### Parameters - `activity_signal: Optional[EnvironmentActivitySignalParam]` activity_signal specifies the activity. - `source: Optional[str]` source of the activity signal, such as "VS Code", "SSH", or "Automations". It should be a human-readable string that describes the source of the activity signal. - `timestamp: Optional[datetime]` timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed. - `environment_id: Optional[str]` The ID of the environment to update activity for. ### Returns - `object` ### Example ```python import os from datetime import datetime from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.environments.mark_active( activity_signal={ "source": "VS Code", "timestamp": datetime.fromisoformat("2025-02-12T14:30:00"), }, environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) print(response) ``` #### Response ```json {} ```