PHPackages                             napche/azure-vm-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. napche/azure-vm-client

ActiveLibrary[API Development](/categories/api)

napche/azure-vm-client
======================

Azure Virtual Machines REST API PHP library

0.0.4(7y ago)15.7k[2 issues](https://github.com/Napche/azure-vm-client/issues)MITPHPPHP &gt;=7.0

Since Jan 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Napche/azure-vm-client)[ Packagist](https://packagist.org/packages/napche/azure-vm-client)[ Docs](https://github.com/Napche/azure-vm-client)[ RSS](/packages/napche-azure-vm-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

PHP Client for Azure Virtual Machines REST API.
===============================================

[](#php-client-for-azure-virtual-machines-rest-api)

Based on

Create an Azure Active Directory (AAD) Application
--------------------------------------------------

[](#create-an-azure-active-directory-aad-application)

AAD encourages the use of Applications / Service Principals for authenticating applications. An application / service principal combination provides a service identity to manage your Azure Subscription. [Click here to learn about AAD applications and service principals.](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)

- [Install the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
- run `az login` to log into Azure
- run `az ad sp create-for-rbac` to create an Azure Active Directory Application with access to Azure Resource Manager for the current Azure Subscription
    - If you want to run this for a different Azure Subscription, run `az account set --subscription 'your subscription name'`
- run `az account list --query "[?isDefault].id" -o tsv` to get your Azure Subscription Id.

The output of `az ad sp create-for-rbac` should look like the following:

```
{
  "appId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "displayName": "some-display-name",
  "name": "http://azure-cli-2017-04-03-15-30-52",
  "password": "XXXXXXXXXXXXXXXXXXXX",
  "tenant": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
```

The values `tenant`, `appId` and `password` are used in the Client constructor.

Example Usage
-------------

[](#example-usage)

```
        use Azure\Entity\VirtualMachine;
        use Azure\AzureVMClient;
        use Azure\Profile\StorageProfile;

        $resourceGroupName = 'new-resource-group';
        $client->createResourceGroup($resourceGroupName, $region, $tag);

        // Create new machine
        $name = 'new_vm';
        $region = 'westeurope';
        $machine = new VirtualMachine( $name, $region );
        $machine->setResourceGroup( $resourceGroupName );

        // Add or change Profiles..
        $storage = new StorageProfile();
        $machine->setStorageProfile( $storage );

        // Create client with instant authentication.
        $client = new AzureVMClient(
            $subscriptionId,
            $tenant,
            $applicationId,
            $password
        );

        /*
        // Create client and authenticate LATER.
        $client = new AzureVMClient(
            $subscriptionId
        );

        // Do some other stuff.

        $client->authenticate($tenant, $applicationId, $password);
        */

        // Create a VM.
        $client->createVM( $machine );

        // Delete afterwards.
        $client->deleteResourceGroup( $resourceGroupName );
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~112 days

Total

5

Last Release

2650d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/743628?v=4)[Napche](/maintainers/Napche)[@Napche](https://github.com/Napche)

---

Tags

apiazurevpsCloud HostingSSDvm

### Embed Badge

![Health badge](/badges/napche-azure-vm-client/health.svg)

```
[![Health](https://phpackages.com/badges/napche-azure-vm-client/health.svg)](https://phpackages.com/packages/napche-azure-vm-client)
```

###  Alternatives

[toin0u/digitalocean-v2

DigitalOcean API v2 client for PHP

7281.1M20](/packages/toin0u-digitalocean-v2)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[toin0u/digitalocean

DigitalOcean API PHP 5.3+ library

15863.0k3](/packages/toin0u-digitalocean)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[dunglas/digital-ocean-bundle

DigitalOcean API v2 client for Symfony and API Platform

312.5k](/packages/dunglas-digital-ocean-bundle)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
