擷取執行個體資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求文法
GET /v2/openapi/getinstance HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| InstanceName |
string |
是 |
執行個體名稱。 |
instance-test |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結構體。 |
||
| RequestId |
string |
請求 ID,可用於排查和定位問題。 |
757E172A-F94B-5E78-8A23-D9068E42F2E9 |
| InstanceName |
string |
執行個體名稱。 |
instance-test |
| ResourceGroupId |
string |
資源群組 ID。 |
rg-acfmxh4em5jncda |
| RegionId |
string |
執行個體的地區 ID。 |
cn-chengdu |
| SPInstanceId |
string |
執行個體 ID。 |
ots_standard_public_cn-9lb34u7u5001 |
| AliasName |
string |
執行個體別名。 |
instance-test |
| UserId |
string |
使用者識別碼。 |
16542312566 |
| Network |
string |
網路類型,取值範圍如下:
|
VPC |
| InstanceDescription |
string |
執行個體描述。 |
測試執行個體的描述資訊。 |
| InstanceSpecification |
string |
執行個體規格。
|
SSD |
| PaymentType |
string |
付費方式。
|
Subscription |
| StorageType |
string |
儲存類型。
|
HYBRID |
| VCUQuota |
integer |
VCU 配額。 |
20 |
| TableQuota |
integer |
執行個體下的表總數。 |
100 |
| InstanceStatus |
string |
執行個體狀態。
|
normal |
| CreateTime |
string |
建立時間。 |
2019-12-23T07:24:33Z |
| Tags |
array<object> |
執行個體的標籤集合。 |
|
|
object |
執行個體的標籤。 |
||
| Key |
string |
標籤鍵。 |
tag |
| Value |
string |
標籤值。 |
333 |
| TagKey |
string |
(已廢棄)標籤鍵。 |
keyTestA |
| TagValue |
string |
(已廢棄)標籤值。 |
00004a20240452b0 |
| NetworkTypeACL |
array |
執行個體允許的網路類型列表。
|
|
|
string |
執行個體允許的網路類型。 |
INTERNET |
|
| NetworkSourceACL |
array |
執行個體允許的網路來源列表。 TRUST_PROXY:控制台。 |
|
|
string |
執行個體允許的網路來源。 |
TRUST_PROXY |
|
| Policy |
string |
執行個體存取控制策略。 |
{ "Version": "1", "Statement": [ { "Action": [ "ots:*" ], "Resource": [ "acs:ots:*:13791xxxxxxxxxxx:instance/myinstance*" ], "Principal": [ "*" ], "Effect": "Allow", "Condition": { "StringEquals": { "ots:TLSVersion": [ "1.2" ] }, "IpAddress": { "acs:SourceIp": [ "192.168.0.1", "198.51.100.1" ] } } } ] } |
| PolicyVersion |
integer |
執行個體存取控制策略的版本。 |
1 |
| IsMultiAZ |
boolean |
是否同城冗餘。
|
true |
| ElasticVCUUpperLimit |
number |
執行個體彈性上限。 |
6 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "757E172A-F94B-5E78-8A23-D9068E42F2E9",
"InstanceName": "instance-test",
"ResourceGroupId": "rg-acfmxh4em5jncda",
"RegionId": "cn-chengdu",
"SPInstanceId": "ots_standard_public_cn-9lb34u7u5001",
"AliasName": "instance-test",
"UserId": "16542312566",
"Network": "VPC",
"InstanceDescription": "測試執行個體的描述資訊。",
"InstanceSpecification": "SSD",
"PaymentType": "Subscription",
"StorageType": "HYBRID",
"VCUQuota": 20,
"TableQuota": 100,
"InstanceStatus": "normal",
"CreateTime": "2019-12-23T07:24:33Z",
"Tags": [
{
"Key": "tag",
"Value": "333",
"TagKey": "keyTestA",
"TagValue": "00004a20240452b0"
}
],
"NetworkTypeACL": [
"INTERNET"
],
"NetworkSourceACL": [
"TRUST_PROXY"
],
"Policy": "{\n \"Version\": \"1\",\n \"Statement\": [\n {\n \"Action\": [\n \"ots:*\"\n ],\n \"Resource\": [\n \"acs:ots:*:13791xxxxxxxxxxx:instance/myinstance*\"\n ],\n \"Principal\": [\n \"*\"\n ],\n \"Effect\": \"Allow\",\n \"Condition\": {\n \"StringEquals\": {\n \"ots:TLSVersion\": [\n \"1.2\"\n ]\n },\n \"IpAddress\": {\n \"acs:SourceIp\": [\n \"192.168.0.1\",\n \"198.51.100.1\"\n ]\n }\n }\n }\n ]\n}",
"PolicyVersion": 1,
"IsMultiAZ": true,
"ElasticVCUUpperLimit": 6
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。