文档

ValidateGatewayName

更新时间:

调用ValidateGatewayName可以校验所在的网关集群中网关名称是否重名。

调试

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

请求参数

名称

类型

是否必选

示例值

描述

Action String ValidateGatewayName

系统规定参数。取值:ValidateGatewayName

StorageBundleId String sb-0001b2otnkdxrigeq***

网关集群ID。

Name String alex***

网关名称。限制:

  • 长度为1~60个字符。
  • 必须以大小写字母或者中文开头。
  • 可以包含大小写字母,中文,数字,半角句号(.),短划线(-)或下划线(_)。

返回数据

名称

类型

示例值

描述

Message String successful

请求结果描述。

RequestId String CB300009-3850-4107-B291-59BDB4EDA183

请求ID。

Code String 200

状态码。状态码为200表示请求成功。

Success Boolean true

请求是否成功。

IsValid Boolean true

网关名称是否重名。取值:

  • true:所属网关集群中网关名称不存在。
  • false:所属网关集群中网关名称已存在。

示例

请求示例

http(s)://[Endpoint]/?Action=ValidateGatewayName
&StorageBundleId=sb-0001b2otnkdxrigeq***
&Name=alex***
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ValidateGatewayNameResponse>
    <Message>successful</Message>
    <RequestId>CB300009-3850-4107-B291-59BDB4EDA183</RequestId>
    <Code>200</Code>
    <Success>true</Success>
    <IsValid>true</IsValid>
</ValidateGatewayNameResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Message" : "successful",
  "RequestId" : "CB300009-3850-4107-B291-59BDB4EDA183",
  "Code" : "200",
  "Success" : true,
  "IsValid" : true
}

错误码

HttpCode

错误码

错误信息

描述

400 EmptyStorageBundleId You must enter a valid ID for the gateway cluster. 网关集群ID不能为空。
400 EmptyGatewayName You must enter a valid name for the gateway. 网关名称不能为空。
400 InvalidGatewayName The specified name of the gateway is invalid. The name must be 1 to 60 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. 无效的网关名称,网关名称长度限制1~60个字符,可以包含大小写字母,中文,数字,“.”,“_”或“-”,同时必须以大小写字母或者中文开头。
404 StorageBundleNotExist The name you specified for the gateway cluster does not exist. You must specify a valid parameter. 网关集群不存在,请确认输入参数是否正确。

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