1 回答

TA貢獻1851條經(jīng)驗 獲得超5個贊
問題是,使用 RFC3339 時,時區(qū)需要為 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 關(guān)注
- 105 瀏覽
添加回答
舉報