ALIYUN::ADBLake::ResourceGroupAccountBinding

ALIYUN::ADBLake::ResourceGroupAccountBinding类型用于将资源组与数据库用户进行绑定。

语法

{
  "Type": "ALIYUN::ADBLake::ResourceGroupAccountBinding",
  "Properties": {
    "AccountName": String,
    "DBClusterId": String,
    "GroupName": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

AccountName

String

需要绑定的数据库账号。既可以绑定数据库普通账号,也可以绑定数据库高权限账号。

DBClusterId

String

数据库集群 ID。

GroupName

String

资源组名称。

返回值

Fn::GetAtt

GroupName:资源组名称。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GroupName:
    Type: String
    Description:
      en: The name of the resource group.
    Required: true
    AllowedPattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{0,254}$
    MinLength: 1
    MaxLength: 255
  DBClusterId:
    Type: String
    Description:
      en: The ID of the database cluster.
    Required: true
  AccountName:
    Type: String
    Description:
      en: The name of the account.
    Required: true
    AllowedPattern: ^[a-z][a-z0-9_]{0,14}[a-z0-9]$
    MinLength: 2
    MaxLength: 16
Resources:
  ResourceGroupAccountBinding:
    Type: ALIYUN::ADBLake::ResourceGroupAccountBinding
    Properties:
      GroupName:
        Ref: GroupName
      DBClusterId:
        Ref: DBClusterId
      AccountName:
        Ref: AccountName
Outputs:
  GroupName:
    Description: The name of the resource group.
    Value:
      Fn::GetAtt:
        - ResourceGroupAccountBinding
        - GroupName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GroupName": {
      "Type": "String",
      "Description": {
        "en": "The name of the resource group."
      },
      "Required": true,
      "AllowedPattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,254}$",
      "MinLength": 1,
      "MaxLength": 255
    },
    "DBClusterId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the database cluster."
      },
      "Required": true
    },
    "AccountName": {
      "Type": "String",
      "Description": {
        "en": "The name of the account."
      },
      "Required": true,
      "AllowedPattern": "^[a-z][a-z0-9_]{0,14}[a-z0-9]$",
      "MinLength": 2,
      "MaxLength": 16
    }
  },
  "Resources": {
    "ResourceGroupAccountBinding": {
      "Type": "ALIYUN::ADBLake::ResourceGroupAccountBinding",
      "Properties": {
        "GroupName": {
          "Ref": "GroupName"
        },
        "DBClusterId": {
          "Ref": "DBClusterId"
        },
        "AccountName": {
          "Ref": "AccountName"
        }
      }
    }
  },
  "Outputs": {
    "GroupName": {
      "Description": "The name of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ResourceGroupAccountBinding",
          "GroupName"
        ]
      }
    }
  }
}