flossiraptor/imds4azure
Composer 安装命令:
composer require flossiraptor/imds4azure
包简介
Query Azure Instance Meta-Data Services.
README 文档
README
The Microsoft Azure IMDS (Instance Meta-Data Service) can be queried to fetch metadata information about the running environment and Azure configuration.
Installation
We recommend using composer to install the IMDS for Azure library.
composer require flossiraptor/imds4azure
Quickstart
use Flossiraptor\Imds4Azure\IMDS; $imds = new IMDS(); // Get all the instance metadata. $instanceMetadata = $imds->instance()->get(); // Get the public IP address of the VM. $ipAddress = $imds->instance()->get('network.interface.0.ipv4.ipAddress.0.publicIpAddress'); // Get the public IP address of the load-balancer. $lbAddress = $imds->loadbalancer()->get('loadbalancer.publicIpAddresses.0.frontendIpAddress'); // Get an access token for the "Management" resource. $token = (string) $imds->identity()->getToken('https://management.azure.com/');
Categories
Detailed descriptions and links can be found at https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service
Supported
/metadata/identity/metadata/instance/metadata/loadbalancer
Not supported
/metadata/attested/metadata/scheduledevents/metadata/versions
Legal
Microsoft, Azure are trademarks of the Microsoft group of companies.
统计信息
- 总下载量: 427
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2025-01-29