Queries the details about a scenario.

In this topic, the details about the ts-7f7a704cf71c49a6**** scenario in the China (Hangzhou) region are queried. The source node data is displayed.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetTemplateScratch

The operation that you want to perform. Set the value to GetTemplateScratch.

RegionId String Yes cn-hangzhou

The ID of the region where the scenario is created.

You can call the DescribeRegions operation to query the most recent region list.

TemplateScratchId String Yes ts-7f7a704cf71c49a6****

The ID of the scenario.

ShowDataOption String No Source

The data display option. Valid values:

  • Source: displays only the data of source nodes.
  • Provisions: displays only the data of new nodes.
  • All: displays all data.

For more information about source nodes and new nodes, see Overview.

Note If you do not set this parameter, the node data is not displayed.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String A8E0EF98-6FBD-5656-8298-FC8194F0F7B7

The ID of the request.

TemplateScratch Object

The scenario.

TemplateScratchId String ts-7f7a704cf71c49a6****

The ID of the scenario.

TemplateScratchType String ArchitectureReplication

The type of the scenario. Valid values:

  • ResourceImport: resource management
  • ArchitectureReplication: resource replication
Status String GENERATE_COMPLETE

The status of the scenario. Valid values:

  • GENERATE_IN_PROGRESS: The scenario is being created.
  • GENERATE_COMPLETE: The scenario is created.
  • GENERATE_FAILED: The scenario fails to be created.
StatusReason String Resource ALIYUN::ECS::VPC vpc-m5eauuq80anx59v28**** could not be found for template scratch.

The reason why the scenario fails to be created.

Note This parameter is returned only if you set the Status parameter to GENERATE_FAILED.
FailedCode String InvalidZoneId

The status code of the scenario that fails to be created.

Note This parameter is returned only if you set the Status parameter to GENERATE_FAILED.
TemplateScratchData Map

The scenario data.

PreferenceParameters Array of PreferenceParameter

The parameters that are configured for the scenario.

ParameterKey String DeletionPolicy

The parameter name.

ParameterValue String Retain

The parameter value.

Description String Replicates a virtual private cloud (VPC) resource.

The description of the scenario.

SourceResources Array of SourceResource

The source resource.

ResourceId String vpc-m5e7cv7e9mz69sszb****

The ID of the resource.

ResourceType String ALIYUN::ECS::VPC

The type of the resource.

SourceTag Object

The source tag.

ResourceTags Map

The resource tags.

ResourceTypeFilter Array of String ALIYUN::ECS::VPC

The filter for resource types.

SourceResourceGroup Object

The source resource group.

ResourceGroupId String rg-acfmzawhxxc****

The ID of the source resource group.

ResourceTypeFilter Array of String ALIYUN::ECS::VPC

The filter for resource types.

LogicalIdStrategy String LongTypePrefixAndIndexSuffix

The policy based on which the logical ID is generated. Default value: LongTypePrefixAndIndexSuffix. Valid values:

  • LongTypePrefixAndIndexSuffix: long-type prefix + index-type suffix
  • LongTypePrefixAndHashSuffix: long-type prefix + hash-type suffix
  • ShortTypePrefixAndHashSuffix: short-type prefix + hash-type suffix
CreateTime String 2021-12-22T01:49:22

The time at which the scenario was created.

The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

UpdateTime String 2021-12-22T01:49:23

The time at which the scenario was updated.

The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

Stacks Array of Stack

The list of stacks that are associated with the scenario.

StackId String 3708bf6a-3a67-44d4-9eb1-c56704b9****

The ID of the stack.

RegionId String cn-hangzhou

The ID of the region to which the stack belongs.

UsageType String ArchitectureReplication

The purpose of the stack. Valid values:

  • ResourceImport: resource management
  • ArchitectureReplication: resource replication
StackProvision Object

The preset information about the stack.

Creatable Boolean true

Indicates whether the resource is replicated by calling the CreateStack operation. Valid values:

  • true
  • false
Importable Boolean false

Indicates whether the resource is managed by calling the CreateChangeSet operation. Valid values:

  • true
  • false

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetTemplateScratch
&RegionId=cn-hangzhou
&TemplateScratchId=ts-7f7a704cf71c49a6****
&ShowDataOption=Source
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetTemplateScratchResponse>
    <TemplateScratch>
        <Status>GENERATE_COMPLETE</Status>
        <Description> Replicates the VPC. </Description>
        <CreateTime>2021-12-22T01:49:22</CreateTime>
        <TemplateScratchId>ts-7f7a704cf71c49a6****</TemplateScratchId>
        <LogicalIdStrategy>LongTypePrefixAndIndexSuffix</LogicalIdStrategy>
        <PreferenceParameters>
            <ParameterValue>vpc-bp1xuamwmphrpcfim****</ParameterValue>
            <ParameterKey>VpcId</ParameterKey>
        </PreferenceParameters>
        <PreferenceParameters>
            <ParameterValue>Retain</ParameterValue>
            <ParameterKey>DeletionPolicy</ParameterKey>
        </PreferenceParameters>
        <PreferenceParameters>
            <ParameterValue>cn-hangzhou</ParameterValue>
            <ParameterKey>RegionId</ParameterKey>
        </PreferenceParameters>
        <PreferenceParameters>
            <ParameterKey>ZoneId</ParameterKey>
        </PreferenceParameters>
        <PreferenceParameters>
            <ParameterKey>VSwitchId</ParameterKey>
        </PreferenceParameters>
        <PreferenceParameters>
            <ParameterKey>InstanceDataReplication</ParameterKey>
        </PreferenceParameters>
        <TemplateScratchData>
            <Source>
                <RegionId>cn-hangzhou</RegionId>
                <Nodes>
                    <ECSVPC_001>
                        <ResourceId>vpc-m5e7cv7e9mz69sszb****</ResourceId>
                        <NodeType>SourceNode</NodeType>
                        <ResourceType>ALIYUN::ECS::VPC</ResourceType>
                        <Properties>
                            <Description>
                                <Type>String</Type>
                            </Description>
                            <SecondaryCidrBlock>
                                <Type>String</Type>
                            </SecondaryCidrBlock>
                            <CidrBlock>
                                <Type>String</Type>
                                <Value>172.16.0.0/12</Value>
                            </CidrBlock>
                            <VpcName>
                                <Type>String</Type>
                                <Value>tf_test</Value>
                            </VpcName>
                            <Ipv6CidrBlock>
                                <Type>String</Type>
                            </Ipv6CidrBlock>
                            <Tags>
                                <Type>List</Type>
                            </Tags>
                            <EnableIpv6>
                                <Type>Boolean</Type>
                                <Value>false</Value>
                            </EnableIpv6>
                            <UserCidr>
                                <Type>String</Type>
                            </UserCidr>
                        </Properties>
                        <ResourceIdentifiers>VpcId</ResourceIdentifiers>
                    </ECSVPC_001>
                </Nodes>
            </Source>
        </TemplateScratchData>
        <UpdateTime>2021-12-22T01:49:23</UpdateTime>
        <Stacks>
            <RegionId>cn-hangzhou</RegionId>
            <UsageType>ArchitectureReplication</UsageType>
            <StackId>3708bf6a-3a67-44d4-9eb1-c56704b9****</StackId>
        </Stacks>
        <TemplateScratchType>ArchitectureReplication</TemplateScratchType>
        <StackProvision>
            <Creatable>true</Creatable>
            <Importable>false</Importable>
        </StackProvision>
        <SourceResources>
            <ResourceId>vpc-m5e7cv7e9mz69sszb****</ResourceId>
            <ResourceType>ALIYUN::ECS::VPC</ResourceType>
        </SourceResources>
    </TemplateScratch>
    <RequestId>A8E0EF98-6FBD-5656-8298-FC8194F0F7B7</RequestId>
</GetTemplateScratchResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TemplateScratch" : {
    "Status" : "GENERATE_COMPLETE",
    "Description": "Replicates a VPC resource."
    "CreateTime" : "2021-12-22T01:49:22",
    "TemplateScratchId" : "ts-7f7a704cf71c49a6****",
    "LogicalIdStrategy" : "LongTypePrefixAndIndexSuffix",
    "PreferenceParameters" : [ {
      "ParameterValue" : "vpc-bp1xuamwmphrpcfim****",
      "ParameterKey" : "VpcId"
    }, {
      "ParameterValue" : "Retain",
      "ParameterKey" : "DeletionPolicy"
    }, {
      "ParameterValue" : "cn-hangzhou",
      "ParameterKey" : "RegionId"
    }, {
      "ParameterKey" : "ZoneId"
    }, {
      "ParameterKey" : "VSwitchId"
    }, {
      "ParameterKey" : "InstanceDataReplication"
    } ],
    "TemplateScratchData" : {
      "Source" : {
        "RegionId" : "cn-hangzhou",
        "Nodes" : {
          "ECSVPC_001" : {
            "ResourceId" : "vpc-m5e7cv7e9mz69sszb****",
            "NodeType" : "SourceNode",
            "ResourceType" : "ALIYUN::ECS::VPC",
            "Properties" : {
              "Description" : {
                "Type" : "String"
              },
              "SecondaryCidrBlock" : {
                "Type" : "String"
              },
              "CidrBlock" : {
                "Type" : "String",
                "Value" : "172.16.0.0/12"
              },
              "VpcName" : {
                "Type" : "String",
                "Value" : "tf_test"
              },
              "Ipv6CidrBlock" : {
                "Type" : "String"
              },
              "Tags" : {
                "Type" : "List"
              },
              "EnableIpv6" : {
                "Type" : "Boolean",
                "Value" : false
              },
              "UserCidr" : {
                "Type" : "String"
              }
            },
            "ResourceIdentifiers" : [ "VpcId" ]
          }
        }
      }
    },
    "UpdateTime" : "2021-12-22T01:49:23",
    "Stacks" : [ {
      "RegionId" : "cn-hangzhou",
      "UsageType" : "ArchitectureReplication",
      "StackId" : "3708bf6a-3a67-44d4-9eb1-c56704b9****"
    } ],
    "TemplateScratchType" : "ArchitectureReplication",
    "StackProvision" : {
      "Creatable" : true,
      "Importable" : false
    },
    "SourceResources" : [ {
      "ResourceId" : "vpc-m5e7cv7e9mz69sszb****",
      "ResourceType" : "ALIYUN::ECS::VPC"
    } ]
  },
  "RequestId" : "A8E0EF98-6FBD-5656-8298-FC8194F0F7B7"
}

Error codes

For a list of error codes, visit the API Error Center.