Operations related to Workspaces
- create - Create a Workspace in the specified Organization
- list - List all Workspaces for the specified Organization
- update - Update a Workspace
- delete - Delete a Workspace
- get - Get a Workspace
Create a new Workspace in the specified Organization.
from cribl_mgmt_plane import CriblMgmtPlane, models
import os
with CriblMgmtPlane(
security=models.Security(
client_oauth=models.SchemeClientOauth(
client_id=os.getenv("CRIBLMGMTPLANE_CLIENT_ID", ""),
client_secret=os.getenv("CRIBLMGMTPLANE_CLIENT_SECRET", ""),
token_url=os.getenv("CRIBLMGMTPLANE_TOKEN_URL", ""),
audience="https://api.cribl.cloud",
),
),
) as cmp_client:
res = cmp_client.workspaces.create(organization_id="<id>", workspace_id="main", alias="Production Environment", description="Main production workspace for customer data processing", tags=[
"production",
"customer-data",
])
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
organization_id |
str | ✔️ | The id of the Organization where you want to create the Workspace. |
|
workspace_id |
str | ✔️ | Unique identifier for the Workspace. | main |
alias |
Optional[str] | ➖ | User-friendly alias for the Workspace. | Production Environment |
description |
Optional[str] | ➖ | Brief description of the Workspace. | Main production Workspace for customer data processing |
tags |
List[str] | ➖ | Tags associated with the Workspace. | [ "production", "customer-data" ] |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.V1WorkspacesCreateWorkspaceResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Get a list of all Workspaces for the specified Organization.
from cribl_mgmt_plane import CriblMgmtPlane, models
import os
with CriblMgmtPlane(
security=models.Security(
client_oauth=models.SchemeClientOauth(
client_id=os.getenv("CRIBLMGMTPLANE_CLIENT_ID", ""),
client_secret=os.getenv("CRIBLMGMTPLANE_CLIENT_SECRET", ""),
token_url=os.getenv("CRIBLMGMTPLANE_TOKEN_URL", ""),
audience="https://api.cribl.cloud",
),
),
) as cmp_client:
res = cmp_client.workspaces.list(organization_id="<id>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id |
str | ✔️ | The id of the Organization that contains the Workspaces. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.V1WorkspacesListWorkspacesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Update the specified Workspace.
from cribl_mgmt_plane import CriblMgmtPlane, models
import os
with CriblMgmtPlane(
security=models.Security(
client_oauth=models.SchemeClientOauth(
client_id=os.getenv("CRIBLMGMTPLANE_CLIENT_ID", ""),
client_secret=os.getenv("CRIBLMGMTPLANE_CLIENT_SECRET", ""),
token_url=os.getenv("CRIBLMGMTPLANE_TOKEN_URL", ""),
audience="https://api.cribl.cloud",
),
),
) as cmp_client:
res = cmp_client.workspaces.update(organization_id="<id>", workspace_id="<id>", alias="Production Environment", description="Main production workspace for customer data processing", tags=[
"production",
"customer-data",
])
assert res is not None
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
organization_id |
str | ✔️ | The id of the Organization that contains the Workspace. |
|
workspace_id |
str | ✔️ | The id of the Workspace to update. |
|
alias |
Optional[str] | ➖ | User-friendly alias for the Workspace. | Production Environment |
description |
Optional[str] | ➖ | Brief description of the Workspace. | Main production Workspace for customer data processing |
tags |
List[str] | ➖ | Tags associated with the Workspace. | [ "production", "customer-data" ] |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Delete the specified Workspace in the specified Organization.
from cribl_mgmt_plane import CriblMgmtPlane, models
import os
with CriblMgmtPlane(
security=models.Security(
client_oauth=models.SchemeClientOauth(
client_id=os.getenv("CRIBLMGMTPLANE_CLIENT_ID", ""),
client_secret=os.getenv("CRIBLMGMTPLANE_CLIENT_SECRET", ""),
token_url=os.getenv("CRIBLMGMTPLANE_TOKEN_URL", ""),
audience="https://api.cribl.cloud",
),
),
) as cmp_client:
res = cmp_client.workspaces.delete(organization_id="<id>", workspace_id="<id>")
assert res is not None
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id |
str | ✔️ | The id of the Organization that contains the Workspace. |
workspace_id |
str | ✔️ | The id of the Workspace to delete. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Get the specified Workspace.
from cribl_mgmt_plane import CriblMgmtPlane, models
import os
with CriblMgmtPlane(
security=models.Security(
client_oauth=models.SchemeClientOauth(
client_id=os.getenv("CRIBLMGMTPLANE_CLIENT_ID", ""),
client_secret=os.getenv("CRIBLMGMTPLANE_CLIENT_SECRET", ""),
token_url=os.getenv("CRIBLMGMTPLANE_TOKEN_URL", ""),
audience="https://api.cribl.cloud",
),
),
) as cmp_client:
res = cmp_client.workspaces.get(organization_id="<id>", workspace_id="<id>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id |
str | ✔️ | The id of the Organization that contains the Workspace. |
workspace_id |
str | ✔️ | The id of the Workspace to get. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.V1WorkspacesGetWorkspaceResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |