When you create a stack in the Resource Orchestration Service (ROS) console to manage multiple categories of resources, you may need to open multiple consoles to query resource parameters. In the Parameters section of a template, you can specify AssociationProperty for parameters to query the resources in the specified region and specify AssociationPropertyMetadata to add filter conditions for the parameters. This way, you can select parameter configurations based on optional values in the ROS console.
Parameters
You can specify one of the following types of values for parameters in AssociationPropertyMetadata:
Literal value. For example, if you set AssociationPropertyMetadata to
"RegionId": "cn-hangzhou"
, ROS resolves this value as the literal value cn-hangzhou.Variable. Specify a variable in the
${ParameterKey}
format. For example, if you set AssociationPropertyMetadata to"VpcId": "${VpcId}"
, ROS resolves this value as a variable that varies based on the value of the VpcId parameter in the template.NoteIf you want to specify a variable in the
${ParameterKey}
format as a literal value, you can add an exclamation point (!) to ${ParameterKey} to use the ${!ParameterKey} format. For example, if you set a value to${!Literal}
, ROS resolves this value as${Literal}
.If you want to specify a variable for a parameter in a Terraform template, add a dollar sign (
$
) to${ParameterKey}
to use the $${ParameterKey} format. For example, if you set AssociationPropertyMetadata to"VpcId": "$${VpcId}"
, ROS resolves this value as a variable that varies based on the value of the VpcId parameter in the Terraform template.
The supported parameters in AssociationPropertyMetadata vary based on different categories of resources that you specify as AssociationProperty values. The following section describes the mappings between the AssociationProperty values and the parameters in AssociationPropertyMetadata in ROS.
Basic resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
Auto | ROS automatically generates parameters, such as AssociationProperty and AssociationPropertyMetadata, based on the original data structure of Terraform. Note This value takes effect only for the JSON parameters in Terraform templates. | Overwrite: optional. Appends values to or overwrites the declarations of nested parameters in the inner level. The value of Overwrite is of the dictionary data type and consists of key-value pairs. |
AutoCompleteInput | The random string that is automatically generated by the system. |
|
ChargeType | The billing method. The following billing methods are supported:
| None. |
Code | The code. | None. |
CommaDelimitedList | The array in which elements are separated by commas (,). | None. |
Cron | The CRON expression, which is a formatted string and specifies the execution time of a scheduled task. | None. |
DateTime | The date. |
Example: |
FileContent | The content that is read from a local file. | AcceptFileSuffixes: the formats of files that you can upload. Separate multiple file formats with commas (,). |
GMTZone | The GMT time zone. | Example: |
Json | The JSON object. | None. |
List[Parameter] | The list of parameters. The ROS console displays the values of a parameter only after you click the relevant button. This value takes effect only for JSON parameters. | Parameter: the declarations of parameters. For more information, see Overview. Example: |
List[Parameters] | The list of parameter sets. The parameter sets are displayed in a table in the ROS console. This value takes effect only for JSON parameters. |
|
OOSServiceRole | The Resource Access Management (RAM) role of CloudOps Orchestration Service (OOS). | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
Password | The password. | None. |
RateControl | The rate control for the OOS execution. | Example: |
Tags | The tags. |
Example: |
Targets | The ECS instances that match a condition. You can select ECS instances by conditions such as instance ID, tag, or resource group. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
TextArea | The rich text. | None. |
TimeTriggerWeekly | The time picker that allows you to specify the interval by the day of a week. | Example: |
TimeZone | The time zone. | Example: |
Null | The ROS console displays the settings of a parameter only after you click the relevant button. This value takes effect only for JSON parameters. Note If you specify AssociationPropertyMetadata and do not specify AssociationProperty for a parameter, the ROS console displays the parameter settings only after you click the relevant button. |
Note You can use Metadata together with List[Parameter] to nest parameters. No limit is imposed on nesting levels. |
Container Registry resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ACR::Namespace::Name | The namespace of the container image. |
|
ALIYUN::ACR::Repo::RepoAttribute | The image repository of the Container Registry Personal Edition instance. |
|
ALIYUN::ACR::Repo::Tag | The information about the tag of the container image. |
|
Cloud-native Gateway resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::APIG::Gateway::GatewayId | The information about a cloud-native gateway. |
Example: |
ALB resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ALB::ACL::ACLId | The access control list (ACL) of Application Load Balancer (ALB). | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::ALB::Instance::InstanceId | The ALB instance. |
Example: |
ALIYUN::ALB::LoadBalancer::LoadBalancerId | The ID of the ALB instance. |
Example: |
BOA resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::BSS::PricingModule::ModuleCode | The pricing module information about an Alibaba Cloud service in Alibaba Cloud Transactions and Bills Management OpenAPI (BSS OpenAPI or BOA). |
|
Certificate Management Service resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::CAS::Certificate::CertificateId | The certificate of the Server Load Balancer (SLB) instance. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
CEN resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::CEN::Instance::CenId | The information about the Cloud Enterprise Network (CEN) instance within the current Alibaba Cloud account. |
|
ALIYUN::CEN::TransitRouter::TransitRouterId | The information about the transit router that is connected to the CEN instance. |
|
CloudMonitor resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::CMS::Alarm::MetricSelector | The details of available metrics in CloudMonitor. | |
ALIYUN::CMS::Alarm::Rule | The threshold-triggered alert rule. | Example: |
ALIYUN::CMS::Alarm::SilenceTime | The mute period of the alert. | Example: |
ALIYUN::CMS::Alarm::TriggerResources | The resources that trigger alerts. | Example: |
ALIYUN::CMS::Event::EventFilterRule | The event-triggered alert rule. | Example: |
ALIYUN::CMS::Event::EventLevel | The level of the event that triggers alerts. | Example: |
ALIYUN::CMS::Event::EventName | The name of the event that triggers alerts. | Example: |
ALIYUN::CMS::Product::ProductType | The cloud service to which the event-triggered alert rule is applied. | Example: |
Container Registry resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::CR::Instance::InstanceId | The information about the Container Registry Enterprise Edition instance. |
|
ALIYUN::CR::NameSpace::Name | The information about the namespace of the Container Registry Enterprise Edition instance. |
|
ALIYUN::CR::Repository::RepoName | The information about the repository of the Container Registry Enterprise Edition instance. |
|
ALIYUN::CR::Repository::Tag | The information about the image tag of the Container Registry Enterprise Edition instance. |
|
ACK resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::CS::Cluster::ClusterId | The ID of the Container Service for Kubernetes (ACK) cluster. |
Example: |
ALIYUN::CS::Cluster::ClusterNodePool | The node pool in the ACK cluster. |
Example: |
ALIYUN::CS::Cluster::KubernetesVersion | The information about the Kubernetes version. |
|
ALIYUN::CS::ManagedKubernetesCluster::ServiceCidr | The information about the Service CIDR block of the ACK managed cluster. |
|
Compute Nest resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ComputeNest::Artifact::ArtifactId | The information about the Compute Nest deployment package. |
|
ALIYUN::ComputeNest::Artifact::ArtifactIdVersion | The information about the version of the Compute Nest deployment package. |
|
ALIYUN::ComputeNest::Service::ServiceId | The ID of the service in Compute Nest. |
Example: |
ALIYUN::ComputeNest::ServiceInstance::ServiceInstanceId | The ID of the service instance in Compute Nest. |
Example: |
ALIYUN::ComputeNestSupplier::Service::ServiceVersion | The version of the service in Compute Nest. |
Example: |
Compute Nest service provider resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ComputeNestSupplier::Service::ServiceVersion | The version of the service in Compute Nest. |
Example: |
DNS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::DNS::Domain::ValidateDomain | The availability of the domain name of Alibaba Cloud DNS (DNS). |
|
DashVector resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::DashVector::ApiKey | The API key of DashVector. |
Domain name resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Domain::DomainName | The information about the domain name. |
|
EAS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::EAS::Instance::InstanceType | The specifications of the Elastic Algorithm Service (EAS) instance. |
|
ALIYUN::EAS::Resource::ResourceId | The information about the resource group of EAS. |
|
EDS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ECD::Bundle::DesktopType | The information about the cloud computer type of Elastic Desktop Service (EDS). |
|
Elastic Container Instance resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ECI::ContainerGroup::ContainerGroupId | The information about the container group of the elastic container instance. |
|
ECS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ECS::ZoneId | The zone ID of ECS. |
Example: |
ALIYUN::ECS::Command::CommandId | The ID of the Cloud Assistant command or Alibaba Cloud command. |
Example: |
ALIYUN::ECS::DeploymentSet::DeploymentSetId | The ID of the deployment set of ECS. |
|
ALIYUN::ECS::Disk::DataDiskCategory | The category of the data disk. |
Example: |
ALIYUN::ECS::Disk::DiskId | The disk ID. |
Example: |
ALIYUN::ECS::Disk::SystemDiskCategory | The category of the system disk. |
Example: |
ALIYUN::ECS::Image::ImageId | The image ID. |
Example: |
ALIYUN::ECS::Instance::AttributeSelector | The property selector of the ECS instance. | Example: |
ALIYUN::ECS::Instance::InstanceId | The ID of the ECS instance. |
Example: |
ALIYUN::ECS::Instance::InstancePropertyEditor | The property editor of the ECS instance. | Example: |
ALIYUN::ECS::Instance::InstanceType | The ECS instance specifications. |
Example: |
ALIYUN::ECS::Instance::MaxBandwidthIn | The maximum inbound public bandwidth of the ECS instance. | Example: |
ALIYUN::ECS::Instance::OSType | The OS type of the ECS instance. |
|
ALIYUN::ECS::Instance::Password | The component of the password of the ECS instance. Note The password must be 8 to 30 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. | Example: |
ALIYUN::ECS::Instance::RenewPeriod | The renewal period of the ECS instance. | Example: |
ALIYUN::ECS::Instance::StopMode | The mode in which the ECS instance is stopped. | Example: |
ALIYUN::ECS::InstanceType::AvailableInstanceType | The available ECS instance types. | Example: |
ALIYUN::ECS::KeyPair::KeyPairName | The key pair. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::ECS::LaunchTemplate::LaunchTemplateId | The ID of the launch template. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::ECS::LaunchTemplate::LaunchTemplateVersion | The version of the launch template. |
Example: |
ALIYUN::ECS::ManagedInstance::InstanceId | The ID of the managed ECS instance. |
Example: |
ALIYUN::ECS::RAM::Role | The RAM role that is assigned to the ECS instance. | Example: |
ALIYUN::ECS::RegionId | The region ID. By default, the region ID of the stack is used. | Example: |
ALIYUN::ECS::RegionId::RegionDeploy | The ECS deployment region. | |
ALIYUN::ECS::RegionId::TargetRegionIds | The IDs of the destination regions of the ECS instance. | Example: |
ALIYUN::ECS::ResourceGroup::ResourceGroupId | The resource group. | Example: |
ALIYUN::ECS::SecurityGroup::PortRange | The port range of the ECS security group based on the IP protocol. |
|
ALIYUN::ECS::SecurityGroup::SecurityGroupId | The ID of the security group. |
Example: |
ALIYUN::ECS::Snapshot::AutoSnapshotPolicyId | The ID of the automatic snapshot policy. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::ECS::Snapshot::SnapshotId | The ID of the disk snapshot of the ECS instance. |
Example: |
ALIYUN::ECS::TAG | The information about the tag of the ECS instance. |
Example: |
ALIYUN::ECS::VPC::VPCId | The VPC ID. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::ECS::VSwitch | The vSwitch. |
Example: |
E-HPC resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::EHPC::Cluster::ClusterId | The cluster. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::EHPC::FileSystem::FileSystemId | The ID of the file system. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::EHPC::FileSystem::MountTargetDomain | The mount target. |
Example: |
Auto Scaling resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ESS::AutoScalingGroup::AutoScalingGroupId | The ID of the scaling group of Auto Scaling. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::ESS::ECIScalingConfiguration::ContainerName | The configurations of the scaling group of the elastic container instance type. |
|
ALIYUN::ESS::ECIScalingConfiguration::ScalingConfigurationId | The ID of the scaling configuration. |
|
ALIYUN::ESS::ScalingConfiguration::ScalingConfigurationId | The ID of the scaling configuration of Auto Scaling. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
Elasticsearch resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Elasticsearch::Instance::InstanceType | The specifications of the Elasticsearch instance. | Example: |
EMR resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Emr::ECSCluster::ClusterId | The E-MapReduce (EMR) clusters. |
|
Function Compute 3.0 resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::FC3::Function::FunctionName | The information about the function in Function Compute 3.0. |
|
Function Compute 2.0 resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::FC::Function::FunctionName | The information about the function in Function Compute 2.0. |
|
ALIYUN::FC::Service::ServiceName | The information about the service in Function Compute 2.0. |
|
Alibaba Cloud DevOps Flow resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Flow::Connection::ConnectionId | The service connection in Alibaba Cloud DevOps. |
|
ALIYUN::Flow::Organization::OrganizationId | The organization workspace within the current account. |
|
Hologres resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Hologres::Instance::InstanceId | The ID of the Hologres instance. |
|
InfluxDB resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::InfluxDB::Instance::InstanceType | The specifications of the Time Series Database for InfluxDB® (InfluxDB) instance. |
Example: |
ApsaraMQ for Kafka resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Kafka::Instance::InstanceId | The information about the ApsaraMQ for Kafka instance in the specified region. |
|
Lindorm resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Lindorm::Instance::InstanceId | The Lindorm instances. |
|
ApsaraDB for MongoDB resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::MongoDB::Instance::InstanceType | The specifications of the ApsaraDB for MongoDB instance. | Example: |
NAS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::NAS::FileSystem::FileSystemId | The information about the file system. |
|
ALIYUN::NAS::FileSystem::MountTargetDomain | The address of the mount target. |
|
NLB resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::NLB::LoadBalancer::LoadBalancerId | The ID of the Network Load Balancer (NLB) instance. |
Example: |
ALIYUN::NLB::Zone::ZoneId | The zone of the NLB instance. |
Example: |
OOS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::OOS::Command::CommandContent | The script of the OOS execution. | CommandType: the command type. Valid values:
Example: |
ALIYUN::OOS::Component::TimerTrigger | The component that you want to use for the OOS time trigger. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::OOS::File::FileUrl | The URL to which you want to upload the file. |
Example: |
ALIYUN::OOS::Package::PackageName | The name of the OOS software package. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::OOS::Package::PackageVersion | The version of the OOS software package. |
Example: |
ALIYUN::OOS::Parameter::Value | The common parameter of OOS. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::OOS::PatchBaseline::PatchBaselineName | The information about the patch baseline of OOS. |
|
ALIYUN::OOS::SecretParameter::Value | The encryption parameter of OOS. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::OOS::Template::TemplateName | The OOS template. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::OOS::Template::TemplateVersion | The version of the OOS template. |
Example: |
OSS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::OSS::Bucket::BucketName | The name of the OSS bucket. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::OSS::Bucket::Object | The OSS object. |
Example: |
ALIYUN::OSS::Object::ObjectName | The name of the OSS object. |
Example: |
UploadFilesToUserBucket | The component of uploading objects to OSS. |
Example: |
PolarDB resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::POLARDB::DBCluster::DBClusterId | The ID of the PolarDB cluster. |
Example: |
ALIYUN::POLARDB::DBCluster::DBNodeClass | The available resources in a PolarDB cluster. |
Example: |
RAM resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::RAM::Role | The RAM role. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::RAM::User | The RAM user. | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ApsaraDB RDS resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::RDS::Engine::EngineId | The database engine type of ApsaraDB RDS. | Example: |
ALIYUN::RDS::Engine::EngineVersion | The database engine version of ApsaraDB RDS. | Engine: the database engine type. Example: |
ALIYUN::RDS::Instance::AccountPassword | The password of the ApsaraDB RDS database account. | Example: |
ALIYUN::RDS::Instance::InstanceId | The ID of the ApsaraDB RDS instance. |
Example: |
ALIYUN::RDS::Instance::InstanceType | The specifications of the ApsaraDB RDS instance. |
Example: |
Tair (Redis OSS-compatible) resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Redis::Instance::InstanceId | The ID of the Tair (Redis OSS-compatible) instance. |
Example: |
ALIYUN::Redis::Instance::InstanceType | The specifications of the Tair (Redis OSS-compatible) instance. |
Example: |
Resource Management resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ResourceManager::Account | The account in the resource directory. | Example: |
ALIYUN::ResourceManager::Folder | The resource directory. | Example: |
SLB resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::SLB::ACL::ACLId | The ACL ID of SLB. |
Example: |
ALIYUN::SLB::Instance::InstanceType | The specifications of the SLB instance. |
Example: |
ALIYUN::SLB::LoadBalancer::LoadBalancerId | The ID of the SLB instance. |
Example: |
ALIYUN::SLB::LoadBalancer::ZoneId | The information about the zone of the SLB instance. |
|
Service Catalog resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::ServiceCatalog::LaunchOption::PortfolioId | The ID of the product portfolio of Service Catalog. |
Example: |
ALIYUN::ServiceCatalog::ProductVersion::ProductVersionId | The ID of the product version of Service Catalog. |
Example: |
Tag resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::Tag::TagKey | The information about the tag. |
|
ALIYUN::Tag::TagValue | The tag value that corresponds to a specified a tag key. |
|
User resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::User::Account::AccountIds | The account IDs. | Example: |
ALIYUN::User::AccountId | The ID of the Alibaba Cloud account. | |
ALIYUN::User::UserId | The ID of the Alibaba Cloud user. |
VPC resource
Value of AssociationProperty | Description | Parameter in AssociationPropertyMetadata |
ALIYUN::VPC::EIP::AllocationId | The information about the elastic IP address (EIP). |
|
ALIYUN::VPC::NatGateway::NatGatewayId | The ID of the NAT gateway. |
Example: |
ALIYUN::VPC::VPC::CidrBlock | The CIDR block of the new VPC. | Example: |
ALIYUN::VPC::VSwitch::CidrBlock | The CIDR block that you want to use to create a vSwitch. |
Example: |
ALIYUN::VPC::VSwitch::VSwitchId | The vSwitch ID. |
Example: |
ALIYUN::VPC::VirtualBorderRouter::RouteTableId | The ID of the virtual border router (VBR). | RegionId: the region ID. By default, the region ID of the stack is used. Example: |
ALIYUN::VPC::Zone::ZoneId | The information about the zone in the VPC. |
|
Usage examples
Example 1: AssociationProperty
In this example, AssociationProperty is set to ALIYUN::ECS::Image::ImageId to query the IDs of all images in the specified region.
JSON format:
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"UserName": {
"Label": "Username",
"Description": "Enter the username",
"Default": "anonymous",
"Type": "String",
"MinLength": "6",
"MaxLength": "12",
"AllowedValues": [
"anonymous",
"user-one",
"user-two"
]
},
"PassWord": {
"Label": "Password",
"NoEcho": "True",
"Description": "Enter the password",
"Type": "String",
"MinLength": "1",
"MaxLength": "41",
"AllowedPattern": "[a-zA-Z0-9]*"
},
"ImageId": {
"Label": "Image",
"Type": "String",
"Description": "Select an image",
"AssociationProperty": "ALIYUN::ECS::Image::ImageId",
"Default": "centos_7_7_x64_20G_alibase_2020****.vhd"
}
}
}
YAML format:
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
UserName:
Label: Username
Description: Enter the username
Default: anonymous
Type: String
MinLength: '6'
MaxLength: '12'
AllowedValues:
- anonymous
- user-one
- user-two
PassWord:
Label: Password
NoEcho: 'True'
Description: Enter the password
Type: String
MinLength: '1'
MaxLength: '41'
AllowedPattern: '[a-zA-Z0-9]*'
ImageId:
Label: Image
Type: String
Description: Select an image
AssociationProperty: ALIYUN::ECS::Image::ImageId
Default: centos_7_7_x64_20G_alibase_2020****.vhd
The following section describes the parameters:
UserName: the username. The value of UserName is of the string data type and must be 6 to 12 characters in length. Valid values:
anonymous (default)
user-one
user-two
PassWord: the password. The value of PassWord is of the string data type. No default value is provided. The value must be 1 to 41 characters in length, and can contain letters and digits.
NoEcho is set to true. A value of true specifies that ROS returns a password masked as asterisks (*) after you query the stack.
ImageId: the image ID. The value of ImageId is of the string data type.
AssociationProperty is set to ALIYUN::ECS::Image::ImageId. This way, the ROS console checks whether the ID of the specified image is available when you create the stack. The ROS console also displays the IDs of other images that are available in the same region as the specified image in a drop-down list.
Example 2: AssociationPropertyMetadata
In this example, AssociationProperty and AssociationPropertyMetadata are specified to query the vSwitch in the specified VPC and zone. For AssociationPropertyMetadata, RegionId is set to the literal value cn-hangzhou, VpcId is set to the variable ${VpcId}, and ZoneId is set to the variable ${EcsZone}. ${VpcId} varies based on the value of ALIYUN::ECS::VPC::VPCId, and ${EcsZone} varies based on the value of ZoneId. This way, the vSwitch is associated with the specified VPC and zone.
The AllowedValues parameter is specified for EcsZone. AutoChangeType is set to false in AssociationPropertyMetadata. This way, the ROS console displays the values of the AllowedValues parameter as a drop-down list.
JSON format:
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"VpcId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"EcsZone": {
"Type": "String",
"AllowedValues": [
"cn-hangzhou-i",
"cn-hangzhou-j",
"cn-hangzhou-k",
"cn-hangzhou-h"
],
"AssociationPropertyMetadata": {
"AutoChangeType": false
}
},
"VSwitchId": {
"Type": "String",
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"RegionId": "cn-hangzhou",
"VpcId": "${VpcId}",
"ZoneId": "${EcsZone}"
}
}
}
}
YAML format:
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
VpcId:
Type: String
AssociationProperty: ALIYUN::ECS::VPC::VPCId
EcsZone:
Type: String
AllowedValues:
- cn-hangzhou-i
- cn-hangzhou-j
- cn-hangzhou-k
- cn-hangzhou-h
AssociationPropertyMetadata:
AutoChangeType: false
VSwitchId:
Type: String
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
AssociationPropertyMetadata:
RegionId: cn-hangzhou
VpcId: ${VpcId}
ZoneId: ${EcsZone}
Example 3: Automatic conversion of Terraform
If you set AssociationProperty to Auto, ROS automatically generates parameters, such as AssociationProperty and AssociationPropertyMetadata, based on the original data structure of Terraform.
More examples
You can use AssociationProperty and AssociationPropertyMetadata to perform the following operations: