Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Azure Stack API Steps to regenerate SDKs

Sarangan Rajamanickam edited this page Aug 4, 2017 · 4 revisions

This page describes the steps to generate the custom Ruby SDKs for Azure Stack.

Phase I: Setting up Specs Repository

Step 1: Clone the Specs repository

Use the following command to clone the specs repository:

git clone https://github.com/Azure/azure-rest-api-specs.git
git checkout current

Step 2: Setup the configuration file

If you would like to (re)generate the azure_mgmt_compute, then open the readme.md file in <YOUR_SPECS_REPOSITORY_CLONED_PATH>/specification/compute/resource-manager/ path and add a new tag such as:

``` yaml $(tag) == '<YOUR_TAG_NAME>'
input-file:
- Microsoft.Compute/2017-03-30/compute.json
- Microsoft.Compute/2017-03-30/disk.json
- Microsoft.Compute/2017-03-30/runCommands.json
- Microsoft.ContainerService/2017-01-31/containerService.json

<YOUR_TAG_NAME> could be something similar to package-compute-2017-03.This tag name will be used to generate the Ruby SDK.

Phase II: Generating the SDK

Step 1: Install Autorest

Use the following command to install autorest:

npm install -g autorest

Step 2: Clone the Ruby SDK

Use the following command to clone Ruby SDK:

git clone https://github.com/Azure/azure-sdk-for-ruby.git 

Step 3: Delete the generated folder of the required SDK

If you would like to (re)generate the azure_mgmt_compute, then open <YOUR_AZURE_RUBY_SDK_CLONED_PATH>/management/azure_mgmt_compute/lib folder and delete the ‘generated’ folder.

Step 4: Generate the SDK

If you would like to (re)generate the azure_mgmt_compute, then you can use the following command:

autorest <YOUR_SPECS_REPOSITORY_CLONED_PATH>/current/specification/compute/resource-manager/readme.md --package-version=<YOUR_PACKAGE_VERSION> --namespace=<YOUR_NAMESPACE_NAME> --package-name=<YOUR_PACKAGE_NAME> --output-folder=<YOUR_AZURE_RUBY_SDK_CLONED_PATH>/management/azure_mgmt_compute/lib --ruby --azure-arm –tag=<YOUR_TAG_NAME>

To use the correct <YOUR_NAMESPACE_NAME> & <YOUR_PACKAGE_NAME>, Refer Namespaces & Package names in the Additional information section.

<YOUR_TAG_NAME> must match with the tag name that you created in Phase I - Step 2.

Additional Information

Namespace & Package names

No Service Name Package Name Namespace
1 Analysis Services azure_mgmt_analysis_services Azure::ARM::AnalysisServices
2 Authorization azure_mgmt_authorization Azure::ARM::Authorization
3 Batch azure_mgmt_batch Azure::ARM::Batch
4 Cdn azure_mgmt_cdn Azure::ARM::CDN
5 Cognitive Services azure_mgmt_cognitive_services Azure::ARM::CognitiveServices
6 Commerce azure_mgmt_commerce Azure::ARM::Commerce
7 Compute azure_mgmt_compute Azure::ARM::Compute
8 Datalake Analytics azure_mgmt_datalake_analytics Azure::ARM::DataLakeAnalytics
9 DataLake Store azure_mgmt_datalake_store Azure::ARM::DataLakeStore
10 Devtest Labs azure_mgmt_devtestlabs Azure::ARM::DevTestLabs
11 Dns azure_mgmt_dns Azure::ARM::Dns
12 Event Hub azure_mgmt_event_hub Azure::ARM::EventHub
13 Features azure_mgmt_features Azure::ARM::Features
14 Graph azure_mgmt_graph Azure::ARM::Graph
15 IoTHub azure_mgmt_iot_hub Azure::ARM::IotHub
16 Key Vault azure_mgmt_key_vault Azure::ARM::KeyVault
17 Locks azure_mgmt_locks Azure::ARM::Locks
18 Logic azure_mgmt_logic Azure::ARM::Logic
19 Machine Learning azure_mgmt_machine_learning Azure::ARM::MachineLearning
20 Media Services azure_mgmt_media_services Azure::ARM::MediaServices
21 Mobile Engangement azure_mgmt_mobile_engagement Azure::ARM::MobileEngagement
22 Monitor azure_mgmt_monitor Azure::ARM::Monitor
23 Network azure_mgmt_network Azure::ARM::Network
24 Notification Hubs azure_mgmt_notification_hubs Azure::ARM::NotificationHubs
25 Policy azure_mgmt_policy Azure::ARM::Policy
26 PowerBI Embedded azure_mgmt_powerbi_embedded Azure::ARM::PowerBiEmbedded
27 Recovery Services azure_mgmt_recovery_services Azure::ARM::RecoveryServices
28 Recoveryservices Backup azure_mgmt_recovery_services_backup Azure::ARM::RecoveryServicesBackup
29 Redis azure_mgmt_redis Azure::ARM::Redis
30 Resources azure_mgmt_resources Azure::ARM::Resources
31 Scheduler azure_mgmt_scheduler Azure::ARM::Scheduler
32 Search azure_mgmt_search Azure::ARM::Search
33 Server Management azure_mgmt_server_management Azure::ARM::ServerManagement
34 Service Bus azure_mgmt_service_bus Azure::ARM::ServiceBus
35 Sql azure_mgmt_sql Azure::ARM::SQL
36 Storage azure_mgmt_storage Azure::ARM::Storage
37 Stream Analytics azure_mgmt_stream_analytics Azure::ARM::StreamAnalytics
38 Subscriptions azure_mgmt_subscriptions Azure::ARM::Subscriptions
39 Traffic Manager azure_mgmt_traffic_manager Azure::ARM::TrafficManager
40 Web azure_mgmt_web Azure::ARM::Web

Also, you can refer to the Rakefile, for further details on package names and namespaces.