CreatePortRangeList - 创建端口列表

创建端口列表,后续可关联资源(例如安全组)使用。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou
ClientTokenstring

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多详情,请参见如何保证幂等性

123e4567-e89b-12d3-a456-426655440000
MaxEntriesinteger

端口列表支持的最大条目容量,创建后不可更改。取值范围:1~2000。

注意 端口列表关联资源(例如安全组)计算规则配额时,将使用最大条目容量计算,而非实际条目数,请合理设置。

10
PortRangeListNamestring

端口列表的名称。长度为 2~128 个字符,必须以大小字母或中文开头,不能以 http://、https://、com.aliyun 和 com.alibabacloud 开头。可以包含中文、英文、数字、半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。

PortRangeListNameSample
Descriptionstring

端口列表的描述信息。长度为 2~256 个英文或中文字符,不能以 http://和 https://开头。

Description information of PortRangeList
Entryarray<object>

端口列表条目数组。

object

端口列表条目集合。

PortRangestring

端口范围。N 的取值范围:0~200。

  • 条目数量不能大于最大条目容量(MaxEntries)。

  • 多个条目中的PortRange不能重复。

80/80
Descriptionstring

端口范围的描述信息。长度为 2~32 个英文或中文字符,不能以 http://和 https://开头。N 的取值范围:0~200。

Description information of Entry
ResourceGroupIdstring

端口列表所在的企业资源组 ID。

rg-aek3b6jzp66****
Tagarray<object>

端口列表绑定的标签数组。数组长度:0~20

object

端口列表绑定的标签键值对信息。

Keystring

端口列表的标签键。

使用该参数时,不允许为空或空字符串。最多支持 128 个字符,不能以 aliyun 和 acs:开头,不能包含 http://或者 https://。

key for PortRangeList
Valuestring

端口列表的标签值。

使用该参数时,不允许为空,允许为空字符串。最多支持 128 个字符,不能包含 http://或者 https://。

value for PortRangeList

返回参数

名称类型描述示例值
object

返回参数集合。

RequestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
PortRangeListIdstring

创建成功的端口列表 ID。

prl-2ze9743****

示例

正常返回示例

JSON格式

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "PortRangeListId": "prl-2ze9743****"
}

错误码

HTTP status code错误码错误信息描述
400InvalidParam.EntryThe specified parameter Entry is not valid.指定的参数Entry不合法。
400InvalidOperation.MaxEntriesCountExceedThe specified MaxEntries exceeded the upper limit.指定的MaxEntries参数超过了最大限制值。
400InvalidOperation.EntryCountExceedMaxEntriesThe number of entries in the port list exceeds MaxEntries.指定的条目数量超过了端口列表的MaxEntries的值。
400InvalidParameter.PortRangeThe specified parameter PortRange is not valid. It should be two integers less than 65535 in specified format.端口列表中的条目PortRange不符合格式要求。应该指定小于65535的两个整数,用斜杠分隔。
400InvalidParameter.PortRangeListNameThe specified parameter PortRangeListName is not valid.指定的端口列表名称不合法。
400LimitExceed.MaxEntriesThe number of entries exceeds the MaxEntries of the specified PortRangeList.端口列表中的条目数量超过了MaxEntries的值。
400LimitExceed.EntryThe number of entries added or removed exceeds the limit.单次增加或删除的条目数量超出限制。
400InvalidOperation.MaxCountExceedThe number of port range list in the current account has exceeded quota.当前账号下的端口列表数量,超出了用户账号端口列表数量的限制。
400InvalidParameter.PortRangeDuplicatedThe specified PortRange is duplicated.指定的端口范围存在重复。
400InvalidDescription.MalformedThe specifid Description is not valid.指定的资源描述格式不合法。长度为 2-256 个字符,不能以 http:// 和 https:// 开头。
404InvalidRegionId.NotFoundThe specified parameter RegionId is not valid.指定的RegionId不存在,请您检查此产品在该地域是否可用。

访问错误中心查看更多错误码。