diff --git a/VERSION b/VERSION index 83ea57e..bd6bf3c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.71 +0.3.72 diff --git a/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php b/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php index d9bfcae..37ea862 100644 --- a/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php +++ b/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php @@ -17,6 +17,8 @@ namespace UCloud\UDBPostgreSQL\Apis; use UCloud\Core\Request\Request; +use UCloud\UDBPostgreSQL\Params\CreateUPgSQLInstanceParamLabels; +use UCloud\UDBPostgreSQL\Params\CreateUPgSQLInstanceParamSecGroupId; class CreateUPgSQLInstanceRequest extends Request { @@ -278,6 +280,26 @@ public function setVPCID($vpcid) $this->set("VPCID", $vpcid); } + /** + * BackupZone: 高可用实例的备库可用区 + * + * @return string|null + */ + public function getBackupZone() + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 高可用实例的备库可用区 + * + * @param string $backupZone + */ + public function setBackupZone($backupZone) + { + $this->set("BackupZone", $backupZone); + } + /** * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" * @@ -297,4 +319,68 @@ public function setInstanceMode($instanceMode) { $this->set("InstanceMode", $instanceMode); } + + /** + * Labels: + * + * @return CreateUPgSQLInstanceParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUPgSQLInstanceParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUPgSQLInstanceParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecGroupId: + * + * @return CreateUPgSQLInstanceParamSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUPgSQLInstanceParamSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param CreateUPgSQLInstanceParamSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamLabels.php b/src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamLabels.php new file mode 100644 index 0000000..271b5ce --- /dev/null +++ b/src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 用户资源标签的键名 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 用户资源标签的键名 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamSecGroupId.php b/src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamSecGroupId.php new file mode 100644 index 0000000..f0e30f3 --- /dev/null +++ b/src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamSecGroupId.php @@ -0,0 +1,64 @@ +get("Id"); + } + + /** + * Id: 安全组id + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/UDBPostgreSQL/UDBPostgreSQLClient.php b/src/UDBPostgreSQL/UDBPostgreSQLClient.php index c1e5fd9..7a3b1c7 100644 --- a/src/UDBPostgreSQL/UDBPostgreSQLClient.php +++ b/src/UDBPostgreSQL/UDBPostgreSQLClient.php @@ -171,7 +171,20 @@ public function backupUPgSQLLog(BackupUPgSQLLogRequest $request = null) * "MachineType" => (string) 机器配置类型,2核4G的机器:o.pgsql2m.medium * "SubnetID" => (string) 子网ID * "VPCID" => (string) VPC的ID + * "BackupZone" => (string) 高可用实例的备库可用区 * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签的键名 + * ] + * ] + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组id + * "Priority" => (integer) 安全组优先级 + * ] + * ] * ] * * Outputs: