| copyright |
|
||
|---|---|---|---|
| lastupdated | 2018-11-18 | ||
| subcollection | AnalyticsEngine |
{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:codeblock: .codeblock} {:screen: .screen} {:pre: .pre}
{: #retrieve-service-id}
Before you can retrieve the service instance ID, ensure that you have the following prerequisites:
- You must have a valid IBMid.
- You must have installed the {{site.data.keyword.Bluemix_notm}} CLI.
To retrieve the service instance ID:
-
Log in to the {{site.data.keyword.Bluemix_notm}} CLI:
ibmcloud api https://cloud.ibm.com ibmcloud login <enter your credentials>If you share an {{site.data.keyword.Bluemix_notm}} account, you'll be asked to choose an account for the current session.
-
List all service instances:
ibmcloud resource service-instancesSample response:
Retrieving service instances in resource group Default and all locations under account ... OK Name Location State Type Tags MyServiceInstance us-south active service_instance -
Retrieve service instance ID:
ibmcloud resource service-instance MyServiceInstance --idSample response:
crn:v1:yp:public:rc-dev-siba1:us-south:a/217b381692bae8d7153823013f2cacf8:046a1611-81ff-4215-a5e0-6af8d7910610::In the sample response,
046a1611-81ff-4215-a5e0-6af8d7910610is the service instance ID.