From 346d12843137d5e3a2cdfd14aef94bc8170d2a46 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Fri, 21 Aug 2026 09:54:35 +0000 Subject: [PATCH] sdk: rolling update for 0.11.121 --- ucloud/services/cloudwatch/client.py | 75 +++++++++++--------- ucloud/services/cloudwatch/schemas/models.py | 62 +++++++++++----- ucloud/services/uai_modelverse/client.py | 38 +++++----- ucloud/services/udb/client.py | 28 +++++--- ucloud/services/udb/schemas/models.py | 36 +++++----- ucloud/version.py | 2 +- 6 files changed, 142 insertions(+), 99 deletions(-) diff --git a/ucloud/services/cloudwatch/client.py b/ucloud/services/cloudwatch/client.py index d3cb6bc..de2b009 100644 --- a/ucloud/services/cloudwatch/client.py +++ b/ucloud/services/cloudwatch/client.py @@ -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) - 创建时间 @@ -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) - 查询结果总数 @@ -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 @@ -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** @@ -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** 模型定义 @@ -679,7 +683,7 @@ def query_metric_data_set( - **ErrMsg** (str) - 该指标查询的状态说明 - **Metric** (str) - 指标名 - **Results** (list) - 见 **MetricResult** 模型定义 - - **TagEntries** (list) - 见 **ObjectType** 模型定义 + - **TagEntries** (list) - 见 **TagEntry** 模型定义 **QueryMetricDataResp** @@ -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** 模型定义 @@ -753,7 +760,7 @@ def query_metric_data_summary( **ResourceSummary** - **CompanyId** (int) - 公司id - - **LabelAttrList** (list) - 见 **ResourceMonitorItem** 模型定义 + - **LabelAttrList** (list) - 见 **LabelAttrItem** 模型定义 - **MonitorAttr** (list) - 见 **ResourceMonitorItem** 模型定义 - **Name** (str) - 资源名称 - **OrganizationId** (int) - 项目id @@ -761,7 +768,7 @@ def query_metric_data_summary( - **ProjectId** (int) - 项目id - **Region** (str) - 地域 - **RegionCN** (str) - 地域中文名 - - **ResourceExtendAttrList** (list) - 见 **ResourceMonitorItem** 模型定义 + - **ResourceExtendAttrList** (list) - 见 **ResourceExtendAttrItem** 模型定义 - **ResourceId** (str) - 资源id - **Status** (int) - 资源状态 - **Zone** (str) - 可用区 diff --git a/ucloud/services/cloudwatch/schemas/models.py b/ucloud/services/cloudwatch/schemas/models.py index 017b6fd..863140f 100644 --- a/ucloud/services/cloudwatch/schemas/models.py +++ b/ucloud/services/cloudwatch/schemas/models.py @@ -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"), @@ -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"), } @@ -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()), } @@ -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(), } @@ -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( @@ -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"), diff --git a/ucloud/services/uai_modelverse/client.py b/ucloud/services/uai_modelverse/client.py index 7718778..312055c 100644 --- a/ucloud/services/uai_modelverse/client.py +++ b/ucloud/services/uai_modelverse/client.py @@ -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) - 值 """ @@ -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) - 收费项描述 @@ -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) - 详细描述 @@ -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 名称 @@ -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** 模型定义 diff --git a/ucloud/services/udb/client.py b/ucloud/services/udb/client.py index da9d8aa..aacc485 100644 --- a/ucloud/services/udb/client.py +++ b/ucloud/services/udb/client.py @@ -835,11 +835,6 @@ def describe_mongo_db_sharded_cluster( **Response Model** - **UFileDataSet** - - **Bucket** (str) - - - **TokenID** (str) - - - **UDBSlaveInstanceSet** - **AdminUser** (str) - - **BackupBeginTime** (int) - @@ -871,9 +866,11 @@ def describe_mongo_db_sharded_cluster( - **ReplicationDelaySeconds** (int) - - **Role** (str) - - **SSDType** (str) - + - **SpecificationClass** (str) - - **SpecificationType** (int) - - **SrcDBId** (str) - - **State** (str) - + - **StorageClass** (str) - - **SubnetId** (str) - - **SystemFileSize** (float) - - **Tag** (str) - @@ -884,8 +881,14 @@ def describe_mongo_db_sharded_cluster( - **Zone** (str) - + **UFileDataSet** + - **Bucket** (str) - + - **TokenID** (str) - + + **UDBInstanceSet** - **AdminUser** (str) - + - **AutoRenew** (int) - - **BackupBeginTime** (int) - - **BackupBlacklist** (str) - - **BackupCount** (int) - @@ -908,6 +911,7 @@ def describe_mongo_db_sharded_cluster( - **DiskUsedSize** (float) - - **EnableSSL** (int) - - **ExpiredTime** (int) - + - **ForceEncryption** (int) - - **IPv6Address** (str) - - **InstanceMode** (str) - - **InstanceType** (str) - @@ -922,9 +926,11 @@ def describe_mongo_db_sharded_cluster( - **Role** (str) - - **SSDType** (str) - - **SSLExpirationTime** (int) - + - **SpecificationClass** (str) - - **SpecificationType** (int) - - **SrcDBId** (str) - - **State** (str) - + - **StorageClass** (str) - - **SubnetId** (str) - - **SystemFileSize** (float) - - **Tag** (str) - @@ -1218,6 +1224,11 @@ def describe_udb_instance( **Response Model** + **UFileDataSet** + - **Bucket** (str) - bucket名称 + - **TokenID** (str) - Ufile的令牌tokenid + + **UDBSlaveInstanceSet** - **AdminUser** (str) - 管理员帐户名,默认root - **BackupBeginTime** (int) - 备份策略,不可修改,开始时间,单位小时计,默认3点 @@ -1263,11 +1274,6 @@ def describe_udb_instance( - **Zone** (str) - 可用区 - **UFileDataSet** - - **Bucket** (str) - bucket名称 - - **TokenID** (str) - Ufile的令牌tokenid - - **UDBInstanceSet** - **AdminUser** (str) - 管理员帐户名,默认root - **AutoRenew** (int) - 0 不自动续费, 1 自动续费 @@ -1510,7 +1516,7 @@ def describe_udb_instance_price( - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **DBTypeId** (str) - (Required) UDB实例的DB版本字符串 - **DiskSpace** (int) - (Required) 磁盘空间(GB),暂时支持20(GB) - 3000(GB), 输入不带单位 - - **MemoryLimit** (int) - (Required) 内存限制(MB),单位为MB.目前支持:2000-96000 + - **MemoryLimit** (int) - (Required) 内存限制(MB),目前支持2000‑96000,按1000进制(1GB=1000MB)计算 - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ - **CPU** (int) - CPU个数,如果db类型为sqlserver,则为必填参数 - **ChargeType** (str) - Year,按年付费; Month,按月付费 Dynamic,按需付费(需开启权限) Trial,试用(需开启权限)默认为月付 diff --git a/ucloud/services/udb/schemas/models.py b/ucloud/services/udb/schemas/models.py index c7e0cf0..dd52c53 100644 --- a/ucloud/services/udb/schemas/models.py +++ b/ucloud/services/udb/schemas/models.py @@ -3,24 +3,6 @@ from ucloud.core.typesystem import schema, fields -class MongoDBShardedClusterSetSchema(schema.ResponseSchema): - """MongoDBShardedClusterSet -""" - - fields = { - "CreateTime": fields.Int(required=False, load_from="CreateTime"), - "DBId": fields.Str(required=False, load_from="DBId"), - "DBTypeId": fields.Str(required=False, load_from="DBTypeId"), - "MongosCount": fields.Int(required=False, load_from="MongosCount"), - "Name": fields.Str(required=False, load_from="Name"), - "ShardsrvCount": fields.Int(required=False, load_from="ShardsrvCount"), - "SubnetId": fields.Str(required=False, load_from="SubnetId"), - "Tag": fields.Str(required=False, load_from="Tag"), - "VPCId": fields.Str(required=False, load_from="VPCId"), - "VirtualIPs": fields.List(fields.Str()), - "Zone": fields.Str(required=False, load_from="Zone"), - } - - class UDBSlaveInstanceSetSchema(schema.ResponseSchema): """UDBSlaveInstanceSet - DescribeUDBSlaveInstance""" @@ -182,6 +164,24 @@ class UDBInstanceSetSchema(schema.ResponseSchema): } +class MongoDBShardedClusterSetSchema(schema.ResponseSchema): + """MongoDBShardedClusterSet -""" + + fields = { + "CreateTime": fields.Int(required=False, load_from="CreateTime"), + "DBId": fields.Str(required=False, load_from="DBId"), + "DBTypeId": fields.Str(required=False, load_from="DBTypeId"), + "MongosCount": fields.Int(required=False, load_from="MongosCount"), + "Name": fields.Str(required=False, load_from="Name"), + "ShardsrvCount": fields.Int(required=False, load_from="ShardsrvCount"), + "SubnetId": fields.Str(required=False, load_from="SubnetId"), + "Tag": fields.Str(required=False, load_from="Tag"), + "VPCId": fields.Str(required=False, load_from="VPCId"), + "VirtualIPs": fields.List(fields.Str()), + "Zone": fields.Str(required=False, load_from="Zone"), + } + + class UDBBackupSetSchema(schema.ResponseSchema): """UDBBackupSet - DescribeUDBBackup""" diff --git a/ucloud/version.py b/ucloud/version.py index 8b76268..f80a0d4 100644 --- a/ucloud/version.py +++ b/ucloud/version.py @@ -1 +1 @@ -version = "0.11.120" +version = "0.11.121"