File tree Expand file tree Collapse file tree 5 files changed +21
-22
lines changed Expand file tree Collapse file tree 5 files changed +21
-22
lines changed Original file line number Diff line number Diff line change 44from stackit .core .configuration import Configuration
55
66project_id = os .getenv ("PROJECT_ID" )
7+ instance_id = "INSTANCE_ID"
78
89# Create a new API client, that uses default authentication and configuration
910config = Configuration ()
1011client = DefaultApi (config )
1112
12- # Get all MariaDB instances
13- response = client .list_instances (project_id )
14-
15- for instance in response .instances :
16- client .delete_instance (project_id , instance .instance_id )
13+ client .delete_instance (project_id , instance_id )
Original file line number Diff line number Diff line change 55
66tag = "tag"
77project_id = os .getenv ("PROJECT_ID" )
8+ instance_id = "INSTANCE_ID"
89
910# Create a new API client, that uses default authentication and configuration
1011config = Configuration ()
1112client = DefaultApi (config )
1213
13- # Get all MongoDBFlex instances
14- response = client .list_instances (project_id , tag )
15-
16- for instance in response .items :
17- client .delete_instance (project_id , instance .id )
14+ client .delete_instance (project_id , instance_id )
Original file line number Diff line number Diff line change 44from stackit .core .configuration import Configuration
55
66project_id = os .getenv ("PROJECT_ID" )
7+ bucket_name = "BUCKET_NAME"
78
89# Create a new API client, that uses default authentication and configuration
910config = Configuration ()
1011client = DefaultApi (config )
1112
12- # List all ObjectStorage buckets instances
13- response = client .list_buckets (project_id )
14-
15- # Delete all ObjectStorage buckets
16- for instance in response .buckets :
17- client .delete_bucket (project_id , instance .name )
13+ client .delete_bucket (project_id , bucket_name )
Original file line number Diff line number Diff line change 1+ import os
2+
3+ from stackit .observability .api .default_api import DefaultApi
4+ from stackit .core .configuration import Configuration
5+
6+ project_id = os .getenv ("PROJECT_ID" )
7+ instance_id = "INSTANCE_ID"
8+
9+ # Create a new API client, that uses default authentication and configuration
10+ config = Configuration ()
11+ client = DefaultApi (config )
12+
13+ client .delete_instance (instance_id , project_id )
Original file line number Diff line number Diff line change 44from stackit .core .configuration import Configuration
55
66project_id = os .getenv ("PROJECT_ID" )
7+ instance_id = "INSTANCE_ID"
78
89# Create a new API client, that uses default authentication and configuration
910config = Configuration ()
1011client = DefaultApi (config )
1112
12- # List all opensearch instances
13- response = client .list_instances (project_id )
14-
15- # Delete all instances
16- for instance in response .instances :
17- client .delete_instance (project_id , instance .cf_guid )
13+ client .delete_instance (project_id , instance_id )
You can’t perform that action at this time.
0 commit comments