文档

CreateDNSServiceRule - 创建DNS授权规则

更新时间:

创建DNS授权规则。

调试

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

调试

授权信息

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

请求参数

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

云连接器实例ID。

iotcc-1y6h8z7imd2yu4****
ServiceTypestring

DNS授权规则的目标类型。取值:

  • Normal:普通类型。

  • DNSRedirect:重定向类型,重定向类型指将当前DNS服务地址重定向至另一个地址。

Normal
Destinationstring

重定向后的DNS服务地址。

说明ServiceType参数取值为DNSRedirect时,该参数必选。
192.168.0.2
Sourcestring

源DNS IP地址。取值:

100.100.2.136100.100.2.137100.100.2.138114.114.114.1148.8.8.88.8.4.4223.5.5.5223.6.6.6221.5.88.88116.116.116.116221.228.15.2661.139.2.69218.6.200.139119.29.29.29218.2.2.2208.67.220.220208.67.222.222218.4.4.4

除以上默认的DNS授权规则的IP,如有其他DNS授权规则的IP诉求,请提交工单,并在工单中附上需要申请的DNS授权规则的IP。

100.100.2.138
DNSServiceRuleNamestring

DNS授权规则名称。

长度为2~128个英文或中文字符,开头必须为大小写英文字母或中文,可包含数字、半角句号(.)、下划线(_)和短划线(-)。

test
DNSServiceRuleDescriptionstring

DNS授权规则描述。

长度为2~256个字符,开头必须为大小写英文字母或中文,但不能为http://https://

description
ClientTokenstring

客户端Token,用于保证请求的幂等性。

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符。

说明若您未指定,则系统自动使用API请求的RequestId作为ClientToken标识。每次API请求的RequestId可能不一样。
123e4567-e89b-12d3-a456-426655440000
DryRunboolean

是否只预检此次请求。取值:

  • true:发送检查请求,不会创建DNS授权规则。检查项包括是否填写了必需参数、请求格式、业务限制。如果检查不通过,则返回对应错误。如果检查通过,则返回错误码DryRunOperation
  • false(默认值):发送正常请求,通过检查后返回HTTP 2xx状态码并直接进行创建。
false
RegionIdstring

DNS授权规则所在的地域ID。

您可以通过调用ListRegions接口获取地域ID。

cn-hangzhou

返回参数

名称类型描述示例值
object
RequestIdstring

请求ID。

BC6D1C1D-6DBD-568C-B867-BC9CA699ED01
DNSServiceRuleIdstring

DNS授权规则ID。

ar-r56ijpurlu50gi****

示例

正常返回示例

JSON格式

{
  "RequestId": "BC6D1C1D-6DBD-568C-B867-BC9CA699ED01",
  "DNSServiceRuleId": "ar-r56ijpurlu50gi****"
}

错误码

HTTP status code错误码错误信息描述
400Forbidden.RAMRam user does not have permission to perform this operation.RAM用户无权限执行此操作。
400OperationDenied.DomainFeatureDisabledThe operation is not allowed because of domain feature disabled.-
400IllegalParam.DestinationThe param of Destination is illegal.Destination无效
400ResourceAlreadyExist.AuthorizationRuleThe specified resource of AuthorizationRule already exists.规则已经存在
400Conflict.ParamThe param is conflict.-
400Conflict.CidrThe cidr is conflict.-
400ResourceNotFound.IoTCloudConnectorThe param of IoTCloudConnectorId is illegal.IoTCloudConnectorId参数非法
400QuotaExceeded.sourceCidrLimitThe quota of SourceCidrsPerAuthorizationRule is exceededSourceCidrsPerAuthorizationRule quota超出
400IllegalParamThe param is illegal.参数非法
400QuotaExceeded.authorizationRuleInstanceLimitThe quota of AuthorizationRulePerIotCC is exceeded-
400IllegalParamFormatThe param is illegal.-
400ResourceInConfiguring.IoTCloudConnectorThe specified resource of IoTCloudConnector is configuring, please try again later.iotcc状态非稳态,或者锁冲突
400OperationDenied.CC5GInstanceNotSupportThe operation is not allowed because of CC5G instance not support.CC5G托管实例不支持此操作。

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

  • 本页导读 (1)
文档反馈