1 回答
TA贡献1851条经验 获得超5个赞
问题是,使用 RFC3339 时,时区需要为 UTC 才能与 Azure 和 pulumi 配合使用。
conStr := ConvertPulumiStringToString(account.PrimaryConnectionString)
httpsOnly := true
now := time.Now().UTC()
sas, err := storage.GetAccountBlobContainerSAS(ctx, &storage.GetAccountBlobContainerSASArgs{
ConnectionString: <-conStr,
ContainerName: "container",
Expiry: now.AddDate(10, 0, 0).Format(time.RFC3339),
HttpsOnly: &httpsOnly,
Permissions: storage.GetAccountBlobContainerSASPermissions{
Add: false,
Create: false,
Delete: false,
List: true,
Read: true,
Write: false,
},
Start: now.Format(time.RFC3339),
})
println(sas.Sas)
- 1 回答
- 0 关注
- 88 浏览
添加回答
举报