## MarkEnvironmentActive `client.Environments.MarkActive(ctx, body) (*EnvironmentMarkActiveResponse, error)` **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 - `body EnvironmentMarkActiveParams` - `ActivitySignal param.Field[EnvironmentActivitySignal]` activity_signal specifies the activity. - `EnvironmentID param.Field[string]` The ID of the environment to update activity for. ### Returns - `type EnvironmentMarkActiveResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "time" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) response, err := client.Environments.MarkActive(context.TODO(), gitpod.EnvironmentMarkActiveParams{ ActivitySignal: gitpod.F(gitpod.EnvironmentActivitySignalParam{ Source: gitpod.F("VS Code"), Timestamp: gitpod.F(time.Now()), }), EnvironmentID: gitpod.F("07e03a28-65a5-4d98-b532-8ea67b188048"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json {} ```