GetTemplateParameterConstraints
Retrieves the allowed values for parameters.
Try it now
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
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 version of the template. | 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 name of the template. The name can contain letters, digits, hyphens (-), and underscores (_). The name 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 Alibaba Cloud Object Storage Service (OSS) bucket, such as oss://ros/template/demo or oss://ros/template/demo?RegionId=cn-hangzhou. The template can be up to 524,288 bytes in length. If you do not specify the region of the OSS bucket, the region specified by the RegionId parameter is used. Note You can specify only one of the TemplateContent, TemplateURL, and TemplateId parameters. | http://oos-template.cn-hangzhou.oss.aliyun-inc.com/oos-test-template.json |
Parameters | string | No | The parameters of the template. | {\"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 information about the parameter constraints. | [ { "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 for a complete list.
Release notes
See 变更详情 for a complete list.