简体   繁体   中英

How to get a Cloud Instance ID in IBM Power Systems Virtual Servers

I want to create a Power Systems Virtual server in IBM cloud. To create the server we need "cloud_instance_id" and "Power Systems Virtual Server instance ID" as a part of the API call.

I am unable to get the cloud_instance_id,Power Systems Virtual Server instance ID to proceed further on this. Please help me with the requested information.

The API call I have used is as in the below document. https://cloud.ibm.com/apidocs/power-cloud#create-a-new-power-vm-instance https://cloud.ibm.com/apidocs/power-cloud#authentication

https://cloud.ibm.com/apidocs/resource-controller#create-provision-a-new-resource-instance

I think you want to use this API to create the instance first.

am checked that link " https://cloud.ibm.com/apidocs/resource-controller#create-provision-a-new-resource-instance " working fine to create a service. but need to launch Power Systems Virtual Server through Rest Api

i refer this link " https://cloud.ibm.com/apidocs/power-cloud#create-a-new-power-vm-instance "

But responce is getting missing bearer token or crn

Rest URL GET- https://us-south.power-iaas.cloud.ibm.com/pcloud/v1/cloud-instances/f65a...ffc58/pvm-instances

Headers Authorization:Bearer eyJra... Bluemix-Instance:crn:v1:bluemix:public:power-iaas:us-east:a/516...2d:f65acd2c-7..58:: Content-Type :application/vnd.ibm.collection+json

Error

"code":500,"message":"missing bearer token or crn"..

So the ibmcloud cli [plugin need installed with this one updated to latest: power-iaas 0.3.0

Then I was able to get the requested information:

ibmcloud pi service-list Listing services under account *********** user ********* ID crn:v1:bluemix:public:power-iaas:us-south:a/9efe07ec3679df7e2b3bbe1de55554be:58495336-666b-4445-a1fd-986499fa30be:: Power Systems Virtual Server-h1
crn:v1:bluemix:public:power-iaas:us-south:a/9efe07ec3679df7e2b3bbe1de6a554be:a74d57dd-bffg-4ca3-b564-6649fcb10aee:: Power Systems Virtual Server-ocp-cp4d They names have been changed above to protect the innocent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM