浏览 Cloud Storage Api Javascript API 教程 ( https://console.bluemix.net/docs/services/cloud-object-storage/libraries/node.html#node-js ) 并要求您填写配置文件
var config = {
endpoint: '<endpoint>',
apiKeyId: '<api-key>',
ibmAuthEndpoint: 'https://iam.ng.bluemix.net/oidc/token',
serviceInstanceId: '<resource-instance-id>',
};
我认为apiKeyId是在认证中找到的
"cloud-object-storage": [
{
"credentials": {
"apikey": "**HERE**",
"endpoints": "",
"iam_apikey_description": "",
"iam_apikey_name": "",
"iam_role_crn": "",
"iam_serviceid_crn": "",
"resource_instance_id": ""
},
"syslog_drain_url": null,
"volume_mounts": [],
"label": "cloud-object-storage",
"provider": null,
"plan": "Lite",
"name": "Cloud Object Storage-bn",
"tags": [
"Lite",
"storage",
"ibm_release",
"ibm_created",
"rc_compatible"
]
}
]
我认为端点位于
https://console.bluemix.net/services/cloud-object-storage/
在 EndPoints 下的示例是 (s3-api.us-geo.objectstorage.softlayer.net)
我不知道在IBM Cloud 中的何处找到serviceInstanceId 。