定制 flossiraptor/imds4azure 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2025-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固