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

Network Interfaces - Get

获取网络接口

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}?api-version=2024-01-01

URI 参数

名称 必需 类型 说明
networkInterfaceName
path True

string

minLength: 1
maxLength: 80
pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[_a-zA-Z0-9]$

网络接口的名称

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 名称不区分大小写。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

api-version
query True

string

minLength: 1

用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

NetworkInterfaces

还行

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 流

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

GetNetworkInterface

示例请求

GET https://management.azure.com/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic?api-version=2024-01-01

示例响应

{
  "id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic",
  "name": "test-nic",
  "type": "Microsoft.AzureStackHCI/networkInterfaces",
  "location": "West US2",
  "extendedLocation": {
    "name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
    "type": "CustomLocation"
  },
  "properties": {
    "provisioningState": "Accepted",
    "ipConfigurations": [
      {
        "name": "ipconfig-sample",
        "properties": {
          "subnet": {
            "id": "external"
          }
        }
      }
    ]
  }
}

定义

名称 说明
createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ExtendedLocation

扩展位置的复杂类型。

ExtendedLocationTypes

扩展位置的类型。

InterfaceDNSSettings
IPConfiguration

网络接口中的 InterfaceIPConfiguration iPConfiguration。

NetworkInterfaces

网络接口资源定义。

Properties

IP 配置的 InterfaceIPConfigurationPropertiesFormat 属性。

ProvisioningStateEnum

网络接口的预配状态。

ProvisioningStatus
Status

在网络接口上执行的作的状态 [Succeeded, Failed, InProgress]

Subnet

子网 - 绑定到 IP 配置的子网的名称。

systemData

与创建和上次修改资源相关的元数据。

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ExtendedLocation

扩展位置的复杂类型。

名称 类型 说明
name

string

扩展位置的名称。

type

ExtendedLocationTypes

扩展位置的类型。

ExtendedLocationTypes

扩展位置的类型。

说明
CustomLocation

InterfaceDNSSettings

名称 类型 说明
dnsServers

string[]

接口的 DNS 服务器 IP 地址列表

IPConfiguration

网络接口中的 InterfaceIPConfiguration iPConfiguration。

名称 类型 说明
name

string

pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[_a-zA-Z0-9]$

名称 - 资源组中唯一的资源的名称。 此名称可用于访问资源。

properties

Properties

IP 配置的 InterfaceIPConfigurationPropertiesFormat 属性。

NetworkInterfaces

网络接口资源定义。

名称 类型 说明
extendedLocation

ExtendedLocation

资源的 extendedLocation。

id

string

资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

资源所在的地理位置

name

string

资源的名称

properties.dnsSettings

InterfaceDNSSettings

接口的 DNS 设置

properties.ipConfigurations

IPConfiguration[]

IPConfigurations - 网络接口的 IPConfigurations 列表。

properties.macAddress

string

MacAddress - 网络接口的 MAC 地址。

properties.provisioningState

ProvisioningStateEnum

网络接口的预配状态。

properties.status.errorCode

string

NetworkInterface 预配错误代码

properties.status.errorMessage

string

描述性错误消息

properties.status.provisioningStatus

ProvisioningStatus

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

资源标记。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

Properties

IP 配置的 InterfaceIPConfigurationPropertiesFormat 属性。

名称 类型 说明
gateway

string

网络接口网关

prefixLength

string

网络接口的 prefixLength

privateIPAddress

string

PrivateIPAddress - IP 配置的专用 IP 地址。

subnet

Subnet

子网 - 绑定到 IP 配置的子网的名称。

ProvisioningStateEnum

网络接口的预配状态。

说明
Succeeded
Failed
InProgress
Accepted
Deleting
Canceled

ProvisioningStatus

名称 类型 说明
operationId

string

在网络接口上执行的作的 ID

status

Status

在网络接口上执行的作的状态 [Succeeded, Failed, InProgress]

Status

在网络接口上执行的作的状态 [Succeeded, Failed, InProgress]

说明
Succeeded
Failed
InProgress

Subnet

子网 - 绑定到 IP 配置的子网的名称。

名称 类型 说明
id

string

ID - ARM 资源 ID,格式为 /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。