@@ -61,6 +61,7 @@ def create(
6161 organization_id : str ,
6262 sso_configuration_id : str ,
6363 name : Optional [str ] | Omit = omit ,
64+ token_expires_in : Optional [str ] | Omit = omit ,
6465 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6566 # The extra values given here take precedence over values defined on the client or passed to this method.
6667 extra_headers : Headers | None = None ,
@@ -81,13 +82,24 @@ def create(
8182
8283 - Create basic SCIM configuration:
8384
84- Creates a SCIM configuration linked to an SSO provider.
85+ Creates a SCIM configuration linked to an SSO provider with default 1 year
86+ token expiration.
8587
8688 ```yaml
8789 organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
8890 ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
8991 ```
9092
93+ - Create SCIM configuration with custom token expiration:
94+
95+ Creates a SCIM configuration with a 90-day token expiration.
96+
97+ ```yaml
98+ organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
99+ ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
100+ tokenExpiresIn: "7776000s"
101+ ```
102+
91103 Args:
92104 organization_id: organization_id is the ID of the organization to create the SCIM configuration
93105 for
@@ -97,6 +109,9 @@ def create(
97109
98110 name: name is a human-readable name for the SCIM configuration
99111
112+ token_expires_in: token_expires_in is the duration until the token expires. Defaults to 1 year.
113+ Minimum 1 day, maximum 2 years.
114+
100115 extra_headers: Send extra headers
101116
102117 extra_query: Add additional query parameters to the request
@@ -112,6 +127,7 @@ def create(
112127 "organization_id" : organization_id ,
113128 "sso_configuration_id" : sso_configuration_id ,
114129 "name" : name ,
130+ "token_expires_in" : token_expires_in ,
115131 },
116132 scim_configuration_create_params .ScimConfigurationCreateParams ,
117133 ),
@@ -373,6 +389,7 @@ def regenerate_token(
373389 self ,
374390 * ,
375391 scim_configuration_id : str ,
392+ token_expires_in : Optional [str ] | Omit = omit ,
376393 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
377394 # The extra values given here take precedence over values defined on the client or passed to this method.
378395 extra_headers : Headers | None = None ,
@@ -393,16 +410,29 @@ def regenerate_token(
393410
394411 - Regenerate token:
395412
396- Creates a new bearer token, invalidating the old one.
413+ Creates a new bearer token with the same expiration duration as the previous
414+ token.
397415
398416 ```yaml
399417 scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
400418 ```
401419
420+ - Regenerate token with new expiration:
421+
422+ Creates a new bearer token with a custom 180-day expiration.
423+
424+ ```yaml
425+ scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
426+ tokenExpiresIn: "15552000s"
427+ ```
428+
402429 Args:
403430 scim_configuration_id: scim_configuration_id is the ID of the SCIM configuration to regenerate token
404431 for
405432
433+ token_expires_in: token_expires_in is the duration until the new token expires. If not specified,
434+ uses the same duration as the previous token.
435+
406436 extra_headers: Send extra headers
407437
408438 extra_query: Add additional query parameters to the request
@@ -414,7 +444,10 @@ def regenerate_token(
414444 return self ._post (
415445 "/gitpod.v1.OrganizationService/RegenerateSCIMToken" ,
416446 body = maybe_transform (
417- {"scim_configuration_id" : scim_configuration_id },
447+ {
448+ "scim_configuration_id" : scim_configuration_id ,
449+ "token_expires_in" : token_expires_in ,
450+ },
418451 scim_configuration_regenerate_token_params .ScimConfigurationRegenerateTokenParams ,
419452 ),
420453 options = make_request_options (
@@ -450,6 +483,7 @@ async def create(
450483 organization_id : str ,
451484 sso_configuration_id : str ,
452485 name : Optional [str ] | Omit = omit ,
486+ token_expires_in : Optional [str ] | Omit = omit ,
453487 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
454488 # The extra values given here take precedence over values defined on the client or passed to this method.
455489 extra_headers : Headers | None = None ,
@@ -470,13 +504,24 @@ async def create(
470504
471505 - Create basic SCIM configuration:
472506
473- Creates a SCIM configuration linked to an SSO provider.
507+ Creates a SCIM configuration linked to an SSO provider with default 1 year
508+ token expiration.
474509
475510 ```yaml
476511 organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
477512 ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
478513 ```
479514
515+ - Create SCIM configuration with custom token expiration:
516+
517+ Creates a SCIM configuration with a 90-day token expiration.
518+
519+ ```yaml
520+ organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
521+ ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
522+ tokenExpiresIn: "7776000s"
523+ ```
524+
480525 Args:
481526 organization_id: organization_id is the ID of the organization to create the SCIM configuration
482527 for
@@ -486,6 +531,9 @@ async def create(
486531
487532 name: name is a human-readable name for the SCIM configuration
488533
534+ token_expires_in: token_expires_in is the duration until the token expires. Defaults to 1 year.
535+ Minimum 1 day, maximum 2 years.
536+
489537 extra_headers: Send extra headers
490538
491539 extra_query: Add additional query parameters to the request
@@ -501,6 +549,7 @@ async def create(
501549 "organization_id" : organization_id ,
502550 "sso_configuration_id" : sso_configuration_id ,
503551 "name" : name ,
552+ "token_expires_in" : token_expires_in ,
504553 },
505554 scim_configuration_create_params .ScimConfigurationCreateParams ,
506555 ),
@@ -762,6 +811,7 @@ async def regenerate_token(
762811 self ,
763812 * ,
764813 scim_configuration_id : str ,
814+ token_expires_in : Optional [str ] | Omit = omit ,
765815 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
766816 # The extra values given here take precedence over values defined on the client or passed to this method.
767817 extra_headers : Headers | None = None ,
@@ -782,16 +832,29 @@ async def regenerate_token(
782832
783833 - Regenerate token:
784834
785- Creates a new bearer token, invalidating the old one.
835+ Creates a new bearer token with the same expiration duration as the previous
836+ token.
786837
787838 ```yaml
788839 scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
789840 ```
790841
842+ - Regenerate token with new expiration:
843+
844+ Creates a new bearer token with a custom 180-day expiration.
845+
846+ ```yaml
847+ scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
848+ tokenExpiresIn: "15552000s"
849+ ```
850+
791851 Args:
792852 scim_configuration_id: scim_configuration_id is the ID of the SCIM configuration to regenerate token
793853 for
794854
855+ token_expires_in: token_expires_in is the duration until the new token expires. If not specified,
856+ uses the same duration as the previous token.
857+
795858 extra_headers: Send extra headers
796859
797860 extra_query: Add additional query parameters to the request
@@ -803,7 +866,10 @@ async def regenerate_token(
803866 return await self ._post (
804867 "/gitpod.v1.OrganizationService/RegenerateSCIMToken" ,
805868 body = await async_maybe_transform (
806- {"scim_configuration_id" : scim_configuration_id },
869+ {
870+ "scim_configuration_id" : scim_configuration_id ,
871+ "token_expires_in" : token_expires_in ,
872+ },
807873 scim_configuration_regenerate_token_params .ScimConfigurationRegenerateTokenParams ,
808874 ),
809875 options = make_request_options (
0 commit comments