ALIYUN::ACM::Configuration类型用于创建配置。

语法

{
  "Type": "ALIYUN::ACM::Configuration",
  "Properties": {
    "DataId": String,
    "Group": String,
    "AppName": String,
    "Tags": String,
    "Content": String,
    "Type": String,
    "NamespaceId": String,
    "Desc": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
DataId String 配置的ID 支持大小写英文字母、数字、英文句点(.)、冒号(:)、星号(*)、下划线(_)和短划线(-)。

当ID前缀为如下值时,ACM会自动使用KMS对此配置进行加解密:

  • cipher-:使用KMS对配置进行加解密。建议加解密数据的大小不超过4 KB,最大不超过6 KB。对特殊符号例如and(&)会解密错误,不推荐使用cipher-。
  • cipher-kms-aes-128-:使用KMS的信封加解密方法,推荐使用。cipher-kms-aes-128-配置内容取值范围为:0KB~100KB。cipher-kms-aes-128-配置内容的明文数据不会传输到KMS,因此安全性更高。
Group String 分组
AppName String 配置归属的应用名称
Tags String 配置的标签 如存在多个标签,以半角逗号(,)分隔。
Content String 配置的内容
Type String 配置内容的格式 取值:
  • text
  • json
  • xml
  • yaml
  • text/html
  • properties
NamespaceId String 命名空间ID
Desc String 配置的描述

返回值

Fn::GetAtt

  • DataId:配置的ID。
  • Group:分组。
  • NamespaceId:命名空间ID。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Configuration": {
      "Type": "ALIYUN::ACM::Configuration",
      "Properties": {
        "DataId": {
          "Ref": "DataId"
        },
        "Group": {
          "Ref": "Group"
        },
        "Tags": {
          "Ref": "Tags"
        },
        "AppName": {
          "Ref": "AppName"
        },
        "Content": {
          "Ref": "Content"
        },
        "Type": {
          "Ref": "Type"
        },
        "NamespaceId": {
          "Ref": "NamespaceId"
        },
        "Desc": {
          "Ref": "Desc"
        }
      }
    }
  },
  "Parameters": {
    "DataId": {
      "Type": "String",
      "Description": "The ID of the configuration. Allowed characters are upper and lower case letters, numbers, decimal points (.), Colons (:), asterisks (*), underscores (_), and underscores (-). When the ID prefix is the following value, ACM will automatically use KMS service to encrypt this configuration:\nThe prefix is cipher-: the KMS service is called to encrypt and decrypt the configuration. The size of the encrypted data does not exceed 4 KB, and the maximum does not exceed 6 KB. Special symbols such as and (&) will decrypt errors and are not recommended.\nThe prefix is cipher-kms-aes-128-: using KMS's envelope encryption and decryption method, the configuration content can exceed  6 KB, up to 100 KB. The plain text data of the configuration content will not be transmitted to the KMS system, which is more secure and recommended."
    },
    "Group": {
      "Default": "DEFAULT_GROUP",
      "Type": "String",
      "Description": "Group"
    },
    "Tags": {
      "Type": "String",
      "Description": "Label configurations, such as the presence of a plurality of tags, separated by commas"
    },
    "AppName": {
      "Type": "String",
      "Description": "Configuration application name"
    },
    "Content": {
      "Type": "String",
      "Description": "The contents of the configuration"
    },
    "Type": {
      "Default": "text",
      "Type": "String",
      "Description": "Provisioning content format, optional values as follows:\ntext, json, xml, yaml, text/html, properties",
      "AllowedValues": [
        "text",
        "json",
        "xml",
        "yaml",
        "text/html",
        "properties"
      ]
    },
    "NamespaceId": {
      "Type": "String",
      "Description": "ID of namespace"
    },
    "Desc": {
      "Type": "String",
      "Description": "Configuration description explains"
    }
  },
  "Outputs": {
    "DataId": {
      "Description": "The ID of the configuration",
      "Value": {
        "Fn::GetAtt": [
          "Configuration",
          "DataId"
        ]
      }
    },
    "Group": {
      "Description": "Group",
      "Value": {
        "Fn::GetAtt": [
          "Configuration",
          "Group"
        ]
      }
    },
    "NamespaceId": {
      "Description": "ID of namespace",
      "Value": {
        "Fn::GetAtt": [
          "Configuration",
          "NamespaceId"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  Configuration:
    Type: 'ALIYUN::ACM::Configuration'
    Properties:
      DataId:
        Ref: DataId
      Group:
        Ref: Group
      Tags:
        Ref: Tags
      AppName:
        Ref: AppName
      Content:
        Ref: Content
      Type:
        Ref: Type
      NamespaceId:
        Ref: NamespaceId
      Desc:
        Ref: Desc
Parameters:
  DataId:
    Type: String
    Description: >-
      The ID of the configuration. Allowed characters are upper and lower case
      letters, numbers, decimal points (.), Colons (:), asterisks (*),
      underscores (_), and underscores (-). When the ID prefix is the following
      value, ACM will automatically use KMS service to encrypt this
      configuration:

      The prefix is cipher-: the KMS service is called to encrypt and decrypt
      the configuration. The size of the encrypted data does not exceed 4 KB,
      and the maximum does not exceed 6 KB. Special symbols such as and (&)
      will decrypt errors and are not recommended.

      The prefix is cipher-kms-aes-128-: using KMS's envelope encryption and
      decryption method, the configuration content can exceed  6 KB, up to 100
      KB. The plain text data of the configuration content will not be
      transmitted to the KMS system, which is more secure and recommended.
  Group:
    Default: DEFAULT_GROUP
    Type: String
    Description: Group
  Tags:
    Type: String
    Description: >-
      Label configurations, such as the presence of a plurality of tags,
      separated by commas
  AppName:
    Type: String
    Description: Configuration application name
  Content:
    Type: String
    Description: The contents of the configuration
  Type:
    Default: text
    Type: String
    Description: |-
      Provisioning content format, optional values as follows:
      text, json, xml, yaml, text/html, properties
    AllowedValues:
      - text
      - json
      - xml
      - yaml
      - text/html
      - properties
  NamespaceId:
    Type: String
    Description: ID of namespace
  Desc:
    Type: String
    Description: Configuration description explains
Outputs:
  DataId:
    Description: The ID of the configuration
    Value:
      'Fn::GetAtt':
        - Configuration
        - DataId
  Group:
    Description: Group
    Value:
      'Fn::GetAtt':
        - Configuration
        - Group
  NamespaceId:
    Description: ID of namespace
    Value:
      'Fn::GetAtt':
        - Configuration
        - NamespaceId