全部产品
Search
文档中心

资源编排:User资源

更新时间:Mar 16, 2026

AssociationProperty取值

说明

对应的AssociationPropertyMetadata

ALIYUN::User::Account::AccountIds

用户账号ID。

示例如下:

  • 示例代码

    JSON示例:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "AccountIds": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::User::Account::AccountIds"
        }
      }
    }

    YAML示例:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      AccountIds:
        Type: String
        AssociationProperty: ALIYUN::User::Account::AccountIds
  • 示例说明

    示例中通过指定参数AccountIds的AssociationProperty属性为ALIYUN::User::Account::AccountIds,获取用户账号ID。

ALIYUN::User::AccountId

获取阿里云主账号ID。

示例代码

JSON示例:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "MasterAccountId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::User::AccountId"
    }
  }
}

YAML示例:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  MasterAccountId:
    Type: String
    AssociationProperty: ALIYUN::User::AccountId

ALIYUN::User::UserId

获取当前阿里云用户ID。

示例代码

JSON示例:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CurrentAccountId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::User::UserId"
    }
  }
}

YAML示例:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CurrentAccountId:
    Type: String
    AssociationProperty: ALIYUN::User::UserId