tccli 3.0.1035.1__py2.py3-none-any.whl → 3.0.1037.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/cdc/v20201214/DescribeDedicatedClusterHosts.md +2 -0
- tccli/examples/cdc/v20201214/DescribeDedicatedClusterOverview.md +59 -7
- tccli/examples/cdwch/v20200915/DescribeInstanceNodes.md +41 -0
- tccli/examples/cdwch/v20200915/DescribeSpec.md +27 -20
- tccli/examples/cwp/v20180228/CreateMalwareWhiteList.md +10 -4
- tccli/examples/cwp/v20180228/DescribeMachineFileTamperRules.md +9 -8
- tccli/examples/cwp/v20180228/ModifyLoginWhiteRecord.md +11 -10
- tccli/examples/hai/v20230812/DescribeApplications.md +6 -2
- tccli/examples/mrs/v20200910/ImageMaskAsync.md +25 -0
- tccli/examples/mrs/v20200910/ImageMaskAsyncGetResult.md +21 -0
- tccli/examples/tcss/v20201101/DescribeAssetSuperNodeList.md +41 -0
- tccli/examples/tcss/v20201101/DescribeClusterNodes.md +42 -0
- tccli/examples/tcss/v20201101/DescribeSuperNodePodList.md +41 -0
- tccli/examples/tcss/v20201101/DescribeUserPodList.md +56 -0
- tccli/examples/tms/v20201229/ModerateText.md +80 -0
- tccli/examples/vod/v20180717/PullEvents.md +2 -1
- tccli/services/aa/aa_client.py +2 -1
- tccli/services/aai/aai_client.py +5 -4
- tccli/services/acp/acp_client.py +9 -8
- tccli/services/advisor/advisor_client.py +3 -2
- tccli/services/af/af_client.py +4 -3
- tccli/services/afc/afc_client.py +4 -3
- tccli/services/aiart/aiart_client.py +3 -2
- tccli/services/aiart/v20221229/api.json +3 -3
- tccli/services/ame/ame_client.py +32 -31
- tccli/services/ams/ams_client.py +10 -9
- tccli/services/anicloud/anicloud_client.py +4 -3
- tccli/services/antiddos/antiddos_client.py +96 -95
- tccli/services/apcas/apcas_client.py +8 -7
- tccli/services/ape/ape_client.py +9 -8
- tccli/services/api/api_client.py +4 -3
- tccli/services/apigateway/apigateway_client.py +97 -96
- tccli/services/apm/apm_client.py +10 -9
- tccli/services/asr/asr_client.py +26 -25
- tccli/services/asw/asw_client.py +10 -9
- tccli/services/autoscaling/autoscaling_client.py +58 -57
- tccli/services/ba/ba_client.py +4 -3
- tccli/services/batch/batch_client.py +32 -31
- tccli/services/batch/v20170312/api.json +3 -3
- tccli/services/bda/bda_client.py +19 -18
- tccli/services/bi/bi_client.py +23 -22
- tccli/services/billing/billing_client.py +33 -32
- tccli/services/bizlive/bizlive_client.py +7 -6
- tccli/services/bm/bm_client.py +54 -53
- tccli/services/bma/bma_client.py +38 -37
- tccli/services/bmeip/bmeip_client.py +21 -20
- tccli/services/bmlb/bmlb_client.py +50 -49
- tccli/services/bmvpc/bmvpc_client.py +62 -61
- tccli/services/bpaas/bpaas_client.py +3 -2
- tccli/services/bri/bri_client.py +2 -1
- tccli/services/bsca/bsca_client.py +8 -7
- tccli/services/btoe/btoe_client.py +15 -14
- tccli/services/cam/cam_client.py +88 -87
- tccli/services/captcha/captcha_client.py +19 -18
- tccli/services/car/car_client.py +7 -6
- tccli/services/cat/cat_client.py +13 -12
- tccli/services/cbs/cbs_client.py +42 -41
- tccli/services/ccc/ccc_client.py +42 -41
- tccli/services/cdb/cdb_client.py +159 -158
- tccli/services/cdb/v20170320/api.json +1 -1
- tccli/services/cdc/cdc_client.py +21 -20
- tccli/services/cdc/v20201214/api.json +113 -27
- tccli/services/cdc/v20201214/examples.json +2 -2
- tccli/services/cdn/cdn_client.py +82 -81
- tccli/services/cdn/v20180606/api.json +10 -1
- tccli/services/cds/cds_client.py +7 -6
- tccli/services/cdwch/cdwch_client.py +109 -55
- tccli/services/cdwch/v20200915/api.json +253 -3
- tccli/services/cdwch/v20200915/examples.json +10 -2
- tccli/services/cdwdoris/cdwdoris_client.py +18 -17
- tccli/services/cdwdoris/v20211228/api.json +1 -1
- tccli/services/cdwpg/cdwpg_client.py +9 -8
- tccli/services/cfg/cfg_client.py +13 -12
- tccli/services/cfs/cfs_client.py +44 -43
- tccli/services/cfw/cfw_client.py +112 -111
- tccli/services/chdfs/chdfs_client.py +30 -29
- tccli/services/ciam/ciam_client.py +24 -23
- tccli/services/cii/cii_client.py +14 -13
- tccli/services/cim/cim_client.py +2 -1
- tccli/services/cis/cis_client.py +8 -7
- tccli/services/ckafka/ckafka_client.py +82 -81
- tccli/services/clb/clb_client.py +86 -85
- tccli/services/cloudaudit/cloudaudit_client.py +20 -19
- tccli/services/cloudhsm/cloudhsm_client.py +15 -14
- tccli/services/cloudstudio/cloudstudio_client.py +10 -9
- tccli/services/cls/cls_client.py +90 -89
- tccli/services/cme/cme_client.py +51 -50
- tccli/services/cmq/cmq_client.py +18 -17
- tccli/services/cms/cms_client.py +7 -6
- tccli/services/config/config_client.py +4 -3
- tccli/services/cpdp/cpdp_client.py +220 -219
- tccli/services/cr/cr_client.py +29 -28
- tccli/services/csip/csip_client.py +35 -34
- tccli/services/csxg/csxg_client.py +6 -5
- tccli/services/cvm/cvm_client.py +95 -94
- tccli/services/cvm/v20170312/api.json +6 -4
- tccli/services/cwp/cwp_client.py +519 -518
- tccli/services/cwp/v20180228/api.json +17 -16
- tccli/services/cwp/v20180228/examples.json +5 -5
- tccli/services/cws/cws_client.py +20 -19
- tccli/services/cynosdb/cynosdb_client.py +131 -130
- tccli/services/dasb/dasb_client.py +56 -55
- tccli/services/dataintegration/dataintegration_client.py +2 -1
- tccli/services/dayu/dayu_client.py +113 -112
- tccli/services/dbbrain/dbbrain_client.py +62 -61
- tccli/services/dbdc/dbdc_client.py +7 -6
- tccli/services/dc/dc_client.py +22 -21
- tccli/services/dcdb/dcdb_client.py +74 -73
- tccli/services/dlc/dlc_client.py +124 -123
- tccli/services/dnspod/dnspod_client.py +73 -72
- tccli/services/domain/domain_client.py +34 -33
- tccli/services/drm/drm_client.py +12 -11
- tccli/services/ds/ds_client.py +13 -12
- tccli/services/dsgc/dsgc_client.py +149 -148
- tccli/services/dtf/dtf_client.py +2 -1
- tccli/services/dts/dts_client.py +69 -68
- tccli/services/dts/v20211206/api.json +1 -0
- tccli/services/eb/eb_client.py +33 -32
- tccli/services/ecc/ecc_client.py +5 -4
- tccli/services/ecdn/ecdn_client.py +17 -16
- tccli/services/ecm/ecm_client.py +140 -139
- tccli/services/eiam/eiam_client.py +43 -42
- tccli/services/eis/eis_client.py +9 -8
- tccli/services/emr/emr_client.py +36 -35
- tccli/services/es/es_client.py +43 -42
- tccli/services/ess/ess_client.py +72 -71
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/essbasic_client.py +123 -122
- tccli/services/essbasic/v20210526/api.json +11 -11
- tccli/services/facefusion/facefusion_client.py +5 -4
- tccli/services/faceid/faceid_client.py +36 -35
- tccli/services/fmu/fmu_client.py +11 -10
- tccli/services/ft/ft_client.py +7 -6
- tccli/services/gaap/gaap_client.py +104 -103
- tccli/services/gme/gme_client.py +29 -28
- tccli/services/goosefs/goosefs_client.py +21 -20
- tccli/services/gpm/gpm_client.py +19 -18
- tccli/services/gs/gs_client.py +9 -8
- tccli/services/gse/gse_client.py +75 -74
- tccli/services/habo/habo_client.py +3 -2
- tccli/services/hai/hai_client.py +12 -11
- tccli/services/hai/v20230812/api.json +59 -1
- tccli/services/hai/v20230812/examples.json +1 -1
- tccli/services/hasim/hasim_client.py +23 -22
- tccli/services/hcm/hcm_client.py +2 -1
- tccli/services/hunyuan/hunyuan_client.py +4 -3
- tccli/services/iai/iai_client.py +36 -35
- tccli/services/ic/ic_client.py +10 -9
- tccli/services/icr/icr_client.py +2 -1
- tccli/services/ie/ie_client.py +11 -10
- tccli/services/iecp/iecp_client.py +103 -102
- tccli/services/iir/iir_client.py +2 -1
- tccli/services/ims/ims_client.py +3 -2
- tccli/services/ioa/ioa_client.py +2 -1
- tccli/services/iot/iot_client.py +46 -45
- tccli/services/iotcloud/iotcloud_client.py +86 -85
- tccli/services/iotexplorer/iotexplorer_client.py +93 -92
- tccli/services/iottid/iottid_client.py +10 -9
- tccli/services/iotvideo/iotvideo_client.py +158 -157
- tccli/services/iotvideoindustry/iotvideoindustry_client.py +105 -104
- tccli/services/irp/irp_client.py +12 -11
- tccli/services/iss/iss_client.py +83 -82
- tccli/services/ivld/ivld_client.py +26 -25
- tccli/services/keewidb/keewidb_client.py +39 -38
- tccli/services/kms/kms_client.py +54 -53
- tccli/services/lcic/lcic_client.py +61 -60
- tccli/services/lighthouse/lighthouse_client.py +108 -107
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/live/live_client.py +154 -153
- tccli/services/lowcode/lowcode_client.py +2 -1
- tccli/services/lp/lp_client.py +2 -1
- tccli/services/mall/mall_client.py +2 -1
- tccli/services/mariadb/mariadb_client.py +73 -72
- tccli/services/market/market_client.py +3 -2
- tccli/services/memcached/memcached_client.py +2 -1
- tccli/services/mgobe/mgobe_client.py +8 -7
- tccli/services/mmps/mmps_client.py +16 -15
- tccli/services/mna/mna_client.py +24 -23
- tccli/services/mongodb/mongodb_client.py +43 -42
- tccli/services/monitor/monitor_client.py +151 -150
- tccli/services/mps/mps_client.py +101 -100
- tccli/services/mrs/mrs_client.py +115 -8
- tccli/services/mrs/v20200910/api.json +97 -0
- tccli/services/mrs/v20200910/examples.json +16 -0
- tccli/services/ms/ms_client.py +24 -23
- tccli/services/msp/msp_client.py +8 -7
- tccli/services/mvj/mvj_client.py +2 -1
- tccli/services/nlp/nlp_client.py +13 -12
- tccli/services/npp/npp_client.py +9 -8
- tccli/services/oceanus/oceanus_client.py +39 -38
- tccli/services/oceanus/v20190422/api.json +39 -4
- tccli/services/ocr/ocr_client.py +82 -81
- tccli/services/omics/omics_client.py +16 -15
- tccli/services/organization/organization_client.py +48 -47
- tccli/services/partners/partners_client.py +20 -19
- tccli/services/pds/pds_client.py +3 -2
- tccli/services/postgres/postgres_client.py +91 -90
- tccli/services/privatedns/privatedns_client.py +26 -25
- tccli/services/pts/pts_client.py +45 -44
- tccli/services/rce/rce_client.py +4 -3
- tccli/services/redis/redis_client.py +96 -95
- tccli/services/region/region_client.py +4 -3
- tccli/services/rkp/rkp_client.py +4 -3
- tccli/services/rp/rp_client.py +2 -1
- tccli/services/rum/rum_client.py +66 -65
- tccli/services/scf/scf_client.py +47 -46
- tccli/services/ses/ses_client.py +28 -27
- tccli/services/smh/smh_client.py +11 -10
- tccli/services/smop/smop_client.py +2 -1
- tccli/services/smpn/smpn_client.py +6 -5
- tccli/services/sms/sms_client.py +19 -18
- tccli/services/soe/soe_client.py +5 -4
- tccli/services/solar/solar_client.py +18 -17
- tccli/services/sqlserver/sqlserver_client.py +145 -144
- tccli/services/ssa/ssa_client.py +24 -23
- tccli/services/ssl/ssl_client.py +58 -57
- tccli/services/sslpod/sslpod_client.py +11 -10
- tccli/services/ssm/ssm_client.py +25 -24
- tccli/services/sts/sts_client.py +7 -6
- tccli/services/taf/taf_client.py +4 -3
- tccli/services/tag/tag_client.py +32 -31
- tccli/services/tan/tan_client.py +2 -1
- tccli/services/tat/tat_client.py +29 -28
- tccli/services/tav/tav_client.py +5 -4
- tccli/services/tbaas/tbaas_client.py +26 -25
- tccli/services/tbm/tbm_client.py +10 -9
- tccli/services/tbp/tbp_client.py +5 -4
- tccli/services/tcaplusdb/tcaplusdb_client.py +54 -53
- tccli/services/tcb/tcb_client.py +90 -89
- tccli/services/tcbr/tcbr_client.py +11 -10
- tccli/services/tcex/tcex_client.py +3 -2
- tccli/services/tchd/tchd_client.py +2 -1
- tccli/services/tci/tci_client.py +42 -41
- tccli/services/tcm/tcm_client.py +13 -12
- tccli/services/tcr/tcr_client.py +110 -109
- tccli/services/tcss/tcss_client.py +558 -345
- tccli/services/tcss/v20201101/api.json +1200 -0
- tccli/services/tcss/v20201101/examples.json +32 -0
- tccli/services/tdcpg/tdcpg_client.py +26 -25
- tccli/services/tdid/tdid_client.py +14 -13
- tccli/services/tdmq/tdmq_client.py +128 -127
- tccli/services/tds/tds_client.py +5 -4
- tccli/services/tem/tem_client.py +61 -60
- tccli/services/teo/teo_client.py +79 -78
- tccli/services/thpc/thpc_client.py +19 -18
- tccli/services/tia/tia_client.py +11 -10
- tccli/services/tic/tic_client.py +14 -13
- tccli/services/ticm/ticm_client.py +4 -3
- tccli/services/tics/tics_client.py +5 -4
- tccli/services/tiems/tiems_client.py +26 -25
- tccli/services/tiia/tiia_client.py +24 -23
- tccli/services/tione/tione_client.py +98 -97
- tccli/services/tiw/tiw_client.py +61 -60
- tccli/services/tke/tke_client.py +219 -218
- tccli/services/tkgdq/tkgdq_client.py +4 -3
- tccli/services/tms/tms_client.py +62 -8
- tccli/services/tms/v20201229/api.json +371 -17
- tccli/services/tms/v20201229/examples.json +8 -0
- tccli/services/tmt/tmt_client.py +8 -7
- tccli/services/tourism/tourism_client.py +2 -1
- tccli/services/trdp/trdp_client.py +2 -1
- tccli/services/trocket/trocket_client.py +23 -22
- tccli/services/trp/trp_client.py +54 -53
- tccli/services/trro/trro_client.py +24 -23
- tccli/services/trtc/trtc_client.py +44 -43
- tccli/services/tse/tse_client.py +66 -65
- tccli/services/tsf/tsf_client.py +220 -219
- tccli/services/tsw/tsw_client.py +5 -4
- tccli/services/tts/tts_client.py +4 -3
- tccli/services/ump/ump_client.py +18 -17
- tccli/services/vm/vm_client.py +7 -6
- tccli/services/vms/vms_client.py +3 -2
- tccli/services/vod/v20180717/api.json +10 -10
- tccli/services/vod/v20180717/examples.json +1 -1
- tccli/services/vod/vod_client.py +169 -168
- tccli/services/vpc/vpc_client.py +317 -316
- tccli/services/vrs/vrs_client.py +8 -7
- tccli/services/waf/waf_client.py +133 -132
- tccli/services/wav/wav_client.py +27 -26
- tccli/services/wedata/wedata_client.py +319 -318
- tccli/services/weilingwith/weilingwith_client.py +58 -57
- tccli/services/wss/wss_client.py +4 -3
- tccli/services/yinsuda/yinsuda_client.py +21 -20
- tccli/services/youmall/youmall_client.py +32 -31
- tccli/services/yunjing/yunjing_client.py +101 -100
- tccli/services/yunsou/yunsou_client.py +3 -2
- {tccli-3.0.1035.1.dist-info → tccli-3.0.1037.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1035.1.dist-info → tccli-3.0.1037.1.dist-info}/RECORD +292 -284
- {tccli-3.0.1035.1.dist-info → tccli-3.0.1037.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1035.1.dist-info → tccli-3.0.1037.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1035.1.dist-info → tccli-3.0.1037.1.dist-info}/license_files/LICENSE +0 -0
@@ -25,7 +25,7 @@ def doDescribeEntity(args, parsed_globals):
|
|
25
25
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
26
|
cred = credential.STSAssumeRoleCredential(
|
27
27
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
28
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
29
29
|
)
|
30
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
31
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -77,7 +77,7 @@ def doDescribeTriple(args, parsed_globals):
|
|
77
77
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
78
78
|
cred = credential.STSAssumeRoleCredential(
|
79
79
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
80
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
80
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
81
81
|
)
|
82
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
83
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -129,7 +129,7 @@ def doDescribeRelation(args, parsed_globals):
|
|
129
129
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
130
|
cred = credential.STSAssumeRoleCredential(
|
131
131
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
133
133
|
)
|
134
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
135
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -267,6 +267,7 @@ def parse_global_arg(parsed_globals):
|
|
267
267
|
|
268
268
|
if g_param[OptionsDefine.Endpoint] is None:
|
269
269
|
g_param[OptionsDefine.Endpoint] = conf["tkgdq"][OptionsDefine.Endpoint]
|
270
|
+
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
270
271
|
except Exception as err:
|
271
272
|
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
272
273
|
|
tccli/services/tms/tms_client.py
CHANGED
@@ -27,7 +27,7 @@ def doDescribeTextStat(args, parsed_globals):
|
|
27
27
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
28
28
|
cred = credential.STSAssumeRoleCredential(
|
29
29
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
30
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
30
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
31
31
|
)
|
32
32
|
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):
|
33
33
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -71,7 +71,7 @@ def doDescribeTextStat(args, parsed_globals):
|
|
71
71
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
72
72
|
|
73
73
|
|
74
|
-
def
|
74
|
+
def doModerateText(args, parsed_globals):
|
75
75
|
g_param = parse_global_arg(parsed_globals)
|
76
76
|
|
77
77
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -79,7 +79,7 @@ def doAccountTipoffAccess(args, parsed_globals):
|
|
79
79
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
80
80
|
cred = credential.STSAssumeRoleCredential(
|
81
81
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
82
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
82
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
83
83
|
)
|
84
84
|
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):
|
85
85
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -100,11 +100,11 @@ def doAccountTipoffAccess(args, parsed_globals):
|
|
100
100
|
client = mod.TmsClient(cred, g_param[OptionsDefine.Region], profile)
|
101
101
|
client._sdkVersion += ("_CLI_" + __version__)
|
102
102
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
103
|
-
model = models.
|
103
|
+
model = models.ModerateTextRequest()
|
104
104
|
model.from_json_string(json.dumps(args))
|
105
105
|
start_time = time.time()
|
106
106
|
while True:
|
107
|
-
rsp = client.
|
107
|
+
rsp = client.ModerateText(model)
|
108
108
|
result = rsp.to_json_string()
|
109
109
|
try:
|
110
110
|
json_obj = json.loads(result)
|
@@ -131,7 +131,7 @@ def doTextModeration(args, parsed_globals):
|
|
131
131
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
132
132
|
cred = credential.STSAssumeRoleCredential(
|
133
133
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
134
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
134
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
135
135
|
)
|
136
136
|
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):
|
137
137
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -183,7 +183,7 @@ def doDescribeTextLib(args, parsed_globals):
|
|
183
183
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
184
184
|
cred = credential.STSAssumeRoleCredential(
|
185
185
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
186
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
186
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
187
187
|
)
|
188
188
|
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):
|
189
189
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -227,6 +227,58 @@ def doDescribeTextLib(args, parsed_globals):
|
|
227
227
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
228
228
|
|
229
229
|
|
230
|
+
def doAccountTipoffAccess(args, parsed_globals):
|
231
|
+
g_param = parse_global_arg(parsed_globals)
|
232
|
+
|
233
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
234
|
+
cred = credential.CVMRoleCredential()
|
235
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
236
|
+
cred = credential.STSAssumeRoleCredential(
|
237
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
238
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
239
|
+
)
|
240
|
+
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):
|
241
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
242
|
+
else:
|
243
|
+
cred = credential.Credential(
|
244
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
245
|
+
)
|
246
|
+
http_profile = HttpProfile(
|
247
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
248
|
+
reqMethod="POST",
|
249
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
250
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
251
|
+
)
|
252
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
253
|
+
if g_param[OptionsDefine.Language]:
|
254
|
+
profile.language = g_param[OptionsDefine.Language]
|
255
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
256
|
+
client = mod.TmsClient(cred, g_param[OptionsDefine.Region], profile)
|
257
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
258
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
259
|
+
model = models.AccountTipoffAccessRequest()
|
260
|
+
model.from_json_string(json.dumps(args))
|
261
|
+
start_time = time.time()
|
262
|
+
while True:
|
263
|
+
rsp = client.AccountTipoffAccess(model)
|
264
|
+
result = rsp.to_json_string()
|
265
|
+
try:
|
266
|
+
json_obj = json.loads(result)
|
267
|
+
except TypeError as e:
|
268
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
269
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
270
|
+
break
|
271
|
+
cur_time = time.time()
|
272
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
273
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
274
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
275
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
276
|
+
else:
|
277
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
278
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
279
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
280
|
+
|
281
|
+
|
230
282
|
CLIENT_MAP = {
|
231
283
|
"v20201229": tms_client_v20201229,
|
232
284
|
"v20200713": tms_client_v20200713,
|
@@ -241,9 +293,10 @@ MODELS_MAP = {
|
|
241
293
|
|
242
294
|
ACTION_MAP = {
|
243
295
|
"DescribeTextStat": doDescribeTextStat,
|
244
|
-
"
|
296
|
+
"ModerateText": doModerateText,
|
245
297
|
"TextModeration": doTextModeration,
|
246
298
|
"DescribeTextLib": doDescribeTextLib,
|
299
|
+
"AccountTipoffAccess": doAccountTipoffAccess,
|
247
300
|
|
248
301
|
}
|
249
302
|
|
@@ -325,6 +378,7 @@ def parse_global_arg(parsed_globals):
|
|
325
378
|
|
326
379
|
if g_param[OptionsDefine.Endpoint] is None:
|
327
380
|
g_param[OptionsDefine.Endpoint] = conf["tms"][OptionsDefine.Endpoint]
|
381
|
+
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
328
382
|
except Exception as err:
|
329
383
|
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
330
384
|
|
@@ -1,5 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
|
+
"ModerateText": {
|
4
|
+
"document": "天御文本内容安全审核接口,改接口会按照客户定制标签输出审核结果",
|
5
|
+
"input": "ModerateTextRequest",
|
6
|
+
"name": "客户定制标签文本审核",
|
7
|
+
"output": "ModerateTextResponse",
|
8
|
+
"status": "online"
|
9
|
+
},
|
3
10
|
"TextModeration": {
|
4
11
|
"document": "本接口(Text Moderation)用于提交文本内容进行智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通文本内容安全服务](https://console.cloud.tencent.com/cms) 并调整好对应的业务配置。\n\n### 接口使用说明\n- 前往“[内容安全控制台-文本内容安全](https://console.cloud.tencent.com/cms)”开启使用文本内容安全服务,首次开通服务的用户可免费领用试用套餐包,包含**3000条**文本识别额度,有效期为15天。\n- 该接口为收费接口,计费方式敬请参见 [腾讯云文本内容安全定价](https://cloud.tencent.com/product/tms/pricing)。\n\n### 接口功能说明:\n- 支持对文本文件进行检测,通过深度学习技术,识别可能令人反感、不安全或不适宜的违规文本内容;\n- 支持识别多种违规场景,包括:低俗、谩骂、色情、广告等场景;\n- 支持根据不同的业务场景配置自定义的审核策略,可在控制台文本内容安全-策略管理中配置;\n- 支持用户自定义配置词库黑白名单,打击自定义识别类型的违规文本(目前仅支持黑名单配置);\n- 支持在审核文本内容时同时关联账号或设备信息,可识别违规风险账号或设备。\n\n### 接口调用说明:\n- 文本内容大小支持:文本原文长度不能超过unicode编码长度10000个字符;\n- 文本审核语言支持:目前支持中文、英文、阿拉伯数字的检测;\n- 默认接口请求频率限制:**1000次/秒**,超过该频率限制则接口会报错。",
|
5
12
|
"input": "TextModerationRequest",
|
@@ -20,11 +27,11 @@
|
|
20
27
|
"members": [
|
21
28
|
{
|
22
29
|
"disabled": false,
|
23
|
-
"document": "该字段用于返回检测结果所对应的全部恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad
|
30
|
+
"document": "该字段用于返回检测结果所对应的全部恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。",
|
24
31
|
"example": "无",
|
25
32
|
"member": "string",
|
26
33
|
"name": "Label",
|
27
|
-
"
|
34
|
+
"output_required": true,
|
28
35
|
"type": "string",
|
29
36
|
"value_allowed_null": false
|
30
37
|
},
|
@@ -34,7 +41,7 @@
|
|
34
41
|
"example": "无",
|
35
42
|
"member": "string",
|
36
43
|
"name": "Suggestion",
|
37
|
-
"
|
44
|
+
"output_required": true,
|
38
45
|
"type": "string",
|
39
46
|
"value_allowed_null": true
|
40
47
|
},
|
@@ -44,7 +51,7 @@
|
|
44
51
|
"example": "无",
|
45
52
|
"member": "string",
|
46
53
|
"name": "Keywords",
|
47
|
-
"
|
54
|
+
"output_required": true,
|
48
55
|
"type": "list",
|
49
56
|
"value_allowed_null": true
|
50
57
|
},
|
@@ -54,37 +61,37 @@
|
|
54
61
|
"example": "无",
|
55
62
|
"member": "int64",
|
56
63
|
"name": "Score",
|
57
|
-
"
|
64
|
+
"output_required": true,
|
58
65
|
"type": "int",
|
59
66
|
"value_allowed_null": true
|
60
67
|
},
|
61
68
|
{
|
62
69
|
"disabled": false,
|
63
|
-
"document": "
|
70
|
+
"document": "该字段用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。\n注意:此字段可能返回 null,表示取不到有效值。",
|
64
71
|
"example": "无",
|
65
72
|
"member": "int64",
|
66
73
|
"name": "LibType",
|
67
|
-
"
|
74
|
+
"output_required": true,
|
68
75
|
"type": "int",
|
69
76
|
"value_allowed_null": true
|
70
77
|
},
|
71
78
|
{
|
72
79
|
"disabled": false,
|
73
|
-
"document": "
|
80
|
+
"document": "该字段用于返回自定义库的ID,以方便自定义库管理和配置。\n注意:此字段可能返回 null,表示取不到有效值。",
|
74
81
|
"example": "无",
|
75
82
|
"member": "string",
|
76
83
|
"name": "LibId",
|
77
|
-
"
|
84
|
+
"output_required": true,
|
78
85
|
"type": "string",
|
79
86
|
"value_allowed_null": true
|
80
87
|
},
|
81
88
|
{
|
82
89
|
"disabled": false,
|
83
|
-
"document": "
|
90
|
+
"document": "该字段用于返回自定义库的名称,以方便自定义库管理和配置。\n注意:此字段可能返回 null,表示取不到有效值。",
|
84
91
|
"example": "无",
|
85
92
|
"member": "string",
|
86
93
|
"name": "LibName",
|
87
|
-
"
|
94
|
+
"output_required": true,
|
88
95
|
"type": "string",
|
89
96
|
"value_allowed_null": true
|
90
97
|
},
|
@@ -94,7 +101,7 @@
|
|
94
101
|
"example": "无",
|
95
102
|
"member": "string",
|
96
103
|
"name": "SubLabel",
|
97
|
-
"
|
104
|
+
"output_required": true,
|
98
105
|
"type": "string",
|
99
106
|
"value_allowed_null": true
|
100
107
|
},
|
@@ -104,7 +111,7 @@
|
|
104
111
|
"example": "{\"Keyword\":\"约炮\",\"Score\":100,\"SubLabel\":\"Sexy\"}",
|
105
112
|
"member": "Tag",
|
106
113
|
"name": "Tags",
|
107
|
-
"
|
114
|
+
"output_required": true,
|
108
115
|
"type": "list",
|
109
116
|
"value_allowed_null": true
|
110
117
|
},
|
@@ -114,7 +121,7 @@
|
|
114
121
|
"example": "习近平",
|
115
122
|
"member": "HitInfo",
|
116
123
|
"name": "HitInfos",
|
117
|
-
"
|
124
|
+
"output_required": true,
|
118
125
|
"type": "list",
|
119
126
|
"value_allowed_null": true
|
120
127
|
}
|
@@ -243,6 +250,353 @@
|
|
243
250
|
],
|
244
251
|
"usage": "out"
|
245
252
|
},
|
253
|
+
"LabelGrade": {
|
254
|
+
"document": "内容审核多级标签结构",
|
255
|
+
"members": [
|
256
|
+
{
|
257
|
+
"disabled": false,
|
258
|
+
"document": "内容审核结果客户定制标签码\n注意:此字段可能返回 null,表示取不到有效值。",
|
259
|
+
"example": "20001",
|
260
|
+
"member": "string",
|
261
|
+
"name": "Code",
|
262
|
+
"output_required": true,
|
263
|
+
"type": "string",
|
264
|
+
"value_allowed_null": true
|
265
|
+
},
|
266
|
+
{
|
267
|
+
"disabled": false,
|
268
|
+
"document": "内容审核结果客户定制一级标签\n注意:此字段可能返回 null,表示取不到有效值。",
|
269
|
+
"example": "违法",
|
270
|
+
"member": "string",
|
271
|
+
"name": "Grade1",
|
272
|
+
"output_required": false,
|
273
|
+
"type": "string",
|
274
|
+
"value_allowed_null": true
|
275
|
+
},
|
276
|
+
{
|
277
|
+
"disabled": false,
|
278
|
+
"document": "内容审核结果客户定制二级标签\n注意:此字段可能返回 null,表示取不到有效值。",
|
279
|
+
"example": "违法直播",
|
280
|
+
"member": "string",
|
281
|
+
"name": "Grade2",
|
282
|
+
"output_required": false,
|
283
|
+
"type": "string",
|
284
|
+
"value_allowed_null": true
|
285
|
+
},
|
286
|
+
{
|
287
|
+
"disabled": false,
|
288
|
+
"document": "内容审核结果客户定制三级标签\n注意:此字段可能返回 null,表示取不到有效值。",
|
289
|
+
"example": "开车直播",
|
290
|
+
"member": "string",
|
291
|
+
"name": "Grade3",
|
292
|
+
"output_required": false,
|
293
|
+
"type": "string",
|
294
|
+
"value_allowed_null": true
|
295
|
+
}
|
296
|
+
],
|
297
|
+
"usage": "out"
|
298
|
+
},
|
299
|
+
"LibCheckResult": {
|
300
|
+
"document": "库检测结果",
|
301
|
+
"members": [
|
302
|
+
{
|
303
|
+
"disabled": false,
|
304
|
+
"document": "库ID\n注意:此字段可能返回 null,表示取不到有效值。",
|
305
|
+
"example": "dg2a89a9hjfdkx0lc",
|
306
|
+
"member": "string",
|
307
|
+
"name": "LibId",
|
308
|
+
"output_required": false,
|
309
|
+
"type": "string",
|
310
|
+
"value_allowed_null": true
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"disabled": false,
|
314
|
+
"document": "库名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
315
|
+
"example": "辱骂词汇库",
|
316
|
+
"member": "string",
|
317
|
+
"name": "LibName",
|
318
|
+
"output_required": false,
|
319
|
+
"type": "string",
|
320
|
+
"value_allowed_null": true
|
321
|
+
},
|
322
|
+
{
|
323
|
+
"disabled": false,
|
324
|
+
"document": "库类型\n注意:此字段可能返回 null,表示取不到有效值。",
|
325
|
+
"example": "1",
|
326
|
+
"member": "uint64",
|
327
|
+
"name": "LibType",
|
328
|
+
"output_required": false,
|
329
|
+
"type": "int",
|
330
|
+
"value_allowed_null": true
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"disabled": false,
|
334
|
+
"document": "命中的关键词\n注意:此字段可能返回 null,表示取不到有效值。",
|
335
|
+
"example": "卧槽",
|
336
|
+
"member": "string",
|
337
|
+
"name": "Keyword",
|
338
|
+
"output_required": false,
|
339
|
+
"type": "string",
|
340
|
+
"value_allowed_null": true
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"disabled": false,
|
344
|
+
"document": "命中的关键词在送审文本的位置,可能存在多个位置,每个位置显示开始位置和结束位置\n注意:此字段可能返回 null,表示取不到有效值。",
|
345
|
+
"example": "无",
|
346
|
+
"member": "Positions",
|
347
|
+
"name": "Positions",
|
348
|
+
"output_required": false,
|
349
|
+
"type": "list",
|
350
|
+
"value_allowed_null": true
|
351
|
+
}
|
352
|
+
],
|
353
|
+
"usage": "out"
|
354
|
+
},
|
355
|
+
"ModelResult": {
|
356
|
+
"document": "模型检测结果",
|
357
|
+
"members": [
|
358
|
+
{
|
359
|
+
"disabled": false,
|
360
|
+
"document": "模型检测出的违规内容\n注意:此字段可能返回 null,表示取不到有效值。",
|
361
|
+
"example": "无",
|
362
|
+
"member": "string",
|
363
|
+
"name": "Content",
|
364
|
+
"output_required": false,
|
365
|
+
"type": "string",
|
366
|
+
"value_allowed_null": true
|
367
|
+
},
|
368
|
+
{
|
369
|
+
"disabled": false,
|
370
|
+
"document": "模型检测出的违规内容的位置\n注意:此字段可能返回 null,表示取不到有效值。",
|
371
|
+
"example": "无",
|
372
|
+
"member": "Positions",
|
373
|
+
"name": "Positions",
|
374
|
+
"output_required": false,
|
375
|
+
"type": "list",
|
376
|
+
"value_allowed_null": true
|
377
|
+
}
|
378
|
+
],
|
379
|
+
"usage": "out"
|
380
|
+
},
|
381
|
+
"ModerateTextRequest": {
|
382
|
+
"document": "ModerateText请求参数结构体",
|
383
|
+
"members": [
|
384
|
+
{
|
385
|
+
"disabled": false,
|
386
|
+
"document": "该字段表示待检测对象的文本内容,文本需要按utf-8格式编码,长度不能超过10000个字符(按unicode编码计算),并进行 Base64加密",
|
387
|
+
"example": "无",
|
388
|
+
"member": "string",
|
389
|
+
"name": "Content",
|
390
|
+
"required": true,
|
391
|
+
"type": "string"
|
392
|
+
},
|
393
|
+
{
|
394
|
+
"disabled": false,
|
395
|
+
"document": "该字段表示策略的具体编号,用于接口调度,在内容安全控制台中可配置。若不传入Biztype参数(留空),则代表采用默认的识别策略;传入则会在审核时根据业务场景采取不同的审核策略。\n备注:Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype",
|
396
|
+
"example": "无",
|
397
|
+
"member": "string",
|
398
|
+
"name": "BizType",
|
399
|
+
"required": false,
|
400
|
+
"type": "string"
|
401
|
+
},
|
402
|
+
{
|
403
|
+
"disabled": false,
|
404
|
+
"document": "该字段表示您为待检测对象分配的数据ID,传入后可方便您对文件进行标识和管理。\n取值:由英文字母(大小写均可)、数字及四个特殊符号(_,-,@,#)组成,长度不超过64个字符",
|
405
|
+
"example": "无",
|
406
|
+
"member": "string",
|
407
|
+
"name": "DataId",
|
408
|
+
"required": false,
|
409
|
+
"type": "string"
|
410
|
+
},
|
411
|
+
{
|
412
|
+
"disabled": false,
|
413
|
+
"document": "该字段表示待检测对象对应的用户相关信息,传入后可便于甄别相应违规风险用户",
|
414
|
+
"example": "无",
|
415
|
+
"member": "User",
|
416
|
+
"name": "User",
|
417
|
+
"required": false,
|
418
|
+
"type": "object"
|
419
|
+
},
|
420
|
+
{
|
421
|
+
"disabled": false,
|
422
|
+
"document": "该字段表示待检测对象对应的设备相关信息,传入后可便于甄别相应违规风险设备",
|
423
|
+
"example": "无",
|
424
|
+
"member": "Device",
|
425
|
+
"name": "Device",
|
426
|
+
"required": false,
|
427
|
+
"type": "object"
|
428
|
+
}
|
429
|
+
],
|
430
|
+
"type": "object"
|
431
|
+
},
|
432
|
+
"ModerateTextResponse": {
|
433
|
+
"document": "ModerateText返回参数结构体",
|
434
|
+
"members": [
|
435
|
+
{
|
436
|
+
"disabled": false,
|
437
|
+
"document": "该字段用于返回检测对象对应请求参数中的DataId,与输入的DataId字段中的内容对应",
|
438
|
+
"example": "无",
|
439
|
+
"member": "string",
|
440
|
+
"name": "DataId",
|
441
|
+
"output_required": false,
|
442
|
+
"type": "string",
|
443
|
+
"value_allowed_null": false
|
444
|
+
},
|
445
|
+
{
|
446
|
+
"disabled": false,
|
447
|
+
"document": "该字段用于返回请求参数中的BizType参数",
|
448
|
+
"example": "无",
|
449
|
+
"member": "string",
|
450
|
+
"name": "BizType",
|
451
|
+
"output_required": false,
|
452
|
+
"type": "string",
|
453
|
+
"value_allowed_null": false
|
454
|
+
},
|
455
|
+
{
|
456
|
+
"disabled": false,
|
457
|
+
"document": "该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。\n返回值:Block:建议屏蔽,Review :建议人工复审,Pass:建议通过",
|
458
|
+
"example": "无",
|
459
|
+
"member": "string",
|
460
|
+
"name": "Suggestion",
|
461
|
+
"output_required": false,
|
462
|
+
"type": "string",
|
463
|
+
"value_allowed_null": false
|
464
|
+
},
|
465
|
+
{
|
466
|
+
"disabled": false,
|
467
|
+
"document": "命中标签,可参阅对应数据结构(LabelGrade)的详细描述",
|
468
|
+
"example": "无",
|
469
|
+
"member": "LabelGrade",
|
470
|
+
"name": "Label",
|
471
|
+
"output_required": false,
|
472
|
+
"type": "object",
|
473
|
+
"value_allowed_null": false
|
474
|
+
},
|
475
|
+
{
|
476
|
+
"disabled": false,
|
477
|
+
"document": "命中标签对应腾讯侧定义的标签",
|
478
|
+
"example": "无",
|
479
|
+
"member": "string",
|
480
|
+
"name": "TcLabelCodes",
|
481
|
+
"output_required": false,
|
482
|
+
"type": "list",
|
483
|
+
"value_allowed_null": false
|
484
|
+
},
|
485
|
+
{
|
486
|
+
"disabled": false,
|
487
|
+
"document": "该字段用于返回当前标签(Label)下被检测文本命中的关键词信息,用于标注文本违规的具体原因(如:加我微信)。该参数可能会有多个返回值,代表命中的多个关键词;如返回值为空且Score不为空,则代表识别结果所对应的恶意标签(Label)是来自于语义模型判断的返回值",
|
488
|
+
"example": "无",
|
489
|
+
"member": "string",
|
490
|
+
"name": "Keywords",
|
491
|
+
"output_required": false,
|
492
|
+
"type": "list",
|
493
|
+
"value_allowed_null": false
|
494
|
+
},
|
495
|
+
{
|
496
|
+
"disabled": false,
|
497
|
+
"document": "该字段用于返回文本审核的详细结果,返回值信息可参阅对应数据结构(ModerationDetail)的详细描述",
|
498
|
+
"example": "无",
|
499
|
+
"member": "ModerationDetail",
|
500
|
+
"name": "ModerationDetails",
|
501
|
+
"output_required": false,
|
502
|
+
"type": "list",
|
503
|
+
"value_allowed_null": false
|
504
|
+
},
|
505
|
+
{
|
506
|
+
"disabled": false,
|
507
|
+
"document": "该字段用于返回审核结果置信度,使用百分制。分数越高表示结果可信度越高。",
|
508
|
+
"example": "90",
|
509
|
+
"member": "uint64",
|
510
|
+
"name": "Score",
|
511
|
+
"output_required": false,
|
512
|
+
"type": "int",
|
513
|
+
"value_allowed_null": false
|
514
|
+
},
|
515
|
+
{
|
516
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
517
|
+
"member": "string",
|
518
|
+
"name": "RequestId",
|
519
|
+
"type": "string"
|
520
|
+
}
|
521
|
+
],
|
522
|
+
"type": "object"
|
523
|
+
},
|
524
|
+
"ModerationDetail": {
|
525
|
+
"document": "文本审核明细结果",
|
526
|
+
"members": [
|
527
|
+
{
|
528
|
+
"disabled": false,
|
529
|
+
"document": "审核建议,Block表示建议拦截,Review表示建议人工复审,Pass表示建议放行\n注意:此字段可能返回 null,表示取不到有效值。",
|
530
|
+
"example": "Block",
|
531
|
+
"member": "string",
|
532
|
+
"name": "Suggestion",
|
533
|
+
"output_required": false,
|
534
|
+
"type": "string",
|
535
|
+
"value_allowed_null": true
|
536
|
+
},
|
537
|
+
{
|
538
|
+
"disabled": false,
|
539
|
+
"document": "命中标签,含标签码和一二三级标签名\n注意:此字段可能返回 null,表示取不到有效值。",
|
540
|
+
"example": "无",
|
541
|
+
"member": "LabelGrade",
|
542
|
+
"name": "Label",
|
543
|
+
"output_required": false,
|
544
|
+
"type": "object",
|
545
|
+
"value_allowed_null": true
|
546
|
+
},
|
547
|
+
{
|
548
|
+
"disabled": false,
|
549
|
+
"document": "标签得分\n注意:此字段可能返回 null,表示取不到有效值。",
|
550
|
+
"example": "98",
|
551
|
+
"member": "uint64",
|
552
|
+
"name": "Score",
|
553
|
+
"output_required": false,
|
554
|
+
"type": "int",
|
555
|
+
"value_allowed_null": true
|
556
|
+
},
|
557
|
+
{
|
558
|
+
"disabled": false,
|
559
|
+
"document": "label对应腾讯侧命中标签码\n注意:此字段可能返回 null,表示取不到有效值。",
|
560
|
+
"example": "[20001002,20001003]",
|
561
|
+
"member": "string",
|
562
|
+
"name": "TcLabelCodes",
|
563
|
+
"output_required": false,
|
564
|
+
"type": "list",
|
565
|
+
"value_allowed_null": true
|
566
|
+
},
|
567
|
+
{
|
568
|
+
"disabled": false,
|
569
|
+
"document": "库检测命中详情\n注意:此字段可能返回 null,表示取不到有效值。",
|
570
|
+
"example": "无",
|
571
|
+
"member": "LibCheckResult",
|
572
|
+
"name": "LibResults",
|
573
|
+
"output_required": false,
|
574
|
+
"type": "list",
|
575
|
+
"value_allowed_null": true
|
576
|
+
},
|
577
|
+
{
|
578
|
+
"disabled": false,
|
579
|
+
"document": "模型检测详情\n注意:此字段可能返回 null,表示取不到有效值。",
|
580
|
+
"example": "无",
|
581
|
+
"member": "ModelResult",
|
582
|
+
"name": "ModelResults",
|
583
|
+
"output_required": false,
|
584
|
+
"type": "list",
|
585
|
+
"value_allowed_null": true
|
586
|
+
},
|
587
|
+
{
|
588
|
+
"disabled": false,
|
589
|
+
"document": "情绪正负向检测结果\n注意:此字段可能返回 null,表示取不到有效值。",
|
590
|
+
"example": "无",
|
591
|
+
"member": "SentimentDetail",
|
592
|
+
"name": "SentimentResult",
|
593
|
+
"output_required": false,
|
594
|
+
"type": "object",
|
595
|
+
"value_allowed_null": true
|
596
|
+
}
|
597
|
+
],
|
598
|
+
"usage": "out"
|
599
|
+
},
|
246
600
|
"Positions": {
|
247
601
|
"document": "标识命中的违规关键词位置信息",
|
248
602
|
"members": [
|
@@ -386,7 +740,7 @@
|
|
386
740
|
"example": "习近平",
|
387
741
|
"member": "string",
|
388
742
|
"name": "Keyword",
|
389
|
-
"
|
743
|
+
"output_required": false,
|
390
744
|
"type": "string",
|
391
745
|
"value_allowed_null": true
|
392
746
|
},
|
@@ -396,7 +750,7 @@
|
|
396
750
|
"example": "ChinesePresident",
|
397
751
|
"member": "string",
|
398
752
|
"name": "SubLabel",
|
399
|
-
"
|
753
|
+
"output_required": false,
|
400
754
|
"type": "string",
|
401
755
|
"value_allowed_null": true
|
402
756
|
},
|
@@ -406,7 +760,7 @@
|
|
406
760
|
"example": "100",
|
407
761
|
"member": "int64",
|
408
762
|
"name": "Score",
|
409
|
-
"
|
763
|
+
"output_required": false,
|
410
764
|
"type": "int",
|
411
765
|
"value_allowed_null": true
|
412
766
|
}
|