File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
examples/objectstorage/src/main/java/cloud/stackit/sdk/objectstorage/examples Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ public static void main(String[] args) throws IOException {
3636 httpClient
3737 .newBuilder ()
3838 .authenticator (authenticator )
39+ // The object storage requests are sychronous and may take a few seconds.
40+ // To prevent an timeout, we increase the read timeout to 15 seconds
3941 .readTimeout (Duration .ofSeconds (15 ))
4042 .build ();
4143
@@ -48,13 +50,8 @@ public static void main(String[] args) throws IOException {
4850 return ;
4951 }
5052
51- // the region which should be used to interact with objectstorage, read from env var for
52- // this example
53- String region = System .getenv ("STACKIT_REGION" );
54- if (region == null || region .isEmpty ()) {
55- System .err .println ("Environment variable 'STACKIT_REGION' not found." );
56- return ;
57- }
53+ // the region which should be used to interact with objectstorage
54+ String region = "eu01" ;
5855
5956 try {
6057 /*
@@ -206,7 +203,7 @@ public static void main(String[] args) throws IOException {
206203 newCredentialGroup .getCredentialsGroup ().getCredentialsGroupId ());
207204 System .out .println (
208205 "* Group ID: " + deleteCredentialsGroupResponse .getCredentialsGroupId ());
209- System .out .println ("* Bucket successfully deleted" );
206+ System .out .println ("* Credentials group successfully deleted" );
210207 } catch (ApiException e ) {
211208 throw new RuntimeException (e );
212209 }
You can’t perform that action at this time.
0 commit comments