-
Notifications
You must be signed in to change notification settings - Fork 246
Azure Stack API Steps to regenerate SDKs
This page describes the steps to generate the custom Ruby SDKs for Azure Stack. This page takes compute service as an example for generation. Similar steps need to be followed for every service for which SDK should be generated.
Use the following command to clone the specs repository:
git clone https://github.com/Azure/azure-rest-api-specs.git
git checkout current
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.
Use the following command to install autorest:
npm install -g autorest
Use the following command to clone Ruby SDK:
git clone https://github.com/Azure/azure-sdk-for-ruby.git
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.
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.
Go into the specific folder for your SDK and build the gem using the following commands:
cd <YOUR_AZURE_RUBY_SDK_CLONED_PATH>/management/azure_mgmt_compute
gem build azure_mgmt_compute.gemspec
The azure stack supported versions for for compute/network/keyvault/storage/resources/policy could be found here.
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.