Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.71
0.3.72
86 changes: 86 additions & 0 deletions src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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"
*
Expand All @@ -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;
}
}
64 changes: 64 additions & 0 deletions src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamLabels.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* Copyright 2026 UCloud Technology Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace UCloud\UDBPostgreSQL\Params;

use UCloud\Core\Request\Request;

class CreateUPgSQLInstanceParamLabels extends Request
{


/**
* Key: 用户资源标签的键值
*
* @return string|null
*/
public function getKey()
{
return $this->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);
}
}
64 changes: 64 additions & 0 deletions src/UDBPostgreSQL/Params/CreateUPgSQLInstanceParamSecGroupId.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* Copyright 2026 UCloud Technology Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace UCloud\UDBPostgreSQL\Params;

use UCloud\Core\Request\Request;

class CreateUPgSQLInstanceParamSecGroupId extends Request
{


/**
* Id: 安全组id
*
* @return string|null
*/
public function getId()
{
return $this->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);
}
}
13 changes: 13 additions & 0 deletions src/UDBPostgreSQL/UDBPostgreSQLClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<object>) [
* [
* "Key" => (string) 用户资源标签的键值
* "Value" => (string) 用户资源标签的键名
* ]
* ]
* "SecGroupId" => (array<object>) [
* [
* "Id" => (string) 安全组id
* "Priority" => (integer) 安全组优先级
* ]
* ]
* ]
*
* Outputs:
Expand Down
Loading