tccli 3.0.1279.1__py2.py3-none-any.whl → 3.0.1281.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/acp/v20220105/api.json +68 -65
- tccli/services/aiart/v20221229/api.json +1 -1
- tccli/services/antiddos/v20200309/api.json +5 -1
- tccli/services/apm/v20210622/api.json +32 -32
- tccli/services/apm/v20210622/examples.json +1 -1
- tccli/services/autoscaling/v20180419/api.json +1 -1
- tccli/services/billing/v20180709/api.json +550 -529
- tccli/services/billing/v20180709/examples.json +4 -4
- tccli/services/cat/v20180409/api.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +15 -1
- tccli/services/cfg/v20210820/api.json +36 -23
- tccli/services/cfg/v20210820/examples.json +11 -11
- tccli/services/cfs/v20190719/examples.json +3 -3
- tccli/services/ciam/v20220331/api.json +111 -111
- tccli/services/ciam/v20220331/examples.json +8 -8
- tccli/services/cls/v20201016/api.json +1 -1
- tccli/services/controlcenter/controlcenter_client.py +212 -0
- tccli/services/controlcenter/v20230110/api.json +521 -3
- tccli/services/controlcenter/v20230110/examples.json +32 -0
- tccli/services/csip/v20221121/api.json +66 -6
- tccli/services/cvm/cvm_client.py +212 -0
- tccli/services/cvm/v20170312/api.json +1076 -272
- tccli/services/cvm/v20170312/examples.json +34 -2
- tccli/services/cynosdb/v20190107/api.json +13 -3
- tccli/services/dbbrain/v20191016/api.json +12 -8
- tccli/services/dbbrain/v20210527/api.json +20 -20
- tccli/services/dlc/v20210125/api.json +19 -0
- tccli/services/dlc/v20210125/examples.json +1 -1
- tccli/services/domain/v20180808/api.json +3 -3
- tccli/services/emr/v20190103/api.json +11 -0
- tccli/services/es/v20180416/api.json +13 -0
- tccli/services/goosefs/v20220519/api.json +16 -15
- tccli/services/goosefs/v20220519/examples.json +2 -2
- tccli/services/gwlb/v20240906/api.json +22 -3
- tccli/services/gwlb/v20240906/examples.json +1 -1
- tccli/services/ims/v20201229/api.json +1 -1
- tccli/services/iotcloud/v20210408/api.json +243 -245
- tccli/services/iotcloud/v20210408/examples.json +64 -64
- tccli/services/keewidb/v20220308/api.json +94 -94
- tccli/services/lcic/v20220817/api.json +110 -63
- tccli/services/lcic/v20220817/examples.json +6 -6
- tccli/services/live/v20180801/api.json +302 -288
- tccli/services/lke/lke_client.py +84 -84
- tccli/services/lke/v20231130/api.json +220 -164
- tccli/services/lke/v20231130/examples.json +16 -16
- tccli/services/lowcode/v20210108/api.json +120 -11
- tccli/services/lowcode/v20210108/examples.json +9 -9
- tccli/services/mariadb/v20170312/api.json +7 -7
- tccli/services/mariadb/v20170312/examples.json +1 -1
- tccli/services/mongodb/v20190725/api.json +7 -6
- tccli/services/mongodb/v20190725/examples.json +2 -2
- tccli/services/monitor/v20180724/examples.json +2 -2
- tccli/services/mqtt/mqtt_client.py +110 -4
- tccli/services/mqtt/v20240516/api.json +132 -0
- tccli/services/mqtt/v20240516/examples.json +22 -0
- tccli/services/ocr/v20181119/api.json +7 -7
- tccli/services/partners/partners_client.py +61 -8
- tccli/services/partners/v20180321/api.json +110 -0
- tccli/services/partners/v20180321/examples.json +8 -0
- tccli/services/pts/v20210728/api.json +44 -6
- tccli/services/redis/v20180412/api.json +66 -66
- tccli/services/rum/v20210622/api.json +90 -0
- tccli/services/sms/v20190711/examples.json +1 -1
- tccli/services/sms/v20210111/examples.json +1 -1
- tccli/services/tag/v20180813/api.json +3 -3
- tccli/services/tag/v20180813/examples.json +1 -1
- tccli/services/tat/v20201028/api.json +141 -128
- tccli/services/tat/v20201028/examples.json +12 -12
- tccli/services/tdmq/tdmq_client.py +53 -0
- tccli/services/tdmq/v20200217/api.json +93 -0
- tccli/services/tdmq/v20200217/examples.json +8 -0
- tccli/services/teo/v20220901/api.json +4 -4
- tccli/services/tke/v20180525/api.json +313 -313
- tccli/services/tke/v20220501/api.json +2 -2
- tccli/services/tms/v20201229/api.json +9 -0
- tccli/services/tsf/v20180326/api.json +884 -884
- tccli/services/vdb/v20230616/api.json +12 -12
- tccli/services/waf/v20180125/api.json +7 -7
- tccli/services/waf/v20180125/examples.json +1 -1
- tccli/services/wedata/v20210820/api.json +107 -0
- {tccli-3.0.1279.1.dist-info → tccli-3.0.1281.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1279.1.dist-info → tccli-3.0.1281.1.dist-info}/RECORD +86 -86
- {tccli-3.0.1279.1.dist-info → tccli-3.0.1281.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1279.1.dist-info → tccli-3.0.1281.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1279.1.dist-info → tccli-3.0.1281.1.dist-info}/license_files/LICENSE +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
"CreateApiImportUserJob": [
|
4
4
|
{
|
5
5
|
"document": "批量导入用户时使用",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateApiImportUserJob\n<公共请求参数>\n\n{\n \"UserStoreId\": \"
|
6
|
+
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateApiImportUserJob\n<公共请求参数>\n\n{\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"DataFlowUserCreateList\": [\n {\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"UserGroup\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Birthdate\": \"2022-10-20\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"nameAndIdCard\",\n \"IdentityVerified\": true,\n \"Job\": \"员工\",\n \"Nationality\": \"汉族\",\n \"Zone\": \"时区\",\n \"Password\": \"password\",\n \"CustomizationAttributes\": [\n {\n \"Name\": \"nickname\",\n \"Value\": \"昵称\",\n \"Type\": \"STRING\"\n }\n ],\n \"Salt\": {\n \"SaltValue\": \"salt***\",\n \"SaltLocation\": {\n \"SaltLocationTypeEnum\": \"HEAD\",\n \"SaltLocationRule\": {\n \"Regex\": \"password123\"\n }\n }\n },\n \"PasswordEncryptTypeEnum\": \"SHA1\",\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n }\n ]\n}",
|
7
7
|
"output": "{\n \"Response\": {\n \"Job\": {\n \"Id\": \"c29f2c0f****************405ec698\",\n \"Status\": \"PENDING\",\n \"Type\": \"IMPORT_USER\",\n \"CreatedDate\": 1715156770024,\n \"Format\": \"NDJSON\",\n \"Location\": \"http://aa.com/bb.csv\",\n \"ErrorDetails\": [\n {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"Error\": \"error message\"\n }\n ],\n \"FailedUsers\": [\n {\n \"FailedUserIdentification\": \"53e25c3****************e4eb5bd1\",\n \"FailedReason\": \"error reason\"\n }\n ]\n },\n \"RequestId\": \"e2e9e8aa********************9ab34c6e\"\n }\n}",
|
8
8
|
"title": "新建接口导入用户任务"
|
9
9
|
}
|
@@ -20,7 +20,7 @@
|
|
20
20
|
{
|
21
21
|
"document": "创建用户时使用",
|
22
22
|
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateUser\n<公共请求参数>\n\n{\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"Password\": \"password\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"UserGroup\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"Birthdate\": 1706682491339,\n \"CustomizationAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"UserName\": \"zhangsan\",\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n}",
|
23
|
-
"output": "{\n \"Response\": {\n \"User\": {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"
|
23
|
+
"output": "{\n \"Response\": {\n \"User\": {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"wu\",\n \"IdentityVerified\": true,\n \"Job\": \"员工\",\n \"Nationality\": \"汉族\",\n \"Primary\": true,\n \"Zone\": \"时区\",\n \"AlreadyFirstLogin\": true,\n \"TenantId\": \"tenantId\",\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Version\": 0,\n \"LockType\": \"wu\",\n \"LockTime\": 0,\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n },\n \"RequestId\": \"e2e9e8aa********************9ab34c6e\"\n }\n}",
|
24
24
|
"title": "创建用户"
|
25
25
|
}
|
26
26
|
],
|
@@ -67,8 +67,8 @@
|
|
67
67
|
"DescribeUser": [
|
68
68
|
{
|
69
69
|
"document": "",
|
70
|
-
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUser\n<公共请求参数>\n\n{\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Pageable\": {\n \"PageSize\": 10,\n \"PageNumber\": 5\n },\n \"Filters\": [\n {\n \"PropertyKey\": \"nickname\",\n \"PropertyValue\": \"昵称1\",\n \"Logic\": true,\n \"OperateLogic\": \"
|
71
|
-
"output": "{\n \"Response\": {\n \"Total\": 100,\n \"Pageable\": {\n \"PageSize\": 10,\n \"PageNumber\": 5\n },\n \"Content\": [\n {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"
|
70
|
+
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUser\n<公共请求参数>\n\n{\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Pageable\": {\n \"PageSize\": 10,\n \"PageNumber\": 5\n },\n \"Filters\": [\n {\n \"PropertyKey\": \"nickname\",\n \"PropertyValue\": \"昵称1\",\n \"Logic\": true,\n \"OperateLogic\": \"test01\"\n }\n ],\n \"Original\": true,\n \"Sort\": {\n \"PropertyKey\": \"nickname\",\n \"Order\": \"decs\"\n }\n}",
|
71
|
+
"output": "{\n \"Response\": {\n \"Total\": 100,\n \"Pageable\": {\n \"PageSize\": 10,\n \"PageNumber\": 5\n },\n \"Content\": [\n {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"nameAndIdCard\",\n \"IdentityVerified\": true,\n \"Job\": \"员工\",\n \"Nationality\": \"汉族\",\n \"Primary\": true,\n \"Zone\": \"时区\",\n \"AlreadyFirstLogin\": true,\n \"TenantId\": \"tenantId\",\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Version\": 0,\n \"LockType\": \"failureLock\",\n \"LockTime\": 0,\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n }\n ],\n \"RequestId\": \"e2e9e8aa********************9ab34c6e\"\n }\n}",
|
72
72
|
"title": "查询用户信息"
|
73
73
|
}
|
74
74
|
],
|
@@ -76,7 +76,7 @@
|
|
76
76
|
{
|
77
77
|
"document": "根据用户ID查询用户信息时使用",
|
78
78
|
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUserById\n<公共请求参数>\n\n{\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"Original\": true\n}",
|
79
|
-
"output": "{\n \"Response\": {\n \"User\": {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"
|
79
|
+
"output": "{\n \"Response\": {\n \"User\": {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"nameAndIdCard\",\n \"IdentityVerified\": true,\n \"Job\": \"员工\",\n \"Nationality\": \"汉族\",\n \"Primary\": true,\n \"Zone\": \"时区\",\n \"AlreadyFirstLogin\": true,\n \"TenantId\": \"tenantId\",\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Version\": 0,\n \"LockType\": \"failureLock\",\n \"LockTime\": 0,\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n },\n \"RequestId\": \"e2e9e8aa********************9ab34c6e\"\n }\n}",
|
80
80
|
"title": "根据ID查询用户信息"
|
81
81
|
}
|
82
82
|
],
|
@@ -108,7 +108,7 @@
|
|
108
108
|
{
|
109
109
|
"document": "",
|
110
110
|
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListUser\n<公共请求参数>\n\n{\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Pageable\": {\n \"PageSize\": 10,\n \"PageNumber\": 5\n },\n \"Filters\": [\n {\n \"Key\": \"nickname\",\n \"Values\": [\n \"昵称1\"\n ],\n \"Logic\": true\n }\n ],\n \"Original\": true\n}",
|
111
|
-
"output": "{\n \"Response\": {\n \"Total\": 100,\n \"Pageable\": {\n \"PageSize\": 10,\n \"PageNumber\": 5\n },\n \"Content\": [\n {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"
|
111
|
+
"output": "{\n \"Response\": {\n \"Total\": 100,\n \"Pageable\": {\n \"PageSize\": 10,\n \"PageNumber\": 5\n },\n \"Content\": [\n {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"wu\",\n \"IdentityVerified\": true,\n \"Job\": \"员工\",\n \"Nationality\": \"汉族\",\n \"Primary\": true,\n \"Zone\": \"时区\",\n \"AlreadyFirstLogin\": true,\n \"TenantId\": \"tenantId\",\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Version\": 0,\n \"LockType\": \"wu\",\n \"LockTime\": 0,\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n }\n ],\n \"RequestId\": \"e2e9e8aa********************9ab34c6e\"\n }\n}",
|
112
112
|
"title": "查询用户列表"
|
113
113
|
}
|
114
114
|
],
|
@@ -116,7 +116,7 @@
|
|
116
116
|
{
|
117
117
|
"document": "",
|
118
118
|
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListUserByProperty\n<公共请求参数>\n\n{\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"PropertyCode\": \"phoneNumber\",\n \"PropertyValue\": \"130****0000\",\n \"Original\": true\n}",
|
119
|
-
"output": "{\n \"Response\": {\n \"Users\": [\n {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"
|
119
|
+
"output": "{\n \"Response\": {\n \"Users\": [\n {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"nameAndIdCard\",\n \"IdentityVerified\": true,\n \"Job\": \"员工\",\n \"Nationality\": \"汉族\",\n \"Primary\": true,\n \"Zone\": \"时区\",\n \"AlreadyFirstLogin\": true,\n \"TenantId\": \"tenantId\",\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Version\": 0,\n \"LockType\": \"failureLock\",\n \"LockTime\": 0,\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n }\n ],\n \"RequestId\": \"e2e9e8aa********************9ab34c6e\"\n }\n}",
|
120
120
|
"title": "查询用户列表"
|
121
121
|
}
|
122
122
|
],
|
@@ -156,7 +156,7 @@
|
|
156
156
|
{
|
157
157
|
"document": "更新用户信息时使用",
|
158
158
|
"input": "POST / HTTP/1.1\nHost: ciam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateUser\n<公共请求参数>\n\n{\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"UserGroup\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"Birthdate\": 1706682491339,\n \"CustomizationAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n}",
|
159
|
-
"output": "{\n \"Response\": {\n \"User\": {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"
|
159
|
+
"output": "{\n \"Response\": {\n \"User\": {\n \"UserId\": \"53e25c3****************e4eb5bd1\",\n \"UserName\": \"zhangsan\",\n \"PhoneNumber\": \"132****0000\",\n \"Email\": \"132****@qq.com\",\n \"LastSignOn\": 1711002933442,\n \"CreatedDate\": 1718332940956,\n \"Status\": \"NORMAL\",\n \"UserDataSourceEnum\": \"管理员添加\",\n \"Nickname\": \"昵称1\",\n \"Address\": \"北京市海淀区\",\n \"Birthdate\": 1706682491339,\n \"UserGroups\": [\n \"6cd22e51****************f6f7cb81\"\n ],\n \"LastModifiedDate\": 1722420973329,\n \"CustomAttributes\": [\n {\n \"Name\": \"k\",\n \"Value\": \"v\",\n \"Type\": \"STRING\"\n }\n ],\n \"ResidentIdentityCard\": \"123456789012345678\",\n \"QqOpenId\": \"qqopenid\",\n \"QqUnionId\": \"qqunionid\",\n \"WechatOpenId\": \"wechatopenid\",\n \"WechatUnionId\": \"wechatunionid\",\n \"AlipayUserId\": \"alipayuserid\",\n \"WeComUserId\": \"wecomuserid\",\n \"Description\": \"用户1\",\n \"Name\": \"姓名\",\n \"Locale\": \"地理位置\",\n \"Gender\": \"男\",\n \"IdentityVerificationMethod\": \"wu\",\n \"IdentityVerified\": true,\n \"Job\": \"员工\",\n \"Nationality\": \"汉族\",\n \"Primary\": true,\n \"Zone\": \"时区\",\n \"AlreadyFirstLogin\": true,\n \"TenantId\": \"tenantId\",\n \"UserStoreId\": \"2c3aca3b****************a7efe88e\",\n \"Version\": 0,\n \"LockType\": \"wu\",\n \"LockTime\": 0,\n \"IndexedAttribute1\": \"value1\",\n \"IndexedAttribute2\": \"value2\",\n \"IndexedAttribute3\": \"value3\",\n \"IndexedAttribute4\": \"value4\",\n \"IndexedAttribute5\": \"value5\"\n },\n \"RequestId\": \"e2e9e8aa********************9ab34c6e\"\n }\n}",
|
160
160
|
"title": "更新用户"
|
161
161
|
}
|
162
162
|
],
|
@@ -15699,7 +15699,7 @@
|
|
15699
15699
|
},
|
15700
15700
|
{
|
15701
15701
|
"disabled": false,
|
15702
|
-
"document": "日志主题id所在的地域id。\n\nid,地域,简称信息如下:\n- 1, 广州,ap-guangzhou\n- 4, 上海,ap-shanghai\n- 5, 中国香港,ap-hongkong\n- 7, 上海金融,ap-shanghai-fsi\n- 8, 北京,ap-beijing\n- 9, 新加坡,ap-singapore\n- 11, 深圳金融,ap-shenzhen-fsi\n- 15, 硅谷,na-siliconvalley\n- 16, 成都,ap-chengdu\n- 17, 法兰克福,eu-frankfurt\n- 18, 首尔,ap-seoul\n- 19, 重庆,ap-chongqing\n-
|
15702
|
+
"document": "日志主题id所在的地域id。\n\nid,地域,简称信息如下:\n- 1, 广州,ap-guangzhou\n- 4, 上海,ap-shanghai\n- 5, 中国香港,ap-hongkong\n- 7, 上海金融,ap-shanghai-fsi\n- 8, 北京,ap-beijing\n- 9, 新加坡,ap-singapore\n- 11, 深圳金融,ap-shenzhen-fsi\n- 15, 硅谷,na-siliconvalley\n- 16, 成都,ap-chengdu\n- 17, 法兰克福,eu-frankfurt\n- 18, 首尔,ap-seoul\n- 19, 重庆,ap-chongqing\n- 22, 弗吉尼亚,na-ashburn\n- 23, 曼谷,ap-bangkok\n- 25, 东京,ap-tokyo\n- 33, 南京,ap-nanjing\n- 46, 北京金融,ap-beijing-fsi\n- 72, 雅加达,ap-jakarta\n- 74, 圣保罗,sa-saopaulo",
|
15703
15703
|
"example": "19",
|
15704
15704
|
"member": "uint64",
|
15705
15705
|
"name": "RegionId",
|
@@ -17,6 +17,162 @@ from tencentcloud.controlcenter.v20230110 import models as models_v20230110
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
+
def doListDeployStepTasks(args, parsed_globals):
|
21
|
+
g_param = parse_global_arg(parsed_globals)
|
22
|
+
|
23
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
24
|
+
cred = credential.CVMRoleCredential()
|
25
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
|
+
cred = credential.STSAssumeRoleCredential(
|
27
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
29
|
+
)
|
30
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
31
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
32
|
+
else:
|
33
|
+
cred = credential.Credential(
|
34
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
35
|
+
)
|
36
|
+
http_profile = HttpProfile(
|
37
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
38
|
+
reqMethod="POST",
|
39
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
40
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
41
|
+
)
|
42
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
43
|
+
if g_param[OptionsDefine.Language]:
|
44
|
+
profile.language = g_param[OptionsDefine.Language]
|
45
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
46
|
+
client = mod.ControlcenterClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
+
model = models.ListDeployStepTasksRequest()
|
50
|
+
model.from_json_string(json.dumps(args))
|
51
|
+
start_time = time.time()
|
52
|
+
while True:
|
53
|
+
rsp = client.ListDeployStepTasks(model)
|
54
|
+
result = rsp.to_json_string()
|
55
|
+
try:
|
56
|
+
json_obj = json.loads(result)
|
57
|
+
except TypeError as e:
|
58
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
59
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
60
|
+
break
|
61
|
+
cur_time = time.time()
|
62
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
63
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
64
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
65
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
66
|
+
else:
|
67
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
68
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
69
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
|
+
|
71
|
+
|
72
|
+
def doGetAccountFactoryBaseline(args, parsed_globals):
|
73
|
+
g_param = parse_global_arg(parsed_globals)
|
74
|
+
|
75
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
76
|
+
cred = credential.CVMRoleCredential()
|
77
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
78
|
+
cred = credential.STSAssumeRoleCredential(
|
79
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
80
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
81
|
+
)
|
82
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
83
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
84
|
+
else:
|
85
|
+
cred = credential.Credential(
|
86
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
87
|
+
)
|
88
|
+
http_profile = HttpProfile(
|
89
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
90
|
+
reqMethod="POST",
|
91
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
92
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
93
|
+
)
|
94
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
95
|
+
if g_param[OptionsDefine.Language]:
|
96
|
+
profile.language = g_param[OptionsDefine.Language]
|
97
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
98
|
+
client = mod.ControlcenterClient(cred, g_param[OptionsDefine.Region], profile)
|
99
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
100
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
+
model = models.GetAccountFactoryBaselineRequest()
|
102
|
+
model.from_json_string(json.dumps(args))
|
103
|
+
start_time = time.time()
|
104
|
+
while True:
|
105
|
+
rsp = client.GetAccountFactoryBaseline(model)
|
106
|
+
result = rsp.to_json_string()
|
107
|
+
try:
|
108
|
+
json_obj = json.loads(result)
|
109
|
+
except TypeError as e:
|
110
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
111
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
112
|
+
break
|
113
|
+
cur_time = time.time()
|
114
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
115
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
116
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
117
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
118
|
+
else:
|
119
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
120
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
121
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
|
+
|
123
|
+
|
124
|
+
def doListAccountFactoryBaselineItems(args, parsed_globals):
|
125
|
+
g_param = parse_global_arg(parsed_globals)
|
126
|
+
|
127
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
128
|
+
cred = credential.CVMRoleCredential()
|
129
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
|
+
cred = credential.STSAssumeRoleCredential(
|
131
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
133
|
+
)
|
134
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
135
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
136
|
+
else:
|
137
|
+
cred = credential.Credential(
|
138
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
139
|
+
)
|
140
|
+
http_profile = HttpProfile(
|
141
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
142
|
+
reqMethod="POST",
|
143
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
144
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
145
|
+
)
|
146
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
147
|
+
if g_param[OptionsDefine.Language]:
|
148
|
+
profile.language = g_param[OptionsDefine.Language]
|
149
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
150
|
+
client = mod.ControlcenterClient(cred, g_param[OptionsDefine.Region], profile)
|
151
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
152
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
+
model = models.ListAccountFactoryBaselineItemsRequest()
|
154
|
+
model.from_json_string(json.dumps(args))
|
155
|
+
start_time = time.time()
|
156
|
+
while True:
|
157
|
+
rsp = client.ListAccountFactoryBaselineItems(model)
|
158
|
+
result = rsp.to_json_string()
|
159
|
+
try:
|
160
|
+
json_obj = json.loads(result)
|
161
|
+
except TypeError as e:
|
162
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
163
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
164
|
+
break
|
165
|
+
cur_time = time.time()
|
166
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
167
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
168
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
169
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
170
|
+
else:
|
171
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
172
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
173
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
|
+
|
175
|
+
|
20
176
|
def doBatchApplyAccountBaselines(args, parsed_globals):
|
21
177
|
g_param = parse_global_arg(parsed_globals)
|
22
178
|
|
@@ -69,6 +225,58 @@ def doBatchApplyAccountBaselines(args, parsed_globals):
|
|
69
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
226
|
|
71
227
|
|
228
|
+
def doUpdateAccountFactoryBaseline(args, parsed_globals):
|
229
|
+
g_param = parse_global_arg(parsed_globals)
|
230
|
+
|
231
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
232
|
+
cred = credential.CVMRoleCredential()
|
233
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
234
|
+
cred = credential.STSAssumeRoleCredential(
|
235
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
236
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
237
|
+
)
|
238
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
239
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
240
|
+
else:
|
241
|
+
cred = credential.Credential(
|
242
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
243
|
+
)
|
244
|
+
http_profile = HttpProfile(
|
245
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
246
|
+
reqMethod="POST",
|
247
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
248
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
249
|
+
)
|
250
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
251
|
+
if g_param[OptionsDefine.Language]:
|
252
|
+
profile.language = g_param[OptionsDefine.Language]
|
253
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
254
|
+
client = mod.ControlcenterClient(cred, g_param[OptionsDefine.Region], profile)
|
255
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
256
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
+
model = models.UpdateAccountFactoryBaselineRequest()
|
258
|
+
model.from_json_string(json.dumps(args))
|
259
|
+
start_time = time.time()
|
260
|
+
while True:
|
261
|
+
rsp = client.UpdateAccountFactoryBaseline(model)
|
262
|
+
result = rsp.to_json_string()
|
263
|
+
try:
|
264
|
+
json_obj = json.loads(result)
|
265
|
+
except TypeError as e:
|
266
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
267
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
268
|
+
break
|
269
|
+
cur_time = time.time()
|
270
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
271
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
272
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
273
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
274
|
+
else:
|
275
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
276
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
277
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
|
+
|
279
|
+
|
72
280
|
CLIENT_MAP = {
|
73
281
|
"v20230110": controlcenter_client_v20230110,
|
74
282
|
|
@@ -80,7 +288,11 @@ MODELS_MAP = {
|
|
80
288
|
}
|
81
289
|
|
82
290
|
ACTION_MAP = {
|
291
|
+
"ListDeployStepTasks": doListDeployStepTasks,
|
292
|
+
"GetAccountFactoryBaseline": doGetAccountFactoryBaseline,
|
293
|
+
"ListAccountFactoryBaselineItems": doListAccountFactoryBaselineItems,
|
83
294
|
"BatchApplyAccountBaselines": doBatchApplyAccountBaselines,
|
295
|
+
"UpdateAccountFactoryBaseline": doUpdateAccountFactoryBaseline,
|
84
296
|
|
85
297
|
}
|
86
298
|
|