简体   繁体   English

如何创建没有持续时间或更长的Windows Azure媒体服务访问策略?

[英]How to create Windows Azure Media Services Access Policy without Duration or with a longer validity?

I've created Azure Media Services and everything works perfectly. 我已经创建了Azure媒体服务,并且一切正常。 I've the below policy for all the Locators for streaming assets. 对于流媒体资产的所有Locators ,我都有以下政策。

await context.AccessPolicies.CreateAsync("My 30 days readonly policy", TimeSpan.FromDays(30), AccessPermissions.Read);

I understand that the above policy will expire in 30 days and I'll need to re-create it. 我了解上述政策将在30天后失效,因此我需要重新创建它。 I want this assets to publically available for as long as it exists. 我希望此资产在存在的前提下可以公开使用。

What would be the best way to do this? 最好的方法是什么?

Thanks in advance... 提前致谢...

Windows Azure媒体服务不支持无限访问策略,但是您可以使用以下示例来设置最大可能的到期时间:

_mediaContext.AccessPolicies.CreateAsync("TimeSpan.MaxValue readonly policy", TimeSpan.MaxValue, AccessPermissions.Read); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM