Additional info on Azure deployment models [https://azure.microsoft.com/en-us/documentation/articles/azure-classic-rm/](https://azure.microsoft.com/en-us/documentation/articles/azure-classic-rm/)
## Azure Resource Management (preview)
* [Authorization](https://rubygems.org/gems/azure_mgmt_authorization) Azure Resource Manager role based authorization
In order to use the Azure SDK, you must supply the following values to the Azure SDK:
* Tenant Id
* Client Id
* Subscription Id
* Client Secret
You could pass the above values in the following ways:
### Option 1 - Environment Variables
You can set the (above) values using the following environment variables:
* AZURE_TENANT_ID
* AZURE_CLIENT_ID
* AZURE_SUBSCRIPTION_ID
* AZURE_CLIENT_SECRET
To set the environment variables, in Windows, you could use the command such as:
```
set AZURE_TENANT_ID=<YOUR_TENANT_ID>
```
In Unix based systems, you could use the command such as:
```
export AZURE_TENANT_ID=<YOUR_TENANT_ID>
```
### Option 2 - Options Hash
The initialization of profile clients take an options hash as a parameter. This options hash consists of tenant_id, client_id, client_secret, subscription_id, active_directory_settings and credentials. Among these, the active_directory_settings and credentials are optional.
You can set the (above) values using the options hash:
```ruby
options = {
tenant_id: 'YOUR TENANT ID',
client_id: 'YOUR CLIENT ID',
client_secret: 'YOUR CLIENT SECRET',
subscription_id: 'YOUR SUBSCRIPTION ID'
}
```
If you would like to pass in the credentials object, you could use the the following code:
You can set the (above) values using a combination of environment variables and options hash. The values mentioned in the options hash will take precedence over the environment variables.
With 0.15.0 of Azure SDK, multiple API versions and profiles are introduced. With these changes, each individual gem
has multiple versions of the services and several profiles. The azure_sdk rollup gem also consists of several profiles. The following section provides details on the usage of multiple API versions and profiles.
## Why Multiple API versions?
Versions 0.14.0 and older, would have access to the latest versions of Azure services at the time of release. Each release up to 0.14.0, would include the latest available api-version of the services. There wasn't an option to use an older api-version of the service (except for using an older version of the sdk gem). With the introduction of multiple API versions per gem, any api-version available for the service can be explicitly targeted.
## What is a Profile?
A profile is a combination of different resource types with different versions from different services. Using a profile,
will help you mix and match between various resource types.
## What to use?
* If you would like to use the latest versions of **all** the services, then the recommendation is to use the **Latest** profile of the Azure SDK rollup gem.
* If you would like to use the services compatible with the **Azure Stack**, then the recommendation is to use the **V2017_03_09** profile of the Azure SDK rollup gem.
* If you would like to use the **latest** api-version of a service, then the recommendation is to use the **Latest** profile of the specific gem. For example, if you would like to use the latest api-version of compute service alone, use the Latest profile of compute gem.
* If you would like to use **specific** api-version of a service, then the recommendation is to use the **specific API** versions defined inside that gem.
Note: All the above options could be combined within the same application.
## Usage of azure_sdk gem
azure_sdk gem is a rollup of all the supported gems in the Ruby SDK. This gem consists of a **Latest** profile which supports the latest version of all services. it introduces a versioned profile **V2017_03_09** profile which is built for Azure Stack.
### Install
You can install the azure_sdk rollup gem with the following command:
```ruby
gem install 'azure_sdk'
```
### Existing Profiles
To start with, the azure_sdk rollup gem has two profiles.
1. V2017_03_09 (Profile built for Azure Stack)
2. Latest (Profile consists of Latest versions of all services)
You could choose the profile that you would like to use. If you would like to use the latest versions of **all** the services, then the recommendation is to use the **Latest** profile of the azure_sdk rollup gem.
If you would like to use the services compatible with the **Azure Stack**, then the recommendation is to use the **V2017_03_09** profile of the Azure SDK rollup gem.
### Usage
The following lines should be used to instantiate a profile client:
For more getting started samples go to [Azure-Samples](https://github.com/Azure-Samples/?utf8=%E2%9C%93&query=ruby). Please make sure to look for the azure_mgmt_* gem versions for samples.
If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-ruby/issues) section of the project. Please make sure to label the
issues with either arm or asm to help us expedite the process.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.