/// <summary> /// Create an Asset. /// </summary> /// <remarks> /// Create an Asset from the provided payload. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='asset'> /// The Asset to be created. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Asset> CreateAsync(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, Asset asset = default(Asset), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, asset, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Query the list of Assets in a workspace. /// </summary> /// <remarks> /// If no filter is passed, the query lists all the Assets in the given /// workspace. The returned list is paginated and the count of items in each /// page is an optional parameter. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='runId'> /// The run Id associated with the Assets. /// </param> /// <param name='name'> /// The object name. /// </param> /// <param name='count'> /// The number of items to retrieve in a page. /// </param> /// <param name='skipToken'> /// The continuation token to retrieve the next page. /// </param> /// <param name='tags'> /// A set of tags with which to filter the returned models. /// It is a comma separated string of tags key or tags key=value /// Example: tagKey1,tagKey2,tagKey3=value3 /// </param> /// <param name='properties'> /// A set of properties with which to filter the returned models. /// It is a comma separated string of properties key and/or properties /// key=value /// Example: propKey1,propKey2,propKey3=value3 /// </param> /// <param name='orderby'> /// An option for specifying how to order the list. Possible values include: /// 'CreatedAtDesc', 'CreatedAtAsc', 'UpdatedAtDesc', 'UpdatedAtAsc' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Asset> > ListQueryAsync(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string runId = default(string), string name = default(string), int?count = default(int?), string skipToken = default(string), string tags = default(string), string properties = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListQueryWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, runId, name, count, skipToken, tags, properties, orderby, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Query the list of Assets in a workspace. /// </summary> /// <remarks> /// If no filter is passed, the query lists all the Assets in the given /// workspace. The returned list is paginated and the count of items in each /// page is an optional parameter. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Asset> > ListQueryNextAsync(this IAssetsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListQueryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List the Asset URLs /// </summary> /// <remarks> /// Lists storage container URLs with shared access signatures (SAS) for /// uploading and downloading Asset content. The signatures are derived from /// the storage account keys. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> /// <param name='permissions'> /// The permissions to set on the SAS URL. Possible values include: 'Read', /// 'ReadWrite', 'ReadWriteDelete' /// </param> /// <param name='expiryTime'> /// The SAS URL expiration time. This must be less than 24 hours from the /// current time. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AssetContainerSas> ListContainerSasAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, AssetContainerPermission?permissions = default(AssetContainerPermission?), System.DateTime?expiryTime = default(System.DateTime?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListContainerSasWithHttpMessagesAsync(resourceGroupName, accountName, assetName, permissions, expiryTime, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update an Asset. /// </summary> /// <remarks> /// Patch a specific Asset. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='id'> /// The Id of the Asset to patch. /// </param> /// <param name='patch'> /// The payload that is used to patch an Asset. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Asset> PatchAsync(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string id, IList <JsonPatchOperation> patch, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PatchWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, id, patch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update an Asset /// </summary> /// <remarks> /// Updates an existing Asset in the Media Services account /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> /// <param name='parameters'> /// The request parameters /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Asset> UpdateAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, Asset parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, assetName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List Assets /// </summary> /// <remarks> /// List Assets in the Media Services account with optional filtering and /// ordering /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Asset> > ListAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, ODataQuery <Asset> odataQuery = default(ODataQuery <Asset>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create an Asset. /// </summary> /// <remarks> /// Create an Asset from the provided payload. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='asset'> /// The Asset to be created. /// </param> public static Asset Create(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, Asset asset = default(Asset)) { return(operations.CreateAsync(subscriptionId, resourceGroup, workspace, asset).GetAwaiter().GetResult()); }
/// <summary> /// Delete an Asset. /// </summary> /// <remarks> /// Deletes an Asset in the Media Services account /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, assetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete an Asset. /// </summary> /// <remarks> /// Delete the specified Asset. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='id'> /// The Id of the Asset to delete. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string id, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, id, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// List Assets /// </summary> /// <remarks> /// List Assets in the Media Services account with optional filtering and /// ordering /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <Asset> List(this IAssetsOperations operations, string resourceGroupName, string accountName, ODataQuery <Asset> odataQuery = default(ODataQuery <Asset>)) { return(operations.ListAsync(resourceGroupName, accountName, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Gets the Asset storage key /// </summary> /// <remarks> /// Gets the Asset storage encryption keys used to decrypt content created by /// version 2 of the Media Services API /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <StorageEncryptedAssetDecryptionData> GetEncryptionKeyAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetEncryptionKeyWithHttpMessagesAsync(resourceGroupName, accountName, assetName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the Asset storage key /// </summary> /// <remarks> /// Gets the Asset storage encryption keys used to decrypt content created by /// version 2 of the Media Services API /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> public static StorageEncryptedAssetDecryptionData GetEncryptionKey(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName) { return(operations.GetEncryptionKeyAsync(resourceGroupName, accountName, assetName).GetAwaiter().GetResult()); }
/// <summary> /// List the Asset URLs /// </summary> /// <remarks> /// Lists storage container URLs with shared access signatures (SAS) for /// uploading and downloading Asset content. The signatures are derived from /// the storage account keys. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> /// <param name='permissions'> /// The permissions to set on the SAS URL. Possible values include: 'Read', /// 'ReadWrite', 'ReadWriteDelete' /// </param> /// <param name='expiryTime'> /// The SAS URL expiration time. This must be less than 24 hours from the /// current time. /// </param> public static AssetContainerSas ListContainerSas(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, AssetContainerPermission?permissions = default(AssetContainerPermission?), System.DateTime?expiryTime = default(System.DateTime?)) { return(operations.ListContainerSasAsync(resourceGroupName, accountName, assetName, permissions, expiryTime).GetAwaiter().GetResult()); }
/// <summary> /// Update an Asset /// </summary> /// <remarks> /// Updates an existing Asset in the Media Services account /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> /// <param name='parameters'> /// The request parameters /// </param> public static Asset Update(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, Asset parameters) { return(operations.UpdateAsync(resourceGroupName, accountName, assetName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Get an Asset. /// </summary> /// <remarks> /// Get an Asset by Id. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='id'> /// The Asset Id. /// </param> public static Asset QueryById(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string id) { return(operations.QueryByIdAsync(subscriptionId, resourceGroup, workspace, id).GetAwaiter().GetResult()); }
/// <summary> /// Delete an Asset. /// </summary> /// <remarks> /// Delete the specified Asset. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='id'> /// The Id of the Asset to delete. /// </param> public static void Delete(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string id) { operations.DeleteAsync(subscriptionId, resourceGroup, workspace, id).GetAwaiter().GetResult(); }
/// <summary> /// List Streaming Locators /// </summary> /// <remarks> /// Lists Streaming Locators which are associated with this asset. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> public static ListStreamingLocatorsResponse ListStreamingLocators(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName) { return(operations.ListStreamingLocatorsAsync(resourceGroupName, accountName, assetName).GetAwaiter().GetResult()); }
/// <summary> /// Update an Asset. /// </summary> /// <remarks> /// Patch a specific Asset. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='id'> /// The Id of the Asset to patch. /// </param> /// <param name='patch'> /// The payload that is used to patch an Asset. /// </param> public static Asset Patch(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string id, IList <JsonPatchOperation> patch) { return(operations.PatchAsync(subscriptionId, resourceGroup, workspace, id, patch).GetAwaiter().GetResult()); }
/// <summary> /// List Streaming Locators /// </summary> /// <remarks> /// Lists Streaming Locators which are associated with this asset. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ListStreamingLocatorsResponse> ListStreamingLocatorsAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListStreamingLocatorsWithHttpMessagesAsync(resourceGroupName, accountName, assetName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Query the list of Assets in a workspace. /// </summary> /// <remarks> /// If no filter is passed, the query lists all the Assets in the given /// workspace. The returned list is paginated and the count of items in each /// page is an optional parameter. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <Asset> ListQueryNext(this IAssetsOperations operations, string nextPageLink) { return(operations.ListQueryNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Get an Asset /// </summary> /// <remarks> /// Get the details of an Asset in the Media Services account /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> public static Asset Get(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName) { return(operations.GetAsync(resourceGroupName, accountName, assetName).GetAwaiter().GetResult()); }
/// <summary> /// Query the list of Assets in a workspace. /// </summary> /// <remarks> /// If no filter is passed, the query lists all the Assets in the given /// workspace. The returned list is paginated and the count of items in each /// page is an optional parameter. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='runId'> /// The run Id associated with the Assets. /// </param> /// <param name='name'> /// The object name. /// </param> /// <param name='count'> /// The number of items to retrieve in a page. /// </param> /// <param name='skipToken'> /// The continuation token to retrieve the next page. /// </param> /// <param name='tags'> /// A set of tags with which to filter the returned models. /// It is a comma separated string of tags key or tags key=value /// Example: tagKey1,tagKey2,tagKey3=value3 /// </param> /// <param name='properties'> /// A set of properties with which to filter the returned models. /// It is a comma separated string of properties key and/or properties /// key=value /// Example: propKey1,propKey2,propKey3=value3 /// </param> /// <param name='orderby'> /// An option for specifying how to order the list. Possible values include: /// 'CreatedAtDesc', 'CreatedAtAsc', 'UpdatedAtDesc', 'UpdatedAtAsc' /// </param> public static IPage <Asset> ListQuery(this IAssetsOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string runId = default(string), string name = default(string), int?count = default(int?), string skipToken = default(string), string tags = default(string), string properties = default(string), string orderby = default(string)) { return(operations.ListQueryAsync(subscriptionId, resourceGroup, workspace, runId, name, count, skipToken, tags, properties, orderby).GetAwaiter().GetResult()); }
/// <summary> /// Delete an Asset. /// </summary> /// <remarks> /// Deletes an Asset in the Media Services account /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the Azure subscription. /// </param> /// <param name='accountName'> /// The Media Services account name. /// </param> /// <param name='assetName'> /// The Asset name. /// </param> public static void Delete(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName) { operations.DeleteAsync(resourceGroupName, accountName, assetName).GetAwaiter().GetResult(); }