This operation obtains configuration samples for a specified resource type.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetResourceConfigurationSample |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
Yes |
The resource type. For more information about how to obtain the resource type, see ListDiscoveredResources. |
ACS::ECS::Instance |
| MockOnly |
string |
No |
Specifies whether to obtain only mock data, which is not real resource data. Valid values:
|
false |
Response elements
|
Parameter |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
DC300244-FCE3-5061-8214-C27ECB66**** |
| Sample |
object |
The sample. |
|
| ResourceType |
string |
The resource type. |
ACS::ECS::Instance |
| Configuration |
string |
The complete configuration information of the resource. |
{\"Status\":\"Running\",\"HibernationOptions\":{\"Configured\":\"false\"},\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"MetadataOptions\":{\"HttpPutResponseHopLimit\":\"0\",\"HttpTokens\":\"optional\",\"HttpEndpoint\":\"enabled\"},\"InstanceId\":\"i-bp67acfmxazb4p****\",\"InstanceChargeType\":\"PostPaid\",\"Memory\":\"16384\",\"StoppedMode\":\"KeepCharging\",\"CpuOptions\":{\"ThreadsPerCore\":\"4\",\"Numa\":\"2\",\"CoreCount\":\"2\"},\"StartTime\":\"2017-12-10T04:04Z\",\"Cpu\":\"8\",\"OSName\":\"CentOS 7.4 64 bit\",\"DeletionProtection\":\"false\",\"SecurityGroupIds\":{\"SecurityGroupId\":[null]},\"InstanceNetworkType\":\"vpc\",\"InnerIpAddress\":{\"IpAddress\":[\"42.112.**.**\"]},\"ExpiredTime\":\"2017-12-10T04:04Z\",\"EipAddress\":{\"AllocationId\":\"eip-2ze88m67qx5z****\",\"Bandwidth\":\"5\",\"IpAddress\":\"42.112.**.**\",\"IsSupportUnassociate\":\"true\",\"InternetChargeType\":\"PayByTraffic\"},\"ImageId\":\"m-bp67acfmxazb4p****\",\"ImageOptions\":{\"LoginAsNonRoot\":\"false\"},\"HostName\":\"testHostName\",\"Tags\":{\"Tag\":[null]},\"VlanId\":\"10\"} |
| ResourceId |
string |
The resource ID. |
i-bp1aaegapahkh880**** |
| ResourceName |
string |
The resource name. |
my-ecs |
| ResourceStatus |
string |
The resource status. |
Running |
| ResourceDeleted |
string |
The deletion status of the resource. Valid values:
|
1 |
| ResourceCreationTime |
string |
The time when the resource was created. |
1646362560000 |
| Region |
string |
The region ID. |
cn-shanghai |
| Version |
string |
The version information. |
5 |
| AvailabilityZone |
string |
The zone. |
cn-shanghai-g |
| AccountId |
string |
The user ID. |
101339776561**** |
| Tags |
string |
The tag. |
{\"key\":\"value\"} |
Examples
Success response
JSON format
{
"RequestId": "DC300244-FCE3-5061-8214-C27ECB66****",
"Sample": {
"ResourceType": "ACS::ECS::Instance",
"Configuration": "{\\\"Status\\\":\\\"Running\\\",\\\"HibernationOptions\\\":{\\\"Configured\\\":\\\"false\\\"},\\\"ResourceGroupId\\\":\\\"rg-bp67acfmxazb4p****\\\",\\\"MetadataOptions\\\":{\\\"HttpPutResponseHopLimit\\\":\\\"0\\\",\\\"HttpTokens\\\":\\\"optional\\\",\\\"HttpEndpoint\\\":\\\"enabled\\\"},\\\"InstanceId\\\":\\\"i-bp67acfmxazb4p****\\\",\\\"InstanceChargeType\\\":\\\"PostPaid\\\",\\\"Memory\\\":\\\"16384\\\",\\\"StoppedMode\\\":\\\"KeepCharging\\\",\\\"CpuOptions\\\":{\\\"ThreadsPerCore\\\":\\\"4\\\",\\\"Numa\\\":\\\"2\\\",\\\"CoreCount\\\":\\\"2\\\"},\\\"StartTime\\\":\\\"2017-12-10T04:04Z\\\",\\\"Cpu\\\":\\\"8\\\",\\\"OSName\\\":\\\"CentOS 7.4 64 bit\\\",\\\"DeletionProtection\\\":\\\"false\\\",\\\"SecurityGroupIds\\\":{\\\"SecurityGroupId\\\":[null]},\\\"InstanceNetworkType\\\":\\\"vpc\\\",\\\"InnerIpAddress\\\":{\\\"IpAddress\\\":[\\\"42.112.**.**\\\"]},\\\"ExpiredTime\\\":\\\"2017-12-10T04:04Z\\\",\\\"EipAddress\\\":{\\\"AllocationId\\\":\\\"eip-2ze88m67qx5z****\\\",\\\"Bandwidth\\\":\\\"5\\\",\\\"IpAddress\\\":\\\"42.112.**.**\\\",\\\"IsSupportUnassociate\\\":\\\"true\\\",\\\"InternetChargeType\\\":\\\"PayByTraffic\\\"},\\\"ImageId\\\":\\\"m-bp67acfmxazb4p****\\\",\\\"ImageOptions\\\":{\\\"LoginAsNonRoot\\\":\\\"false\\\"},\\\"HostName\\\":\\\"testHostName\\\",\\\"Tags\\\":{\\\"Tag\\\":[null]},\\\"VlanId\\\":\\\"10\\\"}",
"ResourceId": "i-bp1aaegapahkh880****",
"ResourceName": "my-ecs",
"ResourceStatus": "Running",
"ResourceDeleted": "1",
"ResourceCreationTime": "1646362560000",
"Region": "cn-shanghai",
"Version": "5",
"AvailabilityZone": "cn-shanghai-g",
"AccountId": "101339776561****",
"Tags": "{\\\"key\\\":\\\"value\\\"}"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.