AttachNetworkInterface_边缘节点服务 ENS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

调用该接口时,请注意:

  • 弹性网卡必须处于可用(Available)状态。
  • 一个弹性网卡只能同时附加到一台相同可用区且相同专有网络的实例上。
  • 实例需处于已停止(Stopped)状态。
  • 一台实例最多可以附加 10 个弹性网卡。
  • 该接口为异步接口,调用成功后,您可以通过查询弹性网卡状态的方式来感知操作结果。

流控信息

请求速率为10/1(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
ens:AttachNetworkInterface
Update
全部资源
*

请求参数

字段名称字段详情
InstanceIdstring

实例 ID。

示例值:i-5p67acfmxazb4p****参考取值来源:
    RunInstances
    CreateInstance
    MountInstanceSDG
    RemoveInstanceSDG
    DeployInstanceSDG
    DescribeInstances
    AttachInstanceSDG
    UnmountInstanceSDG
    ModifyInstanceChargeType
    AddNetworkInterfaceToInstance
NetworkInterfaceIdstring

弹性网卡 ID。

示例值:eni-58z57orgmt6d1****参考取值来源:
    CreateNetworkInterface
    DescribeNetworkInterfaces

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
ens.interface.error
An error occurred while call the API. 诊断
400
InvalidEniId.NotFound
The specified NetworkInterfaceId does not exist.诊断
400
InvalidParameter.EniServiceManaged
The eni is managed by service.诊断
400
InvalidOperation.InvalidEniStatus
Current eni status does not support this operation. 诊断
400
InstanceNotFound
The input parameter instancdId that is not found.诊断
400
InvalidOperation.InvalidEnsStatus
Current instance status does not support this operation. 诊断
400
InvalidOperation.InstanceNotSupport
The specified instance does not support this operation.诊断
400
InvalidOperation.NetworkMismatch
Specified eni and instance are not in the same network.诊断
400
EniPerInstanceLimitExceeded
EniPerInstanceLimitExceeded.诊断
400
InvalidOperation.InvalidEniType
The type of eni does not support this operation. 诊断
400
NoPermission
Permission denied.诊断
400
InvalidParameter.%s
The specified field %s invalid. Please check it again.诊断

变更历史

暂无变更历史

相关示例