Create Media Services Account


It is now recommended to use the Azure Resource Manager (ARM) REST API endpoints, as described in Media Services management REST API reference.

The POST request method described in this topic creates a Media Services account in the specified subscription. Both request and response follow the data contract described later in this section.

The request may be specified as follows (replace <subscription-id> with your subscription ID):

Method Request URI
POST https://endpoint/<subscriptionId>/services/mediaservices/Accounts

A successful operation returns status code 201 (Created). For information about error codes, see Media Services Management Error Codes.

Data Contract

The data contract for AccountCreationRequest is defined as follows:

public class AccountCreationRequest   
    public AccountCreationRequest();   

    public string AccountName { get; set; }   

    public string BlobStorageEndpointUri { get; set; }   

    public string Region { get; set; }   

    public string StorageAccountKey { get; set; }   

    public string StorageAccountName { get; set; }   

The data contract for AccountCreationResult is defined as follows:

public sealed class AccountCreationResult   
    public Guid AccountId { get; }   
    public string AccountName { get; }   
    public string Reason { get; }   

    public HttpStatusCode StatusCode { get; set; }   
    public string Subscription { get; }   

    public static AccountCreationResult Failed(string reason, HttpStatusCode result = HttpStatusCode.BadRequest);   
    public static AccountCreationResult Success(Guid accountId, string accountName, string subscription); }  


See How to: Use Media Services Management REST API.

See Also

Media Services Operations REST