ALIYUN::ACM::Configuration

更新时间:
复制 MD 格式

ALIYUN::ACM::Configuration creates a configuration in Application Configuration Management (ACM).

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

Content

String

Yes

Yes

The configuration content.

None.

DataId

String

Yes

No

The configuration ID.

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

ACM automatically encrypts and decrypts the configuration through Key Management Service (KMS) when the ID uses one of these prefixes:

  • cipher-: ACM encrypts and decrypts the configuration through KMS. Recommended maximum content size: 4 KB. Hard limit: 6 KB. Avoid this prefix if the content contains special characters such as ampersands (&), which cause decryption errors.

  • cipher-kms-aes-128-: ACM uses KMS envelope encryption. Maximum content size: 100 KB. Plaintext data is not transmitted to KMS. Recommended for better security.

NamespaceId

String

Yes

No

The namespace ID.

None.

AppName

String

No

Yes

The application that owns the configuration.

None.

Desc

String

No

Yes

The configuration description.

None.

Group

String

No

No

The configuration group.

None.

Tags

String

No

Yes

The configuration tags.

Separate multiple tags with commas (,).

Type

String

No

Yes

The configuration content format.

Valid values:

  • text

  • json

  • xml

  • yaml

  • text/html

  • properties

Return values

Fn::GetAtt

  • DataId: the configuration ID.

  • Group: the configuration group.

  • NamespaceId: the namespace ID.

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"
        ]
      }
    }
  }
}