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
75 changes: 41 additions & 34 deletions ucloud/services/cloudwatch/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,6 @@ def get_product_metrics(
- **To** (str) - 目标


**MetricUnitConfig**
- **ConversionFactor** (int) - 转换因子
- **ConversionRules** (list) - 见 **ConversionRule** 模型定义
- **UnitCnNames** (list) - 指标中文名列表
- **UnitEnNames** (list) - 指标英文名列表


**MetricUnit**
- **ConversionFactor** (int) - 转换因子
- **CreatedAt** (str) - 创建时间
Expand Down Expand Up @@ -315,6 +308,13 @@ def get_product_metrics(
- **UpdatedBy** (str) - 修改者


**MetricUnitConfig**
- **ConversionFactor** (int) - 转换因子
- **ConversionRules** (list) - 见 **ConversionRule** 模型定义
- **UnitCnNames** (list) - 指标中文名列表
- **UnitEnNames** (list) - 指标英文名列表


**GetProductMetricsRespData**
- **List** (list) - 见 **Metirc** 模型定义
- **Total** (int) - 查询结果总数
Expand Down Expand Up @@ -361,8 +361,13 @@ def list_alert_record(

**Response Model**

**ContentAttrItem**
- **Key** (str) - 键
- **Value** (str) - 值


**AlertRecord**
- **ContentAttrList** (list) - 产品相关的额外属性列表
- **ContentAttrList** (list) - 见 **ContentAttrItem** 模型定义
- **EndAt** (int) - 告警结束时间
- **Level** (str) - 告警等级
- **MetricID** (int) - 指标id
Expand Down Expand Up @@ -651,15 +656,14 @@ def query_metric_data_set(

**Response Model**

**ObjectType**
- **Id** (int) - ID
- **Metas** (str) - {type: spec|basic, key:string, name: string}[] -> JSON字符串
- **ObjectType** (str) - 资源类型ID
- **ObjectTypeKey** (str) - 资源类型
- **ProductCNName** (str) - 产品中文名称
- **ProductENName** (str) - 产品英文名称
- **ProductName** (str) - 产品名称
- **ProductName1** (str) - 产品子名称
**TagEntry**
- **KeyList** (list) - 标签候选值列表
- **TagName** (str) - 标签名称


**TagListItem**
- **Tag** (str) - 标签名
- **TagValue** (str) - 标签值


**MetricSample**
Expand All @@ -670,7 +674,7 @@ def query_metric_data_set(
**MetricResult**
- **ResourceId** (str) - 资源的短id
- **ResourceName** (str) - 资源名称
- **TagList** (list) - 资源标签列表。每项为 TagListItem:Tag(标签名)和 TagValue(标签值)。
- **TagList** (list) - 见 **TagListItem** 模型定义
- **Values** (list) - 见 **MetricSample** 模型定义


Expand All @@ -679,7 +683,7 @@ def query_metric_data_set(
- **ErrMsg** (str) - 该指标查询的状态说明
- **Metric** (str) - 指标名
- **Results** (list) - 见 **MetricResult** 模型定义
- **TagEntries** (list) - 见 **ObjectType** 模型定义
- **TagEntries** (list) - 见 **TagEntry** 模型定义


**QueryMetricDataResp**
Expand Down Expand Up @@ -723,26 +727,29 @@ def query_metric_data_summary(

**Response Model**

**ResourceExtendAttrItem**
- **Key** (str) - 键
- **Value** (str) - 值


**LabelAttrItem**
- **Key** (str) - 键
- **Value** (str) - 值


**TagListItem**
- **Tag** (str) - 标签名
- **TagValue** (str) - 标签值


**MetricSample**
- **Timestamp** (int) - 时间戳
- **Value** (float) - 样本值


**Product**
- **Id** (int) - ID
- **Metas** (str) - {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
- **ProductChName** (str) - 产品中文名称
- **ProductEnName** (str) - 产品英文名称
- **ProductGroup** (str) - 产品分组
- **ProductKey** (str) - 资源类型唯一key
- **ProductName** (str) - 产品名称
- **ProductName1** (str) - 产品子名称
- **ProductType** (int) - 资源类型ID


**MetricSingleSample**
- **Metric** (str) - 指标名
- **TagsList** (list) - 见 **Product** 模型定义
- **TagsList** (list) - 见 **TagListItem** 模型定义
- **Value** (dict) - 见 **MetricSample** 模型定义


Expand All @@ -753,15 +760,15 @@ def query_metric_data_summary(

**ResourceSummary**
- **CompanyId** (int) - 公司id
- **LabelAttrList** (list) - 见 **ResourceMonitorItem** 模型定义
- **LabelAttrList** (list) - 见 **LabelAttrItem** 模型定义
- **MonitorAttr** (list) - 见 **ResourceMonitorItem** 模型定义
- **Name** (str) - 资源名称
- **OrganizationId** (int) - 项目id
- **ProductKey** (str) - 产品类型
- **ProjectId** (int) - 项目id
- **Region** (str) - 地域
- **RegionCN** (str) - 地域中文名
- **ResourceExtendAttrList** (list) - 见 **ResourceMonitorItem** 模型定义
- **ResourceExtendAttrList** (list) - 见 **ResourceExtendAttrItem** 模型定义
- **ResourceId** (str) - 资源id
- **Status** (int) - 资源状态
- **Zone** (str) - 可用区
Expand Down
62 changes: 46 additions & 16 deletions ucloud/services/cloudwatch/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,20 @@ class GetProductMetricsRespDataSchema(schema.ResponseSchema):
}


class ContentAttrItemSchema(schema.ResponseSchema):
"""ContentAttrItem - 告警内容属性项"""

fields = {
"Key": fields.Str(required=False, load_from="Key"),
"Value": fields.Str(required=False, load_from="Value"),
}


class AlertRecordSchema(schema.ResponseSchema):
"""AlertRecord - 告警记录模型"""

fields = {
"ContentAttrList": fields.List(fields.Str()),
"ContentAttrList": fields.List(ContentAttrItemSchema()),
"EndAt": fields.Int(required=False, load_from="EndAt"),
"Level": fields.Str(required=False, load_from="Level"),
"MetricID": fields.Int(required=False, load_from="MetricID"),
Expand Down Expand Up @@ -261,29 +270,32 @@ class MetricSampleSchema(schema.ResponseSchema):
}


class TagListItemSchema(schema.ResponseSchema):
"""TagListItem - 标签键值项"""

fields = {
"Tag": fields.Str(required=False, load_from="Tag"),
"TagValue": fields.Str(required=False, load_from="TagValue"),
}


class MetricResultSchema(schema.ResponseSchema):
"""MetricResult - 单条时间序列的结果(代码结构体:MetricValues)"""

fields = {
"ResourceId": fields.Str(required=False, load_from="ResourceId"),
"ResourceName": fields.Str(required=False, load_from="ResourceName"),
"TagList": fields.List(fields.Int()),
"TagList": fields.List(TagListItemSchema()),
"Values": fields.List(MetricSampleSchema()),
}


class ObjectTypeSchema(schema.ResponseSchema):
"""ObjectType -"""
class TagEntrySchema(schema.ResponseSchema):
"""TagEntry - 标签条目"""

fields = {
"Id": fields.Int(required=False, load_from="Id"),
"Metas": fields.Str(required=False, load_from="Metas"),
"ObjectType": fields.Str(required=False, load_from="ObjectType"),
"ObjectTypeKey": fields.Str(required=False, load_from="ObjectTypeKey"),
"ProductCNName": fields.Str(required=False, load_from="ProductCNName"),
"ProductENName": fields.Str(required=False, load_from="ProductENName"),
"ProductName": fields.Str(required=False, load_from="ProductName"),
"ProductName1": fields.Str(required=False, load_from="ProductName1"),
"KeyList": fields.List(fields.Str()),
"TagName": fields.Str(required=False, load_from="TagName"),
}


Expand All @@ -295,7 +307,7 @@ class QueryMetricDataRespItemSchema(schema.ResponseSchema):
"ErrMsg": fields.Str(required=False, load_from="ErrMsg"),
"Metric": fields.Str(required=False, load_from="Metric"),
"Results": fields.List(MetricResultSchema()),
"TagEntries": fields.List(ObjectTypeSchema()),
"TagEntries": fields.List(TagEntrySchema()),
}


Expand All @@ -313,7 +325,7 @@ class MetricSingleSampleSchema(schema.ResponseSchema):

fields = {
"Metric": fields.Str(required=False, load_from="Metric"),
"TagsList": fields.List(ProductSchema()),
"TagsList": fields.List(TagListItemSchema()),
"Value": MetricSampleSchema(),
}

Expand All @@ -327,12 +339,30 @@ class ResourceMonitorItemSchema(schema.ResponseSchema):
}


class ResourceExtendAttrItemSchema(schema.ResponseSchema):
"""ResourceExtendAttrItem - 资源扩展属性项"""

fields = {
"Key": fields.Str(required=False, load_from="Key"),
"Value": fields.Str(required=False, load_from="Value"),
}


class LabelAttrItemSchema(schema.ResponseSchema):
"""LabelAttrItem - 标签扩展属性项"""

fields = {
"Key": fields.Str(required=False, load_from="Key"),
"Value": fields.Str(required=False, load_from="Value"),
}


class ResourceSummarySchema(schema.ResponseSchema):
"""ResourceSummary - 单个资源的总览属性指标等信息"""

fields = {
"CompanyId": fields.Int(required=False, load_from="CompanyId"),
"LabelAttrList": fields.List(ResourceMonitorItemSchema()),
"LabelAttrList": fields.List(LabelAttrItemSchema()),
"MonitorAttr": fields.List(ResourceMonitorItemSchema()),
"Name": fields.Str(required=False, load_from="Name"),
"OrganizationId": fields.Int(
Expand All @@ -342,7 +372,7 @@ class ResourceSummarySchema(schema.ResponseSchema):
"ProjectId": fields.Int(required=False, load_from="ProjectId"),
"Region": fields.Str(required=False, load_from="Region"),
"RegionCN": fields.Str(required=False, load_from="RegionCN"),
"ResourceExtendAttrList": fields.List(ResourceMonitorItemSchema()),
"ResourceExtendAttrList": fields.List(ResourceExtendAttrItemSchema()),
"ResourceId": fields.Str(required=False, load_from="ResourceId"),
"Status": fields.Int(required=False, load_from="Status"),
"Zone": fields.Str(required=False, load_from="Zone"),
Expand Down
38 changes: 19 additions & 19 deletions ucloud/services/uai_modelverse/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@ def get_filter_options(

**Response Model**

**FilterOptionInteger**
**FilterOptionString**
- **Name** (str) - 显示名称
- **Value** (int) - 值
- **Value** (str) - 值


**FilterOptionString**
**FilterOptionInteger**
- **Name** (str) - 显示名称
- **Value** (str) - 值
- **Value** (int) - 值


"""
Expand Down Expand Up @@ -358,16 +358,6 @@ def get_uf_square_model_detail(

**Response Model**

**Pricing**
- **Completion** (float) - 输出定价
- **Currency** (str) - 币种
- **Image** (float) - 生图定价
- **Prompt** (float) - 提示词定价
- **Unit** (str) - 单位(中文),如“次” “百万”
- **UnitEn** (str) - 单位(English),如“Time” “Million”
- **Video** (str) - 生视频定价


**PriceRate**
- **ChargeItem** (str) - 收费项:input/output/thinking/tool...
- **ChargeItemDescription** (str) - 收费项描述
Expand All @@ -385,6 +375,16 @@ def get_uf_square_model_detail(
- **Rates** (list) - 见 **PriceRate** 模型定义


**Pricing**
- **Completion** (float) - 输出定价
- **Currency** (str) - 币种
- **Image** (float) - 生图定价
- **Prompt** (float) - 提示词定价
- **Unit** (str) - 单位(中文),如“次” “百万”
- **UnitEn** (str) - 单位(English),如“Time” “Million”
- **Video** (str) - 生视频定价


**SquareModel**
- **CreateAt** (int) - 创建时间
- **Describe** (str) - 详细描述
Expand Down Expand Up @@ -949,11 +949,6 @@ def list_um_infer_request_logs(

**Response Model**

**RequestLogSummary**
- **FailedRequests** (int) - 查询条件命中的失败请求数
- **TotalRequests** (int) - 查询条件命中的总请求数


**RequestLogItem**
- **ApiKeyId** (str) - API Key ID
- **ApiKeyName** (str) - API Key 名称
Expand All @@ -978,6 +973,11 @@ def list_um_infer_request_logs(
- **TotalTokens** (int) - 总 Token 数


**RequestLogSummary**
- **FailedRequests** (int) - 查询条件命中的失败请求数
- **TotalRequests** (int) - 查询条件命中的总请求数


**ListUMInferRequestLogsData**
- **Items** (list) - 见 **RequestLogItem** 模型定义
- **Summary** (dict) - 见 **RequestLogSummary** 模型定义
Expand Down
Loading