ibm-cloud-infrastructure

How to create duplicate block storage from snapshot using Softlayer rest api

一曲冷凌霜 提交于 2021-02-17 05:54:51
问题 I have created snapshot but unable to create block storage from snapshot. We cant find any Api document. Anyone help me on this request 回答1: Try using the following slcli command to order a duplicate volume: slcli block volume-duplicate --origin-snapshot-id 11111 --billing monthly 22222 Replace 11111 for your snapshot id and 22222 for your volume id. To get the list of the snapshot ids for your volume you can use the following command: slcli block snapshot-list 1234 Replace 1234 for your

How to get a direct URL to a file on IBM Cloud Object Storage

青春壹個敷衍的年華 提交于 2020-06-26 14:30:11
问题 So, I have a bucket on IBM's Cloud Object Storage. In this bucket I have an file named 'test.png'. What I need is an URL i can use to access this file directly. An URL that I can just write on browser and the image will open on my browser. I've searched everywhere and could not find anything except for a "ObjectSQL URL" in this format: cos://{Region}/{Bucket}/{File} 回答1: Presuming that the bucket has public access enabled, the URL is just https://{endpoint}/{bucket}/{object} (or https://

How to generate an IBM Cloud token from an API Key

六月ゝ 毕业季﹏ 提交于 2020-04-18 04:42:12
问题 I have generated an API key for IBM Cloud, how do I programmatically generate a token from the API key? 回答1: Here is a curl request to do that. curl --location --request POST 'https://iam.cloud.ibm.com/identity/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Basic Yng6Yng=' \ --data-urlencode 'apikey=xxx' \ --data-urlencode 'response_type=cloud_iam' \ --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' Replace xxx with your API

How to generate an IBM Cloud token from an API Key

蹲街弑〆低调 提交于 2020-04-18 04:42:05
问题 I have generated an API key for IBM Cloud, how do I programmatically generate a token from the API key? 回答1: Here is a curl request to do that. curl --location --request POST 'https://iam.cloud.ibm.com/identity/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Basic Yng6Yng=' \ --data-urlencode 'apikey=xxx' \ --data-urlencode 'response_type=cloud_iam' \ --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' Replace xxx with your API

understanding undef locationGroupId entries in package items

隐身守侯 提交于 2020-02-23 08:25:10
问题 I ran a SL REST API query to get the list of items available for the 240 (Endurance iSCSI) package for only the common price entries, by querying only those price entries with a locationGroupId value of undefined. Here is the query I ran: curl -u : https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItems.json?objectFilter=%7B%22items%22:%7B%22prices%22:%7B%22locationGroupId%22:%7B%22operation%22:%22is%20null%22%7D%7D%7D%7D I am a bit confused by the result. Here is an excerpt:

understanding undef locationGroupId entries in package items

霸气de小男生 提交于 2020-02-23 08:24:26
问题 I ran a SL REST API query to get the list of items available for the 240 (Endurance iSCSI) package for only the common price entries, by querying only those price entries with a locationGroupId value of undefined. Here is the query I ran: curl -u : https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItems.json?objectFilter=%7B%22items%22:%7B%22prices%22:%7B%22locationGroupId%22:%7B%22operation%22:%22is%20null%22%7D%7D%7D%7D I am a bit confused by the result. Here is an excerpt:

Apache web server timeout after 60 seconds

橙三吉。 提交于 2020-02-03 05:14:25
问题 I am experiencing timeout after 60 seconds for apache web server + php running in IBM softlayer. These are my settings (httpd server restart after these settings) httpd.conf TimeOut 300 Timeout 300 * tried both at the same, also single entry of TimeOut and Timeout only. php.ini max_execution_time = 300 PHP code: <?php set_time_limit(10000); //Just to make sure sleep(70); echo "Successful"; ?> Using Command Prompt php test.php Result is Successful Using different browsers (Chrome, Firefox and

SoftLayer API how to filter MetricDataTypes

懵懂的女人 提交于 2020-01-26 03:51:06
问题 Can I filter metric data types? I am retrieving datatypes with keynames CPU0, CPU1, etc up to CPU256, plus some other datatypes. I would like a filter to retrieve only the datatypes that do not start with CPU. I tried the filter below but all objects were still retrieved: https://api.softlayer.com/rest/v3/SoftLayer_Metric_Tracking_Object/<objectId>/getMetricDataTypes?objectFilter=objectFilter=objectFilter={"metricDataTypes":{"keyName":{"operation":"!*= CPU"}}} 回答1: Unfortunately, it's not

Ordering Softlayer Vlan pairs

旧时模样 提交于 2020-01-25 21:52:26
问题 I've done some searching on stackoverflow and looked through the API but can't seem to find an answer specifically. I'm creating some automation scripts in python and wondering if there's a way to grab the primaryNetworkComponent and the primaryBackendNetworkComponent pairs and based on location? There's the getVlans() method but not sure which vlans go together unless i go to the gui. Is there no limit to the number of machines that can be on a vlan pair? if there isn't would it just be

How do I create a SoftLayer Vlan using Terraform?

扶醉桌前 提交于 2020-01-25 21:03:41
问题 I am able to create VLANs using control.softlayer.com (we have the automated VLAN ordering flag turned on). However, when I attempt to use the Terraform provider from github slash ibm-bluemix.github.io/tf-ibm-docs/v0.3-tf-v0.9.3/r/infra_vlan.html, I get an error. I am using the API key from my account, so permissions should be the same. Here's the .tf file content: resource "ibmcloud_infra_vlan" "dev_vlan_01" { name = "pancakes_dev_vlan_01" datacenter = "FRA02" type = "PRIVATE" subnet_size =