Menanyakan detail resource tertentu.
Deskripsi operasi
Topik ini memberikan contoh cara menanyakan detail Instance ECS i-bp12g4xbl4i0brkn**** di wilayah China (Hangzhou).
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetDiscoveredResource |
get |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceId |
string |
Yes |
ID resource. Untuk informasi selengkapnya tentang cara mendapatkan ID resource, lihat ListDiscoveredResources. |
i-bp12g4xbl4i0brkn**** |
| ResourceType |
string |
Yes |
Tipe resource. Untuk informasi selengkapnya tentang cara mendapatkan tipe resource, lihat ListDiscoveredResources. |
ACS::ECS::Instance |
| Region |
string |
Yes |
ID wilayah tempat resource berada. Untuk informasi selengkapnya tentang cara mendapatkan ID wilayah resource, lihat ListDiscoveredResources. |
cn-hangzhou |
| ComplianceOption |
integer |
No |
Menentukan apakah akan menanyakan hasil kepatuhan (compliance) resource. Nilai yang valid:
|
0 |
Untuk informasi selengkapnya mengenai parameter permintaan umum, lihat Common parameters.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|
||
| RequestId |
string |
ID permintaan. |
E4D71ACE-6B0A-46E0-8352-56952378CC7F |
| DiscoveredResourceDetail |
object |
Detail resource. |
|
| AvailabilityZone |
string |
Zona tempat resource berada. |
cn-hangzhou-h |
| ResourceType |
string |
Tipe resource. |
ACS::ECS::Instance |
| Configuration |
string |
Informasi konfigurasi lengkap resource. |
{"ResourceGroupId":"","Memory":4096,"InstanceChargeType":"PostPaid","Cpu":2,"OSName":"Windows Server 2022 Datacenter 64-bit (Simplified Chinese)","InstanceNetworkType":"vpc","InnerIpAddress":{"IpAddress":[]},"ExpiredTime":"2099-12-31T15:59Z","ImageId":"win2022_21H2_x64_dtc_zh-cn_40G_alibase_20240110.vhd","EipAddress":{"AllocationId":"","IpAddress":"","InternetChargeType":""},"ImageOptions":{},"VlanId":"","HostName":"iZl4i0brknq****","Status":"Stopped","HibernationOptions":{"Configured":false},"MetadataOptions":{"HttpTokens":"","HttpEndpoint":""},"InstanceId":"i-bp12g4xbl4i0brkn****","StoppedMode":"KeepCharging","CpuOptions":{"ThreadsPerCore":2,"Numa":"ON","CoreCount":1},"StartTime":"2024-02-29T07:08Z","DeletionProtection":false,"VpcAttributes":{"PrivateIpAddress":{"IpAddress":["172.16.XX.XX"]},"VpcId":"vpc-bp1wjaw8t272wwmkg****","VSwitchId":"vsw-bp103i8xzww5132ul****","NatIpAddress":""},"SecurityGroupIds":{"SecurityGroupId":["sg-bp1h96fz9fagaegp****"]},"InternetChargeType":"PayByTraffic","InstanceName":"test123","DeploymentSetId":"","InternetMaxBandwidthOut":5,"SerialNumber":"6764f567-28fb-4a39-bfc3-48404995****","OSType":"windows","CreationTime":"2024-02-29T07:08Z","AutoReleaseTime":"","Description":"","InstanceTypeFamily":"ecs.c7","DedicatedInstanceAttribute":{"Tenancy":"","Affinity":""},"PublicIpAddress":{"IpAddress":["47.98.XX.XX"]},"GPUSpec":"","NetworkInterfaces":{"NetworkInterface":[{"Type":"Primary","PrimaryIpAddress":"172.16.XX.XX","MacAddress":"00:16:3e:0c:**:**","NetworkInterfaceId":"eni-bp19uj35v8won3x9****","PrivateIpSets":{"PrivateIpSet":[{"PrivateIpAddress":"172.16.XX.XX","Primary":true}]}}]},"SpotPriceLimit":0.0,"SaleCycle":"","DeviceAvailable":true,"InstanceType":"ecs.c7.large","OSNameEn":"Windows Server 2022 DataCenter Edition 64bit Chinese Edition","SpotStrategy":"NoSpot","IoOptimized":true,"ZoneId":"cn-hangzhou-b","ClusterId":"","EcsCapacityReservationAttr":{"CapacityReservationPreference":"","CapacityReservationId":""},"DedicatedHostAttribute":{"DedicatedHostId":"","DedicatedHostName":"","DedicatedHostClusterId":""},"GPUAmount":0,"OperationLocks":{"LockReason":[]},"InternetMaxBandwidthIn":2000,"Recyclable":false,"RegionId":"cn-hangzhou","CreditSpecification":""} |
| Region |
string |
ID wilayah. |
cn-hangzhou |
| ResourceCreationTime |
integer |
Timestamp saat resource dibuat. |
1709190480000 |
| Tags |
string |
Tag resource. |
{"key":"value"} |
| AccountId |
integer |
ID Akun Alibaba Cloud pemilik resource. |
120886317861**** |
| ResourceId |
string |
ID resource. |
i-bp12g4xbl4i0brkn**** |
| ResourceDeleted |
integer |
Status penghapusan resource. Nilai yang valid:
|
1 |
| ResourceName |
string |
Nama resource. |
test123 |
| ResourceStatus |
string |
Status resource. Status resource ditentukan oleh Layanan Alibaba Cloud terkait. Parameter ini bisa kosong. Contoh:
|
Stopped |
| ComplianceType |
string |
Tipe kepatuhan. |
COMPLIANT |
| VpcId |
string |
ID VPC tempat resource berada. ID berformat vpc-t4nhheyvay74fp7n0hxxx. Jika resource tidak termasuk dalam VPC, string kosong "" dikembalikan. |
vpc-t4nhheyvay74fp7n0hxxx |
| VSwitchId |
string |
ID vSwitch tempat resource berada. ID berformat vsw-t4n7pokxxxxxxxxxxxxxx. Jika terdapat beberapa ID vSwitch, ID-ID tersebut dipisahkan dengan koma (,). Contoh: vsw-t4n7pokxxxxxxxxxxxxxx,vsw-t4n7pokxxxxxxxxxxxxxx. Jika resource tidak termasuk dalam vSwitch, string kosong "" dikembalikan. |
vsw-t4n7pokxxxxxxxxxxxxxx |
Contoh
Respons sukses
JSONformat
{
"RequestId": "E4D71ACE-6B0A-46E0-8352-56952378CC7F",
"DiscoveredResourceDetail": {
"AvailabilityZone": "cn-hangzhou-h",
"ResourceType": "ACS::ECS::Instance",
"Configuration": "{\"ResourceGroupId\":\"\",\"Memory\":4096,\"InstanceChargeType\":\"PostPaid\",\"Cpu\":2,\"OSName\":\"Windows Server 2022 Datacenter 64-bit (Simplified Chinese)\",\"InstanceNetworkType\":\"vpc\",\"InnerIpAddress\":{\"IpAddress\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"ImageId\":\"win2022_21H2_x64_dtc_zh-cn_40G_alibase_20240110.vhd\",\"EipAddress\":{\"AllocationId\":\"\",\"IpAddress\":\"\",\"InternetChargeType\":\"\"},\"ImageOptions\":{},\"VlanId\":\"\",\"HostName\":\"iZl4i0brknq****\",\"Status\":\"Stopped\",\"HibernationOptions\":{\"Configured\":false},\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"InstanceId\":\"i-bp12g4xbl4i0brkn****\",\"StoppedMode\":\"KeepCharging\",\"CpuOptions\":{\"ThreadsPerCore\":2,\"Numa\":\"ON\",\"CoreCount\":1},\"StartTime\":\"2024-02-29T07:08Z\",\"DeletionProtection\":false,\"VpcAttributes\":{\"PrivateIpAddress\":{\"IpAddress\":[\"172.16.XX.XX\"]},\"VpcId\":\"vpc-bp1wjaw8t272wwmkg****\",\"VSwitchId\":\"vsw-bp103i8xzww5132ul****\",\"NatIpAddress\":\"\"},\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp1h96fz9fagaegp****\"]},\"InternetChargeType\":\"PayByTraffic\",\"InstanceName\":\"test123\",\"DeploymentSetId\":\"\",\"InternetMaxBandwidthOut\":5,\"SerialNumber\":\"6764f567-28fb-4a39-bfc3-48404995****\",\"OSType\":\"windows\",\"CreationTime\":\"2024-02-29T07:08Z\",\"AutoReleaseTime\":\"\",\"Description\":\"\",\"InstanceTypeFamily\":\"ecs.c7\",\"DedicatedInstanceAttribute\":{\"Tenancy\":\"\",\"Affinity\":\"\"},\"PublicIpAddress\":{\"IpAddress\":[\"47.98.XX.XX\"]},\"GPUSpec\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.XX.XX\",\"MacAddress\":\"00:16:3e:0c:**:**\",\"NetworkInterfaceId\":\"eni-bp19uj35v8won3x9****\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.XX.XX\",\"Primary\":true}]}}]},\"SpotPriceLimit\":0.0,\"SaleCycle\":\"\",\"DeviceAvailable\":true,\"InstanceType\":\"ecs.c7.large\",\"OSNameEn\":\"Windows Server 2022 DataCenter Edition 64bit Chinese Edition\",\"SpotStrategy\":\"NoSpot\",\"IoOptimized\":true,\"ZoneId\":\"cn-hangzhou-b\",\"ClusterId\":\"\",\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"\",\"CapacityReservationId\":\"\"},\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\",\"DedicatedHostClusterId\":\"\"},\"GPUAmount\":0,\"OperationLocks\":{\"LockReason\":[]},\"InternetMaxBandwidthIn\":2000,\"Recyclable\":false,\"RegionId\":\"cn-hangzhou\",\"CreditSpecification\":\"\"}",
"Region": "cn-hangzhou",
"ResourceCreationTime": 1709190480000,
"Tags": "{\"key\":\"value\"}",
"AccountId": 0,
"ResourceId": "i-bp12g4xbl4i0brkn****",
"ResourceDeleted": 1,
"ResourceName": "test123",
"ResourceStatus": "Stopped",
"ComplianceType": "COMPLIANT",
"VpcId": "vpc-t4nhheyvay74fp7n0hxxx",
"VSwitchId": "vsw-t4n7pokxxxxxxxxxxxxxx"
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
| 400 | MemberNotBelongToMaster | The specified member does not belong to your organization. | |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.