{"id":18284673,"url":"https://github.com/pplu/azure-sdk-perl","last_synced_at":"2025-07-05T02:02:19.442Z","repository":{"id":66753229,"uuid":"90634856","full_name":"pplu/azure-sdk-perl","owner":"pplu","description":"An attempt to build an Azure SDK for Perl","archived":false,"fork":false,"pushed_at":"2019-02-11T10:05:32.000Z","size":5496,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-21T00:32:54.508Z","etag":null,"topics":["azure","azure-sdk","azure-sdk-perl","perl","rest-api"],"latest_commit_sha":null,"homepage":null,"language":"Perl 6","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pplu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-08T14:03:11.000Z","updated_at":"2020-12-03T09:44:11.000Z","dependencies_parsed_at":"2023-02-24T16:15:24.611Z","dependency_job_id":null,"html_url":"https://github.com/pplu/azure-sdk-perl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fazure-sdk-perl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fazure-sdk-perl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fazure-sdk-perl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fazure-sdk-perl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pplu","download_url":"https://codeload.github.com/pplu/azure-sdk-perl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305876,"owners_count":20917198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-sdk","azure-sdk-perl","perl","rest-api"],"created_at":"2024-11-05T13:14:19.662Z","updated_at":"2025-07-05T02:02:19.429Z","avatar_url":"https://github.com/pplu.png","language":"Perl 6","funding_links":[],"categories":[],"sub_categories":[],"readme":"azure-sdk-perl\n==============\n\nAttempt to build a complete Azure SDK in Perl\n\nThis project is an attempt to build an Azure SDK from the official, public\nAzure REST API definitions found in https://github.com/Azure/azure-rest-api-specs. Said\nrepo holds OpenAPI (Swagger) definitions for a lot of the Azure APIs. Although\nswagger can generate a Perl client, it doesn't take into account Microsoft specific\nextensions to support Azure (x-ms-xxx). Our aim is to develop a fully functional SDK\nthat can support as many Azure services as possible.\n\nStatus\n======\n\nConsider the SDK alpha-quality code and please use with care, since it's in its\ninitial stages. We won't publish it to CPAN until we consider the code a bit more\nstable.\n\nAll the \"here be dragons\" cautions apply, although we're running it in some production\nscenarios with success: YMMV. If you're interested, please report what went well and \nwhat did not in the GitHub issues of this project. We'll try to help get things working \nfor you.\n\nService Scope\n=============\n\nThe intention is to support all the services published on the azure-rest-api-specs GitHub\nrepo. There are some notable services missing from these repos: Azure Storage. I haven't\nfound any specs for the BLOBs, Tables nor Queues services that form part of Azure Storage.\n\nInstallation\n============\n\nFor now we're not providing an \"installable\" package (via CPAN), so just do a Development\nsetup. See below.\n\nDevelopment setup\n============\n\n```\ngit clone https://github.com/capside/azure-sdk-perl.git\ncd azure-sdk-perl\n```\n\nWith carton you can install all the dependencies needed in a local environment, so you can play around with dependencies without\naffecting the system libraries. The cpanfile is used to track the required dependencies.\n\nIt's possible that you need -dev libraries to compile some of these modules. These packages are: \n\n* In Debian/Ubuntu:\n\n```\nsudo apt-get install libssl-dev\n```\n\n* In Red Hat/CentOS:\n\n```\nsudo yum install openssl-devel\n```\n\n* In Mac OS X:\n\n```\nbrew install openssl\n```\n\nIf yo are using Mac OS X - El Capitan(10.11) you will probably need to force the link of the openssl header to /usr/local:\n\n```\nbrew link openssl --force\n```\n\nAnd now tell Carton to install the dependecies in a local lib:\n\n```\ncarton install\n# drop into a shell so perl can always find the local libraries\ncarton exec $SHELL -l\n```\n\nTrying it out\n============\n\nEach class for each API can be constructed in the following way...\n\nCreate a Perl script (myscript.pl):\n\n```\n#!/usr/bin/env perl\n\nuse Azure;\nuse Data::Printer;\n\nmy $subscription_service = Azure-\u003eservice('Subscription');\n\nmy $subscriptions = $subscription_service-\u003eListSubscriptions;\np $subscriptions;\n```\n\nAlso: take a look at the examples directory for some examples of how to\nuse the SDK.\n\nAuthentication\n==============\n\nAzure supports lots of authentication flows to Azure through Microsoft Azure AD.\n\n##Client Credentials\n\nhttps://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oauth-client-creds. This is the best authentication flow for a server-side application that will not gather input from the user.\n\nTo use it, the SDK expects you to place the appropiate values into\n`AZURE_TENANT_ID`, `AZURE_CLIENT_ID` and `AZURE_SECRET_ID` environment variables.\n\nThese values can be obtained in your Azure Account: \n\n```\nexport AZURE_TENANT_ID=01234567-89ab-cdef-0123-4567890abcde\nexport AZURE_CLIENT_ID=fedcab98-7654-3210-fedc-ab9876543210\nexport AZURE_SECRET_ID=Ex4mpleCl1entS3kr3t=\n```\n\n· Tenant ID: the uuid of your AD Tenant. This is visible in the Azure AD control panel,\nunder \"Applications\", select \"Endpoints\". In the URLS you'll identify the Tenant ID.\n\n· Client ID: create a \"Web or API application\" to obtain a Client ID.\n\n· Secret ID: create a new key for the application you just created.\n\nTo manage Azure accounts, the application has to have delegated permissions for the \n\"Windows Azure Service Management API\". Be sure to grant the persmissions from the\napplications \"required permissions\" blade.\n\nIt's also necessary to grant the application privileges over some type of item. Go\nto the Azure subscription, select IAM, add Ownership role to the name of the application\nyou just created (note: you won't be able to select the application until you write the \nfirst letters in the search box)\n\nYou can use this grant just instancing an Azure service (it's the default auth provider)\n\n```\nmy $subscription_service = Azure-\u003eservice('Subscription', subscription_id =\u003e '...');\nmy $subscriptions = $subscription_service-\u003eListSubscriptions;\n```\n\n##Password Grant\n\nThis authentication provider uses the Azure AD password grant. Note that:\n\n\u003e This flow has given us much flexibility to gain a token easily, while, as this flow will expose the user name and password directly in a http request, it brings potential attack risk as well. Your credential will be lost easily if the request is sent to an unexpected endpoint, and definitely we should always avoid  handling the user credential directly. Furthermore, notice that resource owner password grant doesn't provide consent and doesn't support MFA either. So, try to use Authorization Code flow if possible and do not abuse the resource owner password grant\n\nBut it still is handy for some tasks\n\n```\nuse Azure::Credentials::AzureADPassword;\nmy $creds = Azure::Credentials::AzureADPassword-\u003enew();\nmy $config = Azure::SDK::Config-\u003enew(\n  credentials =\u003e $creds,\n  subscription_id =\u003e $ENV{ AZURE_SUBSCRIPTION_ID },\n);\nAzure-\u003edefault_config($config);\n\nmy $subs = Azure-\u003eservice('Subscription');\nmy $subscriptions = $subs-\u003eListSubscriptions;\n```\n\nTo configure it properly in Azure, go to the Azure AD control panel -\u003e Applications\n\n- Create a native Application\n- Give it \"Windows Azure Service Management API\" permissions\n- Click the \"Grant permissions button\" on the applications permissions blade\n\n##Others\n\nOther auth schemes can be plugged into the SDK. Take a look at existing credential providers\nin Azure/Credentials. You basically have to implement a class that \n\nIntegrated CLI\n==============\n\nThe SDK ships with a small CLI utility to help navigate the APIs. It just\n\n\n```\nazure-perl\n```\nwill print all services available\n\n```\nazure-perl Subscription\n```\nwill print the methods that can be called for the Subscription service\n\n```\nazure-perl Subscription ListTenants\n```\nwill execute ListTenants. If the API needs parameters they will be informed:\n```\nazure-perl Subscription GetSubscriptions\n```\nwill tell you what parameters have to be passed to the getSubscription operation\n```\nazure-perl Subscription GetSubscriptions subscriptionId xxxxxxxxxxxx\n\nazure-perl ResourceManagement ListDeployments subscriptionId xxxx resourceGroupName rg1\n```\nNOTE: although the api-version parameter is listed as required, it's really not needed because \nthe SDK figures it out for you.\n\nContributors\n============\nJose Luis Martinez started this project\n\nOriol Soriano, Eleatzar Colomer, Rael Garcia and Albert Bendicho have contributed various\nparts to the very early codebase.\n\nCopyright\n=========\n(c) 2016 CAPSiDE\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplu%2Fazure-sdk-perl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpplu%2Fazure-sdk-perl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplu%2Fazure-sdk-perl/lists"}