AccessPolicyBaseCollection.CreateAsync Method
Asynchronously creates an IAccessPolicy with the provided name and permissions, valid for the provided duration.
Namespace: Microsoft.WindowsAzure.MediaServices.Client
Assembly: Microsoft.WindowsAzure.MediaServices.Client (in Microsoft.WindowsAzure.MediaServices.Client.dll)
Syntax
'Declaration
Public Function CreateAsync ( _
name As String, _
duration As TimeSpan, _
permissions As AccessPermissions _
) As Task(Of IAccessPolicy)
'Usage
Dim instance As AccessPolicyBaseCollection
Dim name As String
Dim duration As TimeSpan
Dim permissions As AccessPermissions
Dim returnValue As Task(Of IAccessPolicy)
returnValue = instance.CreateAsync(name, _
duration, permissions)
public Task<IAccessPolicy> CreateAsync(
string name,
TimeSpan duration,
AccessPermissions permissions
)
public:
Task<IAccessPolicy^>^ CreateAsync(
String^ name,
TimeSpan duration,
AccessPermissions permissions
)
member CreateAsync :
name:string *
duration:TimeSpan *
permissions:AccessPermissions -> Task<IAccessPolicy>
public function CreateAsync(
name : String,
duration : TimeSpan,
permissions : AccessPermissions
) : Task<IAccessPolicy>
Parameters
- name
Type: System.String
Specifies a friendly name for the AccessPolicy.
- duration
Type: System.TimeSpan
Specifies the duration that locators created from this AccessPolicy will be valid for.
- permissions
Type: Microsoft.WindowsAzure.MediaServices.Client.AccessPermissions
Specifies permissions for the created AccessPolicy.
Return Value
Type: System.Threading.Tasks.Task<IAccessPolicy>
A function delegate that returns the future result to be available through the Task<IAccessPolicy>.