元素 | 用户策略 | 存储桶策略 |
委托人 | 不填 | 必填 |
效力 | 必填 | 必填 |
操作 | 必填 | 必填 |
资源 | 必填 | 该存储桶内资源 |
条件 | 选填 | 选填 |
{"Statement": [{"Effect": "Allow","Action": ["cos:*"],"Resource": ["qcs::cos:ap-guangzhou:uid/1250000000:examplebucket-1250000000/*","qcs::cos:ap-guangzhou:uid/1250000000:examplebucket-1250000000/"]}],"Version": "2.0"}
"*"
)"qcs::cos:ap-guangzhou:uid/1250000000:examplebucket-1250000000/*"
)"qcs::cos:ap-guangzhou:uid/1250000000:examplebucket-1250000000/test/*"
)"allow"
(允许)或"deny"
(拒绝)。resource
)被设置为 COS 所有资源("*"
),且不支持修改。若您需要对部分 COS 存储桶、对象授权,可以复制 JSON 的预设策略,创建 自定义策略。预设策略 | 说明 | JSON策略 |
QcloudCOSBucketConfigRead | 拥有该权限的用户可以读取 COS 存储桶配置 |
|
QcloudCOSBucketConfigWrite | 拥有该权限的用户可以修改 COS 存储桶配置 |
|
QcloudCOSDataFullControl | 包含 COS 存储桶内数据读、写、删除、列出的访问权限 |
|
说明 | 操作 | QcloudCOS Bucket ConfigRead | QcloudCOS Bucket ConfigWrite | QcloudCOS Data FullControl | QcloudCOS Data ReadOnly | QcloudCOS Data WriteOnly | QcloudCOS Full Access | QcloudCOS GetService Access | QcloudCOS ListOnly | QcloudCOS Read OnlyAccess |
列举桶 | GetService | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
创建桶 | PutBucket | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
删除桶 | DeleteBucket | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
获取桶基本信息 | HeadBucket | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ |
获取桶的配置项 | GetBucket* | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
修改桶的配置项 | GetBucket* | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
获取桶的访问权限 | GetBucketAcl | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
修改桶的访问权限 | PutBucketAcl | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
列举桶内对象 | GetBucket | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ |
列举桶内对象的所有版本 | GetBucketObjectVersions | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ |
上传对象 | PutObject | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
分块上传 | ListParts InitiateMultipartUpload UploadPart UploadPartCopy CompleteMultipartUpload AbortMultipartUpload ListMultipartUploads | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
追加对象 | AppendObject | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
下载对象 | GetObject | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
查看对象元数据 | HeadObject | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
跨域(CORS)预检 | OptionsObject | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
本页内容是否解决了您的问题?