Retrieves the details of a resource scenario.
Operation description
This topic provides an example of how to query the details of the resource scenario ts-7f7a704cf71c49a6**** in the China (Hangzhou) region and display source node data.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:GetTemplateScratch |
get |
*TemplateScratch
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the resource scenario. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| TemplateScratchId |
string |
No |
The ID of the resource scenario. |
ts-7f7a704cf71c49a6**** |
| ShowDataOption |
string |
No |
The data display option. Valid values:
For more information about source nodes and new nodes, see Overview. Note
If you do not specify this parameter, node data is not displayed by default. |
Source |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
A8E0EF98-6FBD-5656-8298-FC8194F0F7B7 |
| TemplateScratch |
object |
The resource scenario. |
|
| TemplateScratchId |
string |
The ID of the resource scenario. |
ts-7f7a704cf71c49a6**** |
| TemplateScratchType |
string |
The type of the resource scenario. Valid values:
|
ArchitectureReplication |
| Status |
string |
The status of the resource scenario. Valid values:
|
GENERATE_COMPLETE |
| StatusReason |
string |
The reason why the resource scenario failed to be generated. Note
This parameter is returned only when Status is set to GENERATE_FAILED. |
Resource ALIYUN::ECS::VPC vpc-m5eauuq80anx59v28**** could not be found for template scratch. |
| FailedCode |
string |
The status code that indicates why the resource scenario failed to be generated. Note
This parameter is returned only when Status is set to GENERATE_FAILED. |
InvalidZoneId |
| TemplateScratchData |
object |
The resource scenario data. |
See the response example. |
| PreferenceParameters |
array<object> |
The configuration parameters of the resource scenario. |
|
|
object |
|||
| ParameterKey |
string |
The parameter name. |
DeletionPolicy |
| ParameterValue |
string |
The parameter value. |
Retain |
| Description |
string |
The description of the resource scenario. |
Copy VPC resources. |
| SourceResources |
array<object> |
The source resources. |
|
|
object |
The source resources. |
||
| ResourceId |
string |
The resource ID. |
vpc-m5e7cv7e9mz69sszb**** |
| ResourceType |
string |
The resource type. |
ALIYUN::ECS::VPC |
| RelatedResourceTypeFilter |
array |
The related resource type filters. |
|
|
string |
The related resource type filter. |
ALIYUN::ECS::VPC |
|
| SourceTag |
object |
The source tag. |
|
| ResourceTags |
object |
The source tags. |
{"a": "b"} |
| ResourceTypeFilter |
array |
The resource type filters. |
|
|
string |
The resource type filter. |
ALIYUN::ECS::VPC |
|
| SourceResourceGroup |
object |
The source resource group. |
|
| ResourceGroupId |
string |
The ID of the source resource group. |
rg-acfmzawhxxc**** |
| ResourceTypeFilter |
array |
The resource type filters. |
|
|
string |
The resource type filter. |
ALIYUN::ECS::VPC |
|
| LogicalIdStrategy |
string |
The logical ID generation strategy. Valid values:
|
LongTypePrefixAndIndexSuffix |
| CreateTime |
string |
The time when the resource scenario was created. The time is displayed in UTC+0 and follows the ISO 8601 standard without the trailing Z. Format: YYYY-MM-DDThh:mm:ss. |
2021-12-22T01:49:22 |
| UpdateTime |
string |
The time when the resource scenario was last updated. The time is displayed in UTC+0 and follows the ISO 8601 standard without the trailing Z. Format: YYYY-MM-DDThh:mm:ss. |
2021-12-22T01:49:23 |
| Stacks |
array<object> |
The list of stacks associated with the resource scenario. |
|
|
object |
|||
| StackId |
string |
The stack ID. |
3708bf6a-3a67-44d4-9eb1-c56704b9**** |
| RegionId |
string |
The region ID of the stack. |
cn-hangzhou |
| UsageType |
string |
The purpose of the stack. Valid values:
|
ArchitectureReplication |
| StackProvision |
object |
The stack provisioning information. |
|
| Creatable |
boolean |
Indicates whether the resource is replicated by calling the CreateStack operation. Valid values:
|
true |
| Importable |
boolean |
Indicates whether the resource is managed by calling the CreateChangeSet operation. Valid values:
|
false |
| ResourceGroupId |
string |
The resource group ID. |
rg-acfmzmhzoaad5oq |
Examples
Success response
JSON format
{
"RequestId": "A8E0EF98-6FBD-5656-8298-FC8194F0F7B7",
"TemplateScratch": {
"TemplateScratchId": "ts-7f7a704cf71c49a6****",
"TemplateScratchType": "ArchitectureReplication",
"Status": "GENERATE_COMPLETE",
"StatusReason": "Resource ALIYUN::ECS::VPC vpc-m5eauuq80anx59v28**** could not be found for template scratch.",
"FailedCode": "InvalidZoneId",
"TemplateScratchData": {
"test": "test",
"test2": 1
},
"PreferenceParameters": [
{
"ParameterKey": "DeletionPolicy",
"ParameterValue": "Retain"
}
],
"Description": "Copy VPC resources.",
"SourceResources": [
{
"ResourceId": "vpc-m5e7cv7e9mz69sszb****",
"ResourceType": "ALIYUN::ECS::VPC",
"RelatedResourceTypeFilter": [
"ALIYUN::ECS::VPC"
]
}
],
"SourceTag": {
"ResourceTags": {
"a": "b"
},
"ResourceTypeFilter": [
"ALIYUN::ECS::VPC"
]
},
"SourceResourceGroup": {
"ResourceGroupId": "rg-acfmzawhxxc****",
"ResourceTypeFilter": [
"ALIYUN::ECS::VPC"
]
},
"LogicalIdStrategy": "LongTypePrefixAndIndexSuffix",
"CreateTime": "2021-12-22T01:49:22",
"UpdateTime": "2021-12-22T01:49:23",
"Stacks": [
{
"StackId": "3708bf6a-3a67-44d4-9eb1-c56704b9****",
"RegionId": "cn-hangzhou",
"UsageType": "ArchitectureReplication"
}
],
"StackProvision": {
"Creatable": true,
"Importable": false
},
"ResourceGroupId": "rg-acfmzmhzoaad5oq"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.