你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Ip Allocations - Get

按资源组获取指定的 IpAllocation。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}?api-version=2023-09-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}?api-version=2023-09-01&$expand={$expand}

URI 参数

名称 必需 类型 说明
ipAllocationName
path True

string

IpAllocation 的名称。

resourceGroupName
path True

string

资源组的名称。

subscriptionId
path True

string

可以唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

$expand
query

string

展开引用的资源。

响应

名称 类型 说明
200 OK

IpAllocation

请求成功。 该操作返回生成的 IpAllocation 资源。

Other Status Codes

CloudError

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Get IpAllocation

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/IpAllocations/test-ipallocation?api-version=2023-09-01

Sample Response

{
  "name": "test-ipallocation",
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/IpAllocations/test-ipallocation",
  "type": "Microsoft.Network/IpAllocations",
  "location": "centraluseuap",
  "properties": {
    "type": "Hypernet",
    "prefix": "3.2.5.0/24",
    "ipamAllocationId": "916d3b28-663f-448b-9abc-1bea9d5fed8f",
    "allocationTags": {
      "VNetID": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1"
    }
  }
}

定义

名称 说明
CloudError

来自服务的错误响应。

CloudErrorBody

来自服务的错误响应。

IpAllocation

IpAllocation 资源。

IpAllocationType

IpAllocation 类型。

IPVersion

IP 地址版本。

SubResource

对另一个子资源的引用。

CloudError

来自服务的错误响应。

名称 类型 说明
error

CloudErrorBody

云错误正文。

CloudErrorBody

来自服务的错误响应。

名称 类型 说明
code

string

错误的标识符。 代码是固定的,旨在以编程方式使用。

details

CloudErrorBody[]

有关错误的其他详细信息的列表。

message

string

描述错误的消息,该消息适用于在用户界面中显示。

target

string

特定错误的目标。 例如,属性的名称出错。

IpAllocation

IpAllocation 资源。

名称 类型 默认值 说明
etag

string

一个唯一的只读字符串,每当资源更新时都会更改。

id

string

资源 ID。

location

string

资源位置。

name

string

资源名称。

properties.allocationTags

object

IpAllocation 标记。

properties.ipamAllocationId

string

IPAM 分配 ID。

properties.prefix

string

IpAllocation 的地址前缀。

properties.prefixLength

integer

0

IpAllocation 的地址前缀长度。

properties.prefixType

IPVersion

IpAllocation 的地址前缀类型。

properties.subnet

SubResource

使用此 IpAllocation 资源的前缀的子网。

properties.type

IpAllocationType

IpAllocation 的类型。

properties.virtualNetwork

SubResource

使用此 IpAllocation 资源的前缀的 VirtualNetwork。

tags

object

资源标记。

type

string

资源类型。

IpAllocationType

IpAllocation 类型。

名称 类型 说明
Hypernet

string

Undefined

string

IPVersion

IP 地址版本。

名称 类型 说明
IPv4

string

IPv6

string

SubResource

对另一个子资源的引用。

名称 类型 说明
id

string

资源 ID。