EncodingReservedUnitType

By default, Media Reserved Units are no longer needed to be used for Azure Media Services accounts. For compatibility purposes, you can continue to use the Azure APIs to manage and scale MRUs. However, by default, none of the MRU configurations that you set will be used to control encoding concurrency or performance. Be sure to review the Scale Media Processing Overview page to get more information about scaling media processing.

Important

When accessing entities in Media Services, you must set specific header fields and values in your HTTP requests.
For more information, see Setup for Media Services REST API Development and Connecting to Media Services with the Media Services REST API.

This topic gives an overview of the EncodingReservedUnitType entity and also demonstrates how to execute various operations with the Media Services REST API.

EncodingReservedUnitType Entity

Note

As described above, Reserved Units are no longer offered by Azure Media Services. The following information is for compatibility issues only.

The EncodingReservedUnitType entity contains the following properties.

Name Type Description
AccountId

Required. Read-Only
Edm.GUID Media Services account ID.
ReservedUnitType

Required.
Edm.Int Reserved unit type can be one of the following: S1 (0), S2 (1), S3 (2).
CurrentReservedUnits

Required.
Edm.Int Current reserved units. The number of the encoding reserved units that you want to be provisioned for this account.

By default, every Media Services account can scale to up to 25 encoding units. To request a higher limit, see How to request a higher limit for updatable quotas.
MaxReservableUnits

Read-only.
Edm.Int Maximum number of units that can be reserved for the account.

Get EncodingReservedUnitType

Details about the encoding reserved unit type associated with your account can be retrieved by using a GET HTTP request.

Method Request URI HTTP Version
GET Gets information about the encoding reserved unit type associated with your account.

https://<accountname>.restv2.<location>.media.azure.net/api/EncodingReservedUnitTypes
HTTP/1.1

Sample Request

You can try out the following example in the Fiddler’s Composer tab.

To get the latest x-ms-version:, see Media Services REST.

Request headers:

GET https://testrest.cloudapp.net/api/EncodingReservedUnitTypes HTTP/1.1  
DataServiceVersion: 3.0;NetFx  
MaxDataServiceVersion: 3.0;NetFx  
Accept: application/json;odata=minimalmetadata  
Accept-Charset: UTF-8  
x-ms-version: 2.19  
Content-Type: application/json;odata=minimalmetadata  
Host: <host URI>  
User-Agent: Microsoft ADO.NET Data Services  
Authorization: Bearer <token value>  
  

If successful, this operation returns HTTP/1.1 200 OK.

Update EncodingReservedUnitType

Updates EncodingReservedUnitType properties.

Method Request URI HTTP Version
PATCH/PUT/MERGE

For more information about these operations, see PATCH/PUT/MERGE.
https://<accountname>.restv2.<location>.media.azure.net/api/EncodingReservedUnitTypes(guid'accountid') HTTP/1.1

Sample Request

You can try out the following example in the Fiddler’s Composer tab.

To get the latest x-ms-version:, see Media Services REST.

Request headers:

  
PUT https://testrest.cloudapp.net/api/EncodingReservedUnitTypes(guid'61318ce3-0629-4400-8a1b-e716bc501314') HTTP/1.1  
DataServiceVersion: 3.0;NetFx  
MaxDataServiceVersion: 3.0;NetFx  
Accept: application/json;odata=minimalmetadata  
Accept-Charset: UTF-8  
x-ms-version: 2.19  
Content-Type: application/json;odata=minimalmetadata  
Host: <host URI>  
User-Agent: Microsoft ADO.NET Data Services  
Authorization: Bearer <token value>  
  

Request body:

{CurrentReservedUnits:1}  

If successful, this operation returns HTTP/1.1 204 No Content.