Where is the Azure Media Service Region property? - c#

The most simplest thing I thought... but no where to be found... When I'm creating throuh the portal a new media service I can choose a region for the new service, a storage account (with a different region (..question for another day)) and the rest for the properties.
However, when I connect with the SDK I got a CloudMediaContext. I can find any property for channels and live-streams/programs. However, where can I find the region for this Media Service Account? Is this coupled to another storage account (and why can I choose another region), or any other class or is this via another way coupled?

So there are two things going on here:
Control Plane: Control plane deals with the management of service. It includes things like creation of service, fetching service details, key regeneration etc.
Data Plane: Data plane deals with the data in the service. So for media services, data plane deals with managing assets, locators etc.
Azure Media Service SDK deals with data plane only. You give it an account name and key and using that it gives you CloudMediaContext and you use that to manage data in your service.
In order to view the properties of the service itself (like the region), you would need to use Azure Resource Manager (ARM) SDK which is a wrapper over Azure Resource Manager API and not the Media Service SDK. This ARM SDK has support for Media Services.

Related

How to enable 'Vector Tile API' in google cloud platform console?

I am setting up Google Maps Platform gaming solution in Unity using my project api key and a new lat-long value but its not creating any model in scene. It works perfect when I use lat-long given by example scene with SDK.
I have created api key in google cloud platform console. I am unable to find 'Vector Tile API' to enable in console(If that is the issue).
According to docs when we use our own api key and lat-long other then example one, it should generate new model data.
The Maps Unity SDK FAQ states that it uses the Vector Tile API and Playable Locations API, both of which are not listed as part of Google Maps Core Services.
I cannot fin specific for these APIs in their documentation, although for the Google Maps Tile API they state:
If you have not yet purchased access to the API, please contact Sales.
Hence I presume something similar goes for the Vector Tile and Playable Locations API.
Just an update, the Google Maps Platform Gaming Solution is available to the public now.
You can enable the Vector Tile API or what is now called the Semantic Tile API through the Cloud Console Library.
Note that you will need a Billing Account to be able to get started with the GMP Gaming Services (e.g. Semantic Tile API and Playability Locations API)
Here's their getting started doc. You'll see where to enable the APIs and how to create API keys to use with the Maps SDK for Unity.

How to retrieve the catalog of available azure vm sizes in C#?

I'm having issues for a C# azure function where the goal is to create a routine that gathers all the vm sizes available on azure, regardless the subscription, since we want all the vm size types that azure has in store.
Unfortunatly, the available azure API (https://learn.microsoft.com/en-us/rest/api/compute/resourceskus/list) that I found requires a subscription id, which is not my goal.
I would like to know if there is an alternative that could solve this issue. Thanks.

Add Metadata to asset in Azure Media Services

I am developing a background service with .Net, that will upload some videos to the azure media services platform and I would like to add some custom metadata to each video I will upload. I have google for some time, and I found that there is no possibility to upload an asset. How to Add Metadata to assets in Azure Media Services? but having a look to the Azure dashboard I found, that selecting the properties of an asset I am able to add custom metadata manually. My question is, anybody have any idea how can I add this custom fields thougth through the azure media services API. Thanks in advance.
You would be able to add such metadata using Azure Storage APIs (and not via Media Services APIs). See this for example.

Where do I store media in an Azure Web App with C# ASP.NET

I am creating a C# ASP.NET app (using Visual Studio), which I'm hosting on Microsoft Azure. Currently, I have a folder in the solution named "Content", in which I store some media. For example, there a logo that is placed on the website.
The purpose of the web app is to generate a document that a user can download after entering some data. To generate this document, I also need to use some media (mainly images). There can be quite a lot of such images!
Where should I store these images? I currently have them in this "Content" folder as well (in seperate sub folders for each user), but I noticed on Azure there is also a tab called "Storage". I have tried to use this service for a bit, but I don't really understand its purpose. Would it be advisable to use this for storing the media, and then retrieving them with the web app when necessary, or should I leave them on the web app server? What is considered Good Practice?
Thanks in advance for any help
As a starting point, using Blob storage (see Azure Storage Documentation) would be significantly better than file storage on a single webserver - its cheaper and more scalable (pricing tiers for Application server storage will be expensive, you'd have have to duplicate files or have a multi-server directory in a load-balanced environment). The basic design is the application will use an SDK to retrieve the bits and then stream it back to the web browser or other client.
If you anticipate many users downloading the same file, and network performance matters, consider using a Content Delivery Network
You should store it in an Azure Storage Account and reference it using the SDK, after generating the document, you can use Shared Access Signature to give the user access and you can limit the access to read or write for a specific time.
If you will generate videos then you can serve it through Azure Media Services

How can I expose my Azure Table storage data as JSON?

I am new to Azure and trying to get the data from Azure table storage. I am able to read it using c# code and do all CRUD operations. But I am looking for built in REST API from azure storage? Is it available?
Below article says that we need to write our own service and deploy.
https://blog.kloud.com.au/2016/06/09/using-microsoft-azure-table-service-rest-api-to-collect-data-samples
But this require me to have IIS ?? or do I have to write app service in c#??
I want JSON because I want to read it from android app but I do not want to use azure android SDK. I want pure REST API
This article http://chrisrisner.com/Mobile-Services-and-Windows-Azure-Storage is close but it's recommending me create SQL Azure database!! so I am confused.
Based on your requirement, I would recommend you go Shared Access Signature (SAS) route. In short, a SAS is a time-limited/permission-based access to your Azure Storage resources. This removes the need for you to store the storage access key in your application as it poses a major security risk and some other issues.
To read more about SAS, please see this link: https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-shared-access-signature-part-1. This should give you some idea about what is possible with SAS.
Here's how it would work. There will be a server component which will know about the account key. Your app would request this server component to generate and return the SAS URL. It is recommended that you only grant the necessary permissions and only for the required duration in the SAS.
Once your app has the SAS URL, they can simply make HTTP requests directly to Azure Storage by using this SAS URL and get the data back directly from Azure Tables in JSON format. For example, if you want to fetch entities from a table you would make Query Entities REST API call: https://msdn.microsoft.com/en-us/library/azure/dd179421.aspx.
To learn more about SAS, please see this link as well: https://msdn.microsoft.com/en-us/library/azure/ee395415.aspx.
I do not want to store storage key inside android app.
This app is just showing the temperature from a azure storage which is real time pushed by event hub from device to table storage
Regardless your requirement is simply, and it is correct that we don't recommend to expose your storage key in clients. However, to provide table storage entities to your clients, we still need a backend server.
If you have an Azure Mobile Apps server as a backend server for your devices, you can directly integrate Azure Storage SDK in custom APIs to provide table storage entities for your devices. Refer to https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-how-to-use-server-sdk/#how-to-define-a-custom-api-controller for more.
If you don't have an Azure Mobile Apps, you can leverage Auzre Function Apps for you simple requirement, whose environment has automatically added the assembly Microsoft.WindowsAzure.Storage, please refer to https://azure.microsoft.com/en-us/documentation/articles/functions-reference-csharp/ for more.

Categories