创建端口列表,后续可关联资源(例如安全组)使用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:CreatePortRangeList |
create |
*PortRangeList
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| RegionId |
string |
是 |
地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| ClientToken |
string |
否 |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多详情,请参见如何保证幂等性。 |
123e4567-e89b-12d3-a456-426655440000 |
| MaxEntries |
integer |
是 |
端口列表支持的最大条目容量,创建后不可更改。取值范围:1~2000。 重要 端口列表关联资源(例如安全组)计算规则配额时,将使用最大条目容量计算,而非实际条目数,请合理设置。 |
10 |
| PortRangeListName |
string |
是 |
端口列表的名称。长度为 2~128 个字符,必须以大小字母或中文开头,不能以 http://、https://、com.aliyun 和 com.alibabacloud 开头。可以包含中文、英文、数字、半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。 |
PortRangeListNameSample |
| Description |
string |
否 |
端口列表的描述信息。长度为 2~256 个英文或中文字符,不能以 http://和 https://开头。 |
Description information of PortRangeList |
| Entry |
array<object> |
否 |
端口列表条目数组。 |
|
|
object |
否 |
端口列表条目集合。 |
||
| PortRange |
string |
否 |
端口范围。N 的取值范围:0~200。
|
80/80 |
| Description |
string |
否 |
端口范围的描述信息。长度为 2~32 个英文或中文字符,不能以 http://和 https://开头。N 的取值范围:0~200。 |
Description information of Entry |
| ResourceGroupId |
string |
否 |
端口列表所在的企业资源组 ID。 |
rg-aek3b6jzp66**** |
| Tag |
array<object> |
否 |
端口列表绑定的标签数组。数组长度:0~20 |
|
|
object |
否 |
端口列表绑定的标签键值对信息。 |
||
| Key |
string |
否 |
端口列表的标签键。 使用该参数时,不允许为空或空字符串。最多支持 128 个字符,不能以 aliyun 和 acs:开头,不能包含 http://或者 https://。 |
key for PortRangeList |
| Value |
string |
否 |
端口列表的标签值。 使用该参数时,不允许为空,允许为空字符串。最多支持 128 个字符,不能包含 http://或者 https://。 |
value for PortRangeList |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数集合。 |
||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| PortRangeListId |
string |
创建成功的端口列表 ID。 |
prl-2ze9743**** |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PortRangeListId": "prl-2ze9743****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParam.Entry | The specified parameter Entry is not valid. | 指定的参数Entry不合法。 |
| 400 | InvalidOperation.MaxEntriesCountExceed | The specified MaxEntries exceeded the upper limit. | 指定的MaxEntries参数超过了最大限制值。 |
| 400 | InvalidOperation.EntryCountExceedMaxEntries | The number of entries in the port list exceeds MaxEntries. | 指定的条目数量超过了端口列表的MaxEntries的值。 |
| 400 | InvalidParameter.PortRange | The specified parameter PortRange is not valid. It should be two integers less than 65535 in specified format. | 端口列表中的条目PortRange不符合格式要求。应该指定小于65535的两个整数,用斜杠分隔。 |
| 400 | InvalidParameter.PortRangeListName | The specified parameter PortRangeListName is not valid. | 指定的端口列表名称不合法。 |
| 400 | LimitExceed.MaxEntries | The number of entries exceeds the MaxEntries of the specified PortRangeList. | 端口列表中的条目数量超过了MaxEntries的值。 |
| 400 | LimitExceed.Entry | The number of entries added or removed exceeds the limit. | 单次增加或删除的条目数量超出限制。 |
| 400 | InvalidOperation.MaxCountExceed | The number of port range list in the current account has exceeded quota. | 当前账号下的端口列表数量,超出了用户账号端口列表数量的限制。 |
| 400 | InvalidParameter.PortRangeDuplicated | The specified PortRange is duplicated. | 指定的端口范围存在重复。 |
| 400 | InvalidDescription.Malformed | The specifid Description is not valid. | 指定的资源描述格式不合法。长度为 2-256 个字符,不能以 http:// 和 https:// 开头。 |
| 404 | InvalidRegionId.NotFound | The specified parameter RegionId is not valid. | 指定的RegionId不存在,请您检查此产品在该地域是否可用。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。