Skip to content

Commit 9fc32dc

Browse files
feat(api): add maxPortAdmissionLevel to organization policies
1 parent bed4904 commit 9fc32dc

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-174838e2894923e3ff69ca22fed3c1588b9578d0f38f286a58a038b16ba9db81.yml
3-
openapi_spec_hash: 5331987cbc46299f3170b063b9bf06c1
4-
config_hash: 4447d1e1149a80d1bec70d353fb8acbf
3+
openapi_spec_hash: 805193dd7418d079e23e6cdb594e4e59
4+
config_hash: a2977efc262539c5e31ba0e6dfb6a0a1

src/resources/organizations/policies.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { APIResource } from '../../core/resource';
44
import * as PoliciesAPI from './policies';
5+
import * as EnvironmentsAPI from '../environments/environments';
56
import { APIPromise } from '../../core/api-promise';
67
import { RequestOptions } from '../../internal/request-options';
78

@@ -500,6 +501,14 @@ export interface PolicyUpdateParams {
500501
*/
501502
maximumRunningEnvironmentsPerUser?: string | null;
502503

504+
/**
505+
* max_port_admission_level caps the maximum admission level a user-opened port may
506+
* use. UNSPECIFIED means no cap (any AdmissionLevel value is allowed). System
507+
* ports (VS Code Browser, agents) are exempt. The legacy port_sharing_disabled
508+
* field, when true, takes precedence and blocks all user-initiated port sharing.
509+
*/
510+
maxPortAdmissionLevel?: EnvironmentsAPI.AdmissionLevel | null;
511+
503512
/**
504513
* members_create_projects controls whether members can create projects
505514
*/

tests/api-resources/organizations/policies.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ describe('resource policies', () => {
6565
maximumEnvironmentsPerUser: '20',
6666
maximumEnvironmentTimeout: '3600s',
6767
maximumRunningEnvironmentsPerUser: '5',
68+
maxPortAdmissionLevel: 'ADMISSION_LEVEL_UNSPECIFIED',
6869
membersCreateProjects: true,
6970
membersRequireProjects: true,
7071
portSharingDisabled: true,

0 commit comments

Comments
 (0)