The cloud is more than a portal: accessing the trial/promotional account

The cloud is more than a portal: accessing the trial/promotional account

TL;DR I will save you 5 minutes when you want to access the Oracle database as a service via REST on your promotion account when it’s (automatically) coupled to your Identity cloud service (IDCS).

Like many people I have a personal promotion account on the Oracle cloud to play with the Oracle Database as a service. Some of you know that I like to do things in commandline more than clicking around in a portal. The REST api is pretty well documented. You can find the documentation here: https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbr/toc.htm

To test all this, I use curl. Very easy and simple to use and ideal to learn how to access the cloud using the REST calls. I made a habit when testing to define my username, password and identity domain in an environment variable. I find this easy to play around with urls and errors and it obfuscates also a bit my username / password / identity domain.

As a simple test, I usually use the “View all service instances”. The explanation can be found here: https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbr/op-paas-service-dbcs-api-v1.1-instances-%7BidentityDomainId%7D-get.html#examples This is nice and easy as you just specify your identity Domain and you get a result. Easy to learn how it works.

When accessing a traditional cloud account you get this output:

Pay attention to line 2. That gives us the http status code 200 which means “OK”. For your interest, I like this page to check what each number means. Note that I use curl -LI instead of the example in the Oracle documentation. This way I don’t list the json it returns. When you replace -LI with –include, it gives you the full json which you request.

Then we do the same with the promotion account.

This means “Forbidden”.
When I check with the full output:

No DBAAS permission.
This is odd because I am allowed and able to create services:

 

So there must be something different between the traditional cloud account and the promotion/trial account. Quickly I noticed that in the promotional account Oracle Identity Cloud Service (IDCS) is active. I’m a dba and I don’t know anything about this beast, so I was able to create a service request and then after a while it turned out I need to use the identity domain from the IDCS.
This URL can be retrieved in the portal under Dashboard -> Database -> Overview -> Additional information
There you will find following information (don’t mind the things I blanked out):

 

Then you can see at the right an idcs- entry. That’s the identity domain you need.

When I then export my environment variable to that identity domain it lists my one and only vanpupi-instance (sorry for the stars, you must use your own idcs 😉 ):

And when I ask the full output it nicely lists my vanpupi instance (i manually hid some thing with stars, it should show you your own info):

 

As always, questions, remarks? find me on twitter @vanpupi

Leave a Reply

Your email address will not be published. Required fields are marked *

18 + 4 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: