ALIYUN::DMS::User

更新时间:
复制 MD 格式

ALIYUN::DMS::User adds a user to Data Management (DMS).

Syntax

{
  "Type": "ALIYUN::DMS::User",
  "Properties": {
    "Status": String,
    "Uid": String,
    "UserName": String,
    "RoleNames": List,
    "Mobile": String,
    "Tid": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Status

String

No

Yes

The user status.

Valid values:

  • NORMAL: The user is enabled.

  • DISABLE: The user is disabled.

Uid

String

Yes

No

The Alibaba Cloud unique ID (UID) of the user.

None

UserName

String

No

Yes

The username.

None

RoleNames

List

No

Yes

The roles assigned to the user.

Valid values:

  • USER: common user

  • DBA: database administrator

  • ADMIN: DMS administrator

  • SECURITY_ADMIN: security administrator

Note

You can specify multiple roles.

Mobile

String

No

Yes

The mobile number of the user.

None

Tid

String

No

No

The tenant ID.

None

Return values

Fn::GetAtt

  • Uid: the UID of the user.

  • UserName: the username.

  • RoleNames: the roles assigned to the user.

  • UserId: the user ID.

  • RoleIds: the role IDs.

  • Mobile: the mobile number of the user.

  • ParentUid: the UID of the Alibaba Cloud account.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Status": {
      "Type": "String",
      "Description": "UserStatus"
    },
    "Uid": {
      "Type": "String",
      "Description": "UserAliYunUid"
    },
    "UserName": {
      "Type": "String",
      "Description": "UserNickName"
    },
    "RoleNames": {
      "Type": "Json",
      "Description": "UserRole"
    },
    "Mobile": {
      "Type": "String",
      "Description": "UserMobile"
    },
    "Tid": {
      "Type": "String",
      "Description": ""
    }
  },
  "Resources": {
    "DMSEnterpriseUser": {
      "Type": "ALIYUN::DMS::User",
      "Properties": {
        "Status": {
          "Ref": "Status"
        },
        "Uid": {
          "Ref": "Uid"
        },
        "UserName": {
          "Ref": "UserName"
        },
        "RoleNames": {
          "Ref": "RoleNames"
        },
        "Mobile": {
          "Ref": "Mobile"
        },
        "Tid": {
          "Ref": "Tid"
        }
      }
    }
  },
  "Outputs": {
    "Uid": {
      "Description": "UserAliYunUid",
      "Value": {
        "Fn::GetAtt": [
          "DMSEnterpriseUser",
          "Uid"
        ]
      }
    },
    "UserName": {
      "Description": "UserNickName",
      "Value": {
        "Fn::GetAtt": [
          "DMSEnterpriseUser",
          "UserName"
        ]
      }
    },
    "RoleNames": {
      "Description": "UserRole",
      "Value": {
        "Fn::GetAtt": [
          "DMSEnterpriseUser",
          "RoleNames"
        ]
      }
    },
    "UserId": {
      "Description": "UserId",
      "Value": {
        "Fn::GetAtt": [
          "DMSEnterpriseUser",
          "UserId"
        ]
      }
    },
    "RoleIds": {
      "Description": "UserRoleId",
      "Value": {
        "Fn::GetAtt": [
          "DMSEnterpriseUser",
          "RoleIds"
        ]
      }
    },
    "Mobile": {
      "Description": "UserMobile",
      "Value": {
        "Fn::GetAtt": [
          "DMSEnterpriseUser",
          "Mobile"
        ]
      }
    },
    "ParentUid": {
      "Description": "ParentAliYunUid",
      "Value": {
        "Fn::GetAtt": [
          "DMSEnterpriseUser",
          "ParentUid"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
 Status:
  Type: String
  Description: UserStatus
 Uid:
  Type: String
  Description: UserAliYunUid
 UserName:
  Type: String
  Description: UserNickName
 RoleNames:
  Type: Json
  Description: UserRole
 Mobile:
  Type: String
  Description: UserMobile
 Tid:
  Type: String
  Description: ''
Resources:
 DMSEnterpriseUser:
  Type: 'ALIYUN::DMS::User'
  Properties:
   Status:
    Ref: Status
   Uid:
    Ref: Uid
   UserName:
    Ref: UserName
   RoleNames:
    Ref: RoleNames
   Mobile:
    Ref: Mobile
   Tid:
    Ref: Tid
Outputs:
 Uid:
  Description: UserAliYunUid
  Value:
   'Fn::GetAtt':
    - DMSEnterpriseUser
    - Uid
 UserName:
  Description: UserNickName
  Value:
   'Fn::GetAtt':
    - DMSEnterpriseUser
    - UserName
 RoleNames:
  Description: UserRole
  Value:
   'Fn::GetAtt':
    - DMSEnterpriseUser
    - RoleNames
 UserId:
  Description: UserId
  Value:
   'Fn::GetAtt':
    - DMSEnterpriseUser
    - UserId
 RoleIds:
  Description: UserRoleId
  Value:
   'Fn::GetAtt':
    - DMSEnterpriseUser
    - RoleIds
 Mobile:
  Description: UserMobile
  Value:
   'Fn::GetAtt':
    - DMSEnterpriseUser
    - Mobile
 ParentUid:
  Description: ParentAliYunUid
  Value:
   'Fn::GetAtt':
    - DMSEnterpriseUser
    - ParentUid