All Products
Search
Document Center

Resource Orchestration Service:Tag resources

Last Updated:Apr 02, 2026

AssociationProperty value

Description

Corresponding AssociationPropertyMetadata

ALIYUN::Tag::TagKey

Queries tag key information.

  • RegionId: The region ID. The default is the region of the stack.

  • ResourceType: The resource type.

  • ShowSystem: Specifies whether to filter system tags.

Sample code

JSON example:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RegionId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::RegionId"
    },
    "TagKey": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::Tag::TagKey",
      "AssociationPropertyMetadata": {
        "RegionId": "${RegionId}"
      }
    }
  }
}

YAML example:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RegionId:
    Type: String
    AssociationProperty: ALIYUN::ECS::RegionId
  TagKey:
    Type: String
    AssociationProperty: ALIYUN::Tag::TagKey
    AssociationPropertyMetadata:
      RegionId: ${RegionId}

ALIYUN::Tag::TagValue

Queries the tag values for a specified tag key.

  • RegionId: The region ID. The default is the region of the stack.

  • ResourceType: The resource type.

  • Key: The tag key.

Sample code

JSON example:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RegionId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::RegionId"
    },
    "TagKey": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::Tag::TagKey",
      "AssociationPropertyMetadata": {
        "RegionId": "${RegionId}"
      }
    },
    "TagValue": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::Tag::TagValue",
      "AssociationPropertyMetadata": {
        "RegionId": "${RegionId}",
        "Key": "${TagKey}"
      }
    }
  }
}

YAML example:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RegionId:
    Type: String
    AssociationProperty: ALIYUN::ECS::RegionId
  TagKey:
    Type: String
    AssociationProperty: ALIYUN::Tag::TagKey
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
  TagValue:
    Type: String
    AssociationProperty: ALIYUN::Tag::TagValue
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
      Key: ${TagKey}