Closed busyfree closed 4 years ago
直接使用go里面的demo去创建token的
Code: InvalidParameter.GrantOtherResource, Message: [QC_STS] cant grant other resource, RequestId
代码
opt := &sts.CredentialOptions{ DurationSeconds: expiredAt, Region: region, Policy: &sts.CredentialPolicy{ Statement: []sts.CredentialPolicyStatement{ { Action: []string{ "name/cos:PostObject", "name/cos:PutObject", }, Effect: "allow", Resource: []string{ // 这里的uid是腾讯云后台的APPID? "qcs::cos:" + region + ":uid/" + uid + ":" + bucket + "/tmp", }, }, }, }, }
直接使用go里面的demo去创建token的
代码