tccli 3.0.1222.1__py2.py3-none-any.whl → 3.0.1223.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/billing/v20180709/api.json +356 -356
  3. tccli/services/billing/v20180709/examples.json +7 -7
  4. tccli/services/cls/v20201016/api.json +1 -1
  5. tccli/services/dcdb/v20180411/api.json +136 -136
  6. tccli/services/dnspod/dnspod_client.py +139 -33
  7. tccli/services/dnspod/v20210323/api.json +104 -0
  8. tccli/services/dnspod/v20210323/examples.json +16 -0
  9. tccli/services/ess/v20201111/api.json +4 -4
  10. tccli/services/essbasic/v20210526/api.json +2 -2
  11. tccli/services/goosefs/v20220519/api.json +9 -0
  12. tccli/services/hunyuan/v20230901/api.json +11 -0
  13. tccli/services/lcic/v20220817/api.json +10 -1
  14. tccli/services/lighthouse/v20200324/api.json +1 -1
  15. tccli/services/live/live_client.py +322 -4
  16. tccli/services/live/v20180801/api.json +331 -0
  17. tccli/services/live/v20180801/examples.json +48 -0
  18. tccli/services/lke/v20231130/api.json +29 -9
  19. tccli/services/mariadb/v20170312/api.json +142 -142
  20. tccli/services/mps/v20190612/api.json +11 -1
  21. tccli/services/oceanus/v20190422/api.json +10 -0
  22. tccli/services/ocr/v20181119/api.json +30 -0
  23. tccli/services/ocr/v20181119/examples.json +4 -10
  24. tccli/services/privatedns/privatedns_client.py +4 -534
  25. tccli/services/privatedns/v20201028/api.json +4 -943
  26. tccli/services/privatedns/v20201028/examples.json +0 -80
  27. tccli/services/redis/v20180412/api.json +1 -1
  28. tccli/services/teo/v20220901/api.json +5 -0
  29. tccli/services/tke/v20220501/api.json +3 -1
  30. tccli/services/vod/v20180717/api.json +19 -0
  31. tccli/services/vpc/v20170312/api.json +29 -0
  32. {tccli-3.0.1222.1.dist-info → tccli-3.0.1223.1.dist-info}/METADATA +2 -2
  33. {tccli-3.0.1222.1.dist-info → tccli-3.0.1223.1.dist-info}/RECORD +36 -36
  34. {tccli-3.0.1222.1.dist-info → tccli-3.0.1223.1.dist-info}/WHEEL +0 -0
  35. {tccli-3.0.1222.1.dist-info → tccli-3.0.1223.1.dist-info}/entry_points.txt +0 -0
  36. {tccli-3.0.1222.1.dist-info → tccli-3.0.1223.1.dist-info}/license_files/LICENSE +0 -0
@@ -4104,7 +4104,16 @@
4104
4104
  "example": "abc",
4105
4105
  "member": "string",
4106
4106
  "name": "UserId",
4107
- "required": true,
4107
+ "required": false,
4108
+ "type": "string"
4109
+ },
4110
+ {
4111
+ "disabled": false,
4112
+ "document": "客户端用户 id,如果未指定则为用户 id。",
4113
+ "example": "abc",
4114
+ "member": "string",
4115
+ "name": "OriginId",
4116
+ "required": false,
4108
4117
  "type": "string"
4109
4118
  }
4110
4119
  ],
@@ -7572,7 +7572,7 @@
7572
7572
  },
7573
7573
  {
7574
7574
  "disabled": false,
7575
- "document": "实例登录密码。具体按照操作系统的复杂度要求。 \n`LINUX_UNIX` 实例密码必须 8-30 位,推荐使用 12 位以上密码,不能包含空格, 不能以“/”开头,至少包含以下字符中的三种不同字符,字符种类:<br><li>小写字母:[a-z]<br><li>大写字母:[A-Z]<br><li>数字:0-9<br><li>特殊字符: ()\\`\\~!@#$%^&\\*-+=\\_|{}[]:;' <>,.?/</li>\n`WINDOWS` 实例密码必须 12-30 位,不能包含空格, 不能以“/”开头且不包括用户名,至少包含以下字符中的三种不同字符<br><li>小写字母:[a-z]<br><li>大写字母:[A-Z]<br><li>数字: 0-9<br><li>特殊字符:()\\`~!@#$%^&\\*-+=\\_|{}[]:;' <>,.?/",
7575
+ "document": "实例登录密码。具体按照操作系统的复杂度要求。 \n\n`LINUX_UNIX` 实例密码必须 8-30 位,推荐使用 12 位以上密码,不能包含空格,不能以“/”开头,至少包含以下字符中的三种不同字符,字符种类:<br>\n<li>小写字母:[a-z]</li>\n<li>大写字母:[A-Z]</li>\n<li>数字:0-9</li>\n<li>特殊字符: ()\\`\\~!@#$%^&\\*-+=\\_|{}[]:;' <>,.?/</li> \n\n`WINDOWS` 实例密码必须 12-30 位,不能包含空格,不能以“/”开头且不包括用户名,至少包含以下字符中的三种不同字符:<br>\n<li>小写字母:[a-z]</li>\n<li>大写字母:[A-Z]</li>\n<li>数字:0-9</li>\n<li>特殊字符:()\\`~!@#$%^&\\*-+=\\_|{}[]:;' <>,.?/</li> ",
7576
7576
  "example": " HelloTgHd123_&*",
7577
7577
  "member": "string",
7578
7578
  "name": "Password",
@@ -901,6 +901,58 @@ def doDescribeLiveSnapshotRules(args, parsed_globals):
901
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
902
 
903
903
 
904
+ def doReleaseCaster(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.LiveClient(cred, g_param[OptionsDefine.Region], profile)
931
+ client._sdkVersion += ("_CLI_" + __version__)
932
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
+ model = models.ReleaseCasterRequest()
934
+ model.from_json_string(json.dumps(args))
935
+ start_time = time.time()
936
+ while True:
937
+ rsp = client.ReleaseCaster(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
+
904
956
  def doDescribeTimeShiftStreamList(args, parsed_globals):
905
957
  g_param = parse_global_arg(parsed_globals)
906
958
 
@@ -1941,6 +1993,110 @@ def doDescribeAreaBillBandwidthAndFluxList(args, parsed_globals):
1941
1993
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1942
1994
 
1943
1995
 
1996
+ def doDescribeLiveTranscodeRules(args, parsed_globals):
1997
+ g_param = parse_global_arg(parsed_globals)
1998
+
1999
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2000
+ cred = credential.CVMRoleCredential()
2001
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2002
+ cred = credential.STSAssumeRoleCredential(
2003
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2004
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2005
+ )
2006
+ 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):
2007
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2008
+ else:
2009
+ cred = credential.Credential(
2010
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2011
+ )
2012
+ http_profile = HttpProfile(
2013
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2014
+ reqMethod="POST",
2015
+ endpoint=g_param[OptionsDefine.Endpoint],
2016
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2017
+ )
2018
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2019
+ if g_param[OptionsDefine.Language]:
2020
+ profile.language = g_param[OptionsDefine.Language]
2021
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2022
+ client = mod.LiveClient(cred, g_param[OptionsDefine.Region], profile)
2023
+ client._sdkVersion += ("_CLI_" + __version__)
2024
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2025
+ model = models.DescribeLiveTranscodeRulesRequest()
2026
+ model.from_json_string(json.dumps(args))
2027
+ start_time = time.time()
2028
+ while True:
2029
+ rsp = client.DescribeLiveTranscodeRules(model)
2030
+ result = rsp.to_json_string()
2031
+ try:
2032
+ json_obj = json.loads(result)
2033
+ except TypeError as e:
2034
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2035
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2036
+ break
2037
+ cur_time = time.time()
2038
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2039
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2040
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2041
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2042
+ else:
2043
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2044
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2045
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2046
+
2047
+
2048
+ def doStopCasterPvw(args, parsed_globals):
2049
+ g_param = parse_global_arg(parsed_globals)
2050
+
2051
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2052
+ cred = credential.CVMRoleCredential()
2053
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2054
+ cred = credential.STSAssumeRoleCredential(
2055
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2056
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2057
+ )
2058
+ 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):
2059
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2060
+ else:
2061
+ cred = credential.Credential(
2062
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2063
+ )
2064
+ http_profile = HttpProfile(
2065
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2066
+ reqMethod="POST",
2067
+ endpoint=g_param[OptionsDefine.Endpoint],
2068
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2069
+ )
2070
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2071
+ if g_param[OptionsDefine.Language]:
2072
+ profile.language = g_param[OptionsDefine.Language]
2073
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2074
+ client = mod.LiveClient(cred, g_param[OptionsDefine.Region], profile)
2075
+ client._sdkVersion += ("_CLI_" + __version__)
2076
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2077
+ model = models.StopCasterPvwRequest()
2078
+ model.from_json_string(json.dumps(args))
2079
+ start_time = time.time()
2080
+ while True:
2081
+ rsp = client.StopCasterPvw(model)
2082
+ result = rsp.to_json_string()
2083
+ try:
2084
+ json_obj = json.loads(result)
2085
+ except TypeError as e:
2086
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2087
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2088
+ break
2089
+ cur_time = time.time()
2090
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2091
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2092
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2093
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2094
+ else:
2095
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2096
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2097
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
+
2099
+
1944
2100
  def doDeleteCasterLayoutInfo(args, parsed_globals):
1945
2101
  g_param = parse_global_arg(parsed_globals)
1946
2102
 
@@ -4073,6 +4229,58 @@ def doCreateLiveCallbackTemplate(args, parsed_globals):
4073
4229
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4074
4230
 
4075
4231
 
4232
+ def doCreateCasterPgm(args, parsed_globals):
4233
+ g_param = parse_global_arg(parsed_globals)
4234
+
4235
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4236
+ cred = credential.CVMRoleCredential()
4237
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4238
+ cred = credential.STSAssumeRoleCredential(
4239
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4240
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4241
+ )
4242
+ 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):
4243
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4244
+ else:
4245
+ cred = credential.Credential(
4246
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4247
+ )
4248
+ http_profile = HttpProfile(
4249
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4250
+ reqMethod="POST",
4251
+ endpoint=g_param[OptionsDefine.Endpoint],
4252
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4253
+ )
4254
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4255
+ if g_param[OptionsDefine.Language]:
4256
+ profile.language = g_param[OptionsDefine.Language]
4257
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4258
+ client = mod.LiveClient(cred, g_param[OptionsDefine.Region], profile)
4259
+ client._sdkVersion += ("_CLI_" + __version__)
4260
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4261
+ model = models.CreateCasterPgmRequest()
4262
+ model.from_json_string(json.dumps(args))
4263
+ start_time = time.time()
4264
+ while True:
4265
+ rsp = client.CreateCasterPgm(model)
4266
+ result = rsp.to_json_string()
4267
+ try:
4268
+ json_obj = json.loads(result)
4269
+ except TypeError as e:
4270
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4271
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4272
+ break
4273
+ cur_time = time.time()
4274
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4275
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4276
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4277
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4278
+ else:
4279
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4280
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4281
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4282
+
4283
+
4076
4284
  def doModifyCasterOutputInfo(args, parsed_globals):
4077
4285
  g_param = parse_global_arg(parsed_globals)
4078
4286
 
@@ -4125,6 +4333,58 @@ def doModifyCasterOutputInfo(args, parsed_globals):
4125
4333
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4126
4334
 
4127
4335
 
4336
+ def doCreateCasterPvw(args, parsed_globals):
4337
+ g_param = parse_global_arg(parsed_globals)
4338
+
4339
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4340
+ cred = credential.CVMRoleCredential()
4341
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4342
+ cred = credential.STSAssumeRoleCredential(
4343
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4344
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4345
+ )
4346
+ 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):
4347
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4348
+ else:
4349
+ cred = credential.Credential(
4350
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4351
+ )
4352
+ http_profile = HttpProfile(
4353
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4354
+ reqMethod="POST",
4355
+ endpoint=g_param[OptionsDefine.Endpoint],
4356
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4357
+ )
4358
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4359
+ if g_param[OptionsDefine.Language]:
4360
+ profile.language = g_param[OptionsDefine.Language]
4361
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4362
+ client = mod.LiveClient(cred, g_param[OptionsDefine.Region], profile)
4363
+ client._sdkVersion += ("_CLI_" + __version__)
4364
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4365
+ model = models.CreateCasterPvwRequest()
4366
+ model.from_json_string(json.dumps(args))
4367
+ start_time = time.time()
4368
+ while True:
4369
+ rsp = client.CreateCasterPvw(model)
4370
+ result = rsp.to_json_string()
4371
+ try:
4372
+ json_obj = json.loads(result)
4373
+ except TypeError as e:
4374
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4375
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4376
+ break
4377
+ cur_time = time.time()
4378
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4379
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4380
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4381
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4382
+ else:
4383
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4384
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4385
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4386
+
4387
+
4128
4388
  def doResumeLiveStream(args, parsed_globals):
4129
4389
  g_param = parse_global_arg(parsed_globals)
4130
4390
 
@@ -8181,6 +8441,58 @@ def doDescribeLivePlayAuthKey(args, parsed_globals):
8181
8441
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8182
8442
 
8183
8443
 
8444
+ def doCreateCasterPgmFromPvw(args, parsed_globals):
8445
+ g_param = parse_global_arg(parsed_globals)
8446
+
8447
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
8448
+ cred = credential.CVMRoleCredential()
8449
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
8450
+ cred = credential.STSAssumeRoleCredential(
8451
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
8452
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
8453
+ )
8454
+ 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):
8455
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
8456
+ else:
8457
+ cred = credential.Credential(
8458
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
8459
+ )
8460
+ http_profile = HttpProfile(
8461
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
8462
+ reqMethod="POST",
8463
+ endpoint=g_param[OptionsDefine.Endpoint],
8464
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
8465
+ )
8466
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
8467
+ if g_param[OptionsDefine.Language]:
8468
+ profile.language = g_param[OptionsDefine.Language]
8469
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
8470
+ client = mod.LiveClient(cred, g_param[OptionsDefine.Region], profile)
8471
+ client._sdkVersion += ("_CLI_" + __version__)
8472
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
8473
+ model = models.CreateCasterPgmFromPvwRequest()
8474
+ model.from_json_string(json.dumps(args))
8475
+ start_time = time.time()
8476
+ while True:
8477
+ rsp = client.CreateCasterPgmFromPvw(model)
8478
+ result = rsp.to_json_string()
8479
+ try:
8480
+ json_obj = json.loads(result)
8481
+ except TypeError as e:
8482
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
8483
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
8484
+ break
8485
+ cur_time = time.time()
8486
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
8487
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
8488
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
8489
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
8490
+ else:
8491
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
8492
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
8493
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8494
+
8495
+
8184
8496
  def doDescribeCasterTransitionTypes(args, parsed_globals):
8185
8497
  g_param = parse_global_arg(parsed_globals)
8186
8498
 
@@ -8909,7 +9221,7 @@ def doDescribeLiveCerts(args, parsed_globals):
8909
9221
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8910
9222
 
8911
9223
 
8912
- def doDescribeLiveTranscodeRules(args, parsed_globals):
9224
+ def doStopCasterPgm(args, parsed_globals):
8913
9225
  g_param = parse_global_arg(parsed_globals)
8914
9226
 
8915
9227
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -8938,11 +9250,11 @@ def doDescribeLiveTranscodeRules(args, parsed_globals):
8938
9250
  client = mod.LiveClient(cred, g_param[OptionsDefine.Region], profile)
8939
9251
  client._sdkVersion += ("_CLI_" + __version__)
8940
9252
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
8941
- model = models.DescribeLiveTranscodeRulesRequest()
9253
+ model = models.StopCasterPgmRequest()
8942
9254
  model.from_json_string(json.dumps(args))
8943
9255
  start_time = time.time()
8944
9256
  while True:
8945
- rsp = client.DescribeLiveTranscodeRules(model)
9257
+ rsp = client.StopCasterPgm(model)
8946
9258
  result = rsp.to_json_string()
8947
9259
  try:
8948
9260
  json_obj = json.loads(result)
@@ -9405,6 +9717,7 @@ ACTION_MAP = {
9405
9717
  "DescribeStreamPushInfoList": doDescribeStreamPushInfoList,
9406
9718
  "StartLiveStreamMonitor": doStartLiveStreamMonitor,
9407
9719
  "DescribeLiveSnapshotRules": doDescribeLiveSnapshotRules,
9720
+ "ReleaseCaster": doReleaseCaster,
9408
9721
  "DescribeTimeShiftStreamList": doDescribeTimeShiftStreamList,
9409
9722
  "AddCasterInputInfo": doAddCasterInputInfo,
9410
9723
  "CreateLivePadTemplate": doCreateLivePadTemplate,
@@ -9425,6 +9738,8 @@ ACTION_MAP = {
9425
9738
  "DescribeLiveDomainCert": doDescribeLiveDomainCert,
9426
9739
  "AddLiveWatermark": doAddLiveWatermark,
9427
9740
  "DescribeAreaBillBandwidthAndFluxList": doDescribeAreaBillBandwidthAndFluxList,
9741
+ "DescribeLiveTranscodeRules": doDescribeLiveTranscodeRules,
9742
+ "StopCasterPvw": doStopCasterPvw,
9428
9743
  "DeleteCasterLayoutInfo": doDeleteCasterLayoutInfo,
9429
9744
  "DeleteLiveWatermarkRule": doDeleteLiveWatermarkRule,
9430
9745
  "DescribeDeliverBandwidthList": doDescribeDeliverBandwidthList,
@@ -9466,7 +9781,9 @@ ACTION_MAP = {
9466
9781
  "DescribeLiveDomains": doDescribeLiveDomains,
9467
9782
  "DescribePullTransformPushInfo": doDescribePullTransformPushInfo,
9468
9783
  "CreateLiveCallbackTemplate": doCreateLiveCallbackTemplate,
9784
+ "CreateCasterPgm": doCreateCasterPgm,
9469
9785
  "ModifyCasterOutputInfo": doModifyCasterOutputInfo,
9786
+ "CreateCasterPvw": doCreateCasterPvw,
9470
9787
  "ResumeLiveStream": doResumeLiveStream,
9471
9788
  "ModifyLivePullStreamTask": doModifyLivePullStreamTask,
9472
9789
  "DeleteLiveDomain": doDeleteLiveDomain,
@@ -9545,6 +9862,7 @@ ACTION_MAP = {
9545
9862
  "DescribeProIspPlaySumInfoList": doDescribeProIspPlaySumInfoList,
9546
9863
  "DescribeAllStreamPlayInfoList": doDescribeAllStreamPlayInfoList,
9547
9864
  "DescribeLivePlayAuthKey": doDescribeLivePlayAuthKey,
9865
+ "CreateCasterPgmFromPvw": doCreateCasterPgmFromPvw,
9548
9866
  "DescribeCasterTransitionTypes": doDescribeCasterTransitionTypes,
9549
9867
  "DescribeCasterDisplayInfo": doDescribeCasterDisplayInfo,
9550
9868
  "StopLiveStreamMonitor": doStopLiveStreamMonitor,
@@ -9559,7 +9877,7 @@ ACTION_MAP = {
9559
9877
  "CreateRecordTask": doCreateRecordTask,
9560
9878
  "CreateLiveTranscodeTemplate": doCreateLiveTranscodeTemplate,
9561
9879
  "DescribeLiveCerts": doDescribeLiveCerts,
9562
- "DescribeLiveTranscodeRules": doDescribeLiveTranscodeRules,
9880
+ "StopCasterPgm": doStopCasterPgm,
9563
9881
  "EnableLiveDomain": doEnableLiveDomain,
9564
9882
  "DeleteCasterOutputInfo": doDeleteCasterOutputInfo,
9565
9883
  "StopLivePadProcessor": doStopLivePadProcessor,