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.37
0.3.38
1 change: 1 addition & 0 deletions src/CloudWatch/Apis/ListAlertRecordResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use UCloud\Core\Response\Response;
use UCloud\CloudWatch\Models\AlertRecord;
use UCloud\CloudWatch\Models\ContentAttrItem;

class ListAlertRecordResponse extends Response
{
Expand Down
3 changes: 2 additions & 1 deletion src/CloudWatch/Apis/QueryMetricDataSetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
use UCloud\Core\Response\Response;
use UCloud\CloudWatch\Models\QueryMetricDataResp;
use UCloud\CloudWatch\Models\QueryMetricDataRespItem;
use UCloud\CloudWatch\Models\ObjectType;
use UCloud\CloudWatch\Models\TagEntry;
use UCloud\CloudWatch\Models\MetricResult;
use UCloud\CloudWatch\Models\TagListItem;
use UCloud\CloudWatch\Models\MetricSample;

class QueryMetricDataSetResponse extends Response
Expand Down
4 changes: 3 additions & 1 deletion src/CloudWatch/Apis/QueryMetricDataSummaryResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
use UCloud\Core\Response\Response;
use UCloud\CloudWatch\Models\QueryMetricDataSummaryRespData;
use UCloud\CloudWatch\Models\ResourceSummary;
use UCloud\CloudWatch\Models\ResourceExtendAttrItem;
use UCloud\CloudWatch\Models\LabelAttrItem;
use UCloud\CloudWatch\Models\ResourceMonitorItem;
use UCloud\CloudWatch\Models\MetricSingleSample;
use UCloud\CloudWatch\Models\Product;
use UCloud\CloudWatch\Models\TagListItem;
use UCloud\CloudWatch\Models\MetricSample;

class QueryMetricDataSummaryResponse extends Response
Expand Down
85 changes: 20 additions & 65 deletions src/CloudWatch/CloudWatchClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,12 @@ public function getProductMetrics(GetProductMetricsRequest $request = null)
* "Status" => (string) 告警状态
* "StartAt" => (integer) 告警触发时间
* "EndAt" => (integer) 告警结束时间
* "ContentAttrList" => (array<string>) 产品相关的额外属性列表
* "ContentAttrList" => (array<object>) 产品相关的额外属性列表[
* [
* "Key" => (string) 键
* "Value" => (string) 值
* ]
* ]
* ]
* ]
* "TotalCount" => (integer) 告警记录总数
Expand Down Expand Up @@ -662,21 +667,20 @@ public function modifyAlertStrategyRemark(ModifyAlertStrategyRemarkRequest $requ
* "ErrMsg" => (string) 该指标查询的状态说明
* "TagEntries" => (array<object>) 标签列表。每项为 TagEntry:TagName(标签名)和 KeyList(该标签的全部候选值)。[
* [
* "Id" => (integer) ID
* "ObjectType" => (string) 资源类型ID
* "ObjectTypeKey" => (string) 资源类型
* "ProductName" => (string) 产品名称
* "ProductName1" => (string) 产品子名称
* "ProductCNName" => (string) 产品中文名称
* "ProductENName" => (string) 产品英文名称
* "Metas" => (string) {type: spec|basic, key:string, name: string}[] -> JSON字符串
* "TagName" => (string) 标签名称
* "KeyList" => (array<string>) 标签候选值列表
* ]
* ]
* "Results" => (array<object>) 查询到的时间序列列表[
* [
* "ResourceId" => (string) 资源的短id
* "ResourceName" => (string) 资源名称
* "TagList" => (array<integer>) 资源标签列表。每项为 TagListItem:Tag(标签名)和 TagValue(标签值)。
* "TagList" => (array<object>) 资源标签列表。每项为 TagListItem:Tag(标签名)和 TagValue(标签值)。[
* [
* "Tag" => (string) 标签名
* "TagValue" => (string) 标签值
* ]
* ]
* "Values" => (array<object>) 指标数据点列表,元素为 MetricPoint[
* [
* "Timestamp" => (integer) 时间戳
Expand Down Expand Up @@ -730,56 +734,14 @@ public function queryMetricDataSet(QueryMetricDataSetRequest $request = null)
* "ProjectId" => (integer) 项目id
* "ResourceExtendAttrList" => (array<object>) 资源扩展属性列表[
* [
* "Metric" => (string) 指标名
* "MetricValues" => (array<object>) 指标数据数组[
* [
* "Metric" => (string) 指标名
* "TagsList" => (array<object>) 指标标签列表[
* [
* "Id" => (integer) ID
* "ProductType" => (integer) 资源类型ID
* "ProductKey" => (string) 资源类型唯一key
* "ProductName" => (string) 产品名称
* "ProductName1" => (string) 产品子名称
* "ProductChName" => (string) 产品中文名称
* "ProductEnName" => (string) 产品英文名称
* "Metas" => (string) {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
* "ProductGroup" => (string) 产品分组
* ]
* ]
* "Value" => (object) 指标单个样本点对象[
* "Timestamp" => (integer) 时间戳
* "Value" => (number) 样本值
* ]
* ]
* ]
* "Key" => (string) 键
* "Value" => (string) 值
* ]
* ]
* "LabelAttrList" => (array<object>) 资源标签属性列表[
* [
* "Metric" => (string) 指标名
* "MetricValues" => (array<object>) 指标数据数组[
* [
* "Metric" => (string) 指标名
* "TagsList" => (array<object>) 指标标签列表[
* [
* "Id" => (integer) ID
* "ProductType" => (integer) 资源类型ID
* "ProductKey" => (string) 资源类型唯一key
* "ProductName" => (string) 产品名称
* "ProductName1" => (string) 产品子名称
* "ProductChName" => (string) 产品中文名称
* "ProductEnName" => (string) 产品英文名称
* "Metas" => (string) {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
* "ProductGroup" => (string) 产品分组
* ]
* ]
* "Value" => (object) 指标单个样本点对象[
* "Timestamp" => (integer) 时间戳
* "Value" => (number) 样本值
* ]
* ]
* ]
* "Key" => (string) 键
* "Value" => (string) 值
* ]
* ]
* "CompanyId" => (integer) 公司id
Expand All @@ -798,15 +760,8 @@ public function queryMetricDataSet(QueryMetricDataSetRequest $request = null)
* "Metric" => (string) 指标名
* "TagsList" => (array<object>) 指标标签列表[
* [
* "Id" => (integer) ID
* "ProductType" => (integer) 资源类型ID
* "ProductKey" => (string) 资源类型唯一key
* "ProductName" => (string) 产品名称
* "ProductName1" => (string) 产品子名称
* "ProductChName" => (string) 产品中文名称
* "ProductEnName" => (string) 产品英文名称
* "Metas" => (string) {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
* "ProductGroup" => (string) 产品分组
* "Tag" => (string) 标签名
* "TagValue" => (string) 标签值
* ]
* ]
* "Value" => (object) 指标单个样本点对象[
Expand Down
20 changes: 16 additions & 4 deletions src/CloudWatch/Models/AlertRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,20 +445,32 @@ public function setEndAt($endAt)
/**
* ContentAttrList: 产品相关的额外属性列表
*
* @return string[]|null
* @return ContentAttrItem[]|null
*/
public function getContentAttrList()
{
return $this->get("ContentAttrList");
$items = $this->get("ContentAttrList");
if ($items == null) {
return [];
}
$result = [];
foreach ($items as $i => $item) {
array_push($result, new ContentAttrItem($item));
}
return $result;
}

/**
* ContentAttrList: 产品相关的额外属性列表
*
* @param string[] $contentAttrList
* @param ContentAttrItem[] $contentAttrList
*/
public function setContentAttrList(array $contentAttrList)
{
$this->set("ContentAttrList", $contentAttrList);
$result = [];
foreach ($contentAttrList as $i => $item) {
array_push($result, $item->getAll());
}
return $result;
}
}
64 changes: 64 additions & 0 deletions src/CloudWatch/Models/ContentAttrItem.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\CloudWatch\Models;

use UCloud\Core\Response\Response;

class ContentAttrItem extends Response
{


/**
* 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/CloudWatch/Models/LabelAttrItem.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\CloudWatch\Models;

use UCloud\Core\Response\Response;

class LabelAttrItem extends Response
{


/**
* 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);
}
}
20 changes: 16 additions & 4 deletions src/CloudWatch/Models/MetricResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,33 @@ public function setResourceName($resourceName)
/**
* TagList: 资源标签列表。每项为 TagListItem:Tag(标签名)和 TagValue(标签值)。
*
* @return int[]|null
* @return TagListItem[]|null
*/
public function getTagList()
{
return $this->get("TagList");
$items = $this->get("TagList");
if ($items == null) {
return [];
}
$result = [];
foreach ($items as $i => $item) {
array_push($result, new TagListItem($item));
}
return $result;
}

/**
* TagList: 资源标签列表。每项为 TagListItem:Tag(标签名)和 TagValue(标签值)。
*
* @param int[] $tagList
* @param TagListItem[] $tagList
*/
public function setTagList(array $tagList)
{
$this->set("TagList", $tagList);
$result = [];
foreach ($tagList as $i => $item) {
array_push($result, $item->getAll());
}
return $result;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/CloudWatch/Models/MetricSingleSample.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function setMetric($metric)
/**
* TagsList: 指标标签列表
*
* @return Product[]|null
* @return TagListItem[]|null
*/
public function getTagsList()
{
Expand All @@ -55,15 +55,15 @@ public function getTagsList()
}
$result = [];
foreach ($items as $i => $item) {
array_push($result, new Product($item));
array_push($result, new TagListItem($item));
}
return $result;
}

/**
* TagsList: 指标标签列表
*
* @param Product[] $tagsList
* @param TagListItem[] $tagsList
*/
public function setTagsList(array $tagsList)
{
Expand Down
Loading