LocatorBaseCollection.CreateSasLocatorAsync Method (IAsset, IAccessPolicy)
Asynchronously creates a SAS Locator with the specified access policy and asset.
Namespace: Microsoft.WindowsAzure.MediaServices.Client
Assembly: Microsoft.WindowsAzure.MediaServices.Client (in Microsoft.WindowsAzure.MediaServices.Client.dll)
Syntax
'Declaration
Public Function CreateSasLocatorAsync ( _
asset As IAsset, _
accessPolicy As IAccessPolicy _
) As Task(Of ILocator)
'Usage
Dim instance As LocatorBaseCollection
Dim asset As IAsset
Dim accessPolicy As IAccessPolicy
Dim returnValue As Task(Of ILocator)
returnValue = instance.CreateSasLocatorAsync(asset, _
accessPolicy)
public Task<ILocator> CreateSasLocatorAsync(
IAsset asset,
IAccessPolicy accessPolicy
)
public:
Task<ILocator^>^ CreateSasLocatorAsync(
IAsset^ asset,
IAccessPolicy^ accessPolicy
)
member CreateSasLocatorAsync :
asset:IAsset *
accessPolicy:IAccessPolicy -> Task<ILocator>
public function CreateSasLocatorAsync(
asset : IAsset,
accessPolicy : IAccessPolicy
) : Task<ILocator>
Parameters
- asset
Type: Microsoft.WindowsAzure.MediaServices.Client.IAsset
The asset to create a SAS Locator for.
- accessPolicy
Type: Microsoft.WindowsAzure.MediaServices.Client.IAccessPolicy
The AccessPolicy that governs access for the locator.
Return Value
Type: System.Threading.Tasks.Task<ILocator>
A function delegate that returns the future result to be available through the Task<ILocator>.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | asset |
ArgumentNullException | accessPolicy |