diff --git a/VERSION b/VERSION index 0b9c019..e473765 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.12 +0.3.13 diff --git a/src/UDNS/Apis/AssociateUDNSZoneVPCRequest.php b/src/UDNS/Apis/AssociateUDNSZoneVPCRequest.php new file mode 100644 index 0000000..0859d2a --- /dev/null +++ b/src/UDNS/Apis/AssociateUDNSZoneVPCRequest.php @@ -0,0 +1,133 @@ + "AssociateUDNSZoneVPC"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("VPCProjectId"); + $this->markRequired("VPCId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @return string|null + */ + public function getVPCProjectId() + { + return $this->get("VPCProjectId"); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @param string $vpcProjectId + */ + public function setVPCProjectId($vpcProjectId) + { + $this->set("VPCProjectId", $vpcProjectId); + } + + /** + * VPCId: VPC资源ID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC资源ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/UDNS/Apis/AssociateUDNSZoneVPCResponse.php b/src/UDNS/Apis/AssociateUDNSZoneVPCResponse.php new file mode 100644 index 0000000..907a9d6 --- /dev/null +++ b/src/UDNS/Apis/AssociateUDNSZoneVPCResponse.php @@ -0,0 +1,26 @@ + "CreateUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("Name"); + $this->markRequired("Type"); + $this->markRequired("Value"); + $this->markRequired("ValueType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * Name: 主机记录 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 主机记录 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|IsEnabled,其中权重支持1-10,IsEnabled为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|IsEnabled,其中权重支持1-10,IsEnabled为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * TTL: TTL值,范围为5-600,单位为秒。默认为5 + * + * @return integer|null + */ + public function getTTL() + { + return $this->get("TTL"); + } + + /** + * TTL: TTL值,范围为5-600,单位为秒。默认为5 + * + * @param int $ttl + */ + public function setTTL($ttl) + { + $this->set("TTL", $ttl); + } + + /** + * Remark: 记录的备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 记录的备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UDNS/Apis/CreateUDNSRecordResponse.php b/src/UDNS/Apis/CreateUDNSRecordResponse.php new file mode 100644 index 0000000..9390510 --- /dev/null +++ b/src/UDNS/Apis/CreateUDNSRecordResponse.php @@ -0,0 +1,44 @@ +get("DNSRecordId"); + } + + /** + * DNSRecordId: 域名记录的资源ID + * + * @param string $dnsRecordId + */ + public function setDNSRecordId($dnsRecordId) + { + $this->set("DNSRecordId", $dnsRecordId); + } +} diff --git a/src/UDNS/Apis/CreateUDNSZoneRequest.php b/src/UDNS/Apis/CreateUDNSZoneRequest.php new file mode 100644 index 0000000..de47625 --- /dev/null +++ b/src/UDNS/Apis/CreateUDNSZoneRequest.php @@ -0,0 +1,232 @@ + "CreateUDNSZone"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneName"); + $this->markRequired("Type"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneName: 域名字符串 + * + * @return string|null + */ + public function getDNSZoneName() + { + return $this->get("DNSZoneName"); + } + + /** + * DNSZoneName: 域名字符串 + * + * @param string $dnsZoneName + */ + public function setDNSZoneName($dnsZoneName) + { + $this->set("DNSZoneName", $dnsZoneName); + } + + /** + * Type: 域名类型。枚举值,“private”,内网DNS;“public”,公网DNS,暂只支持private。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 域名类型。枚举值,“private”,内网DNS;“public”,公网DNS,暂只支持private。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Tag: 所属业务组名称 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 所属业务组名称 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @return string|null + */ + public function getIsRecursionEnabled() + { + return $this->get("IsRecursionEnabled"); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @param string $isRecursionEnabled + */ + public function setIsRecursionEnabled($isRecursionEnabled) + { + $this->set("IsRecursionEnabled", $isRecursionEnabled); + } + + /** + * Quantity: 购买时长,默认为1 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认为1 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费,默认为按月付费 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费,默认为按月付费 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CouponId: 代金券ID,默认不使用 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID,默认不使用 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDNS/Apis/CreateUDNSZoneResponse.php b/src/UDNS/Apis/CreateUDNSZoneResponse.php new file mode 100644 index 0000000..ab7acbc --- /dev/null +++ b/src/UDNS/Apis/CreateUDNSZoneResponse.php @@ -0,0 +1,44 @@ +get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } +} diff --git a/src/UDNS/Apis/DeleteUDNSRecordRequest.php b/src/UDNS/Apis/DeleteUDNSRecordRequest.php new file mode 100644 index 0000000..4cf0040 --- /dev/null +++ b/src/UDNS/Apis/DeleteUDNSRecordRequest.php @@ -0,0 +1,112 @@ + "DeleteUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("RecordIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * RecordIds: 域名记录资源ID + * + * @return string[]|null + */ + public function getRecordIds() + { + return $this->get("RecordIds"); + } + + /** + * RecordIds: 域名记录资源ID + * + * @param string[] $recordIds + */ + public function setRecordIds(array $recordIds) + { + $this->set("RecordIds", $recordIds); + } +} diff --git a/src/UDNS/Apis/DeleteUDNSRecordResponse.php b/src/UDNS/Apis/DeleteUDNSRecordResponse.php new file mode 100644 index 0000000..9276737 --- /dev/null +++ b/src/UDNS/Apis/DeleteUDNSRecordResponse.php @@ -0,0 +1,26 @@ + "DescribeUDNSDomain"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("DNSZoneName"); + $this->markRequired("VPCId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneName: zone名称 + * + * @return string|null + */ + public function getDNSZoneName() + { + return $this->get("DNSZoneName"); + } + + /** + * DNSZoneName: zone名称 + * + * @param string $dnsZoneName + */ + public function setDNSZoneName($dnsZoneName) + { + $this->set("DNSZoneName", $dnsZoneName); + } + + /** + * VPCId: VPI资源ID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPI资源ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Offset: 查询数量偏移 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 查询数量偏移 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数量 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数量 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UDNS/Apis/DescribeUDNSDomainResponse.php b/src/UDNS/Apis/DescribeUDNSDomainResponse.php new file mode 100644 index 0000000..09afeb7 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSDomainResponse.php @@ -0,0 +1,78 @@ +get("RecordInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RecordInfo($item)); + } + return $result; + } + + /** + * RecordInfos: 查询记录 + * + * @param RecordInfo[] $recordInfos + */ + public function setRecordInfos(array $recordInfos) + { + $result = []; + foreach ($recordInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 总条数 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总条数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDNS/Apis/DescribeUDNSRecordRequest.php b/src/UDNS/Apis/DescribeUDNSRecordRequest.php new file mode 100644 index 0000000..8c0c7f9 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSRecordRequest.php @@ -0,0 +1,211 @@ + "DescribeUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * RecordIds: 域名记录资源ID + * + * @return string[]|null + */ + public function getRecordIds() + { + return $this->get("RecordIds"); + } + + /** + * RecordIds: 域名记录资源ID + * + * @param string[] $recordIds + */ + public function setRecordIds(array $recordIds) + { + $this->set("RecordIds", $recordIds); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Query: 模糊查询记录 + * + * @return string|null + */ + public function getQuery() + { + return $this->get("Query"); + } + + /** + * Query: 模糊查询记录 + * + * @param string $query + */ + public function setQuery($query) + { + $this->set("Query", $query); + } + + /** + * SortKey: 排序字段,只支持host update_time + * + * @return string|null + */ + public function getSortKey() + { + return $this->get("SortKey"); + } + + /** + * SortKey: 排序字段,只支持host update_time + * + * @param string $sortKey + */ + public function setSortKey($sortKey) + { + $this->set("SortKey", $sortKey); + } + + /** + * SortDir: 排序方式,支持asc desc + * + * @return string|null + */ + public function getSortDir() + { + return $this->get("SortDir"); + } + + /** + * SortDir: 排序方式,支持asc desc + * + * @param string $sortDir + */ + public function setSortDir($sortDir) + { + $this->set("SortDir", $sortDir); + } +} diff --git a/src/UDNS/Apis/DescribeUDNSRecordResponse.php b/src/UDNS/Apis/DescribeUDNSRecordResponse.php new file mode 100644 index 0000000..9930e54 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSRecordResponse.php @@ -0,0 +1,78 @@ +get("TotalCount"); + } + + /** + * TotalCount: 资源数量 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * RecordInfos: 域名记录详细信息 + * + * @return RecordInfo[]|null + */ + public function getRecordInfos() + { + $items = $this->get("RecordInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RecordInfo($item)); + } + return $result; + } + + /** + * RecordInfos: 域名记录详细信息 + * + * @param RecordInfo[] $recordInfos + */ + public function setRecordInfos(array $recordInfos) + { + $result = []; + foreach ($recordInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDNS/Apis/DescribeUDNSZoneRequest.php b/src/UDNS/Apis/DescribeUDNSZoneRequest.php new file mode 100644 index 0000000..3954419 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSZoneRequest.php @@ -0,0 +1,130 @@ + "DescribeUDNSZone"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneIds: 域名资源ID + * + * @return string[]|null + */ + public function getDNSZoneIds() + { + return $this->get("DNSZoneIds"); + } + + /** + * DNSZoneIds: 域名资源ID + * + * @param string[] $dnsZoneIds + */ + public function setDNSZoneIds(array $dnsZoneIds) + { + $this->set("DNSZoneIds", $dnsZoneIds); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UDNS/Apis/DescribeUDNSZoneResponse.php b/src/UDNS/Apis/DescribeUDNSZoneResponse.php new file mode 100644 index 0000000..786db16 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSZoneResponse.php @@ -0,0 +1,78 @@ +get("TotalCount"); + } + + /** + * TotalCount: 符合查询条件的域名数量 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DNSZoneInfos: 域名资源信息 + * + * @return ZoneInfo[]|null + */ + public function getDNSZoneInfos() + { + $items = $this->get("DNSZoneInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ZoneInfo($item)); + } + return $result; + } + + /** + * DNSZoneInfos: 域名资源信息 + * + * @param ZoneInfo[] $dnsZoneInfos + */ + public function setDNSZoneInfos(array $dnsZoneInfos) + { + $result = []; + foreach ($dnsZoneInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDNS/Apis/DisassociateUDNSZoneVPCRequest.php b/src/UDNS/Apis/DisassociateUDNSZoneVPCRequest.php new file mode 100644 index 0000000..32fad44 --- /dev/null +++ b/src/UDNS/Apis/DisassociateUDNSZoneVPCRequest.php @@ -0,0 +1,133 @@ + "DisassociateUDNSZoneVPC"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("VPCProjectId"); + $this->markRequired("VPCId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @return string|null + */ + public function getVPCProjectId() + { + return $this->get("VPCProjectId"); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @param string $vpcProjectId + */ + public function setVPCProjectId($vpcProjectId) + { + $this->set("VPCProjectId", $vpcProjectId); + } + + /** + * VPCId: VPC资源ID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC资源ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/UDNS/Apis/DisassociateUDNSZoneVPCResponse.php b/src/UDNS/Apis/DisassociateUDNSZoneVPCResponse.php new file mode 100644 index 0000000..8258ad8 --- /dev/null +++ b/src/UDNS/Apis/DisassociateUDNSZoneVPCResponse.php @@ -0,0 +1,26 @@ + "ModifyUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("RecordId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * RecordId: 域名记录资源ID + * + * @return string|null + */ + public function getRecordId() + { + return $this->get("RecordId"); + } + + /** + * RecordId: 域名记录资源ID + * + * @param string $recordId + */ + public function setRecordId($recordId) + { + $this->set("RecordId", $recordId); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|Enable,其中权重支持1-10,Enable为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|Enable,其中权重支持1-10,Enable为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * TTL: TTL值,单位为秒 + * + * @return integer|null + */ + public function getTTL() + { + return $this->get("TTL"); + } + + /** + * TTL: TTL值,单位为秒 + * + * @param int $ttl + */ + public function setTTL($ttl) + { + $this->set("TTL", $ttl); + } + + /** + * Remark: 记录的备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 记录的备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } +} diff --git a/src/UDNS/Apis/ModifyUDNSRecordResponse.php b/src/UDNS/Apis/ModifyUDNSRecordResponse.php new file mode 100644 index 0000000..c2289b3 --- /dev/null +++ b/src/UDNS/Apis/ModifyUDNSRecordResponse.php @@ -0,0 +1,26 @@ + "ModifyUDNSZone"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @return string|null + */ + public function getIsRecursionEnabled() + { + return $this->get("IsRecursionEnabled"); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @param string $isRecursionEnabled + */ + public function setIsRecursionEnabled($isRecursionEnabled) + { + $this->set("IsRecursionEnabled", $isRecursionEnabled); + } +} diff --git a/src/UDNS/Apis/ModifyUDNSZoneResponse.php b/src/UDNS/Apis/ModifyUDNSZoneResponse.php new file mode 100644 index 0000000..3392ba4 --- /dev/null +++ b/src/UDNS/Apis/ModifyUDNSZoneResponse.php @@ -0,0 +1,26 @@ +get("RecordId"); + } + + /** + * RecordId: 域名记录资源ID + * + * @param string $recordId + */ + public function setRecordId($recordId) + { + $this->set("RecordId", $recordId); + } + + /** + * Name: 主机记录 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 主机记录 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Type: 记录类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 记录类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * ValueSet: 数值组 + * + * @return ValueSet[]|null + */ + public function getValueSet() + { + $items = $this->get("ValueSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ValueSet($item)); + } + return $result; + } + + /** + * ValueSet: 数值组 + * + * @param ValueSet[] $valueSet + */ + public function setValueSet(array $valueSet) + { + $result = []; + foreach ($valueSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ValueType: 记录策略,标准或随机应答 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 记录策略,标准或随机应答 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * TTL: TTL值,单位为秒 + * + * @return integer|null + */ + public function getTTL() + { + return $this->get("TTL"); + } + + /** + * TTL: TTL值,单位为秒 + * + * @param int $ttl + */ + public function setTTL($ttl) + { + $this->set("TTL", $ttl); + } + + /** + * Remark: 记录备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 记录备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UDNS/Models/VPCInfo.php b/src/UDNS/Models/VPCInfo.php new file mode 100644 index 0000000..cef0a07 --- /dev/null +++ b/src/UDNS/Models/VPCInfo.php @@ -0,0 +1,124 @@ +get("VPCId"); + } + + /** + * VPCId: VPC ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @return string|null + */ + public function getVPCProjectId() + { + return $this->get("VPCProjectId"); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @param string $vpcProjectId + */ + public function setVPCProjectId($vpcProjectId) + { + $this->set("VPCProjectId", $vpcProjectId); + } + + /** + * Name: VPC名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: VPC名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Network: VPC地址空间 + * + * @return string[]|null + */ + public function getNetwork() + { + return $this->get("Network"); + } + + /** + * Network: VPC地址空间 + * + * @param string[] $network + */ + public function setNetwork(array $network) + { + $this->set("Network", $network); + } + + /** + * VPCType: VPC类型:Normal 公有云 Hybrid 托管云 + * + * @return string|null + */ + public function getVPCType() + { + return $this->get("VPCType"); + } + + /** + * VPCType: VPC类型:Normal 公有云 Hybrid 托管云 + * + * @param string $vpcType + */ + public function setVPCType($vpcType) + { + $this->set("VPCType", $vpcType); + } +} diff --git a/src/UDNS/Models/ValueSet.php b/src/UDNS/Models/ValueSet.php new file mode 100644 index 0000000..736e579 --- /dev/null +++ b/src/UDNS/Models/ValueSet.php @@ -0,0 +1,84 @@ +get("Data"); + } + + /** + * Data: 主机记录 + * + * @param string $data + */ + public function setData($data) + { + $this->set("Data", $data); + } + + /** + * Weight: 权重 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 权重 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * IsEnabled: 是否启用 + * + * @return integer|null + */ + public function getIsEnabled() + { + return $this->get("IsEnabled"); + } + + /** + * IsEnabled: 是否启用 + * + * @param int $isEnabled + */ + public function setIsEnabled($isEnabled) + { + $this->set("IsEnabled", $isEnabled); + } +} diff --git a/src/UDNS/Models/ZoneInfo.php b/src/UDNS/Models/ZoneInfo.php new file mode 100644 index 0000000..d5c331c --- /dev/null +++ b/src/UDNS/Models/ZoneInfo.php @@ -0,0 +1,256 @@ +get("DNSZoneName"); + } + + /** + * DNSZoneName: 域名名称 + * + * @param string $dnsZoneName + */ + public function setDNSZoneName($dnsZoneName) + { + $this->set("DNSZoneName", $dnsZoneName); + } + + /** + * DNSZoneId: UDNS私有域名 Zone ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: UDNS私有域名 Zone ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @return string|null + */ + public function getIsRecursionEnabled() + { + return $this->get("IsRecursionEnabled"); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @param string $isRecursionEnabled + */ + public function setIsRecursionEnabled($isRecursionEnabled) + { + $this->set("IsRecursionEnabled", $isRecursionEnabled); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 过期时间 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 过期时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * ChargeType: 计费类型(Dynamic、Month、Year) + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型(Dynamic、Month、Year) + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * IsAutoRenew: 是否开启自动续费(Yes No) + * + * @return string|null + */ + public function getIsAutoRenew() + { + return $this->get("IsAutoRenew"); + } + + /** + * IsAutoRenew: 是否开启自动续费(Yes No) + * + * @param string $isAutoRenew + */ + public function setIsAutoRenew($isAutoRenew) + { + $this->set("IsAutoRenew", $isAutoRenew); + } + + /** + * RecordInfos: 记录相关ID + * + * @return string[]|null + */ + public function getRecordInfos() + { + return $this->get("RecordInfos"); + } + + /** + * RecordInfos: 记录相关ID + * + * @param string[] $recordInfos + */ + public function setRecordInfos(array $recordInfos) + { + $this->set("RecordInfos", $recordInfos); + } + + /** + * VPCInfos: 绑定的VPC信息 + * + * @return VPCInfo[]|null + */ + public function getVPCInfos() + { + $items = $this->get("VPCInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPCInfo($item)); + } + return $result; + } + + /** + * VPCInfos: 绑定的VPC信息 + * + * @param VPCInfo[] $vpcInfos + */ + public function setVPCInfos(array $vpcInfos) + { + $result = []; + foreach ($vpcInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDNS/UDNSClient.php b/src/UDNS/UDNSClient.php new file mode 100644 index 0000000..e3e8184 --- /dev/null +++ b/src/UDNS/UDNSClient.php @@ -0,0 +1,416 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "VPCProjectId" => (string) VPC所属项目ID + * "VPCId" => (string) VPC资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AssociateUDNSZoneVPCResponse + * @throws UCloudException + */ + public function associateUDNSZoneVPC(AssociateUDNSZoneVPCRequest $request = null) + { + $resp = $this->invoke($request); + return new AssociateUDNSZoneVPCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDNSRecord - 创建域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/create_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "Name" => (string) 主机记录 + * "Type" => (string) 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * "Value" => (string) 数值组,支持逗号分割。格式为:Value|权重|IsEnabled,其中权重支持1-10,IsEnabled为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * "ValueType" => (string) 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * "TTL" => (integer) TTL值,范围为5-600,单位为秒。默认为5 + * "Remark" => (string) 记录的备注信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "DNSRecordId" => (string) 域名记录的资源ID + * ] + * + * @return CreateUDNSRecordResponse + * @throws UCloudException + */ + public function createUDNSRecord(CreateUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDNSZone - 创建域名 + * + * See also: https://docs.ucloud.cn/api/udns-api/create_udns_zone + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneName" => (string) 域名字符串 + * "Type" => (string) 域名类型。枚举值,“private”,内网DNS;“public”,公网DNS,暂只支持private。 + * "Tag" => (string) 所属业务组名称 + * "Remark" => (string) 备注 + * "IsRecursionEnabled" => (string) 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * "Quantity" => (integer) 购买时长,默认为1 + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费,默认为按月付费 + * "CouponId" => (string) 代金券ID,默认不使用 + * ] + * + * Outputs: + * + * $outputs = [ + * "DNSZoneId" => (string) 域名资源ID + * ] + * + * @return CreateUDNSZoneResponse + * @throws UCloudException + */ + public function createUDNSZone(CreateUDNSZoneRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUDNSZoneResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDNSRecord - 删除域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/delete_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "RecordIds" => (array) 域名记录资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUDNSRecordResponse + * @throws UCloudException + */ + public function deleteUDNSRecord(DeleteUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDNSDomain - zone下所有域名的rr记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/describe_udns_domain + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneName" => (string) zone名称 + * "VPCId" => (string) VPI资源ID + * "Offset" => (integer) 查询数量偏移 + * "Limit" => (integer) 返回数量 + * ] + * + * Outputs: + * + * $outputs = [ + * "RecordInfos" => (array) 查询记录[ + * [ + * "RecordId" => (string) 域名记录资源ID + * "Name" => (string) 主机记录 + * "Type" => (string) 记录类型 + * "ValueSet" => (array) 数值组[ + * [ + * "Data" => (string) 主机记录 + * "Weight" => (integer) 权重 + * "IsEnabled" => (integer) 是否启用 + * ] + * ] + * "ValueType" => (string) 记录策略,标准或随机应答 + * "TTL" => (integer) TTL值,单位为秒 + * "Remark" => (string) 记录备注信息 + * ] + * ] + * "TotalCount" => (integer) 总条数 + * ] + * + * @return DescribeUDNSDomainResponse + * @throws UCloudException + */ + public function describeUDNSDomain(DescribeUDNSDomainRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUDNSDomainResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDNSRecord - 获取域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/describe_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "RecordIds" => (array) 域名记录资源ID + * "Limit" => (integer) 数据分页值, 默认为20 + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Query" => (string) 模糊查询记录 + * "SortKey" => (string) 排序字段,只支持host update_time + * "SortDir" => (string) 排序方式,支持asc desc + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 资源数量 + * "RecordInfos" => (array) 域名记录详细信息[ + * [ + * "RecordId" => (string) 域名记录资源ID + * "Name" => (string) 主机记录 + * "Type" => (string) 记录类型 + * "ValueSet" => (array) 数值组[ + * [ + * "Data" => (string) 主机记录 + * "Weight" => (integer) 权重 + * "IsEnabled" => (integer) 是否启用 + * ] + * ] + * "ValueType" => (string) 记录策略,标准或随机应答 + * "TTL" => (integer) TTL值,单位为秒 + * "Remark" => (string) 记录备注信息 + * ] + * ] + * ] + * + * @return DescribeUDNSRecordResponse + * @throws UCloudException + */ + public function describeUDNSRecord(DescribeUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDNSZone - 获取域名信息 + * + * See also: https://docs.ucloud.cn/api/udns-api/describe_udns_zone + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneIds" => (array) 域名资源ID + * "Limit" => (integer) 数据分页值, 默认为20 + * "Offset" => (integer) 数据偏移量, 默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 符合查询条件的域名数量 + * "DNSZoneInfos" => (array) 域名资源信息[ + * [ + * "DNSZoneName" => (string) 域名名称 + * "DNSZoneId" => (string) UDNS私有域名 Zone ID + * "Tag" => (string) 业务组 + * "Remark" => (string) 备注 + * "IsRecursionEnabled" => (string) 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 过期时间 + * "ChargeType" => (string) 计费类型(Dynamic、Month、Year) + * "IsAutoRenew" => (string) 是否开启自动续费(Yes No) + * "RecordInfos" => (array) 记录相关ID + * "VPCInfos" => (array) 绑定的VPC信息[ + * [ + * "VPCId" => (string) VPC ID + * "VPCProjectId" => (string) VPC所属项目ID + * "Name" => (string) VPC名称 + * "Network" => (array) VPC地址空间 + * "VPCType" => (string) VPC类型:Normal 公有云 Hybrid 托管云 + * ] + * ] + * ] + * ] + * ] + * + * @return DescribeUDNSZoneResponse + * @throws UCloudException + */ + public function describeUDNSZone(DescribeUDNSZoneRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUDNSZoneResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DisassociateUDNSZoneVPC - 解绑域名和VPC + * + * See also: https://docs.ucloud.cn/api/udns-api/disassociate_udns_zone_vpc + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "VPCProjectId" => (string) VPC所属项目ID + * "VPCId" => (string) VPC资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DisassociateUDNSZoneVPCResponse + * @throws UCloudException + */ + public function disassociateUDNSZoneVPC(DisassociateUDNSZoneVPCRequest $request = null) + { + $resp = $this->invoke($request); + return new DisassociateUDNSZoneVPCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDNSRecord - 修改域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/modify_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "RecordId" => (string) 域名记录资源ID + * "Value" => (string) 数值组,支持逗号分割。格式为:Value|权重|Enable,其中权重支持1-10,Enable为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * "ValueType" => (string) 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * "TTL" => (integer) TTL值,单位为秒 + * "Remark" => (string) 记录的备注信息 + * "Type" => (string) 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUDNSRecordResponse + * @throws UCloudException + */ + public function modifyUDNSRecord(ModifyUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDNSZone - 修改域名备注/递归查询状态 + * + * See also: https://docs.ucloud.cn/api/udns-api/modify_udns_zone + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "Remark" => (string) 备注 + * "IsRecursionEnabled" => (string) 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUDNSZoneResponse + * @throws UCloudException + */ + public function modifyUDNSZone(ModifyUDNSZoneRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUDNSZoneResponse($resp->toArray(), $resp->getRequestId()); + } +}