Retrieves the available values for template parameters.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oos:GetTemplateParameterConstraints |
get |
*Template
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| TemplateVersion |
string |
No |
The template version. |
v1 |
| TemplateContent |
string |
No |
The template content in JSON or YAML format. |
{ "Description": "Example template, describe instances in some status", "FormatVersion": "OOS-2019-06-01", "Parameters": {}, "Tasks": [{ "Name": "describeInstances", "Action": "ACS::ExecuteAPI", "Description": "desc-en", "Properties": { "Service": "ECS", "API": "DescribeInstances", "Parameters": { "Status": "Running" } } }] } |
| TemplateName |
string |
No |
The template name. The name can contain letters, digits, hyphens (-), and underscores (_), and can be up to 200 characters in length. |
MyTemplate |
| TemplateURL |
string |
No |
The URL of the file that contains the template body. The URL must point to a template that is located on a web server (HTTP or HTTPS) or in an OSS bucket (for example, oss://ros/template/demo or oss://ros/template/demo?RegionId=cn-hangzhou). The maximum length of the template is 524,288 bytes. If you do not specify the OSS region, the default value is the same as the RegionId parameter. Note
You must specify only one of the following parameters: TemplateBody, TemplateURL, and TemplateId. |
http://oos-template.cn-hangzhou.oss.aliyun-inc.com/oos-test-template.json |
| Parameters |
string |
No |
The template parameters. |
{\"endDate\": \"2022-04-13T03:31:20Z\", \"Status\": \"Stopped\"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
CBEC8072-BEC2-478E-8EAE-E723BA79CF19 |
| ParameterConstraints |
object |
The parameter constraint information. |
[ { "Type": "String", "AllowedValues": [ "ecs.n1.tiny", "ecs.r8a.4xlarge", "ecs.n2.xlarge", "ecs.c7.2xlarge", "ecs.c8i.4xlarge", "ecs.g8i.48xlarge", "ecs.c8a.4xlarge", "ecs.i2.4xlarge", "ecs.r8y.2xlarge" ], "AssociationParameterNames": [ "RegionId", "zoneId" ], "ParameterKey": "instanceType" }, { "Type": "String", "AllowedValues": [], "AssociationParameterNames": [ "RegionId", "zoneId", "InstanceType" ], "ParameterKey": "systemDiskCategory" } ] |
Examples
Success response
JSON format
{
"RequestId": "CBEC8072-BEC2-478E-8EAE-E723BA79CF19",
"ParameterConstraints": [
{
"Type": "String",
"AllowedValues": [
"ecs.n1.tiny",
"ecs.r8a.4xlarge",
"ecs.n2.xlarge",
"ecs.c7.2xlarge",
"ecs.c8i.4xlarge",
"ecs.g8i.48xlarge",
"ecs.c8a.4xlarge",
"ecs.i2.4xlarge",
"ecs.r8y.2xlarge"
],
"AssociationParameterNames": [
"RegionId",
"zoneId"
],
"ParameterKey": "instanceType"
},
{
"Type": "String",
"AllowedValues": [],
"AssociationParameterNames": [
"RegionId",
"zoneId",
"InstanceType"
],
"ParameterKey": "systemDiskCategory"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.