ALIYUN::ACM::Configuration is used to create a configuration.

Syntax

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

Properties

PropertyTypeRequiredEditableDescriptionConstraint
DataIdStringYesNoThe ID of the configuration.The ID can contain letters, digits, periods (.), colons (:), asterisks (*), underscores (_), and hyphens (-).

When the ID is prefixed with one of the following values, Application Configuration Management (ACM) automatically encrypts or decrypts the configuration based on Key Management Service (KMS):

  • cipher-: If you use the cipher- prefix for the configuration ID, ACM uses the KMS service to encrypt or decrypt the configuration. We recommended that the size of the configuration content that you want to encrypt or decrypt does not exceed 4 KB. The maximum size of the configuration content is 6 KB. If the content that you want to decrypt contains special characters, such as ampersands (&), we recommend that you do not use the cipher- prefix. Otherwise, a decryption error occurs.
  • cipher-kms-aes-128-: If you use the cipher-kms-aes-128- prefix for the configuration ID, ACM uses the envelope encryption and decryption method of KMS for the configuration. The content of the configuration that is prefixed with cipher-kms-aes-128- can be up to 100 KB in size. If the ID of a configuration is prefixed with cipher-kms-aes-128-, the plaintext data of the configuration content is not transmitted to KMS. For security purpose, we recommend that you use the cipher-kms-aes-128- prefix.
GroupStringNoNoThe group to which the configuration belongs.None.
AppNameStringNoYesThe name of the application to which the configuration belongs.None.
TagsStringNoYesThe tags that you want to add to the configuration.Separate multiple tags with commas (,).
ContentStringYesYesThe content of the configuration.None.
TypeStringNoYesThe content format of the configuration.Valid values:
  • text
  • json
  • xml
  • yaml
  • text/html
  • properties
NamespaceIdStringYesNoThe ID of the namespace.None.
DescStringNoYesThe description of the configuration.None.

Return values

Fn::GetAtt

  • DataId: the ID of the configuration.
  • Group: the group to which the configuration belongs.
  • NamespaceId: the ID of the namespace.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      NamespaceId:
        Type: String
        Description: ID of namespace
    Resources:
      Configuration:
        Type: ALIYUN::ACM::Configuration
        Properties:
          DataId: test-data
          Content: Test Content
          NamespaceId:
            Ref: NamespaceId
    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
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "NamespaceId": {
          "Type": "String",
          "Description": "ID of namespace"
        }
      },
      "Resources": {
        "Configuration": {
          "Type": "ALIYUN::ACM::Configuration",
          "Properties": {
            "DataId": "test-data",
            "Content": "Test Content",
            "NamespaceId": {
              "Ref": "NamespaceId"
            }
          }
        }
      },
      "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"
            ]
          }
        }
      }
    }