Post

Introduction to Alibaba Cloud (ALIYUN)

starting point ...

Introduction to Alibaba Cloud (ALIYUN)

Reference: https://www.alibabacloud.com/help/en/ros/developer-reference/list-of-resource-types-by-service?spm=a2c63.p38356.help-menu-28850.d_5_1_1.38c72064WsyHRT

Function Compute (FC)

1
2
3
4
5
6
7
8
9
10
11
12
13
ROSTemplateFormatVersion: '2015-09-01'

Parameters:
  ServiceName:
    Type: String
    Description: Service name.

Resources:
  Functions:
    Type: DATASOURCE::FC::Functions
    Properties:
      ServiceName:
        Ref: ServiceName

Resource Orchestration Service (ROS)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ROSTemplateFormatVersion: '2015-09-01'
Description: Creates a machine user with basic developer permissions and access keys for terminal use

Resources:

  RamUser:
    Type: ALIYUN::RAM::User
    Properties:
      UserName: dev-machine-user
      PolicyAttachments:
        System: # 'System' basically says this role is managed for ya
          - AliyunDevsFullAccess

  RamUserAccessKey:
    Type: ALIYUN::RAM::AccessKey
    Properties:
      UserName: !GetAtt RamUser.UserName

  DevRole:
    Type: ALIYUN::RAM::Role
    Description: Dev role
    Properties:
      RoleName: dev-role
      MaxSessionDuration: 3600
      PolicyAttachments:
        System:
          - AliyunDevsFullAccess
      AssumeRolePolicyDocument:
        Version: '1'
        Statement:
          - Action: sts:AssumeRole
            Effect: Allow
            Principal:
              Service:
                - 'actiontrail.aliyuncs.com'
              ROS:
                - !Sub "acs:ram::${ALIYUN::AccountId}:root"

Outputs:
  UserId:
    Description: The RAM user ID created
    Value: !GetAtt RamUser.UserId
This post is licensed under CC BY 4.0 by the author.