ALIYUN::DMS::User is used to add 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 status of the user. 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 name of the user. None
RoleNames List No Yes The roles that the user assumes. Valid values:
  • USER: common user
  • DBA: database administrator
  • ADMIN: DMS administrator
  • SECURITY_ADMIN: security administrator
Note Multiple roles can be specified.
Mobile String No Yes The phone number of the user. None
Tid String No No The ID of the tenant. None

Response parameters

Fn::GetAtt

  • Uid: the Alibaba Cloud UID of the user.
  • UserName: the name of the user.
  • RoleNames: the roles that the user assumes.
  • UserId: the ID of the user.
  • RoleIds: the IDs of the roles.
  • Mobile: the phone 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