# Policies ## GetOrganizationPolicies `client.organizations.policies.retrieve(PolicyRetrieveParamsbody, RequestOptionsoptions?): PolicyRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetOrganizationPolicies` Gets organization policy settings by organization ID. Use this method to: - Retrieve current policy settings for an organization - View resource limits and restrictions - Check allowed editors and other configurations ### Examples - Get organization policies: Retrieves policy settings for a specific organization. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `body: PolicyRetrieveParams` - `organizationId: string` organization_id is the ID of the organization to retrieve policies for ### Returns - `PolicyRetrieveResponse` - `policies: OrganizationPolicies` - `agentPolicy: AgentPolicy` agent_policy contains agent-specific policy settings - `commandDenyList: Array` command_deny_list contains a list of commands that agents are not allowed to execute - `mcpDisabled: boolean` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scmToolsDisabled: boolean` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `allowedAgentIds?: Array` allowed_agent_ids contains the agent IDs users may select when the codex_rollout feature flag is enabled. Empty means all agents are allowed. - `allowedCodexModels?: Array` Deprecated: use codex_model_policy. This legacy allowlist cannot distinguish omitted from intentionally empty on update requests. Empty means all Codex models are allowed. - `"CODEX_OPEN_AI_MODEL_UNSPECIFIED"` - `"CODEX_OPEN_AI_MODEL_GPT_5_5"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4_MINI"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK"` - `"CODEX_OPEN_AI_MODEL_GPT_5_2"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_SOL"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA"` - `allowedCodexReasoningEfforts?: Array` allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may select when the codex_rollout feature flag is enabled. Empty means all Codex reasoning efforts are allowed. - `"CODEX_REASONING_EFFORT_UNSPECIFIED"` - `"CODEX_REASONING_EFFORT_LOW"` - `"CODEX_REASONING_EFFORT_MEDIUM"` - `"CODEX_REASONING_EFFORT_HIGH"` - `"CODEX_REASONING_EFFORT_EXTRA_HIGH"` - `allowedCodexServiceTiers?: Array` allowed_codex_service_tiers contains the Codex service tiers users may select when the codex_rollout feature flag is enabled. Empty means all Codex service tiers are allowed. - `"CODEX_SERVICE_TIER_UNSPECIFIED"` - `"CODEX_SERVICE_TIER_FAST"` - `codexModelPolicy?: CodexModelPolicy` codex_model_policy contains explicit per-model Codex availability states. Missing policy or missing model entries mean allowed. - `modelStates?: Record` model_states maps CodexOpenAIModel enum names to explicit policy states. Missing entries are treated as allowed. - `"CODEX_MODEL_POLICY_STATE_UNSPECIFIED"` - `"CODEX_MODEL_POLICY_STATE_ALLOWED"` - `"CODEX_MODEL_POLICY_STATE_DISABLED"` - `conversationSharingPolicy?: ConversationSharingPolicy` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `maxSubagentsPerEnvironment?: number` max_subagents_per_environment limits the number of non-terminal sub-agents a parent can have running simultaneously in the same environment. Valid range: 0-10. Zero means use the default (5). - `scmToolsAllowedGroupId?: string` scm_tools_allowed_group_id restricts SCM tools access to members of this group. Empty means no restriction (all users can use SCM tools if not disabled). - `allowedEditorIds: Array` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allowLocalRunners: boolean` allow_local_runners controls whether local runners are allowed to be used in the organization - `defaultEditorId: string` default_editor_id is the default editor ID to be used when a user doesn't specify one - `defaultEnvironmentImage: string` default_environment_image is the default container image when none is defined in repo - `disableFromScratch: boolean` disable_from_scratch controls whether non-admin users can create blank environments without a Git or URL initializer. - `maximumEnvironmentsPerUser: string` maximum_environments_per_user limits total environments (running or stopped) per user - `maximumRunningEnvironmentsPerUser: string` maximum_running_environments_per_user limits simultaneously running environments per user - `membersCreateProjects: boolean` members_create_projects controls whether members can create projects - `membersRequireProjects: boolean` members_require_projects controls whether environments can only be created from projects by non-admin users - `organizationId: string` organization_id is the ID of the organization - `portSharingDisabled: boolean` port_sharing_disabled controls whether user-initiated port sharing is disabled in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. - `requireCustomDomainAccess: boolean` require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. - `restrictAccountCreationToScim: boolean` restrict_account_creation_to_scim controls whether account creation is restricted to SCIM-provisioned users only. When true and SCIM is configured for the organization, only users provisioned via SCIM can create accounts. - `webBrowserDisabled: boolean` web_browser_disabled controls whether users can open the built-in web browser from environment pages. This does not affect VS Code Browser. - `deleteArchivedEnvironmentsAfter?: string` delete_archived_environments_after controls how long archived environments are kept before automatic deletion. 0 means no automatic deletion. Maximum duration is 4 weeks (2419200 seconds). - `editorVersionRestrictions?: Record` editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy, editor_version_restrictions not set means no restrictions. If empty or not set for an editor, we will use the latest version of the editor - `allowedVersions?: Array` allowed_versions lists the versions that are allowed If empty, we will use the latest version of the editor Examples for JetBrains: `["2025.2", "2025.1", "2024.3"]` - `maximumEnvironmentLifetime?: string` maximum_environment_lifetime controls for how long environments are allowed to be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000 seconds). - `maximumEnvironmentTimeout?: string` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `securityAgentPolicy?: SecurityAgentPolicy` security_agent_policy contains security agent configuration for the organization. When configured, security agents are automatically deployed to all environments. - `crowdstrike?: CrowdStrikeConfig` crowdstrike contains CrowdStrike Falcon configuration - `additionalOptions?: Record` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cidSecretId?: string` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled?: boolean` enabled controls whether CrowdStrike Falcon is deployed to environments - `image?: string` image is the CrowdStrike Falcon sensor container image reference - `tags?: string` tags are optional tags to apply to the Falcon sensor (comma-separated) - `securityPolicyId?: string` security_policy_id references the Veto Exec SecurityPolicy assigned to newly created environments. The public GA contract accepts policies that use only SecurityPolicy.Spec.executables. Assignment validates materializability and rejects unsupported executable selectors or effects. If empty, new environments have no SecurityPolicy by default. - `vetoExecPolicy?: VetoExecPolicy` veto_exec_policy contains the veto exec policy for environments. - `action?: KernelControlsAction` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled?: boolean` enabled controls whether executable blocking is active - `executables?: Array` executables is the list of executable paths or names to block ### Example ```typescript import Gitpod from '@gitpod/sdk'; const client = new Gitpod({ bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted }); const policy = await client.organizations.policies.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); console.log(policy.policies); ``` #### Response ```json { "policies": { "agentPolicy": { "commandDenyList": [ "string" ], "mcpDisabled": true, "scmToolsDisabled": true, "allowedAgentIds": [ "string" ], "allowedCodexModels": [ "CODEX_OPEN_AI_MODEL_UNSPECIFIED" ], "allowedCodexReasoningEfforts": [ "CODEX_REASONING_EFFORT_UNSPECIFIED" ], "allowedCodexServiceTiers": [ "CODEX_SERVICE_TIER_UNSPECIFIED" ], "codexModelPolicy": { "modelStates": { "foo": "CODEX_MODEL_POLICY_STATE_UNSPECIFIED" } }, "conversationSharingPolicy": "CONVERSATION_SHARING_POLICY_UNSPECIFIED", "goalModeDisabled": true, "maxSubagentsPerEnvironment": 10, "scmToolsAllowedGroupId": "scmToolsAllowedGroupId" }, "allowedEditorIds": [ "string" ], "allowLocalRunners": true, "defaultEditorId": "defaultEditorId", "defaultEnvironmentImage": "defaultEnvironmentImage", "disableFromScratch": true, "maximumEnvironmentsPerUser": "maximumEnvironmentsPerUser", "maximumRunningEnvironmentsPerUser": "maximumRunningEnvironmentsPerUser", "membersCreateProjects": true, "membersRequireProjects": true, "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "portSharingDisabled": true, "requireCustomDomainAccess": true, "restrictAccountCreationToScim": true, "webBrowserDisabled": true, "archiveEnvironmentsAfter": "+9125115.360s", "deleteArchivedEnvironmentsAfter": "+9125115.360s", "editorVersionRestrictions": { "foo": { "allowedVersions": [ "string" ] } }, "maximumEnvironmentLifetime": "+9125115.360s", "maximumEnvironmentLifetimeStrict": true, "maximumEnvironmentTimeout": "+9125115.360s", "maxPortAdmissionLevel": "ADMISSION_LEVEL_UNSPECIFIED", "securityAgentPolicy": { "crowdstrike": { "additionalOptions": { "foo": "string" }, "cidSecretId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "image": "image", "tags": "tags" }, "customAgents": [ { "id": "id", "description": "description", "enabled": true, "envMappings": [ { "name": "name", "secretName": "secretName" } ], "name": "name", "startCommand": "startCommand" } ] }, "securityPolicyId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "vetoExecPolicy": { "action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "enabled": true, "executables": [ "string" ], "safelist": [ "string" ] }, "vetoFilePolicy": { "blockDevices": { "action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "enabled": true }, "enabled": true, "paths": { "defaultEffect": "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "defaultSurface": "VETO_FILE_SURFACE_UNSPECIFIED", "entries": [ { "effect": "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "path": "path", "surface": "VETO_FILE_SURFACE_UNSPECIFIED", "trackChanges": true } ] } } } } ``` ## UpdateOrganizationPolicies `client.organizations.policies.update(PolicyUpdateParamsbody, RequestOptionsoptions?): PolicyUpdateResponse` **post** `/gitpod.v1.OrganizationService/UpdateOrganizationPolicies` Updates organization policy settings. Use this method to: - Configure editor restrictions - Set environment resource limits - Define project creation permissions - Customize default configurations ### Examples - Update editor policies: Restricts available editors and sets a default. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" allowedEditorIds: - "vscode" - "jetbrains" defaultEditorId: "vscode" ``` - Set environment limits: Configures limits for environment usage. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" maximumEnvironmentTimeout: "3600s" maximumRunningEnvironmentsPerUser: "5" maximumEnvironmentsPerUser: "20" ``` ### Parameters - `body: PolicyUpdateParams` - `organizationId: string` organization_id is the ID of the organization to update policies for - `agentPolicy?: AgentPolicy | null` agent_policy contains agent-specific policy settings - `allowedAgentIds?: Array` allowed_agent_ids contains the agent IDs users may select when the codex_rollout feature flag is enabled. Empty means all agents are allowed. - `allowedCodexModels?: Array` Deprecated: use codex_model_policy. This legacy allowlist cannot distinguish omitted from intentionally empty on update requests. Empty means all Codex models are allowed. - `"CODEX_OPEN_AI_MODEL_UNSPECIFIED"` - `"CODEX_OPEN_AI_MODEL_GPT_5_5"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4_MINI"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK"` - `"CODEX_OPEN_AI_MODEL_GPT_5_2"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_SOL"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA"` - `allowedCodexReasoningEfforts?: Array` allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may select when the codex_rollout feature flag is enabled. Empty means all Codex reasoning efforts are allowed. - `"CODEX_REASONING_EFFORT_UNSPECIFIED"` - `"CODEX_REASONING_EFFORT_LOW"` - `"CODEX_REASONING_EFFORT_MEDIUM"` - `"CODEX_REASONING_EFFORT_HIGH"` - `"CODEX_REASONING_EFFORT_EXTRA_HIGH"` - `allowedCodexServiceTiers?: Array` allowed_codex_service_tiers contains the Codex service tiers users may select when the codex_rollout feature flag is enabled. Empty means all Codex service tiers are allowed. - `"CODEX_SERVICE_TIER_UNSPECIFIED"` - `"CODEX_SERVICE_TIER_FAST"` - `codexModelPolicy?: CodexModelPolicy` codex_model_policy contains explicit per-model Codex availability states. Omit to leave the current model policy unchanged. Send an empty policy to clear explicit model states. - `modelStates?: Record` model_states maps CodexOpenAIModel enum names to explicit policy states. Missing entries are treated as allowed. - `"CODEX_MODEL_POLICY_STATE_UNSPECIFIED"` - `"CODEX_MODEL_POLICY_STATE_ALLOWED"` - `"CODEX_MODEL_POLICY_STATE_DISABLED"` - `commandDenyList?: Array` command_deny_list contains a list of commands that agents are not allowed to execute - `conversationSharingPolicy?: ConversationSharingPolicy | null` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `maxSubagentsPerEnvironment?: number | null` max_subagents_per_environment limits the number of non-terminal sub-agents a parent can have running simultaneously in the same environment. Valid range: 0-10. Zero means use the default (5). - `mcpDisabled?: boolean | null` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scmToolsAllowedGroupId?: string | null` scm_tools_allowed_group_id restricts SCM tools access to members of this group. Empty means no restriction (all users can use SCM tools if not disabled). - `scmToolsDisabled?: boolean | null` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `allowedEditorIds?: Array` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allowLocalRunners?: boolean | null` allow_local_runners controls whether local runners are allowed to be used in the organization - `defaultEditorId?: string | null` default_editor_id is the default editor ID to be used when a user doesn't specify one - `defaultEnvironmentImage?: string | null` default_environment_image is the default container image when none is defined in repo - `deleteArchivedEnvironmentsAfter?: string | null` delete_archived_environments_after controls how long archived environments are kept before automatic deletion. 0 means no automatic deletion. Maximum duration is 4 weeks (2419200 seconds). - `disableFromScratch?: boolean | null` disable_from_scratch controls whether non-admin users can create blank environments without a Git or URL initializer. - `editorVersionRestrictions?: Record` editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy with allowed major versions. - `allowedVersions?: Array` allowed_versions lists the versions that are allowed If empty, we will use the latest version of the editor Examples for JetBrains: `["2025.2", "2025.1", "2024.3"]` - `maximumEnvironmentLifetime?: string | null` maximum_environment_lifetime controls for how long environments are allowed to be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000 seconds). - `maximumEnvironmentsPerUser?: string | null` maximum_environments_per_user limits total environments (running or stopped) per user - `maximumEnvironmentTimeout?: string | null` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `maximumRunningEnvironmentsPerUser?: string | null` maximum_running_environments_per_user limits simultaneously running environments per user - `maxPortAdmissionLevel?: AdmissionLevel | null` max_port_admission_level caps the maximum admission level a user-opened port may use. UNSPECIFIED means no cap (any AdmissionLevel value is allowed). System ports (VS Code Browser, agents) are exempt. The legacy port_sharing_disabled field, when true, takes precedence and blocks all user-initiated port sharing. - `"ADMISSION_LEVEL_UNSPECIFIED"` - `"ADMISSION_LEVEL_OWNER_ONLY"` - `"ADMISSION_LEVEL_EVERYONE"` - `"ADMISSION_LEVEL_ORGANIZATION"` - `"ADMISSION_LEVEL_CREATOR_ONLY"` - `membersCreateProjects?: boolean | null` members_create_projects controls whether members can create projects - `membersRequireProjects?: boolean | null` members_require_projects controls whether environments can only be created from projects by non-admin users - `portSharingDisabled?: boolean | null` port_sharing_disabled controls whether user-initiated port sharing is disabled in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. - `requireCustomDomainAccess?: boolean | null` require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. - `restrictAccountCreationToScim?: boolean | null` restrict_account_creation_to_scim controls whether account creation is restricted to SCIM-provisioned users only. When true and SCIM is configured for the organization, only users provisioned via SCIM can create accounts. - `securityAgentPolicy?: SecurityAgentPolicy | null` security_agent_policy contains security agent configuration updates - `crowdstrike?: Crowdstrike | null` crowdstrike contains CrowdStrike Falcon configuration updates - `additionalOptions?: Record` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs - `cidSecretId?: string | null` cid_secret_id references an organization secret containing the Customer ID (CID) - `enabled?: boolean | null` enabled controls whether CrowdStrike Falcon is deployed to environments - `image?: string | null` image is the CrowdStrike Falcon sensor container image reference - `tags?: string | null` tags are optional tags to apply to the Falcon sensor - `securityPolicyId?: string | null` security_policy_id assigns a Veto Exec SecurityPolicy to newly created environments. The public GA contract accepts policies that use only SecurityPolicy.Spec.executables. Assignment validates materializability and rejects unsupported executable selectors or effects. Set this field to an empty string to clear the default assignment. - `vetoExecPolicy?: VetoExecPolicy | null` veto_exec_policy contains the veto exec policy for environments. - `action?: KernelControlsAction` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled?: boolean` enabled controls whether executable blocking is active - `executables?: Array` executables is the list of executable paths or names to block - `webBrowserDisabled?: boolean | null` web_browser_disabled controls whether users can open the built-in web browser from environment pages. This does not affect VS Code Browser. ### Returns - `PolicyUpdateResponse = unknown` ### Example ```typescript import Gitpod from '@gitpod/sdk'; const client = new Gitpod({ bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted }); const policy = await client.organizations.policies.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', maximumEnvironmentsPerUser: '20', maximumEnvironmentTimeout: '3600s', maximumRunningEnvironmentsPerUser: '5', }); console.log(policy); ``` #### Response ```json {} ``` ## Domain Types ### Agent Policy - `AgentPolicy` AgentPolicy contains agent-specific policy settings for an organization - `commandDenyList: Array` command_deny_list contains a list of commands that agents are not allowed to execute - `mcpDisabled: boolean` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scmToolsDisabled: boolean` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `allowedAgentIds?: Array` allowed_agent_ids contains the agent IDs users may select when the codex_rollout feature flag is enabled. Empty means all agents are allowed. - `allowedCodexModels?: Array` Deprecated: use codex_model_policy. This legacy allowlist cannot distinguish omitted from intentionally empty on update requests. Empty means all Codex models are allowed. - `"CODEX_OPEN_AI_MODEL_UNSPECIFIED"` - `"CODEX_OPEN_AI_MODEL_GPT_5_5"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4_MINI"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK"` - `"CODEX_OPEN_AI_MODEL_GPT_5_2"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_SOL"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA"` - `allowedCodexReasoningEfforts?: Array` allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may select when the codex_rollout feature flag is enabled. Empty means all Codex reasoning efforts are allowed. - `"CODEX_REASONING_EFFORT_UNSPECIFIED"` - `"CODEX_REASONING_EFFORT_LOW"` - `"CODEX_REASONING_EFFORT_MEDIUM"` - `"CODEX_REASONING_EFFORT_HIGH"` - `"CODEX_REASONING_EFFORT_EXTRA_HIGH"` - `allowedCodexServiceTiers?: Array` allowed_codex_service_tiers contains the Codex service tiers users may select when the codex_rollout feature flag is enabled. Empty means all Codex service tiers are allowed. - `"CODEX_SERVICE_TIER_UNSPECIFIED"` - `"CODEX_SERVICE_TIER_FAST"` - `codexModelPolicy?: CodexModelPolicy` codex_model_policy contains explicit per-model Codex availability states. Missing policy or missing model entries mean allowed. - `modelStates?: Record` model_states maps CodexOpenAIModel enum names to explicit policy states. Missing entries are treated as allowed. - `"CODEX_MODEL_POLICY_STATE_UNSPECIFIED"` - `"CODEX_MODEL_POLICY_STATE_ALLOWED"` - `"CODEX_MODEL_POLICY_STATE_DISABLED"` - `conversationSharingPolicy?: ConversationSharingPolicy` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `maxSubagentsPerEnvironment?: number` max_subagents_per_environment limits the number of non-terminal sub-agents a parent can have running simultaneously in the same environment. Valid range: 0-10. Zero means use the default (5). - `scmToolsAllowedGroupId?: string` scm_tools_allowed_group_id restricts SCM tools access to members of this group. Empty means no restriction (all users can use SCM tools if not disabled). ### Codex Model Policy - `CodexModelPolicy` CodexModelPolicy controls per-model availability for Codex. - `modelStates?: Record` model_states maps CodexOpenAIModel enum names to explicit policy states. Missing entries are treated as allowed. - `"CODEX_MODEL_POLICY_STATE_UNSPECIFIED"` - `"CODEX_MODEL_POLICY_STATE_ALLOWED"` - `"CODEX_MODEL_POLICY_STATE_DISABLED"` ### Conversation Sharing Policy - `ConversationSharingPolicy = "CONVERSATION_SHARING_POLICY_UNSPECIFIED" | "CONVERSATION_SHARING_POLICY_DISABLED" | "CONVERSATION_SHARING_POLICY_ORGANIZATION"` ConversationSharingPolicy controls how agent conversations can be shared. - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` ### Crowd Strike Config - `CrowdStrikeConfig` CrowdStrikeConfig configures CrowdStrike Falcon sensor deployment - `additionalOptions?: Record` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cidSecretId?: string` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled?: boolean` enabled controls whether CrowdStrike Falcon is deployed to environments - `image?: string` image is the CrowdStrike Falcon sensor container image reference - `tags?: string` tags are optional tags to apply to the Falcon sensor (comma-separated) ### Custom Agent Env Mapping - `CustomAgentEnvMapping` CustomAgentEnvMapping maps a script placeholder to an organization secret. The backend resolves the secret name to a UUID at runtime. - `name?: string` name is the environment variable name used as a placeholder in the start command. - `secretName?: string` secret_name is the name of the organization secret whose value populates this placeholder. ### Custom Security Agent - `CustomSecurityAgent` CustomSecurityAgent defines a custom security agent configured by an organization admin. - `id?: string` id is a unique identifier for this custom agent within the organization. Server-generated at save time if empty. - `description?: string` description is a human-readable description of what this agent does - `enabled?: boolean` enabled controls whether this custom agent is deployed to environments - `envMappings?: Array` env_mappings maps script placeholders to organization secret names, resolved to secret values at runtime. - `name?: string` name is the environment variable name used as a placeholder in the start command. - `secretName?: string` secret_name is the name of the organization secret whose value populates this placeholder. - `name?: string` name is the display name for this custom agent - `startCommand?: string` start_command is the shell script that starts the agent ### Organization Policies - `OrganizationPolicies` - `agentPolicy: AgentPolicy` agent_policy contains agent-specific policy settings - `commandDenyList: Array` command_deny_list contains a list of commands that agents are not allowed to execute - `mcpDisabled: boolean` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scmToolsDisabled: boolean` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `allowedAgentIds?: Array` allowed_agent_ids contains the agent IDs users may select when the codex_rollout feature flag is enabled. Empty means all agents are allowed. - `allowedCodexModels?: Array` Deprecated: use codex_model_policy. This legacy allowlist cannot distinguish omitted from intentionally empty on update requests. Empty means all Codex models are allowed. - `"CODEX_OPEN_AI_MODEL_UNSPECIFIED"` - `"CODEX_OPEN_AI_MODEL_GPT_5_5"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4_MINI"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK"` - `"CODEX_OPEN_AI_MODEL_GPT_5_2"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_SOL"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA"` - `allowedCodexReasoningEfforts?: Array` allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may select when the codex_rollout feature flag is enabled. Empty means all Codex reasoning efforts are allowed. - `"CODEX_REASONING_EFFORT_UNSPECIFIED"` - `"CODEX_REASONING_EFFORT_LOW"` - `"CODEX_REASONING_EFFORT_MEDIUM"` - `"CODEX_REASONING_EFFORT_HIGH"` - `"CODEX_REASONING_EFFORT_EXTRA_HIGH"` - `allowedCodexServiceTiers?: Array` allowed_codex_service_tiers contains the Codex service tiers users may select when the codex_rollout feature flag is enabled. Empty means all Codex service tiers are allowed. - `"CODEX_SERVICE_TIER_UNSPECIFIED"` - `"CODEX_SERVICE_TIER_FAST"` - `codexModelPolicy?: CodexModelPolicy` codex_model_policy contains explicit per-model Codex availability states. Missing policy or missing model entries mean allowed. - `modelStates?: Record` model_states maps CodexOpenAIModel enum names to explicit policy states. Missing entries are treated as allowed. - `"CODEX_MODEL_POLICY_STATE_UNSPECIFIED"` - `"CODEX_MODEL_POLICY_STATE_ALLOWED"` - `"CODEX_MODEL_POLICY_STATE_DISABLED"` - `conversationSharingPolicy?: ConversationSharingPolicy` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `maxSubagentsPerEnvironment?: number` max_subagents_per_environment limits the number of non-terminal sub-agents a parent can have running simultaneously in the same environment. Valid range: 0-10. Zero means use the default (5). - `scmToolsAllowedGroupId?: string` scm_tools_allowed_group_id restricts SCM tools access to members of this group. Empty means no restriction (all users can use SCM tools if not disabled). - `allowedEditorIds: Array` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allowLocalRunners: boolean` allow_local_runners controls whether local runners are allowed to be used in the organization - `defaultEditorId: string` default_editor_id is the default editor ID to be used when a user doesn't specify one - `defaultEnvironmentImage: string` default_environment_image is the default container image when none is defined in repo - `disableFromScratch: boolean` disable_from_scratch controls whether non-admin users can create blank environments without a Git or URL initializer. - `maximumEnvironmentsPerUser: string` maximum_environments_per_user limits total environments (running or stopped) per user - `maximumRunningEnvironmentsPerUser: string` maximum_running_environments_per_user limits simultaneously running environments per user - `membersCreateProjects: boolean` members_create_projects controls whether members can create projects - `membersRequireProjects: boolean` members_require_projects controls whether environments can only be created from projects by non-admin users - `organizationId: string` organization_id is the ID of the organization - `portSharingDisabled: boolean` port_sharing_disabled controls whether user-initiated port sharing is disabled in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. - `requireCustomDomainAccess: boolean` require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. - `restrictAccountCreationToScim: boolean` restrict_account_creation_to_scim controls whether account creation is restricted to SCIM-provisioned users only. When true and SCIM is configured for the organization, only users provisioned via SCIM can create accounts. - `webBrowserDisabled: boolean` web_browser_disabled controls whether users can open the built-in web browser from environment pages. This does not affect VS Code Browser. - `deleteArchivedEnvironmentsAfter?: string` delete_archived_environments_after controls how long archived environments are kept before automatic deletion. 0 means no automatic deletion. Maximum duration is 4 weeks (2419200 seconds). - `editorVersionRestrictions?: Record` editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy, editor_version_restrictions not set means no restrictions. If empty or not set for an editor, we will use the latest version of the editor - `allowedVersions?: Array` allowed_versions lists the versions that are allowed If empty, we will use the latest version of the editor Examples for JetBrains: `["2025.2", "2025.1", "2024.3"]` - `maximumEnvironmentLifetime?: string` maximum_environment_lifetime controls for how long environments are allowed to be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000 seconds). - `maximumEnvironmentTimeout?: string` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `securityAgentPolicy?: SecurityAgentPolicy` security_agent_policy contains security agent configuration for the organization. When configured, security agents are automatically deployed to all environments. - `crowdstrike?: CrowdStrikeConfig` crowdstrike contains CrowdStrike Falcon configuration - `additionalOptions?: Record` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cidSecretId?: string` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled?: boolean` enabled controls whether CrowdStrike Falcon is deployed to environments - `image?: string` image is the CrowdStrike Falcon sensor container image reference - `tags?: string` tags are optional tags to apply to the Falcon sensor (comma-separated) - `securityPolicyId?: string` security_policy_id references the Veto Exec SecurityPolicy assigned to newly created environments. The public GA contract accepts policies that use only SecurityPolicy.Spec.executables. Assignment validates materializability and rejects unsupported executable selectors or effects. If empty, new environments have no SecurityPolicy by default. - `vetoExecPolicy?: VetoExecPolicy` veto_exec_policy contains the veto exec policy for environments. - `action?: KernelControlsAction` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled?: boolean` enabled controls whether executable blocking is active - `executables?: Array` executables is the list of executable paths or names to block ### Security Agent Policy - `SecurityAgentPolicy` SecurityAgentPolicy contains security agent configuration for an organization. When enabled, security agents are automatically deployed to all environments. - `crowdstrike?: CrowdStrikeConfig` crowdstrike contains CrowdStrike Falcon configuration - `additionalOptions?: Record` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cidSecretId?: string` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled?: boolean` enabled controls whether CrowdStrike Falcon is deployed to environments - `image?: string` image is the CrowdStrike Falcon sensor container image reference - `tags?: string` tags are optional tags to apply to the Falcon sensor (comma-separated) ### Veto Exec Policy - `VetoExecPolicy` VetoExecPolicy defines the policy for blocking or auditing executable execution in environments. - `action?: KernelControlsAction` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled?: boolean` enabled controls whether executable blocking is active - `executables?: Array` executables is the list of executable paths or names to block ### Policy Retrieve Response - `PolicyRetrieveResponse` - `policies: OrganizationPolicies` - `agentPolicy: AgentPolicy` agent_policy contains agent-specific policy settings - `commandDenyList: Array` command_deny_list contains a list of commands that agents are not allowed to execute - `mcpDisabled: boolean` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scmToolsDisabled: boolean` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `allowedAgentIds?: Array` allowed_agent_ids contains the agent IDs users may select when the codex_rollout feature flag is enabled. Empty means all agents are allowed. - `allowedCodexModels?: Array` Deprecated: use codex_model_policy. This legacy allowlist cannot distinguish omitted from intentionally empty on update requests. Empty means all Codex models are allowed. - `"CODEX_OPEN_AI_MODEL_UNSPECIFIED"` - `"CODEX_OPEN_AI_MODEL_GPT_5_5"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4"` - `"CODEX_OPEN_AI_MODEL_GPT_5_4_MINI"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX"` - `"CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK"` - `"CODEX_OPEN_AI_MODEL_GPT_5_2"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_SOL"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA"` - `"CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA"` - `allowedCodexReasoningEfforts?: Array` allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may select when the codex_rollout feature flag is enabled. Empty means all Codex reasoning efforts are allowed. - `"CODEX_REASONING_EFFORT_UNSPECIFIED"` - `"CODEX_REASONING_EFFORT_LOW"` - `"CODEX_REASONING_EFFORT_MEDIUM"` - `"CODEX_REASONING_EFFORT_HIGH"` - `"CODEX_REASONING_EFFORT_EXTRA_HIGH"` - `allowedCodexServiceTiers?: Array` allowed_codex_service_tiers contains the Codex service tiers users may select when the codex_rollout feature flag is enabled. Empty means all Codex service tiers are allowed. - `"CODEX_SERVICE_TIER_UNSPECIFIED"` - `"CODEX_SERVICE_TIER_FAST"` - `codexModelPolicy?: CodexModelPolicy` codex_model_policy contains explicit per-model Codex availability states. Missing policy or missing model entries mean allowed. - `modelStates?: Record` model_states maps CodexOpenAIModel enum names to explicit policy states. Missing entries are treated as allowed. - `"CODEX_MODEL_POLICY_STATE_UNSPECIFIED"` - `"CODEX_MODEL_POLICY_STATE_ALLOWED"` - `"CODEX_MODEL_POLICY_STATE_DISABLED"` - `conversationSharingPolicy?: ConversationSharingPolicy` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `maxSubagentsPerEnvironment?: number` max_subagents_per_environment limits the number of non-terminal sub-agents a parent can have running simultaneously in the same environment. Valid range: 0-10. Zero means use the default (5). - `scmToolsAllowedGroupId?: string` scm_tools_allowed_group_id restricts SCM tools access to members of this group. Empty means no restriction (all users can use SCM tools if not disabled). - `allowedEditorIds: Array` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allowLocalRunners: boolean` allow_local_runners controls whether local runners are allowed to be used in the organization - `defaultEditorId: string` default_editor_id is the default editor ID to be used when a user doesn't specify one - `defaultEnvironmentImage: string` default_environment_image is the default container image when none is defined in repo - `disableFromScratch: boolean` disable_from_scratch controls whether non-admin users can create blank environments without a Git or URL initializer. - `maximumEnvironmentsPerUser: string` maximum_environments_per_user limits total environments (running or stopped) per user - `maximumRunningEnvironmentsPerUser: string` maximum_running_environments_per_user limits simultaneously running environments per user - `membersCreateProjects: boolean` members_create_projects controls whether members can create projects - `membersRequireProjects: boolean` members_require_projects controls whether environments can only be created from projects by non-admin users - `organizationId: string` organization_id is the ID of the organization - `portSharingDisabled: boolean` port_sharing_disabled controls whether user-initiated port sharing is disabled in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. - `requireCustomDomainAccess: boolean` require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. - `restrictAccountCreationToScim: boolean` restrict_account_creation_to_scim controls whether account creation is restricted to SCIM-provisioned users only. When true and SCIM is configured for the organization, only users provisioned via SCIM can create accounts. - `webBrowserDisabled: boolean` web_browser_disabled controls whether users can open the built-in web browser from environment pages. This does not affect VS Code Browser. - `deleteArchivedEnvironmentsAfter?: string` delete_archived_environments_after controls how long archived environments are kept before automatic deletion. 0 means no automatic deletion. Maximum duration is 4 weeks (2419200 seconds). - `editorVersionRestrictions?: Record` editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy, editor_version_restrictions not set means no restrictions. If empty or not set for an editor, we will use the latest version of the editor - `allowedVersions?: Array` allowed_versions lists the versions that are allowed If empty, we will use the latest version of the editor Examples for JetBrains: `["2025.2", "2025.1", "2024.3"]` - `maximumEnvironmentLifetime?: string` maximum_environment_lifetime controls for how long environments are allowed to be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000 seconds). - `maximumEnvironmentTimeout?: string` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `securityAgentPolicy?: SecurityAgentPolicy` security_agent_policy contains security agent configuration for the organization. When configured, security agents are automatically deployed to all environments. - `crowdstrike?: CrowdStrikeConfig` crowdstrike contains CrowdStrike Falcon configuration - `additionalOptions?: Record` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cidSecretId?: string` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled?: boolean` enabled controls whether CrowdStrike Falcon is deployed to environments - `image?: string` image is the CrowdStrike Falcon sensor container image reference - `tags?: string` tags are optional tags to apply to the Falcon sensor (comma-separated) - `securityPolicyId?: string` security_policy_id references the Veto Exec SecurityPolicy assigned to newly created environments. The public GA contract accepts policies that use only SecurityPolicy.Spec.executables. Assignment validates materializability and rejects unsupported executable selectors or effects. If empty, new environments have no SecurityPolicy by default. - `vetoExecPolicy?: VetoExecPolicy` veto_exec_policy contains the veto exec policy for environments. - `action?: KernelControlsAction` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled?: boolean` enabled controls whether executable blocking is active - `executables?: Array` executables is the list of executable paths or names to block ### Policy Update Response - `PolicyUpdateResponse = unknown`