全部产品
Search
文档中心

资源编排:ALIYUN::CloudSSO::Directory

更新时间:Jul 18, 2024

ALIYUN::CloudSSO::Directory类型用于创建目录。

语法

{
  "Type": "ALIYUN::CloudSSO::Directory",
  "Properties": {
    "DirectoryName": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DirectoryName

String

目录名称。该参数必须全局唯一。

格式:包含小写字母、数字或短划线(-)。不能以短划线(-)开头或结尾,且不能有两个连续的短划线(-)。不能以d-开头。

长度:2~64个字符。

说明

如果不指定,则由系统自动生成。

返回值

Fn::GetAtt

DirectoryId:目录ID。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DirectoryName:
    Description:
      en: 'The name of the directory. The name must be globally unique.

        The name can contain lowercase letters, digits, or hyphens (-). The name cannot
        start or end with a hyphen (-) and cannot contain two consecutive hyphens
        (-). The name cannot start with d-.

        The name must be 2 to 64 characters in length.

        **Note**: If you do not specify this parameter, the value of this parameter
        is automatically generated by the system.'
    Required: false
    Type: String
Resources:
  Directory:
    Properties:
      DirectoryName:
        Ref: DirectoryName
    Type: ALIYUN::CloudSSO::Directory
Outputs:
  DirectoryId:
    Description: The ID of the directory.
    Value:
      Fn::GetAtt:
      - Directory
      - DirectoryId
                        

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DirectoryName": {
      "Type": "String",
      "Description": {
        "en": "The name of the directory. The name must be globally unique.\nThe name can contain lowercase letters, digits, or hyphens (-). The name cannot start or end with a hyphen (-) and cannot contain two consecutive hyphens (-). The name cannot start with d-.\nThe name must be 2 to 64 characters in length.\n**Note**: If you do not specify this parameter, the value of this parameter is automatically generated by the system."
      },
      "Required": false
    }
  },
  "Resources": {
    "Directory": {
      "Type": "ALIYUN::CloudSSO::Directory",
      "Properties": {
        "DirectoryName": {
          "Ref": "DirectoryName"
        }
      }
    }
  },
  "Outputs": {
    "DirectoryId": {
      "Description": "The ID of the directory.",
      "Value": {
        "Fn::GetAtt": [
          "Directory",
          "DirectoryId"
        ]
      }
    }
  }
}