Skip to content

Commit f6be4fb

Browse files
authored
Merge pull request #9 from AdalbertMemSQL/PLAT-6414
Added expiresAt argument to the create_workspace_group
2 parents c66a5c4 + e96dbc0 commit f6be4fb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

singlestoredb/management/workspace.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ def regions(self) -> List[Region]:
434434
def create_workspace_group(
435435
self, name: str, region: Union[str, Region],
436436
firewall_ranges: List[str], admin_password: Optional[str] = None,
437+
expires_at: Optional[str] = None,
437438
) -> WorkspaceGroup:
438439
"""
439440
Create a new workspace group.
@@ -450,6 +451,13 @@ def create_workspace_group(
450451
admin_password : str, optional
451452
Admin password for the workspace group. If no password is supplied,
452453
a password will be generated and retured in the response.
454+
expires_at : str, optional
455+
The timestamp of when the workspace group will expire.
456+
If the expiration time is not specified,
457+
the workspace group will have no expiration time.
458+
At expiration, the workspace group is terminated and all the data is lost.
459+
Expiration time can be specified as a timestamp or duration.
460+
Example: "2021-01-02T15:04:05Z07:00", "2021-01-02", "3h30m"
453461
454462
Returns
455463
-------
@@ -463,6 +471,7 @@ def create_workspace_group(
463471
name=name, regionID=region,
464472
adminPassword=admin_password,
465473
firewallRanges=firewall_ranges,
474+
expiresAt=expires_at,
466475
),
467476
)
468477
return self.get_workspace_group(res.json()['workspaceGroupID'])

0 commit comments

Comments
 (0)