Queries scenarios.
Operation description
In this example, the scenarios that are created in the China (Hangzhou) region are queried. In the response, a scenario of the Resource Management and a scenario of the Resource Replication type are returned.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the scenario. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
TemplateScratchId | string | No | The ID of the scenario. | ts-7f7a704cf71c49a6**** |
TemplateScratchType | string | No | The type of the resource scenario. Valid values:
| ArchitectureReplication |
Status | string | No | The status of the scenario. Valid values:
| ["GENERATE_COMPLETE"] |
Tags | array<object> | No | The tags of the scenario. | |
object | No | |||
Key | string | Yes | The tag key of the scenario. Note
Tags is optional. If you want to specify Tags, you must specify Key.
| usage |
Value | string | No | The tag value of the scenario. | test |
PageSize | integer | No | The number of entries to return on each page. Maximum value: 50. Default value: 10. | 10 |
PageNumber | integer | No | The number of the page to return. Pages start from page 1. Default value: 1 | 1 |
ResourceGroupId | string | No | The ID of the resource group. | rg-acfmxazb4ph6aiy**** |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "D1C09606-C58B-558F-9B4E-5BF263D17D09",
"TotalCount": 2,
"PageNumber": 1,
"PageSize": 10,
"TemplateScratches": [
{
"TemplateScratchId": "ts-48ad85d66cca4620****",
"TemplateScratchType": "ResourceImport",
"Status": "GENERATE_COMPLETE",
"StatusReason": "Resource ALIYUN::ECS::VPC vpc-m5eauuq80anx59v28**** could not be found for template scratch.",
"FailedCode": "InvalidZoneId",
"PreferenceParameters": [
{
"ParameterKey": "DeletionPolicy",
"ParameterValue": "Retain"
}
],
"Description": "The description of the scenario.",
"SourceResources": [
{
"ResourceId": "vpc-m5eauuq80anx59v28****",
"ResourceType": "ALIYUN::ECS::VPC"
}
],
"SourceTag": {
"ResourceTags": {
"a": "b"
},
"ResourceTypeFilter": [
"ALIYUN::ECS::VPC"
]
},
"SourceResourceGroup": {
"ResourceGroupId": "rg-acfmzawhxxc****",
"ResourceTypeFilter": [
"ALIYUN::ECS::VPC"
]
},
"LogicalIdStrategy": "LongTypePrefixAndIndexSuffix",
"Tags": [
{
"Key": "usage1",
"Value": "test1"
}
],
"CreateTime": "2021-12-07T08:06:44",
"UpdateTime": "2021-12-07T08:06:44",
"ResourceGroupId": "rg-acfm4nxcvht4pmi"
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-10-10 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |