ALIYUN::TSDB::InfluxDBDatabase类型用于创建时间序列数据库。

语法

{
  "Type": "ALIYUN::TSDB::InfluxDBDatabase",
  "Properties": {
    "InstanceId": String,
    "DBName": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
InstanceId String 时间序列数据库实例ID。
DBName String 时间序列数据库名称。 长度不超过64个字符。必须以小写英文字母开头,以小写英文字母或数字结尾。可包含小写英文字母、数字和下划线(_)。

返回值

Fn::GetAtt

  • InstanceId:时间序列数据库实例ID。
  • DBName:时间序列数据库名称。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "The ID of TSDB for InfluxDB.",
      "Default": "ts-wz99vz6u8jg39****"
    },
    "DBName": {
      "Type": "String",
      "Description": "The name of database. The name can at most be 64 characters in length and can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit.",
      "MinLength": 1,
      "MaxLength": 64,
      "Default": "test"
    }
  },
  "Resources": {
    "InfluxDBDatabase": {
      "Type": "ALIYUN::TSDB::InfluxDBDatabase",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "DBName": {
          "Ref": "DBName"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "The ID of TSDB for InfluxDB.",
      "Value": {
        "Fn::GetAtt": [
          "InfluxDBDatabase",
          "InstanceId"
        ]
      }
    },
    "DBName": {
      "Description": "The name of database.",
      "Value": {
        "Fn::GetAtt": [
          "InfluxDBDatabase",
          "DBName"
        ]
      }
    }
  }
}