In your template's parameter settings, specify AssociationProperty to retrieve resources from the selected region and AssociationPropertyMetadata to add filter conditions. This lets you dynamically select parameter values in the console instead of looking them up across multiple consoles.
Parameters
Values for AssociationPropertyMetadata:
-
Specify a value for a parameter. For example, for
"RegionId": "cn-hangzhou", OOS uses the cn-hangzhou region. -
Specify a variable for a parameter in the format
${ParameterKey}. For example, for"VpcId": "${VpcId}", OOS dynamically retrieves the VpcId parameter's value from the current template.Note-
To treat an expression like
${ParameterKey}as a literal string, add an exclamation mark (!) inside the braces. For example,${!Literal}evaluates to the literal string${Literal}. -
If you want to use a parameter variable in a Terraform template, add an additional
$before the$character. For example, if you specify"VpcId": "$${VpcId}", OOS dynamically retrieves the value of VpcId from the Terraform template.
-
The AssociationPropertyMetadata varies depending on the resource specified in AssociationProperty.
Custom resource
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::Resource::Data::API |
Queries data from the OpenAPI of an Alibaba Cloud product based on specified parameters. |
The following is an example: |
Basic resources
|
Value |
Description |
AssociationPropertyMetadata |
|
Auto |
Operation Orchestration Service (OOS) automatically generates fields such as Note
This property applies only to JSON-type parameters in Terraform templates. |
This parameter is optional and is a dictionary data type. It consists of the following components: |
|
AutoCompleteInput |
Automatically generates a random string. |
|
|
ChargeType |
The billing method. Valid values:
|
None |
|
Code |
Used for code input. |
None |
|
CommaDelimitedList |
An array of comma-separated values. |
None |
|
Cron |
A cron expression, which is a formatted string that specifies the execution time for a scheduled task. |
None |
|
DateTime |
A date and time value. |
Example: |
|
FileContent |
Reads content from a local file. |
|
|
GMTZone |
GMT time zone selection. |
Example: |
|
Json |
Used for JSON object input. |
None |
|
List[Parameter] |
A list of parameters, displayed with indentation. This property applies only to |
For more information, see Overview. Example: |
|
List[Parameters] |
A list of parameter groups, displayed in a table. This property applies only to |
|
|
OOSServiceRole |
Specifies the OOS service role. |
Example: |
|
Password |
Used for password input. |
None |
|
RateControl |
Specifies the execution rate for OOS. |
Example: |
|
Tags |
Used for resource tags. |
Example: |
|
Targets |
ECS instance objects. You can select instances by instance ID, tag, resource group, and more. |
Example: |
|
TextArea |
Used for rich text input. |
None |
|
TimeTriggerWeekly |
Selects a time on a weekly basis. |
Example: |
|
TimeZone |
Time zone selection. |
Example: |
|
None |
Displayed with indentation. This property applies only to Note
If you specify |
Note
You can combine this with |
ACR resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::ACR::Namespace::Name |
Queries container image namespaces. |
|
|
ALIYUN::ACR::Repo::RepoAttribute |
Queries image repositories in ACR Personal Edition. |
|
|
ALIYUN::ACR::Repo::Tag |
Queries container image tags. |
|
APIG resource
|
Value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::APIG::Gateway::GatewayId |
Retrieves information about a cloud-native gateway. |
Example: |
ALB resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::ALB::ACL::ACLId |
An ALB access control list (ACL). |
|
|
ALIYUN::ALB::Instance::InstanceId |
The ID of an ALB instance. |
|
|
ALIYUN::ALB::LoadBalancer::LoadBalancerId |
The ID of an ALB instance. |
|
Bailian
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::Bailian::ApiKey::ApiKeyInfo |
Retrieves information about an Alibaba Cloud Model Studio API key. |
|
BSS resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::BSS::PricingModule::ModuleCode |
Queries the pricing module information for a specific Alibaba Cloud product. |
|
CAS resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::CAS::Certificate::CertificateId |
The certificate ID for an SLB instance. |
RegionId: The ID of the region where the certificate is located. Defaults to the region of the stack. Example: |
CEN resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::CEN::Instance::CenId |
Lists the Cloud Enterprise Network (CEN) instances within the specified resource group. |
|
|
ALIYUN::CEN::TransitRouter::TransitRouterId |
Lists the transit router instances within the specified CEN instance. |
|
CMS resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::CMS::Alarm::MetricSelector |
Available CloudMonitor metrics. |
|
|
ALIYUN::CMS::Alarm::Rule |
A threshold-triggered alert rule. |
Example: |
|
ALIYUN::CMS::Alarm::SilenceTime |
The silence time for an alert. |
Example: |
|
ALIYUN::CMS::Alarm::TriggerResources |
Resources that trigger an alert. |
Example: |
|
ALIYUN::CMS::Event::EventFilterRule |
An event-triggered alert rule. |
Example: |
|
ALIYUN::CMS::Event::EventLevel |
The level of an event-triggered alert. |
Example: |
|
ALIYUN::CMS::Event::EventName |
The name of an event-triggered alert. |
Example: |
|
ALIYUN::CMS::Product::ProductType |
The cloud service for the event-triggered alert rule. |
Example: |
CR resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::CR::Instance::InstanceId |
Queries Container Registry Enterprise Edition instances. |
|
|
ALIYUN::CR::NameSpace::Name |
Queries Container Registry Enterprise Edition namespaces. |
|
|
ALIYUN::CR::Repository::RepoName |
Queries Container Registry Enterprise Edition repositories. |
|
|
ALIYUN::CR::Repository::Tag |
Queries the tags of a Container Registry Enterprise Edition repository. |
|
CS resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::CS::Cluster::ClusterId |
The ID of an ACK cluster. |
Example: |
|
ALIYUN::CS::Cluster::ClusterNodePool |
A node pool in an ACK cluster. |
Example: |
|
ALIYUN::CS::Cluster::KubernetesVersion |
The Kubernetes versions that are available. |
|
|
ALIYUN::CS::ManagedKubernetesCluster::ServiceCidr |
The service CIDR block for an ACK managed cluster. |
|
Compute Nest resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::ComputeNest::Artifact::ArtifactId |
The ID of a Compute Nest artifact. |
|
|
ALIYUN::ComputeNest::Artifact::ArtifactIdVersion |
The version of a Compute Nest artifact. |
|
|
ALIYUN::ComputeNest::Service::ServiceId |
The ID of a Compute Nest service. |
Example: |
|
ALIYUN::ComputeNest::ServiceInstance::ServiceInstanceId |
The ID of a Compute Nest service instance. |
Example: |
|
ALIYUN::ComputeNestSupplier::Service::ServiceVersion |
The version of a Compute Nest service. |
Example: |
ComputeNestSupplier resources
|
AssociationProperty value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::ComputeNestSupplier::Service::ServiceVersion |
The Compute Nest service version. |
Example: |
DNS resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::DNS::Domain::ValidateDomain |
Checks the availability of a domain name for Alibaba Cloud DNS. |
|
DashVector resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::DashVector::ApiKey |
The API key for the DashVector vector search service. |
|
Domain resource
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::Domain::DomainName |
Queries information about a domain name. |
|
EAS resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::EAS::Instance::InstanceType |
Available instance types for an Elastic Algorithm Service (EAS) instance. |
|
|
ALIYUN::EAS::Resource::ResourceId |
Lists EAS resource groups. |
|
ECD resources
|
AssociationProperty value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::ECD::Bundle::DesktopType |
Queries available desktop types. |
|
ECI resources
|
Value |
Description |
Associated metadata |
|
ALIYUN::ECI::ContainerGroup::ContainerGroupId |
Queries ECI container groups. |
|
ECS resources
|
Value |
Description |
Association property metadata |
|
ALIYUN::ECS::ZoneId |
The ID of the ECS zone. |
Example: |
|
ALIYUN::ECS::Command::CommandId |
The ID of a Cloud Assistant or public command. |
Example: |
|
ALIYUN::ECS::DeploymentSet::DeploymentSetId |
The ID of an ECS deployment set. |
|
|
ALIYUN::ECS::Disk::DataDiskCategory |
The data disk category. |
Example: |
|
ALIYUN::ECS::Disk::DiskId |
The ID of the disk. |
Example: |
|
ALIYUN::ECS::Disk::SystemDiskCategory |
The system disk category. |
Example: |
|
ALIYUN::ECS::Image::ImageId |
The ID of the image. |
Example: |
|
ALIYUN::ECS::Instance::AttributeSelector |
The attribute selector for ECS instances. |
Example: |
|
ALIYUN::ECS::Instance::InstanceId |
The ID of an ECS instance. |
Example: |
|
ALIYUN::ECS::Instance::InstancePropertyEditor |
The property editor for ECS instances. |
Example: |
|
ALIYUN::ECS::Instance::InstanceType |
The ECS instance type. |
Example: |
|
ALIYUN::ECS::Instance::MaxBandwidthIn |
The maximum inbound public bandwidth for an ECS instance. |
Example: |
|
ALIYUN::ECS::Instance::OSType |
The operating system type of an ECS instance. |
|
|
ALIYUN::ECS::Instance::Password |
The password component for an ECS instance. Note
The password must be 8 to 30 characters long and 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 an ECS instance. |
Example: |
|
ALIYUN::ECS::Instance::StopMode |
The stop mode for an ECS instance. |
Example: |
|
ALIYUN::ECS::InstanceType::AvailableInstanceType |
The available ECS instance types. |
Example: |
|
ALIYUN::ECS::KeyPair::KeyPairName |
The name of the key pair. |
RegionId: The ID of the region. Defaults to the region where the stack is located. Example: |
|
ALIYUN::ECS::LaunchTemplate::LaunchTemplateId |
The ID of a launch template. |
RegionId: The ID of the region. Defaults to the region where the stack is located. Example: |
|
ALIYUN::ECS::LaunchTemplate::LaunchTemplateVersion |
The version of the launch template. |
Example: |
|
ALIYUN::ECS::ManagedInstance::InstanceId |
The ID of a managed instance. |
Example: |
|
ALIYUN::ECS::RAM::Role |
The instance RAM role to attach to an ECS instance. |
Example: |
|
ALIYUN::ECS::RegionId |
The ID of the region. Defaults to the region where the stack is located. |
Example: |
|
ALIYUN::ECS::RegionId::RegionDeploy |
The deployment region for an ECS instance. |
|
|
ALIYUN::ECS::RegionId::TargetRegionIds |
The ID of the destination region for an ECS instance. |
Example: |
|
ALIYUN::ECS::ResourceGroup::ResourceGroupId |
The ID of the resource group. |
Example: |
|
ALIYUN::ECS::SecurityGroup::PortRange |
The port range for a security group rule, based on the specified IP protocol. |
|
|
ALIYUN::ECS::SecurityGroup::SecurityGroupId |
The ID of a security group. |
Example: |
|
ALIYUN::ECS::Snapshot::AutoSnapshotPolicyId |
The ID of an automatic snapshot policy. |
RegionId: The ID of the region. Defaults to the region where the stack is located. Example: |
|
ALIYUN::ECS::Snapshot::SnapshotId |
The ID of a snapshot of an ECS disk. |
Example: |
|
ALIYUN::ECS::TAG |
The tags attached to an ECS instance. |
Example: |
|
ALIYUN::ECS::VPC::VPCId |
The ID of a VPC. |
RegionId: The ID of the region. Defaults to the region where the stack is located. Example: |
|
ALIYUN::ECS::vSwitch |
The ID of the vSwitch. |
Example: |
EHPC resources
|
AssociationProperty |
Description |
AssociationPropertyMetadata |
|
ALIYUN::EHPC::Cluster::ClusterId |
The ID of the EHPC cluster. |
Example: |
|
ALIYUN::EHPC::FileSystem::FileSystemId |
The ID of the file system. |
Example: |
|
ALIYUN::EHPC::FileSystem::MountTargetDomain |
The mount target. |
Example: |
ESS resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::ESS::AutoScalingGroup::AutoScalingGroupId |
The ID of an Auto Scaling group. |
RegionId: The region ID. Defaults to the region where the stack resides. Example: |
|
ALIYUN::ESS::ECIScalingConfiguration::ContainerName |
The name of a container in an ECI scaling configuration. |
|
|
ALIYUN::ESS::ECIScalingConfiguration::ScalingConfigurationId |
The ID of an ECI scaling configuration. |
|
|
ALIYUN::ESS::ScalingConfiguration::ScalingConfigurationId |
The ID of a scaling configuration. |
RegionId: The region ID. Defaults to the region where the stack resides. Example: |
Elasticsearch resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::Elasticsearch::Instance::InstanceType |
The Elasticsearch instance type. |
Example: |
EMR resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::Emr::ECSCluster::ClusterId |
Queries E-MapReduce (EMR) clusters. |
|
FC3 resources
|
Value |
Description |
AssociationPropertyMetadata parameters |
|
ALIYUN::FC3::Function::FunctionName |
Lists Function Compute functions. |
|
FC resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::FC::Function::FunctionName |
Queries functions in legacy Function Compute. |
|
|
ALIYUN::FC::Service::ServiceName |
Queries services in legacy Function Compute. |
|
Flow
|
Value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::Flow::Connection::ConnectionId |
Gets a list of service connections in Alibaba Cloud DevOps. |
|
|
ALIYUN::Flow::Organization::OrganizationId |
Gets a list of organizations for the current user. |
|
Hologres resources
|
Association property |
Description |
Association property metadata |
|
ALIYUN::Hologres::Instance::InstanceId |
Retrieves Hologres instance IDs. |
|
InfluxDB resources
|
AssociationProperty value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::InfluxDB::Instance::InstanceType |
The instance type for TSDB for InfluxDB®. |
Example: |
Kafka
|
AssociationProperty value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::Kafka::Instance::InstanceId |
Lists the ApsaraMQ for Kafka instances in a specified region. |
|
Lindorm resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::Lindorm::Instance::InstanceId |
Lists Lindorm instances. |
|
MongoDB resources
|
Value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::MongoDB::Instance::InstanceType |
Available instance types for an ApsaraDB for MongoDB instance. |
Example: |
NAS resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::NAS::FileSystem::FileSystemId |
Retrieves a list of file systems. |
|
|
ALIYUN::NAS::FileSystem::MountTargetDomain |
Retrieves a list of mount target domains. |
|
NLB resources
|
Value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::NLB::LoadBalancer::LoadBalancerId |
The ID of a Network Load Balancer (NLB) instance. |
Example: |
|
ALIYUN::NLB::Zone::ZoneId |
The available zones for Network Load Balancer (NLB). |
Example: |
OOS
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::OOS::Command::CommandContent |
An Operation Orchestration Service (OOS) execution script. |
CommandType: The command type. Valid values:
Example: |
|
ALIYUN::OOS::Component::TimerTrigger |
An OOS time trigger. |
RegionId: The region ID. Defaults to the stack's region. Example: |
|
ALIYUN::OOS::File::FileUrl |
The URL for uploading a file. |
Example: |
|
ALIYUN::OOS::Package::PackageName |
The name of an OOS software package. |
RegionId: The region ID. Defaults to the stack's region. Example: |
|
ALIYUN::OOS::Package::PackageVersion |
The version of an OOS software package. |
Example: |
|
ALIYUN::OOS::Parameter::Value |
An OOS common parameter. |
RegionId: The region ID. Defaults to the stack's region. Example: |
|
ALIYUN::OOS::PatchBaseline::PatchBaselineName |
An OOS patch baseline. |
|
|
ALIYUN::OOS::SecretParameter::Value |
An OOS secret parameter. |
RegionId: The region ID. Defaults to the stack's region. Example: |
|
ALIYUN::OOS::Template::TemplateName |
An OOS template. |
RegionId: The region ID. Defaults to the stack's region. Example: |
|
ALIYUN::OOS::Template::TemplateVersion |
The version of an OOS template. |
The following is an example: |
OSS resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::OSS::Bucket::BucketName |
The name of an OSS bucket. |
Example: |
|
ALIYUN::OSS::Bucket::Object |
An OSS object. |
Example: |
|
ALIYUN::OSS::Object::ObjectName |
The name of an OSS object. |
Example: |
|
UploadFilesToUserBucket |
An OSS file upload component. |
Example: |
PolarDB resources
|
Value |
Description |
Association property metadata |
|
ALIYUN::PolarDB::DBCluster::DBClusterId |
The ID of a PolarDB cluster. |
Example: |
|
ALIYUN::PolarDB::DBCluster::DBNodeClass |
The available node classes for a PolarDB cluster. |
Example: |
RAM resources
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::RAM::Role |
A RAM role. |
Example: |
|
ALIYUN::RAM::User |
A RAM user. |
Example: |
RDS resources
|
AssociationProperty |
Description |
AssociationPropertyMetadata |
|
ALIYUN::RDS::Engine::EngineId |
The database engine for an ApsaraDB RDS instance. |
Example: |
|
ALIYUN::RDS::Engine::EngineVersion |
The database engine version for an ApsaraDB RDS instance. |
Example: |
|
ALIYUN::RDS::Instance::AccountPassword |
The password for an ApsaraDB RDS database account. |
Example: |
|
ALIYUN::RDS::Instance::InstanceId |
The ID of an ApsaraDB RDS instance. |
Example: |
|
ALIYUN::RDS::Instance::InstanceType |
The ApsaraDB RDS instance type. |
Example: |
Redis
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::Redis::Instance::InstanceId |
The Redis instance ID. |
Example: |
|
ALIYUN::Redis::Instance::InstanceType |
The Redis instance types. |
Example: |
ResourceManager resources
|
Value |
Description |
Corresponding AssociationPropertyMetadata |
|
ALIYUN::ResourceManager::Account |
A resource account. |
Example: |
|
ALIYUN::ResourceManager::Folder |
A resource folder. |
Example: |
SLB
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::SLB::ACL::ACLId |
The ID of an SLB access control list (ACL). |
Example: |
|
ALIYUN::SLB::Instance::InstanceType |
The SLB instance type. |
Example: |
|
ALIYUN::SLB::LoadBalancer::LoadBalancerId |
The SLB instance ID. |
Example: |
|
ALIYUN::SLB::LoadBalancer::ZoneId |
The available zones for an SLB instance. |
|
Service catalog
|
AssociationProperty |
Description |
AssociationPropertyMetadata |
|
ALIYUN::ServiceCatalog::LaunchOption::PortfolioId |
The ID of a Service Catalog portfolio. |
Example: |
|
ALIYUN::ServiceCatalog::ProductVersion::ProductVersionId |
The product version ID. |
Example: |
Tagging resources
|
Association property |
Description |
Association property metadata |
|
ALIYUN::Tag::TagKey |
Queries available tag keys. |
|
|
ALIYUN::Tag::TagValue |
Retrieves the tag values for a specified tag key. |
|
User resources
|
AssociationProperty value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::User::Account::AccountIds |
User account IDs. |
Example: |
|
ALIYUN::User::AccountId |
Gets the Alibaba Cloud main account ID. |
|
|
ALIYUN::User::UserId |
Gets the current Alibaba Cloud user ID. |
|
VPC
|
Value |
Description |
AssociationPropertyMetadata |
|
ALIYUN::VPC::EIP::AllocationId |
Lists available EIPs. |
|
|
ALIYUN::VPC::NatGateway::NatGatewayId |
The ID of a NAT gateway. |
Example: |
|
ALIYUN::VPC::VPC::CidrBlock |
The CIDR block for a new VPC. |
Example: |
|
ALIYUN::VPC::vSwitch::CidrBlock |
Suggests CIDR blocks for a new vSwitch. |
Example: |
|
ALIYUN::VPC::vSwitch::VSwitchId |
Retrieves the ID of a vSwitch. |
Example: |
|
ALIYUN::VPC::VirtualBorderRouter::RouteTableId |
The ID of a VBR. |
Example: |
|
ALIYUN::VPC::Zone::ZoneId |
Lists available zones for a VPC. |
|
Examples
Example 1: AssociationProperty example
Set the AssociationProperty parameter to ALIYUN::ECS::Image::ImageId to retrieve all available image IDs in the selected region.
JSON example:
{
"FormatVersion": "OOS-2019-06-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 example:
FormatVersion: 'OOS-2019-06-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
Parameters:
-
UserName: A string of 6 to 12 characters. Valid values:-
anonymous(default value) -
user-one -
user-two
-
-
PassWord: A string of 1 to 41 characters that can contain uppercase letters, lowercase letters, and digits. This parameter has no default value.If
NoEchois set totrue, the system does not return the parameter value when you query the stack. -
ImageId: The ID of the image.If
AssociationPropertyis set toALIYUN::ECS::Image::ImageId, the ROS console verifies that the specified image ID is available when you create a stack. The console also provides a drop-down list of other available image IDs in the selected region.
Example 2: AssociationPropertyMetadata
Specify AssociationProperty with AssociationPropertyMetadata (including RegionId, VpcId, and ZoneId) to retrieve a vSwitch from a specific VPC and zone. The RegionId is set to the static value China (Hangzhou). The VpcId and ZoneId values are dynamically set from the ${VpcId} and ${EcsZone} parameters, filtering the available vSwitch options based on the selected VPC and zone.
For a parameter with AllowedValues configured, such as EcsZone, you can add AutoChangeType to its AssociationPropertyMetadata and set the value to false. This renders the parameter as a dropdown list in the CloudOps Orchestration Service console.
JSON example:
{
"FormatVersion": "OOS-2019-06-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 example:
FormatVersion: 'OOS-2019-06-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}