-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS-OSS-PutBucketPolicy.yml
77 lines (77 loc) · 2.15 KB
/
ACS-OSS-PutBucketPolicy.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FormatVersion: OOS-2019-06-01
Description:
en: Put the bucket policy
zh-cn: 设置存储空间授权策略
name-en: ACS-OSS-PutBucketPolicy
name-zh-cn: 设置存储空间授权策略
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
bucketName:
Label:
en: BucketName
zh-cn: OSS bucket 名称
Type: String
bucketPolicy:
Label:
en: BucketPolicy
zh-cn: 存储空间授权策略
Description:
en: (for example:{"Version":"1","Statement":[{"Action":["oss:PutObject","oss:GetObject"],"Effect":"Deny","Principal":["1234567890"],"Resource":["acs:oss:*:1234567890:*/*"]}]}).
zh-cn: (例子:{"Version":"1","Statement":[{"Action":["oss:PutObject","oss:GetObject"],"Effect":"Deny","Principal":["1234567890"],"Resource":["acs:oss:*:1234567890:*/*"]}]})。
Type: Json
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: putBucketPolicy
Action: 'ACS::ExecuteAPI'
Description:
en: Put the bucket policy
zh-cn: 设置存储空间的授权策略
Properties:
Service: OSS
API: PutBucketPolicy
Method: PUT
URI: '?policy'
Headers:
Content-MD5: ""
Content-Type: application/json
Parameters:
BucketName: '{{ bucketName }}'
RegionId: '{{ regionId }}'
Body: '{{ bucketPolicy }}'
- Name: waitBucketPolicy
Action: 'ACS::WaitFor'
Description:
en: Wait for the authorization policy of the storage space to take effect
zh-cn: 等待存储空间的授权策略生效
Properties:
Service: OSS
API: GetBucketPolicy
Method: GET
URI: '?policy'
Headers: {}
Parameters:
BucketName: '{{ bucketName }}'
RegionId: '{{ regionId }}'
DesiredValues:
- '{{ bucketPolicy }}'
PropertySelector: .
Outputs:
policyInfo:
Type: Json
Value:
bucketName: '{{ bucketName }}'
bucketPolicy: '{{ bucketPolicy }}'