全部产品
Search
文档中心

资源编排:ALIYUN::POLARDB::AITask

更新时间:Nov 02, 2023

ALIYUN::POLARDB::AITask类型用于开启PolarDB for AI功能。

语法

{
  "Type": "ALIYUN::POLARDB::AITask",
  "Properties": {
    "Username": String,
    "NodeType": String,
    "DBClusterId": String,
    "Password": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Username

String

需要开启PolarDB for AI功能的数据库账号。

NodeType

String

节点类型。

取值:

  • DLNode:AI节点。

  • SearchNode:搜索AI节点。

DBClusterId

String

集群ID。

Password

String

需要开启PolarDB for AI功能的数据库账号的密码。

返回值

Fn::GetAtt

DBClusterId:集群ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DBClusterId:
        Description: The ID of the DB cluster.
        Type: String
      NodeType:
        Default: DLNode
        Type: String
        Default: DLNode
      Password:
        Description: The password of the database account that enables the PolarDB for AI function
            is required.
        Type: String
      Username:
        Description: The database account that enables the PolarDB for AI function is required.
        Type: String
    Resources:
      AITask:
        Properties:
          DBClusterId:
            Ref: DBClusterId
          NodeType:
            Ref: NodeType
          Password:
            Ref: Password
          Username:
            Ref: Username
        Type: ALIYUN::POLARDB::AITask
    Outputs:
      DBClusterId:
        Description: The ID of the DB cluster.
        Value:
          Fn::GetAtt:
          - AITask
          - DBClusterId
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Username": {
          "Type": "String",
          "Description": "The database account that enables the PolarDB for AI function is required."
        },
        "NodeType": {
          "Type": "String",
          "Description": "The type of the node. Valid values:\nDLNode: AI node(default).\nSearchNode: Search ai node.",
          "Default": "DLNode"
        },
        "DBClusterId": {
          "Type": "String",
          "Description": : "The ID of the DB cluster."
        },
        "Password": {
          "Type": "String",
          "Description": "The password of the database account that enables the PolarDB for AI function is required."
        }
      },
      "Resources": {
        "AITask": {
          "Type": "ALIYUN::POLARDB::AITask",
          "Properties": {
            "Username": {
              "Ref": "Username"
            },
            "NodeType": {
              "Ref": "NodeType"
            },
            "DBClusterId": {
              "Ref": "DBClusterId"
            },
            "Password": {
              "Ref": "Password"
            }
          }
        }
      },
      "Outputs": {
        "DBClusterId": {
          "Description": "The ID of the DB cluster.",
          "Value": {
            "Fn::GetAtt": [
              "AITask",
              "DBClusterId"
            ]
          }
        }
      }
    }