Skip to content

Commit 545a85c

Browse files
authored
sdk: rolling update for 0.11.127 (#360)
1 parent f26e0e9 commit 545a85c

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

‎ucloud/services/ukms/client.py‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ def create_key(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
106106
- **Region** (str) - (Config) 地域。参见地域和可用区列表。
107107
- **ResourceId** (str) - (Required) UKMS 实例资源 ID。
108108
- **Alias** (str) - 可选密钥别名,格式为 alias/name。
109-
- **DeletionProtection** (str) - 是否开启删除保护。可选值:true、false;默认 false。
109+
- **DeletionProtection** (bool) - 是否开启删除保护。可选值:true、false;默认 false。
110110
- **Description** (str) - 密钥描述,最多 8192 字符。
111111
- **KeySpec** (str) - 密钥规格,默认 SYMMETRIC_DEFAULT(AES_256)。可选值:SYMMETRIC_DEFAULT(AES_256)、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。
112112
- **KeyUsage** (str) - 密钥用途
113-
- **Origin** (str) - 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 100660。
113+
- **Origin** (str) - 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 1230。
114114
115115
**Response**
116116
@@ -139,7 +139,7 @@ def decrypt(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
139139
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子账号必须填写。
140140
- **Region** (str) - (Config) 地域。参见地域和可用区列表。
141141
- **CiphertextBlob** (str) - (Required) 待解密密文。
142-
- **EncryptionAlgorithm** (str) - 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填或使用默认 RSAES_OAEP_SHA_256。
142+
- **EncryptionAlgorithm** (str) - 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填。
143143
- **EncryptionContext** (str) - 加密上下文,JSON Object。该参数内容会记录在日志中,请勿传入密码、密钥、令牌等敏感信息。
144144
- **KeyId** (str) - 主密钥 KeyId;对称密钥可空,从 CiphertextBlob 自动识别;非对称必填。
145145
- **ResourceId** (str) - UKMS 实例资源 ID。
@@ -204,6 +204,7 @@ def describe_key(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
204204
**Response Model**
205205
206206
**KeyMetadata**
207+
- **Arn** (str) - ucs:ukms:{Region}:{CompanyId}:key/{KeyId}
207208
- **CreationDate** (int) - 创建时间,Unix 时间戳。
208209
- **DeletionDate** (int) - 计划删除时间,Unix 时间戳。
209210
- **DeletionProtection** (bool) - 是否开启删除保护。取值:true、false。
@@ -214,8 +215,9 @@ def describe_key(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
214215
- **KeyState** (str) - 密钥对外状态。取值:Enabled、Disabled、PendingDeletion、PendingImport、Unavailable。
215216
- **KeyUsage** (list) - 密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。
216217
- **KeyVersion** (int) - 当前密钥版本。
218+
- **OrganizationId** (int) - 所属组织数字 ID
217219
- **Origin** (str) - 密钥材料来源。取值:UCLOUD_KMS、EXTERNAL;当前 CreateKey 仅支持 UCLOUD_KMS。
218-
- **ProjectId** (str) - 密钥所属项目的对外别名,格式为 org-xxx。该值由项目数字 ID 解析得到,可能因项目别名查询失败而为空。
220+
- **ProjectId** (str) - 密钥所属项目ID。
219221
- **ResourceId** (str) - 密钥所属的 UKMS 实例资源 ID。
220222
221223
@@ -238,7 +240,7 @@ def disable_key(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
238240
239241
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子账号必须填写。
240242
- **Region** (str) - (Config) 地域。参见地域和可用区列表。
241-
- **KeyId** (str) - (Required) 密钥 DB 数字 ID。
243+
- **KeyId** (str) - (Required) 密钥资源长 ID
242244
- **ResourceId** (str) - UKMS 实例资源 ID。
243245
244246
**Response**
@@ -266,7 +268,7 @@ def disable_key_rotation(
266268
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子账号必须填写。
267269
- **Region** (str) - (Config) 地域。参见地域和可用区列表。
268270
- **KeyId** (str) - (Required) 密钥 ID、ARN 或别名。
269-
- **ResourceId** (str) - UKMS 实例资源 ID。
271+
- **ResourceId** (str) - (Required) UKMS 实例资源 ID。
270272
271273
**Response**
272274
@@ -290,7 +292,7 @@ def enable_key(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
290292
291293
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子账号必须填写。
292294
- **Region** (str) - (Config) 地域。参见地域和可用区列表。
293-
- **KeyId** (str) - (Required) 密钥 DB 数字 ID。
295+
- **KeyId** (str) - (Required) 密钥资源长 ID
294296
- **ResourceId** (str) - UKMS 实例资源 ID。
295297
296298
**Response**
@@ -706,7 +708,7 @@ def list_keys(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
706708
- **KeyUsage** (list) - 按 KeySpec 派生的密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。
707709
- **NextRotationDate** (int) - 下次自动轮转时间(Unix 时间戳,秒);仅在已开启自动轮转时返回。
708710
- **OrganizationId** (int) - 密钥所属组织的数字 ID,来源于密钥关联的资源交易记录。
709-
- **Origin** (str) - 密钥来源,由 Origin 派生。取值:ucloud、import。当前 CreateKey 仅支持 ucloud。
711+
- **Origin** (str) - 密钥来源,由 Origin 派生。取值:UCLOUD_KMS、EXTERNAL。当前 CreateKey 仅支持 UCLOUD_KMS。
710712
- **PlanDeleteTime** (int) - 计划删除时间,Unix 时间戳。
711713
- **ProjectId** (str) - 密钥所属项目的对外别名,格式为 org-xxx。该值由项目数字 ID 解析得到,可能因项目别名查询失败而为空。
712714
- **ResourceId** (str) - 密钥所属的 UKMS 实例资源 ID。
@@ -789,7 +791,7 @@ def rotate_key_on_demand(
789791
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子账号必须填写。
790792
- **Region** (str) - (Config) 地域。参见地域和可用区列表。
791793
- **KeyId** (str) - (Required) 密钥 ID、ARN 或别名。
792-
- **ResourceId** (str) - UKMS 实例资源 ID。
794+
- **ResourceId** (str) - (Required) UKMS 实例资源 ID。
793795
794796
**Response**
795797
@@ -816,7 +818,7 @@ def schedule_key_deletion(
816818
817819
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子账号必须填写。
818820
- **Region** (str) - (Config) 地域。参见地域和可用区列表。
819-
- **KeyId** (str) - (Required) 密钥 DB 数字 ID。
821+
- **KeyId** (str) - (Required) 密钥资源长 ID
820822
- **DeleteDay** (int) - 删除等待天数,取值范围为 7~30 天;未填写时默认为 30 天。
821823
- **ResourceId** (str) - UKMS 实例资源 ID。
822824

‎ucloud/services/ukms/schemas/apis.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class CreateKeyRequestSchema(schema.RequestSchema):
9191

9292
fields = {
9393
"Alias": fields.Str(required=False, dump_to="Alias"),
94-
"DeletionProtection": fields.Str(
94+
"DeletionProtection": fields.Bool(
9595
required=False, dump_to="DeletionProtection"
9696
),
9797
"Description": fields.Str(required=False, dump_to="Description"),
@@ -237,7 +237,7 @@ class DisableKeyRotationRequestSchema(schema.RequestSchema):
237237
"KeyId": fields.Str(required=True, dump_to="KeyId"),
238238
"ProjectId": fields.Str(required=False, dump_to="ProjectId"),
239239
"Region": fields.Str(required=True, dump_to="Region"),
240-
"ResourceId": fields.Str(required=False, dump_to="ResourceId"),
240+
"ResourceId": fields.Str(required=True, dump_to="ResourceId"),
241241
}
242242

243243

@@ -711,7 +711,7 @@ class RotateKeyOnDemandRequestSchema(schema.RequestSchema):
711711
"KeyId": fields.Str(required=True, dump_to="KeyId"),
712712
"ProjectId": fields.Str(required=False, dump_to="ProjectId"),
713713
"Region": fields.Str(required=True, dump_to="Region"),
714-
"ResourceId": fields.Str(required=False, dump_to="ResourceId"),
714+
"ResourceId": fields.Str(required=True, dump_to="ResourceId"),
715715
}
716716

717717

‎ucloud/services/ukms/schemas/models.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class KeyMetadataSchema(schema.ResponseSchema):
77
"""KeyMetadata - DescribeKey 返回的密钥元数据"""
88

99
fields = {
10+
"Arn": fields.Str(required=False, load_from="Arn"),
1011
"CreationDate": fields.Int(required=True, load_from="CreationDate"),
1112
"DeletionDate": fields.Int(required=False, load_from="DeletionDate"),
1213
"DeletionProtection": fields.Bool(
@@ -21,7 +22,7 @@ class KeyMetadataSchema(schema.ResponseSchema):
2122
"KeyVersion": fields.Int(required=True, load_from="KeyVersion"),
2223
"OrganizationId": fields.Int(
2324
required=False, load_from="OrganizationId"
24-
), # Deprecated, will be removed at 1.0
25+
),
2526
"Origin": fields.Str(required=True, load_from="Origin"),
2627
"ProjectId": fields.Str(required=False, load_from="ProjectId"),
2728
"ResourceId": fields.Str(required=True, load_from="ResourceId"),

‎ucloud/version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.11.126"
1+
version = "0.11.127"

0 commit comments

Comments
 (0)