tccli 3.0.1108.1__py2.py3-none-any.whl → 3.0.1109.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/examples/bi/v20220105/CreateEmbedToken.md +4 -2
- tccli/examples/cam/v20190116/CreateRole.md +1 -1
- tccli/examples/emr/v20190103/DescribeEmrOverviewMetrics.md +40 -0
- tccli/examples/emr/v20190103/DescribeHBaseTableOverview.md +94 -0
- tccli/examples/ims/v20200713/ImageModeration.md +2 -2
- tccli/examples/ims/v20201229/ImageModeration.md +2 -2
- tccli/examples/vcg/v20240404/DescribeVideoStylizationJob.md +24 -0
- tccli/examples/vcg/v20240404/SubmitVideoStylizationJob.md +22 -0
- tccli/examples/vtc/v20240223/ConfirmVideoTranslateJob.md +33 -0
- tccli/examples/vtc/v20240223/DescribeVideoTranslateJob.md +70 -0
- tccli/examples/vtc/v20240223/SubmitVideoTranslateJob.md +49 -0
- tccli/services/__init__.py +6 -0
- tccli/services/autoscaling/v20180419/api.json +9 -8
- tccli/services/bi/v20220105/api.json +22 -3
- tccli/services/bi/v20220105/examples.json +2 -2
- tccli/services/cam/v20190116/api.json +71 -70
- tccli/services/cam/v20190116/examples.json +1 -1
- tccli/services/cfw/v20190904/api.json +1 -1
- tccli/services/ckafka/v20190819/api.json +20 -0
- tccli/services/cls/v20201016/api.json +10 -10
- tccli/services/cvm/v20170312/api.json +33 -0
- tccli/services/dbbrain/v20210527/api.json +5 -5
- tccli/services/emr/emr_client.py +114 -8
- tccli/services/emr/v20190103/api.json +493 -0
- tccli/services/emr/v20190103/examples.json +16 -0
- tccli/services/ims/v20200713/api.json +1 -1
- tccli/services/ims/v20200713/examples.json +1 -1
- tccli/services/ims/v20201229/api.json +1 -1
- tccli/services/ims/v20201229/examples.json +1 -1
- tccli/services/rce/rce_client.py +0 -53
- tccli/services/rce/v20201103/api.json +0 -24
- tccli/services/rce/v20201103/examples.json +0 -8
- tccli/services/tcss/v20201101/api.json +5 -5
- tccli/services/tdmq/v20200217/api.json +7 -7
- tccli/services/trtc/v20190722/api.json +20 -11
- tccli/services/vcg/__init__.py +4 -0
- tccli/services/vcg/v20240404/api.json +140 -0
- tccli/services/vcg/v20240404/examples.json +21 -0
- tccli/services/vcg/vcg_client.py +248 -0
- tccli/services/vod/v20180717/api.json +9 -0
- tccli/services/vtc/__init__.py +4 -0
- tccli/services/vtc/v20240223/api.json +425 -0
- tccli/services/vtc/v20240223/examples.json +41 -0
- tccli/services/vtc/vtc_client.py +301 -0
- {tccli-3.0.1108.1.dist-info → tccli-3.0.1109.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1108.1.dist-info → tccli-3.0.1109.1.dist-info}/RECORD +50 -35
- {tccli-3.0.1108.1.dist-info → tccli-3.0.1109.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1108.1.dist-info → tccli-3.0.1109.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1108.1.dist-info → tccli-3.0.1109.1.dist-info}/license_files/LICENSE +0 -0
    
        tccli/services/emr/emr_client.py
    CHANGED
    
    | @@ -693,6 +693,58 @@ def doModifyUserManagerPwd(args, parsed_globals): | |
| 693 693 | 
             
                FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
         | 
| 694 694 |  | 
| 695 695 |  | 
| 696 | 
            +
            def doDescribeHBaseTableOverview(args, parsed_globals):
         | 
| 697 | 
            +
                g_param = parse_global_arg(parsed_globals)
         | 
| 698 | 
            +
             | 
| 699 | 
            +
                if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
         | 
| 700 | 
            +
                    cred = credential.CVMRoleCredential()
         | 
| 701 | 
            +
                elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
         | 
| 702 | 
            +
                    cred = credential.STSAssumeRoleCredential(
         | 
| 703 | 
            +
                        g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
         | 
| 704 | 
            +
                        g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
         | 
| 705 | 
            +
                    )
         | 
| 706 | 
            +
                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):
         | 
| 707 | 
            +
                    cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
         | 
| 708 | 
            +
                else:
         | 
| 709 | 
            +
                    cred = credential.Credential(
         | 
| 710 | 
            +
                        g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
         | 
| 711 | 
            +
                    )
         | 
| 712 | 
            +
                http_profile = HttpProfile(
         | 
| 713 | 
            +
                    reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
         | 
| 714 | 
            +
                    reqMethod="POST",
         | 
| 715 | 
            +
                    endpoint=g_param[OptionsDefine.Endpoint],
         | 
| 716 | 
            +
                    proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
         | 
| 717 | 
            +
                )
         | 
| 718 | 
            +
                profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
         | 
| 719 | 
            +
                if g_param[OptionsDefine.Language]:
         | 
| 720 | 
            +
                    profile.language = g_param[OptionsDefine.Language]
         | 
| 721 | 
            +
                mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
         | 
| 722 | 
            +
                client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
         | 
| 723 | 
            +
                client._sdkVersion += ("_CLI_" + __version__)
         | 
| 724 | 
            +
                models = MODELS_MAP[g_param[OptionsDefine.Version]]
         | 
| 725 | 
            +
                model = models.DescribeHBaseTableOverviewRequest()
         | 
| 726 | 
            +
                model.from_json_string(json.dumps(args))
         | 
| 727 | 
            +
                start_time = time.time()
         | 
| 728 | 
            +
                while True:
         | 
| 729 | 
            +
                    rsp = client.DescribeHBaseTableOverview(model)
         | 
| 730 | 
            +
                    result = rsp.to_json_string()
         | 
| 731 | 
            +
                    try:
         | 
| 732 | 
            +
                        json_obj = json.loads(result)
         | 
| 733 | 
            +
                    except TypeError as e:
         | 
| 734 | 
            +
                        json_obj = json.loads(result.decode('utf-8'))  # python3.3
         | 
| 735 | 
            +
                    if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
         | 
| 736 | 
            +
                        break
         | 
| 737 | 
            +
                    cur_time = time.time()
         | 
| 738 | 
            +
                    if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
         | 
| 739 | 
            +
                        raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
         | 
| 740 | 
            +
                        (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
         | 
| 741 | 
            +
                        search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
         | 
| 742 | 
            +
                    else:
         | 
| 743 | 
            +
                        print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
         | 
| 744 | 
            +
                    time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
         | 
| 745 | 
            +
                FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
         | 
| 746 | 
            +
             | 
| 747 | 
            +
             | 
| 696 748 | 
             
            def doDescribeInstances(args, parsed_globals):
         | 
| 697 749 | 
             
                g_param = parse_global_arg(parsed_globals)
         | 
| 698 750 |  | 
| @@ -849,6 +901,58 @@ def doTerminateClusterNodes(args, parsed_globals): | |
| 849 901 | 
             
                FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
         | 
| 850 902 |  | 
| 851 903 |  | 
| 904 | 
            +
            def doDescribeEmrOverviewMetrics(args, parsed_globals):
         | 
| 905 | 
            +
                g_param = parse_global_arg(parsed_globals)
         | 
| 906 | 
            +
             | 
| 907 | 
            +
                if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
         | 
| 908 | 
            +
                    cred = credential.CVMRoleCredential()
         | 
| 909 | 
            +
                elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
         | 
| 910 | 
            +
                    cred = credential.STSAssumeRoleCredential(
         | 
| 911 | 
            +
                        g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
         | 
| 912 | 
            +
                        g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
         | 
| 913 | 
            +
                    )
         | 
| 914 | 
            +
                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):
         | 
| 915 | 
            +
                    cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
         | 
| 916 | 
            +
                else:
         | 
| 917 | 
            +
                    cred = credential.Credential(
         | 
| 918 | 
            +
                        g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
         | 
| 919 | 
            +
                    )
         | 
| 920 | 
            +
                http_profile = HttpProfile(
         | 
| 921 | 
            +
                    reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
         | 
| 922 | 
            +
                    reqMethod="POST",
         | 
| 923 | 
            +
                    endpoint=g_param[OptionsDefine.Endpoint],
         | 
| 924 | 
            +
                    proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
         | 
| 925 | 
            +
                )
         | 
| 926 | 
            +
                profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
         | 
| 927 | 
            +
                if g_param[OptionsDefine.Language]:
         | 
| 928 | 
            +
                    profile.language = g_param[OptionsDefine.Language]
         | 
| 929 | 
            +
                mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
         | 
| 930 | 
            +
                client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
         | 
| 931 | 
            +
                client._sdkVersion += ("_CLI_" + __version__)
         | 
| 932 | 
            +
                models = MODELS_MAP[g_param[OptionsDefine.Version]]
         | 
| 933 | 
            +
                model = models.DescribeEmrOverviewMetricsRequest()
         | 
| 934 | 
            +
                model.from_json_string(json.dumps(args))
         | 
| 935 | 
            +
                start_time = time.time()
         | 
| 936 | 
            +
                while True:
         | 
| 937 | 
            +
                    rsp = client.DescribeEmrOverviewMetrics(model)
         | 
| 938 | 
            +
                    result = rsp.to_json_string()
         | 
| 939 | 
            +
                    try:
         | 
| 940 | 
            +
                        json_obj = json.loads(result)
         | 
| 941 | 
            +
                    except TypeError as e:
         | 
| 942 | 
            +
                        json_obj = json.loads(result.decode('utf-8'))  # python3.3
         | 
| 943 | 
            +
                    if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
         | 
| 944 | 
            +
                        break
         | 
| 945 | 
            +
                    cur_time = time.time()
         | 
| 946 | 
            +
                    if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
         | 
| 947 | 
            +
                        raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
         | 
| 948 | 
            +
                        (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
         | 
| 949 | 
            +
                        search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
         | 
| 950 | 
            +
                    else:
         | 
| 951 | 
            +
                        print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
         | 
| 952 | 
            +
                    time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
         | 
| 953 | 
            +
                FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
         | 
| 954 | 
            +
             | 
| 955 | 
            +
             | 
| 852 956 | 
             
            def doDescribeUsersForUserManager(args, parsed_globals):
         | 
| 853 957 | 
             
                g_param = parse_global_arg(parsed_globals)
         | 
| 854 958 |  | 
| @@ -1421,7 +1525,7 @@ def doInquiryPriceCreateInstance(args, parsed_globals): | |
| 1421 1525 | 
             
                FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
         | 
| 1422 1526 |  | 
| 1423 1527 |  | 
| 1424 | 
            -
            def  | 
| 1528 | 
            +
            def doAddMetricScaleStrategy(args, parsed_globals):
         | 
| 1425 1529 | 
             
                g_param = parse_global_arg(parsed_globals)
         | 
| 1426 1530 |  | 
| 1427 1531 | 
             
                if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
         | 
| @@ -1450,11 +1554,11 @@ def doDescribeResourceSchedule(args, parsed_globals): | |
| 1450 1554 | 
             
                client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
         | 
| 1451 1555 | 
             
                client._sdkVersion += ("_CLI_" + __version__)
         | 
| 1452 1556 | 
             
                models = MODELS_MAP[g_param[OptionsDefine.Version]]
         | 
| 1453 | 
            -
                model = models. | 
| 1557 | 
            +
                model = models.AddMetricScaleStrategyRequest()
         | 
| 1454 1558 | 
             
                model.from_json_string(json.dumps(args))
         | 
| 1455 1559 | 
             
                start_time = time.time()
         | 
| 1456 1560 | 
             
                while True:
         | 
| 1457 | 
            -
                    rsp = client. | 
| 1561 | 
            +
                    rsp = client.AddMetricScaleStrategy(model)
         | 
| 1458 1562 | 
             
                    result = rsp.to_json_string()
         | 
| 1459 1563 | 
             
                    try:
         | 
| 1460 1564 | 
             
                        json_obj = json.loads(result)
         | 
| @@ -1785,7 +1889,7 @@ def doDescribeAutoScaleStrategies(args, parsed_globals): | |
| 1785 1889 | 
             
                FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
         | 
| 1786 1890 |  | 
| 1787 1891 |  | 
| 1788 | 
            -
            def  | 
| 1892 | 
            +
            def doDescribeResourceSchedule(args, parsed_globals):
         | 
| 1789 1893 | 
             
                g_param = parse_global_arg(parsed_globals)
         | 
| 1790 1894 |  | 
| 1791 1895 | 
             
                if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
         | 
| @@ -1814,11 +1918,11 @@ def doAddMetricScaleStrategy(args, parsed_globals): | |
| 1814 1918 | 
             
                client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
         | 
| 1815 1919 | 
             
                client._sdkVersion += ("_CLI_" + __version__)
         | 
| 1816 1920 | 
             
                models = MODELS_MAP[g_param[OptionsDefine.Version]]
         | 
| 1817 | 
            -
                model = models. | 
| 1921 | 
            +
                model = models.DescribeResourceScheduleRequest()
         | 
| 1818 1922 | 
             
                model.from_json_string(json.dumps(args))
         | 
| 1819 1923 | 
             
                start_time = time.time()
         | 
| 1820 1924 | 
             
                while True:
         | 
| 1821 | 
            -
                    rsp = client. | 
| 1925 | 
            +
                    rsp = client.DescribeResourceSchedule(model)
         | 
| 1822 1926 | 
             
                    result = rsp.to_json_string()
         | 
| 1823 1927 | 
             
                    try:
         | 
| 1824 1928 | 
             
                        json_obj = json.loads(result)
         | 
| @@ -2173,9 +2277,11 @@ ACTION_MAP = { | |
| 2173 2277 | 
             
                "DescribeCvmQuota": doDescribeCvmQuota,
         | 
| 2174 2278 | 
             
                "ScaleOutInstance": doScaleOutInstance,
         | 
| 2175 2279 | 
             
                "ModifyUserManagerPwd": doModifyUserManagerPwd,
         | 
| 2280 | 
            +
                "DescribeHBaseTableOverview": doDescribeHBaseTableOverview,
         | 
| 2176 2281 | 
             
                "DescribeInstances": doDescribeInstances,
         | 
| 2177 2282 | 
             
                "RunJobFlow": doRunJobFlow,
         | 
| 2178 2283 | 
             
                "TerminateClusterNodes": doTerminateClusterNodes,
         | 
| 2284 | 
            +
                "DescribeEmrOverviewMetrics": doDescribeEmrOverviewMetrics,
         | 
| 2179 2285 | 
             
                "DescribeUsersForUserManager": doDescribeUsersForUserManager,
         | 
| 2180 2286 | 
             
                "DeleteUserManagerUserList": doDeleteUserManagerUserList,
         | 
| 2181 2287 | 
             
                "AddUsersForUserManager": doAddUsersForUserManager,
         | 
| @@ -2187,14 +2293,14 @@ ACTION_MAP = { | |
| 2187 2293 | 
             
                "SyncPodState": doSyncPodState,
         | 
| 2188 2294 | 
             
                "CreateInstance": doCreateInstance,
         | 
| 2189 2295 | 
             
                "InquiryPriceCreateInstance": doInquiryPriceCreateInstance,
         | 
| 2190 | 
            -
                " | 
| 2296 | 
            +
                "AddMetricScaleStrategy": doAddMetricScaleStrategy,
         | 
| 2191 2297 | 
             
                "ModifyResourceScheduleConfig": doModifyResourceScheduleConfig,
         | 
| 2192 2298 | 
             
                "DescribeHiveQueries": doDescribeHiveQueries,
         | 
| 2193 2299 | 
             
                "StartStopServiceOrMonitor": doStartStopServiceOrMonitor,
         | 
| 2194 2300 | 
             
                "TerminateTasks": doTerminateTasks,
         | 
| 2195 2301 | 
             
                "TerminateInstance": doTerminateInstance,
         | 
| 2196 2302 | 
             
                "DescribeAutoScaleStrategies": doDescribeAutoScaleStrategies,
         | 
| 2197 | 
            -
                " | 
| 2303 | 
            +
                "DescribeResourceSchedule": doDescribeResourceSchedule,
         | 
| 2198 2304 | 
             
                "DescribeAutoScaleGroupGlobalConf": doDescribeAutoScaleGroupGlobalConf,
         | 
| 2199 2305 | 
             
                "DescribeClusterNodes": doDescribeClusterNodes,
         | 
| 2200 2306 | 
             
                "DescribeInstancesList": doDescribeInstancesList,
         |