您在哪里可以找到 Javascript 的 IBM Cloud Storage API 的配置信息
Where do you find the Config info for IBM Cloud Storage API for Javascript
浏览云存储教程 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。
serviceInstanceId 是凭证中的 "resource_instance_id"。类似于:
crn:v1:bluemix:public:cloud-object-storage:global:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"resource_instance_id": ""
端点实际上是 "s3-api.us-geo.objectstorage.softlayer.net" 而不是凭据上通知的端点。
我相信您可以使用以下 Cloud CLI 命令检索您需要的 resource_instance_id
:
bx resource service-instances -r global
bx resource service-instance "SERVICE NAME FROM PREVIOUS COMMAND" -r all --id
浏览云存储教程 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。
serviceInstanceId 是凭证中的 "resource_instance_id"。类似于:
crn:v1:bluemix:public:cloud-object-storage:global:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"resource_instance_id": ""
端点实际上是 "s3-api.us-geo.objectstorage.softlayer.net" 而不是凭据上通知的端点。
我相信您可以使用以下 Cloud CLI 命令检索您需要的 resource_instance_id
:
bx resource service-instances -r global
bx resource service-instance "SERVICE NAME FROM PREVIOUS COMMAND" -r all --id