How to get Pricing details of azure resources using API? - azure

I need to get pricing details for SQL Server and Storage account in my application. I have found this url - https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices#api-endpoint but this works for Azure Virtual Machines. Will the same API work for other resources? How can I get details for SQL Server and Storage Account using same API?

You can use the below api's to get the required details :
Databases :
You can get SQL database (serverless,single server etc.) ,
Database for PostgreSQL etc.
https://prices.azure.com/api/retail/prices?api-version=2021-10-01-preview&$filter=serviceFamily eq 'Databases'
Storage Account:
This depends on what you want to create and store and the redundancy
as well which is the same when you select from the drop down of
Pricing Calculator
https://prices.azure.com/api/retail/prices?api-version=2021-10-01-preview&$filter=serviceFamily eq 'Storage'

Related

In Azure CosmosDB - disable the Data Explorer to user

In Azure Portal to user - how to disable the Data Explorer in Azure Cosmos DB service.
I guess what you are looking for is to restrict users from executing query on Azure portal. You can have a look at different roles available and control the access level accordingly. In this case what you need is Cosmos DB Operator
Can provision Azure Cosmos accounts, databases, and containers. Cannot
access any data or use Data Explorer.

Azure: How to associate a storage account for a specific SQL Database?

I would like to know if you are able to select your own storage account when creating a SQL database and SQL server on Azure? I have tried this a few times and but it doesn't seem to give the option to select an existing storage account. I am trying to associate specific storage accounts with specific resources using a similar name. Thank you in advance.
Azure SQL Database, as a fully managed service, does not expose a Storage Account to you. How it stores its data is not something you have to worry about. You just specify the performance tier and amount of storage to use (and region, security/network settings, etc). That's it.
Same thing applies to SQL Managed Instance service: You can specify amount of storage, and region.
Now: If you create a SQL Server instance within your own VM, then yes, you get to choose every detail, including storage account location (or the use of Managed Disks), medium type (SSD, for example).

Azure Cross Directory Data Access

I'm currently developing a Azure solution for one of my managed service clients.
we are developing a power bi service for their Azure backup/ azure recovery.
we are looking to host the whole process in our own azure environment, however we cannot get the data from A) their recovery vault logs into B) our Azure environment.
Anyone have any ideas on how to move data from their environment into our environment storage?
thank you
Power BI based reporting gets the data from storage accounts which store Azure Backup data. Once customer configured diagnostic settings to send data to a storage account(ask him to create a dedicated storage account for this), he can share the access keys with you so that you can connect to customer's storage account to get the required data and run Power Bi report in your environment.
This doc has all the details - with the change being in this case, customer will store data in his storage account and provide you access to that storage account via access key.

Determine SQL Azure Region without using Admin Console

I am working on a solution that uses SQL Azure. Part of the project deals with backups and using the DAC Web Services for backups.
The issue is that there is a different endpoint depending on which region the Azure SQL database is in. As I am working with multiple groups, and cannot ensure which region the database will be in, I am looking for a way to programmatically determine the region.
The region is also important, as I want to copy the backups to a different region just to be on the safe side.
I know that I can look in the Admin console, but I would like to use code to solve this problem.
Additional information:
The application is running on Azure using Worker Roles for functionality.
I do not have access to all of the account-id's to use the full REST API.
I do have access to the master database on the Azure Sql Server.
Working on this in C# (I failed to put the language)
You can use Get Servers request (GET https://management.database.windows.net:8443/<subscription-id>/servers) of Azure REST API to enumerate SQL servers which gives the Location or Region more info at msdn -> http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx

how to programmatically link resources in azure cloud services?

Please let me know is there any way to programmatic-ally link the resources(sql database or storage account) to my Azure cloud service.
This is a vague question, but... Windows Azure SQL Database and Windows Azure Storage are both services you simply consume - grab an endpoint and connect. That's the link. Very loose coupling. For SQL Database, it's just like accessing an on-premises database: open a connection via connection string and start working with the database.
For Windows Azure Storage, you can connect to any storage account you create, even ones in different subscriptions, as long as you have the account name and access key.
If there's something more specific you're looking for, you'll need to post a more specific question.

Resources