tccli 3.0.1339.1__py2.py3-none-any.whl → 3.0.1341.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/bh/bh_client.py +326 -8
- tccli/services/bh/v20230418/api.json +547 -0
- tccli/services/bh/v20230418/examples.json +48 -0
- tccli/services/ccc/v20200210/api.json +1 -1
- tccli/services/cdb/v20170320/api.json +144 -144
- tccli/services/cdb/v20170320/examples.json +19 -19
- tccli/services/cdn/v20180606/examples.json +1 -1
- tccli/services/csip/v20221121/api.json +48 -10
- tccli/services/csip/v20221121/examples.json +11 -11
- tccli/services/cvm/v20170312/api.json +9 -0
- tccli/services/cwp/v20180228/api.json +106 -2
- tccli/services/cwp/v20180228/examples.json +12 -0
- tccli/services/cynosdb/v20190107/api.json +29 -2
- tccli/services/cynosdb/v20190107/examples.json +1 -1
- tccli/services/dsgc/v20190723/api.json +215 -17
- tccli/services/emr/emr_client.py +363 -310
- tccli/services/emr/v20190103/api.json +299 -0
- tccli/services/emr/v20190103/examples.json +8 -0
- tccli/services/ess/v20201111/api.json +16 -5
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/gs/v20191118/api.json +10 -1
- tccli/services/ims/v20200713/api.json +1 -1
- tccli/services/ims/v20200713/examples.json +1 -1
- tccli/services/kms/kms_client.py +915 -120
- tccli/services/kms/v20190118/api.json +1104 -27
- tccli/services/kms/v20190118/examples.json +126 -0
- tccli/services/live/v20180801/api.json +9 -0
- tccli/services/live/v20180801/examples.json +4 -4
- tccli/services/lke/lke_client.py +228 -16
- tccli/services/lke/v20231130/api.json +1490 -217
- tccli/services/lke/v20231130/examples.json +33 -1
- tccli/services/mqtt/v20240516/api.json +80 -0
- tccli/services/mqtt/v20240516/examples.json +6 -0
- tccli/services/organization/v20210331/api.json +11 -0
- tccli/services/organization/v20210331/examples.json +1 -1
- tccli/services/partners/v20180321/api.json +2 -2
- tccli/services/postgres/v20170312/api.json +4 -4
- tccli/services/ses/v20201002/api.json +8 -8
- tccli/services/tcss/v20201101/api.json +10 -0
- tccli/services/thpc/v20230321/api.json +32 -2
- tccli/services/tione/v20211111/api.json +11 -0
- tccli/services/trocket/trocket_client.py +53 -0
- tccli/services/trocket/v20230308/api.json +233 -143
- tccli/services/trocket/v20230308/examples.json +14 -6
- tccli/services/vpc/v20170312/api.json +9 -0
- tccli/services/waf/v20180125/api.json +59 -21
- tccli/services/wedata/v20210820/api.json +432 -10
- tccli/services/wedata/v20210820/examples.json +17 -1
- tccli/services/wedata/wedata_client.py +114 -8
- {tccli-3.0.1339.1.dist-info → tccli-3.0.1341.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1339.1.dist-info → tccli-3.0.1341.1.dist-info}/RECORD +55 -55
- {tccli-3.0.1339.1.dist-info → tccli-3.0.1341.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1339.1.dist-info → tccli-3.0.1341.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1339.1.dist-info → tccli-3.0.1341.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/kms/kms_client.py
CHANGED
@@ -17,6 +17,58 @@ from tencentcloud.kms.v20190118 import models as models_v20190118
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
+
def doListDataKeys(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.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
+
model = models.ListDataKeysRequest()
|
50
|
+
model.from_json_string(json.dumps(args))
|
51
|
+
start_time = time.time()
|
52
|
+
while True:
|
53
|
+
rsp = client.ListDataKeys(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
|
+
|
20
72
|
def doDeleteImportedKeyMaterial(args, parsed_globals):
|
21
73
|
g_param = parse_global_arg(parsed_globals)
|
22
74
|
|
@@ -69,7 +121,683 @@ def doDeleteImportedKeyMaterial(args, parsed_globals):
|
|
69
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
122
|
|
71
123
|
|
72
|
-
def doPostQuantumCryptoVerify(args, parsed_globals):
|
124
|
+
def doPostQuantumCryptoVerify(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.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
151
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
152
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
+
model = models.PostQuantumCryptoVerifyRequest()
|
154
|
+
model.from_json_string(json.dumps(args))
|
155
|
+
start_time = time.time()
|
156
|
+
while True:
|
157
|
+
rsp = client.PostQuantumCryptoVerify(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
|
+
|
176
|
+
def doAsymmetricRsaDecrypt(args, parsed_globals):
|
177
|
+
g_param = parse_global_arg(parsed_globals)
|
178
|
+
|
179
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
180
|
+
cred = credential.CVMRoleCredential()
|
181
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
182
|
+
cred = credential.STSAssumeRoleCredential(
|
183
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
184
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
185
|
+
)
|
186
|
+
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):
|
187
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
188
|
+
else:
|
189
|
+
cred = credential.Credential(
|
190
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
191
|
+
)
|
192
|
+
http_profile = HttpProfile(
|
193
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
194
|
+
reqMethod="POST",
|
195
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
196
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
197
|
+
)
|
198
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
199
|
+
if g_param[OptionsDefine.Language]:
|
200
|
+
profile.language = g_param[OptionsDefine.Language]
|
201
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
202
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
203
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
204
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
+
model = models.AsymmetricRsaDecryptRequest()
|
206
|
+
model.from_json_string(json.dumps(args))
|
207
|
+
start_time = time.time()
|
208
|
+
while True:
|
209
|
+
rsp = client.AsymmetricRsaDecrypt(model)
|
210
|
+
result = rsp.to_json_string()
|
211
|
+
try:
|
212
|
+
json_obj = json.loads(result)
|
213
|
+
except TypeError as e:
|
214
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
215
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
216
|
+
break
|
217
|
+
cur_time = time.time()
|
218
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
219
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
220
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
221
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
222
|
+
else:
|
223
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
224
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
225
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
|
+
|
227
|
+
|
228
|
+
def doEncrypt(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.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
255
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
256
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
+
model = models.EncryptRequest()
|
258
|
+
model.from_json_string(json.dumps(args))
|
259
|
+
start_time = time.time()
|
260
|
+
while True:
|
261
|
+
rsp = client.Encrypt(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
|
+
|
280
|
+
def doCreateWhiteBoxKey(args, parsed_globals):
|
281
|
+
g_param = parse_global_arg(parsed_globals)
|
282
|
+
|
283
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
284
|
+
cred = credential.CVMRoleCredential()
|
285
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
286
|
+
cred = credential.STSAssumeRoleCredential(
|
287
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
288
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
289
|
+
)
|
290
|
+
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):
|
291
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
292
|
+
else:
|
293
|
+
cred = credential.Credential(
|
294
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
295
|
+
)
|
296
|
+
http_profile = HttpProfile(
|
297
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
298
|
+
reqMethod="POST",
|
299
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
300
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
301
|
+
)
|
302
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
303
|
+
if g_param[OptionsDefine.Language]:
|
304
|
+
profile.language = g_param[OptionsDefine.Language]
|
305
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
306
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
307
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
308
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
+
model = models.CreateWhiteBoxKeyRequest()
|
310
|
+
model.from_json_string(json.dumps(args))
|
311
|
+
start_time = time.time()
|
312
|
+
while True:
|
313
|
+
rsp = client.CreateWhiteBoxKey(model)
|
314
|
+
result = rsp.to_json_string()
|
315
|
+
try:
|
316
|
+
json_obj = json.loads(result)
|
317
|
+
except TypeError as e:
|
318
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
319
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
320
|
+
break
|
321
|
+
cur_time = time.time()
|
322
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
323
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
324
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
325
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
326
|
+
else:
|
327
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
328
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
329
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
|
+
|
331
|
+
|
332
|
+
def doImportDataKey(args, parsed_globals):
|
333
|
+
g_param = parse_global_arg(parsed_globals)
|
334
|
+
|
335
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
336
|
+
cred = credential.CVMRoleCredential()
|
337
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
338
|
+
cred = credential.STSAssumeRoleCredential(
|
339
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
341
|
+
)
|
342
|
+
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):
|
343
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
344
|
+
else:
|
345
|
+
cred = credential.Credential(
|
346
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
347
|
+
)
|
348
|
+
http_profile = HttpProfile(
|
349
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
350
|
+
reqMethod="POST",
|
351
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
352
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
353
|
+
)
|
354
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
355
|
+
if g_param[OptionsDefine.Language]:
|
356
|
+
profile.language = g_param[OptionsDefine.Language]
|
357
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
358
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
359
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
360
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
+
model = models.ImportDataKeyRequest()
|
362
|
+
model.from_json_string(json.dumps(args))
|
363
|
+
start_time = time.time()
|
364
|
+
while True:
|
365
|
+
rsp = client.ImportDataKey(model)
|
366
|
+
result = rsp.to_json_string()
|
367
|
+
try:
|
368
|
+
json_obj = json.loads(result)
|
369
|
+
except TypeError as e:
|
370
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
371
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
372
|
+
break
|
373
|
+
cur_time = time.time()
|
374
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
375
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
376
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
377
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
378
|
+
else:
|
379
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
380
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
381
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
|
+
|
383
|
+
|
384
|
+
def doEnableWhiteBoxKeys(args, parsed_globals):
|
385
|
+
g_param = parse_global_arg(parsed_globals)
|
386
|
+
|
387
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
388
|
+
cred = credential.CVMRoleCredential()
|
389
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
390
|
+
cred = credential.STSAssumeRoleCredential(
|
391
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
392
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
393
|
+
)
|
394
|
+
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):
|
395
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
396
|
+
else:
|
397
|
+
cred = credential.Credential(
|
398
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
399
|
+
)
|
400
|
+
http_profile = HttpProfile(
|
401
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
402
|
+
reqMethod="POST",
|
403
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
404
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
405
|
+
)
|
406
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
407
|
+
if g_param[OptionsDefine.Language]:
|
408
|
+
profile.language = g_param[OptionsDefine.Language]
|
409
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
410
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
411
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
412
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
+
model = models.EnableWhiteBoxKeysRequest()
|
414
|
+
model.from_json_string(json.dumps(args))
|
415
|
+
start_time = time.time()
|
416
|
+
while True:
|
417
|
+
rsp = client.EnableWhiteBoxKeys(model)
|
418
|
+
result = rsp.to_json_string()
|
419
|
+
try:
|
420
|
+
json_obj = json.loads(result)
|
421
|
+
except TypeError as e:
|
422
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
423
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
424
|
+
break
|
425
|
+
cur_time = time.time()
|
426
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
427
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
428
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
429
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
430
|
+
else:
|
431
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
432
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
433
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
|
+
|
435
|
+
|
436
|
+
def doUpdateAlias(args, parsed_globals):
|
437
|
+
g_param = parse_global_arg(parsed_globals)
|
438
|
+
|
439
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
440
|
+
cred = credential.CVMRoleCredential()
|
441
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
442
|
+
cred = credential.STSAssumeRoleCredential(
|
443
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
444
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
445
|
+
)
|
446
|
+
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):
|
447
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
448
|
+
else:
|
449
|
+
cred = credential.Credential(
|
450
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
451
|
+
)
|
452
|
+
http_profile = HttpProfile(
|
453
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
454
|
+
reqMethod="POST",
|
455
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
456
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
457
|
+
)
|
458
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
459
|
+
if g_param[OptionsDefine.Language]:
|
460
|
+
profile.language = g_param[OptionsDefine.Language]
|
461
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
462
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
463
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
464
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
+
model = models.UpdateAliasRequest()
|
466
|
+
model.from_json_string(json.dumps(args))
|
467
|
+
start_time = time.time()
|
468
|
+
while True:
|
469
|
+
rsp = client.UpdateAlias(model)
|
470
|
+
result = rsp.to_json_string()
|
471
|
+
try:
|
472
|
+
json_obj = json.loads(result)
|
473
|
+
except TypeError as e:
|
474
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
475
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
476
|
+
break
|
477
|
+
cur_time = time.time()
|
478
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
479
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
480
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
481
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
482
|
+
else:
|
483
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
484
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
485
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
|
+
|
487
|
+
|
488
|
+
def doDeleteWhiteBoxKey(args, parsed_globals):
|
489
|
+
g_param = parse_global_arg(parsed_globals)
|
490
|
+
|
491
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
492
|
+
cred = credential.CVMRoleCredential()
|
493
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
494
|
+
cred = credential.STSAssumeRoleCredential(
|
495
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
496
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
497
|
+
)
|
498
|
+
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):
|
499
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
500
|
+
else:
|
501
|
+
cred = credential.Credential(
|
502
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
503
|
+
)
|
504
|
+
http_profile = HttpProfile(
|
505
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
506
|
+
reqMethod="POST",
|
507
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
508
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
509
|
+
)
|
510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
511
|
+
if g_param[OptionsDefine.Language]:
|
512
|
+
profile.language = g_param[OptionsDefine.Language]
|
513
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
514
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
+
model = models.DeleteWhiteBoxKeyRequest()
|
518
|
+
model.from_json_string(json.dumps(args))
|
519
|
+
start_time = time.time()
|
520
|
+
while True:
|
521
|
+
rsp = client.DeleteWhiteBoxKey(model)
|
522
|
+
result = rsp.to_json_string()
|
523
|
+
try:
|
524
|
+
json_obj = json.loads(result)
|
525
|
+
except TypeError as e:
|
526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
528
|
+
break
|
529
|
+
cur_time = time.time()
|
530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
534
|
+
else:
|
535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
|
+
|
539
|
+
|
540
|
+
def doImportKeyMaterial(args, parsed_globals):
|
541
|
+
g_param = parse_global_arg(parsed_globals)
|
542
|
+
|
543
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
544
|
+
cred = credential.CVMRoleCredential()
|
545
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
546
|
+
cred = credential.STSAssumeRoleCredential(
|
547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
549
|
+
)
|
550
|
+
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):
|
551
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
552
|
+
else:
|
553
|
+
cred = credential.Credential(
|
554
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
555
|
+
)
|
556
|
+
http_profile = HttpProfile(
|
557
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
558
|
+
reqMethod="POST",
|
559
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
560
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
561
|
+
)
|
562
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
563
|
+
if g_param[OptionsDefine.Language]:
|
564
|
+
profile.language = g_param[OptionsDefine.Language]
|
565
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
566
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
567
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
568
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
+
model = models.ImportKeyMaterialRequest()
|
570
|
+
model.from_json_string(json.dumps(args))
|
571
|
+
start_time = time.time()
|
572
|
+
while True:
|
573
|
+
rsp = client.ImportKeyMaterial(model)
|
574
|
+
result = rsp.to_json_string()
|
575
|
+
try:
|
576
|
+
json_obj = json.loads(result)
|
577
|
+
except TypeError as e:
|
578
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
579
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
580
|
+
break
|
581
|
+
cur_time = time.time()
|
582
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
583
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
584
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
585
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
586
|
+
else:
|
587
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
588
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
589
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
|
+
|
591
|
+
|
592
|
+
def doDescribeDataKey(args, parsed_globals):
|
593
|
+
g_param = parse_global_arg(parsed_globals)
|
594
|
+
|
595
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
596
|
+
cred = credential.CVMRoleCredential()
|
597
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
598
|
+
cred = credential.STSAssumeRoleCredential(
|
599
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
600
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
601
|
+
)
|
602
|
+
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):
|
603
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
604
|
+
else:
|
605
|
+
cred = credential.Credential(
|
606
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
607
|
+
)
|
608
|
+
http_profile = HttpProfile(
|
609
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
610
|
+
reqMethod="POST",
|
611
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
612
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
613
|
+
)
|
614
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
615
|
+
if g_param[OptionsDefine.Language]:
|
616
|
+
profile.language = g_param[OptionsDefine.Language]
|
617
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
618
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
619
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
620
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
+
model = models.DescribeDataKeyRequest()
|
622
|
+
model.from_json_string(json.dumps(args))
|
623
|
+
start_time = time.time()
|
624
|
+
while True:
|
625
|
+
rsp = client.DescribeDataKey(model)
|
626
|
+
result = rsp.to_json_string()
|
627
|
+
try:
|
628
|
+
json_obj = json.loads(result)
|
629
|
+
except TypeError as e:
|
630
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
631
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
632
|
+
break
|
633
|
+
cur_time = time.time()
|
634
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
635
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
636
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
637
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
638
|
+
else:
|
639
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
640
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
641
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
|
+
|
643
|
+
|
644
|
+
def doGetPublicKey(args, parsed_globals):
|
645
|
+
g_param = parse_global_arg(parsed_globals)
|
646
|
+
|
647
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
648
|
+
cred = credential.CVMRoleCredential()
|
649
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
650
|
+
cred = credential.STSAssumeRoleCredential(
|
651
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
652
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
653
|
+
)
|
654
|
+
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):
|
655
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
656
|
+
else:
|
657
|
+
cred = credential.Credential(
|
658
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
659
|
+
)
|
660
|
+
http_profile = HttpProfile(
|
661
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
662
|
+
reqMethod="POST",
|
663
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
664
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
665
|
+
)
|
666
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
667
|
+
if g_param[OptionsDefine.Language]:
|
668
|
+
profile.language = g_param[OptionsDefine.Language]
|
669
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
670
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
671
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
672
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
+
model = models.GetPublicKeyRequest()
|
674
|
+
model.from_json_string(json.dumps(args))
|
675
|
+
start_time = time.time()
|
676
|
+
while True:
|
677
|
+
rsp = client.GetPublicKey(model)
|
678
|
+
result = rsp.to_json_string()
|
679
|
+
try:
|
680
|
+
json_obj = json.loads(result)
|
681
|
+
except TypeError as e:
|
682
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
683
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
684
|
+
break
|
685
|
+
cur_time = time.time()
|
686
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
687
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
688
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
689
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
690
|
+
else:
|
691
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
692
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
693
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
|
+
|
695
|
+
|
696
|
+
def doDisableKey(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.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
723
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
724
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
+
model = models.DisableKeyRequest()
|
726
|
+
model.from_json_string(json.dumps(args))
|
727
|
+
start_time = time.time()
|
728
|
+
while True:
|
729
|
+
rsp = client.DisableKey(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
|
+
|
748
|
+
def doGenerateDataKey(args, parsed_globals):
|
749
|
+
g_param = parse_global_arg(parsed_globals)
|
750
|
+
|
751
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
752
|
+
cred = credential.CVMRoleCredential()
|
753
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
754
|
+
cred = credential.STSAssumeRoleCredential(
|
755
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
756
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
757
|
+
)
|
758
|
+
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):
|
759
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
760
|
+
else:
|
761
|
+
cred = credential.Credential(
|
762
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
763
|
+
)
|
764
|
+
http_profile = HttpProfile(
|
765
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
766
|
+
reqMethod="POST",
|
767
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
768
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
769
|
+
)
|
770
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
771
|
+
if g_param[OptionsDefine.Language]:
|
772
|
+
profile.language = g_param[OptionsDefine.Language]
|
773
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
774
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
775
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
776
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
+
model = models.GenerateDataKeyRequest()
|
778
|
+
model.from_json_string(json.dumps(args))
|
779
|
+
start_time = time.time()
|
780
|
+
while True:
|
781
|
+
rsp = client.GenerateDataKey(model)
|
782
|
+
result = rsp.to_json_string()
|
783
|
+
try:
|
784
|
+
json_obj = json.loads(result)
|
785
|
+
except TypeError as e:
|
786
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
787
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
788
|
+
break
|
789
|
+
cur_time = time.time()
|
790
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
791
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
792
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
793
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
794
|
+
else:
|
795
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
796
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
797
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
798
|
+
|
799
|
+
|
800
|
+
def doListDataKeyDetail(args, parsed_globals):
|
73
801
|
g_param = parse_global_arg(parsed_globals)
|
74
802
|
|
75
803
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +826,11 @@ def doPostQuantumCryptoVerify(args, parsed_globals):
|
|
98
826
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
99
827
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
828
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
829
|
+
model = models.ListDataKeyDetailRequest()
|
102
830
|
model.from_json_string(json.dumps(args))
|
103
831
|
start_time = time.time()
|
104
832
|
while True:
|
105
|
-
rsp = client.
|
833
|
+
rsp = client.ListDataKeyDetail(model)
|
106
834
|
result = rsp.to_json_string()
|
107
835
|
try:
|
108
836
|
json_obj = json.loads(result)
|
@@ -121,7 +849,7 @@ def doPostQuantumCryptoVerify(args, parsed_globals):
|
|
121
849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
850
|
|
123
851
|
|
124
|
-
def
|
852
|
+
def doGetDataKeyPlaintext(args, parsed_globals):
|
125
853
|
g_param = parse_global_arg(parsed_globals)
|
126
854
|
|
127
855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -150,11 +878,11 @@ def doEncrypt(args, parsed_globals):
|
|
150
878
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
151
879
|
client._sdkVersion += ("_CLI_" + __version__)
|
152
880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.
|
881
|
+
model = models.GetDataKeyPlaintextRequest()
|
154
882
|
model.from_json_string(json.dumps(args))
|
155
883
|
start_time = time.time()
|
156
884
|
while True:
|
157
|
-
rsp = client.
|
885
|
+
rsp = client.GetDataKeyPlaintext(model)
|
158
886
|
result = rsp.to_json_string()
|
159
887
|
try:
|
160
888
|
json_obj = json.loads(result)
|
@@ -173,7 +901,7 @@ def doEncrypt(args, parsed_globals):
|
|
173
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
902
|
|
175
903
|
|
176
|
-
def
|
904
|
+
def doAsymmetricSm2Decrypt(args, parsed_globals):
|
177
905
|
g_param = parse_global_arg(parsed_globals)
|
178
906
|
|
179
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -202,11 +930,11 @@ def doEnableWhiteBoxKeys(args, parsed_globals):
|
|
202
930
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
203
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
204
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
-
model = models.
|
933
|
+
model = models.AsymmetricSm2DecryptRequest()
|
206
934
|
model.from_json_string(json.dumps(args))
|
207
935
|
start_time = time.time()
|
208
936
|
while True:
|
209
|
-
rsp = client.
|
937
|
+
rsp = client.AsymmetricSm2Decrypt(model)
|
210
938
|
result = rsp.to_json_string()
|
211
939
|
try:
|
212
940
|
json_obj = json.loads(result)
|
@@ -225,7 +953,7 @@ def doEnableWhiteBoxKeys(args, parsed_globals):
|
|
225
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
954
|
|
227
955
|
|
228
|
-
def
|
956
|
+
def doSignByAsymmetricKey(args, parsed_globals):
|
229
957
|
g_param = parse_global_arg(parsed_globals)
|
230
958
|
|
231
959
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -254,11 +982,11 @@ def doUpdateAlias(args, parsed_globals):
|
|
254
982
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
255
983
|
client._sdkVersion += ("_CLI_" + __version__)
|
256
984
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
-
model = models.
|
985
|
+
model = models.SignByAsymmetricKeyRequest()
|
258
986
|
model.from_json_string(json.dumps(args))
|
259
987
|
start_time = time.time()
|
260
988
|
while True:
|
261
|
-
rsp = client.
|
989
|
+
rsp = client.SignByAsymmetricKey(model)
|
262
990
|
result = rsp.to_json_string()
|
263
991
|
try:
|
264
992
|
json_obj = json.loads(result)
|
@@ -277,7 +1005,7 @@ def doUpdateAlias(args, parsed_globals):
|
|
277
1005
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
1006
|
|
279
1007
|
|
280
|
-
def
|
1008
|
+
def doCancelKeyDeletion(args, parsed_globals):
|
281
1009
|
g_param = parse_global_arg(parsed_globals)
|
282
1010
|
|
283
1011
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +1034,11 @@ def doDeleteWhiteBoxKey(args, parsed_globals):
|
|
306
1034
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
307
1035
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
1036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
1037
|
+
model = models.CancelKeyDeletionRequest()
|
310
1038
|
model.from_json_string(json.dumps(args))
|
311
1039
|
start_time = time.time()
|
312
1040
|
while True:
|
313
|
-
rsp = client.
|
1041
|
+
rsp = client.CancelKeyDeletion(model)
|
314
1042
|
result = rsp.to_json_string()
|
315
1043
|
try:
|
316
1044
|
json_obj = json.loads(result)
|
@@ -329,7 +1057,7 @@ def doDeleteWhiteBoxKey(args, parsed_globals):
|
|
329
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
1058
|
|
331
1059
|
|
332
|
-
def
|
1060
|
+
def doGetKeyRotationStatus(args, parsed_globals):
|
333
1061
|
g_param = parse_global_arg(parsed_globals)
|
334
1062
|
|
335
1063
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -358,11 +1086,11 @@ def doImportKeyMaterial(args, parsed_globals):
|
|
358
1086
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
359
1087
|
client._sdkVersion += ("_CLI_" + __version__)
|
360
1088
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
-
model = models.
|
1089
|
+
model = models.GetKeyRotationStatusRequest()
|
362
1090
|
model.from_json_string(json.dumps(args))
|
363
1091
|
start_time = time.time()
|
364
1092
|
while True:
|
365
|
-
rsp = client.
|
1093
|
+
rsp = client.GetKeyRotationStatus(model)
|
366
1094
|
result = rsp.to_json_string()
|
367
1095
|
try:
|
368
1096
|
json_obj = json.loads(result)
|
@@ -381,7 +1109,7 @@ def doImportKeyMaterial(args, parsed_globals):
|
|
381
1109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
1110
|
|
383
1111
|
|
384
|
-
def
|
1112
|
+
def doScheduleDataKeyDeletion(args, parsed_globals):
|
385
1113
|
g_param = parse_global_arg(parsed_globals)
|
386
1114
|
|
387
1115
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +1138,11 @@ def doGetPublicKey(args, parsed_globals):
|
|
410
1138
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
411
1139
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
1140
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
1141
|
+
model = models.ScheduleDataKeyDeletionRequest()
|
414
1142
|
model.from_json_string(json.dumps(args))
|
415
1143
|
start_time = time.time()
|
416
1144
|
while True:
|
417
|
-
rsp = client.
|
1145
|
+
rsp = client.ScheduleDataKeyDeletion(model)
|
418
1146
|
result = rsp.to_json_string()
|
419
1147
|
try:
|
420
1148
|
json_obj = json.loads(result)
|
@@ -433,7 +1161,7 @@ def doGetPublicKey(args, parsed_globals):
|
|
433
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
1162
|
|
435
1163
|
|
436
|
-
def
|
1164
|
+
def doDescribeWhiteBoxKeyDetails(args, parsed_globals):
|
437
1165
|
g_param = parse_global_arg(parsed_globals)
|
438
1166
|
|
439
1167
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -462,11 +1190,11 @@ def doDisableKey(args, parsed_globals):
|
|
462
1190
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
463
1191
|
client._sdkVersion += ("_CLI_" + __version__)
|
464
1192
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
-
model = models.
|
1193
|
+
model = models.DescribeWhiteBoxKeyDetailsRequest()
|
466
1194
|
model.from_json_string(json.dumps(args))
|
467
1195
|
start_time = time.time()
|
468
1196
|
while True:
|
469
|
-
rsp = client.
|
1197
|
+
rsp = client.DescribeWhiteBoxKeyDetails(model)
|
470
1198
|
result = rsp.to_json_string()
|
471
1199
|
try:
|
472
1200
|
json_obj = json.loads(result)
|
@@ -485,7 +1213,7 @@ def doDisableKey(args, parsed_globals):
|
|
485
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
1214
|
|
487
1215
|
|
488
|
-
def
|
1216
|
+
def doBindCloudResource(args, parsed_globals):
|
489
1217
|
g_param = parse_global_arg(parsed_globals)
|
490
1218
|
|
491
1219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -514,11 +1242,11 @@ def doGenerateDataKey(args, parsed_globals):
|
|
514
1242
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
515
1243
|
client._sdkVersion += ("_CLI_" + __version__)
|
516
1244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
-
model = models.
|
1245
|
+
model = models.BindCloudResourceRequest()
|
518
1246
|
model.from_json_string(json.dumps(args))
|
519
1247
|
start_time = time.time()
|
520
1248
|
while True:
|
521
|
-
rsp = client.
|
1249
|
+
rsp = client.BindCloudResource(model)
|
522
1250
|
result = rsp.to_json_string()
|
523
1251
|
try:
|
524
1252
|
json_obj = json.loads(result)
|
@@ -537,7 +1265,7 @@ def doGenerateDataKey(args, parsed_globals):
|
|
537
1265
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
1266
|
|
539
1267
|
|
540
|
-
def
|
1268
|
+
def doCancelKeyArchive(args, parsed_globals):
|
541
1269
|
g_param = parse_global_arg(parsed_globals)
|
542
1270
|
|
543
1271
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -566,11 +1294,11 @@ def doAsymmetricSm2Decrypt(args, parsed_globals):
|
|
566
1294
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
567
1295
|
client._sdkVersion += ("_CLI_" + __version__)
|
568
1296
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
-
model = models.
|
1297
|
+
model = models.CancelKeyArchiveRequest()
|
570
1298
|
model.from_json_string(json.dumps(args))
|
571
1299
|
start_time = time.time()
|
572
1300
|
while True:
|
573
|
-
rsp = client.
|
1301
|
+
rsp = client.CancelKeyArchive(model)
|
574
1302
|
result = rsp.to_json_string()
|
575
1303
|
try:
|
576
1304
|
json_obj = json.loads(result)
|
@@ -589,7 +1317,7 @@ def doAsymmetricSm2Decrypt(args, parsed_globals):
|
|
589
1317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
1318
|
|
591
1319
|
|
592
|
-
def
|
1320
|
+
def doArchiveKey(args, parsed_globals):
|
593
1321
|
g_param = parse_global_arg(parsed_globals)
|
594
1322
|
|
595
1323
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +1346,11 @@ def doSignByAsymmetricKey(args, parsed_globals):
|
|
618
1346
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
619
1347
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
1348
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
1349
|
+
model = models.ArchiveKeyRequest()
|
622
1350
|
model.from_json_string(json.dumps(args))
|
623
1351
|
start_time = time.time()
|
624
1352
|
while True:
|
625
|
-
rsp = client.
|
1353
|
+
rsp = client.ArchiveKey(model)
|
626
1354
|
result = rsp.to_json_string()
|
627
1355
|
try:
|
628
1356
|
json_obj = json.loads(result)
|
@@ -641,7 +1369,7 @@ def doSignByAsymmetricKey(args, parsed_globals):
|
|
641
1369
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
1370
|
|
643
1371
|
|
644
|
-
def
|
1372
|
+
def doUpdateDataKeyDescription(args, parsed_globals):
|
645
1373
|
g_param = parse_global_arg(parsed_globals)
|
646
1374
|
|
647
1375
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -670,11 +1398,11 @@ def doCancelKeyDeletion(args, parsed_globals):
|
|
670
1398
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
671
1399
|
client._sdkVersion += ("_CLI_" + __version__)
|
672
1400
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
-
model = models.
|
1401
|
+
model = models.UpdateDataKeyDescriptionRequest()
|
674
1402
|
model.from_json_string(json.dumps(args))
|
675
1403
|
start_time = time.time()
|
676
1404
|
while True:
|
677
|
-
rsp = client.
|
1405
|
+
rsp = client.UpdateDataKeyDescription(model)
|
678
1406
|
result = rsp.to_json_string()
|
679
1407
|
try:
|
680
1408
|
json_obj = json.loads(result)
|
@@ -693,7 +1421,7 @@ def doCancelKeyDeletion(args, parsed_globals):
|
|
693
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
1422
|
|
695
1423
|
|
696
|
-
def
|
1424
|
+
def doCreateKey(args, parsed_globals):
|
697
1425
|
g_param = parse_global_arg(parsed_globals)
|
698
1426
|
|
699
1427
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +1450,11 @@ def doGetKeyRotationStatus(args, parsed_globals):
|
|
722
1450
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
723
1451
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
1452
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
1453
|
+
model = models.CreateKeyRequest()
|
726
1454
|
model.from_json_string(json.dumps(args))
|
727
1455
|
start_time = time.time()
|
728
1456
|
while True:
|
729
|
-
rsp = client.
|
1457
|
+
rsp = client.CreateKey(model)
|
730
1458
|
result = rsp.to_json_string()
|
731
1459
|
try:
|
732
1460
|
json_obj = json.loads(result)
|
@@ -745,7 +1473,7 @@ def doGetKeyRotationStatus(args, parsed_globals):
|
|
745
1473
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
1474
|
|
747
1475
|
|
748
|
-
def
|
1476
|
+
def doDisableKeys(args, parsed_globals):
|
749
1477
|
g_param = parse_global_arg(parsed_globals)
|
750
1478
|
|
751
1479
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -774,11 +1502,11 @@ def doDescribeWhiteBoxKeyDetails(args, parsed_globals):
|
|
774
1502
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
775
1503
|
client._sdkVersion += ("_CLI_" + __version__)
|
776
1504
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
-
model = models.
|
1505
|
+
model = models.DisableKeysRequest()
|
778
1506
|
model.from_json_string(json.dumps(args))
|
779
1507
|
start_time = time.time()
|
780
1508
|
while True:
|
781
|
-
rsp = client.
|
1509
|
+
rsp = client.DisableKeys(model)
|
782
1510
|
result = rsp.to_json_string()
|
783
1511
|
try:
|
784
1512
|
json_obj = json.loads(result)
|
@@ -797,7 +1525,7 @@ def doDescribeWhiteBoxKeyDetails(args, parsed_globals):
|
|
797
1525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
798
1526
|
|
799
1527
|
|
800
|
-
def
|
1528
|
+
def doCancelDataKeyDeletion(args, parsed_globals):
|
801
1529
|
g_param = parse_global_arg(parsed_globals)
|
802
1530
|
|
803
1531
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -826,11 +1554,11 @@ def doBindCloudResource(args, parsed_globals):
|
|
826
1554
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
827
1555
|
client._sdkVersion += ("_CLI_" + __version__)
|
828
1556
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
829
|
-
model = models.
|
1557
|
+
model = models.CancelDataKeyDeletionRequest()
|
830
1558
|
model.from_json_string(json.dumps(args))
|
831
1559
|
start_time = time.time()
|
832
1560
|
while True:
|
833
|
-
rsp = client.
|
1561
|
+
rsp = client.CancelDataKeyDeletion(model)
|
834
1562
|
result = rsp.to_json_string()
|
835
1563
|
try:
|
836
1564
|
json_obj = json.loads(result)
|
@@ -849,7 +1577,7 @@ def doBindCloudResource(args, parsed_globals):
|
|
849
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
1578
|
|
851
1579
|
|
852
|
-
def
|
1580
|
+
def doEncryptByWhiteBox(args, parsed_globals):
|
853
1581
|
g_param = parse_global_arg(parsed_globals)
|
854
1582
|
|
855
1583
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -878,11 +1606,11 @@ def doDisableKeys(args, parsed_globals):
|
|
878
1606
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
879
1607
|
client._sdkVersion += ("_CLI_" + __version__)
|
880
1608
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
-
model = models.
|
1609
|
+
model = models.EncryptByWhiteBoxRequest()
|
882
1610
|
model.from_json_string(json.dumps(args))
|
883
1611
|
start_time = time.time()
|
884
1612
|
while True:
|
885
|
-
rsp = client.
|
1613
|
+
rsp = client.EncryptByWhiteBox(model)
|
886
1614
|
result = rsp.to_json_string()
|
887
1615
|
try:
|
888
1616
|
json_obj = json.loads(result)
|
@@ -901,7 +1629,7 @@ def doDisableKeys(args, parsed_globals):
|
|
901
1629
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
1630
|
|
903
1631
|
|
904
|
-
def
|
1632
|
+
def doListAlgorithms(args, parsed_globals):
|
905
1633
|
g_param = parse_global_arg(parsed_globals)
|
906
1634
|
|
907
1635
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -930,11 +1658,11 @@ def doArchiveKey(args, parsed_globals):
|
|
930
1658
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
931
1659
|
client._sdkVersion += ("_CLI_" + __version__)
|
932
1660
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.
|
1661
|
+
model = models.ListAlgorithmsRequest()
|
934
1662
|
model.from_json_string(json.dumps(args))
|
935
1663
|
start_time = time.time()
|
936
1664
|
while True:
|
937
|
-
rsp = client.
|
1665
|
+
rsp = client.ListAlgorithms(model)
|
938
1666
|
result = rsp.to_json_string()
|
939
1667
|
try:
|
940
1668
|
json_obj = json.loads(result)
|
@@ -953,7 +1681,7 @@ def doArchiveKey(args, parsed_globals):
|
|
953
1681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
1682
|
|
955
1683
|
|
956
|
-
def
|
1684
|
+
def doReEncrypt(args, parsed_globals):
|
957
1685
|
g_param = parse_global_arg(parsed_globals)
|
958
1686
|
|
959
1687
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -982,11 +1710,11 @@ def doGetServiceStatus(args, parsed_globals):
|
|
982
1710
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
983
1711
|
client._sdkVersion += ("_CLI_" + __version__)
|
984
1712
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
-
model = models.
|
1713
|
+
model = models.ReEncryptRequest()
|
986
1714
|
model.from_json_string(json.dumps(args))
|
987
1715
|
start_time = time.time()
|
988
1716
|
while True:
|
989
|
-
rsp = client.
|
1717
|
+
rsp = client.ReEncrypt(model)
|
990
1718
|
result = rsp.to_json_string()
|
991
1719
|
try:
|
992
1720
|
json_obj = json.loads(result)
|
@@ -1005,7 +1733,7 @@ def doGetServiceStatus(args, parsed_globals):
|
|
1005
1733
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
1734
|
|
1007
1735
|
|
1008
|
-
def
|
1736
|
+
def doListKeys(args, parsed_globals):
|
1009
1737
|
g_param = parse_global_arg(parsed_globals)
|
1010
1738
|
|
1011
1739
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1034,11 +1762,11 @@ def doEncryptByWhiteBox(args, parsed_globals):
|
|
1034
1762
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1035
1763
|
client._sdkVersion += ("_CLI_" + __version__)
|
1036
1764
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1037
|
-
model = models.
|
1765
|
+
model = models.ListKeysRequest()
|
1038
1766
|
model.from_json_string(json.dumps(args))
|
1039
1767
|
start_time = time.time()
|
1040
1768
|
while True:
|
1041
|
-
rsp = client.
|
1769
|
+
rsp = client.ListKeys(model)
|
1042
1770
|
result = rsp.to_json_string()
|
1043
1771
|
try:
|
1044
1772
|
json_obj = json.loads(result)
|
@@ -1057,7 +1785,7 @@ def doEncryptByWhiteBox(args, parsed_globals):
|
|
1057
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
1786
|
|
1059
1787
|
|
1060
|
-
def
|
1788
|
+
def doGenerateRandom(args, parsed_globals):
|
1061
1789
|
g_param = parse_global_arg(parsed_globals)
|
1062
1790
|
|
1063
1791
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1086,11 +1814,11 @@ def doListAlgorithms(args, parsed_globals):
|
|
1086
1814
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
1815
|
client._sdkVersion += ("_CLI_" + __version__)
|
1088
1816
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
-
model = models.
|
1817
|
+
model = models.GenerateRandomRequest()
|
1090
1818
|
model.from_json_string(json.dumps(args))
|
1091
1819
|
start_time = time.time()
|
1092
1820
|
while True:
|
1093
|
-
rsp = client.
|
1821
|
+
rsp = client.GenerateRandom(model)
|
1094
1822
|
result = rsp.to_json_string()
|
1095
1823
|
try:
|
1096
1824
|
json_obj = json.loads(result)
|
@@ -1109,7 +1837,7 @@ def doListAlgorithms(args, parsed_globals):
|
|
1109
1837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1838
|
|
1111
1839
|
|
1112
|
-
def
|
1840
|
+
def doGetDataKeyCiphertextBlob(args, parsed_globals):
|
1113
1841
|
g_param = parse_global_arg(parsed_globals)
|
1114
1842
|
|
1115
1843
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1138,11 +1866,11 @@ def doReEncrypt(args, parsed_globals):
|
|
1138
1866
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
1867
|
client._sdkVersion += ("_CLI_" + __version__)
|
1140
1868
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
-
model = models.
|
1869
|
+
model = models.GetDataKeyCiphertextBlobRequest()
|
1142
1870
|
model.from_json_string(json.dumps(args))
|
1143
1871
|
start_time = time.time()
|
1144
1872
|
while True:
|
1145
|
-
rsp = client.
|
1873
|
+
rsp = client.GetDataKeyCiphertextBlob(model)
|
1146
1874
|
result = rsp.to_json_string()
|
1147
1875
|
try:
|
1148
1876
|
json_obj = json.loads(result)
|
@@ -1161,7 +1889,7 @@ def doReEncrypt(args, parsed_globals):
|
|
1161
1889
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
1890
|
|
1163
1891
|
|
1164
|
-
def
|
1892
|
+
def doPostQuantumCryptoDecrypt(args, parsed_globals):
|
1165
1893
|
g_param = parse_global_arg(parsed_globals)
|
1166
1894
|
|
1167
1895
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1190,11 +1918,11 @@ def doListKeys(args, parsed_globals):
|
|
1190
1918
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1191
1919
|
client._sdkVersion += ("_CLI_" + __version__)
|
1192
1920
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1193
|
-
model = models.
|
1921
|
+
model = models.PostQuantumCryptoDecryptRequest()
|
1194
1922
|
model.from_json_string(json.dumps(args))
|
1195
1923
|
start_time = time.time()
|
1196
1924
|
while True:
|
1197
|
-
rsp = client.
|
1925
|
+
rsp = client.PostQuantumCryptoDecrypt(model)
|
1198
1926
|
result = rsp.to_json_string()
|
1199
1927
|
try:
|
1200
1928
|
json_obj = json.loads(result)
|
@@ -1213,7 +1941,7 @@ def doListKeys(args, parsed_globals):
|
|
1213
1941
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1942
|
|
1215
1943
|
|
1216
|
-
def
|
1944
|
+
def doEnableDataKeys(args, parsed_globals):
|
1217
1945
|
g_param = parse_global_arg(parsed_globals)
|
1218
1946
|
|
1219
1947
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1242,11 +1970,11 @@ def doGenerateRandom(args, parsed_globals):
|
|
1242
1970
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
1971
|
client._sdkVersion += ("_CLI_" + __version__)
|
1244
1972
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
-
model = models.
|
1973
|
+
model = models.EnableDataKeysRequest()
|
1246
1974
|
model.from_json_string(json.dumps(args))
|
1247
1975
|
start_time = time.time()
|
1248
1976
|
while True:
|
1249
|
-
rsp = client.
|
1977
|
+
rsp = client.EnableDataKeys(model)
|
1250
1978
|
result = rsp.to_json_string()
|
1251
1979
|
try:
|
1252
1980
|
json_obj = json.loads(result)
|
@@ -1265,7 +1993,7 @@ def doGenerateRandom(args, parsed_globals):
|
|
1265
1993
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
1994
|
|
1267
1995
|
|
1268
|
-
def
|
1996
|
+
def doOverwriteWhiteBoxDeviceFingerprints(args, parsed_globals):
|
1269
1997
|
g_param = parse_global_arg(parsed_globals)
|
1270
1998
|
|
1271
1999
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1294,11 +2022,11 @@ def doPostQuantumCryptoDecrypt(args, parsed_globals):
|
|
1294
2022
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1295
2023
|
client._sdkVersion += ("_CLI_" + __version__)
|
1296
2024
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1297
|
-
model = models.
|
2025
|
+
model = models.OverwriteWhiteBoxDeviceFingerprintsRequest()
|
1298
2026
|
model.from_json_string(json.dumps(args))
|
1299
2027
|
start_time = time.time()
|
1300
2028
|
while True:
|
1301
|
-
rsp = client.
|
2029
|
+
rsp = client.OverwriteWhiteBoxDeviceFingerprints(model)
|
1302
2030
|
result = rsp.to_json_string()
|
1303
2031
|
try:
|
1304
2032
|
json_obj = json.loads(result)
|
@@ -1317,7 +2045,7 @@ def doPostQuantumCryptoDecrypt(args, parsed_globals):
|
|
1317
2045
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1318
2046
|
|
1319
2047
|
|
1320
|
-
def
|
2048
|
+
def doUpdateDataKeyName(args, parsed_globals):
|
1321
2049
|
g_param = parse_global_arg(parsed_globals)
|
1322
2050
|
|
1323
2051
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1346,11 +2074,11 @@ def doOverwriteWhiteBoxDeviceFingerprints(args, parsed_globals):
|
|
1346
2074
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1347
2075
|
client._sdkVersion += ("_CLI_" + __version__)
|
1348
2076
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1349
|
-
model = models.
|
2077
|
+
model = models.UpdateDataKeyNameRequest()
|
1350
2078
|
model.from_json_string(json.dumps(args))
|
1351
2079
|
start_time = time.time()
|
1352
2080
|
while True:
|
1353
|
-
rsp = client.
|
2081
|
+
rsp = client.UpdateDataKeyName(model)
|
1354
2082
|
result = rsp.to_json_string()
|
1355
2083
|
try:
|
1356
2084
|
json_obj = json.loads(result)
|
@@ -1369,7 +2097,7 @@ def doOverwriteWhiteBoxDeviceFingerprints(args, parsed_globals):
|
|
1369
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
2098
|
|
1371
2099
|
|
1372
|
-
def
|
2100
|
+
def doDescribeWhiteBoxKey(args, parsed_globals):
|
1373
2101
|
g_param = parse_global_arg(parsed_globals)
|
1374
2102
|
|
1375
2103
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1398,11 +2126,11 @@ def doCreateKey(args, parsed_globals):
|
|
1398
2126
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1399
2127
|
client._sdkVersion += ("_CLI_" + __version__)
|
1400
2128
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1401
|
-
model = models.
|
2129
|
+
model = models.DescribeWhiteBoxKeyRequest()
|
1402
2130
|
model.from_json_string(json.dumps(args))
|
1403
2131
|
start_time = time.time()
|
1404
2132
|
while True:
|
1405
|
-
rsp = client.
|
2133
|
+
rsp = client.DescribeWhiteBoxKey(model)
|
1406
2134
|
result = rsp.to_json_string()
|
1407
2135
|
try:
|
1408
2136
|
json_obj = json.loads(result)
|
@@ -1421,7 +2149,7 @@ def doCreateKey(args, parsed_globals):
|
|
1421
2149
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
2150
|
|
1423
2151
|
|
1424
|
-
def
|
2152
|
+
def doGetParametersForImport(args, parsed_globals):
|
1425
2153
|
g_param = parse_global_arg(parsed_globals)
|
1426
2154
|
|
1427
2155
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1450,11 +2178,11 @@ def doDescribeWhiteBoxKey(args, parsed_globals):
|
|
1450
2178
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
2179
|
client._sdkVersion += ("_CLI_" + __version__)
|
1452
2180
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
-
model = models.
|
2181
|
+
model = models.GetParametersForImportRequest()
|
1454
2182
|
model.from_json_string(json.dumps(args))
|
1455
2183
|
start_time = time.time()
|
1456
2184
|
while True:
|
1457
|
-
rsp = client.
|
2185
|
+
rsp = client.GetParametersForImport(model)
|
1458
2186
|
result = rsp.to_json_string()
|
1459
2187
|
try:
|
1460
2188
|
json_obj = json.loads(result)
|
@@ -1473,7 +2201,7 @@ def doDescribeWhiteBoxKey(args, parsed_globals):
|
|
1473
2201
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1474
2202
|
|
1475
2203
|
|
1476
|
-
def
|
2204
|
+
def doDisableWhiteBoxKeys(args, parsed_globals):
|
1477
2205
|
g_param = parse_global_arg(parsed_globals)
|
1478
2206
|
|
1479
2207
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1502,11 +2230,11 @@ def doGetParametersForImport(args, parsed_globals):
|
|
1502
2230
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1503
2231
|
client._sdkVersion += ("_CLI_" + __version__)
|
1504
2232
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1505
|
-
model = models.
|
2233
|
+
model = models.DisableWhiteBoxKeysRequest()
|
1506
2234
|
model.from_json_string(json.dumps(args))
|
1507
2235
|
start_time = time.time()
|
1508
2236
|
while True:
|
1509
|
-
rsp = client.
|
2237
|
+
rsp = client.DisableWhiteBoxKeys(model)
|
1510
2238
|
result = rsp.to_json_string()
|
1511
2239
|
try:
|
1512
2240
|
json_obj = json.loads(result)
|
@@ -1525,7 +2253,7 @@ def doGetParametersForImport(args, parsed_globals):
|
|
1525
2253
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
2254
|
|
1527
2255
|
|
1528
|
-
def
|
2256
|
+
def doDisableDataKey(args, parsed_globals):
|
1529
2257
|
g_param = parse_global_arg(parsed_globals)
|
1530
2258
|
|
1531
2259
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1554,11 +2282,11 @@ def doDisableWhiteBoxKeys(args, parsed_globals):
|
|
1554
2282
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1555
2283
|
client._sdkVersion += ("_CLI_" + __version__)
|
1556
2284
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1557
|
-
model = models.
|
2285
|
+
model = models.DisableDataKeyRequest()
|
1558
2286
|
model.from_json_string(json.dumps(args))
|
1559
2287
|
start_time = time.time()
|
1560
2288
|
while True:
|
1561
|
-
rsp = client.
|
2289
|
+
rsp = client.DisableDataKey(model)
|
1562
2290
|
result = rsp.to_json_string()
|
1563
2291
|
try:
|
1564
2292
|
json_obj = json.loads(result)
|
@@ -1577,7 +2305,7 @@ def doDisableWhiteBoxKeys(args, parsed_globals):
|
|
1577
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
2306
|
|
1579
2307
|
|
1580
|
-
def
|
2308
|
+
def doDescribeDataKeys(args, parsed_globals):
|
1581
2309
|
g_param = parse_global_arg(parsed_globals)
|
1582
2310
|
|
1583
2311
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1606,11 +2334,11 @@ def doListKeyDetail(args, parsed_globals):
|
|
1606
2334
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
2335
|
client._sdkVersion += ("_CLI_" + __version__)
|
1608
2336
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
-
model = models.
|
2337
|
+
model = models.DescribeDataKeysRequest()
|
1610
2338
|
model.from_json_string(json.dumps(args))
|
1611
2339
|
start_time = time.time()
|
1612
2340
|
while True:
|
1613
|
-
rsp = client.
|
2341
|
+
rsp = client.DescribeDataKeys(model)
|
1614
2342
|
result = rsp.to_json_string()
|
1615
2343
|
try:
|
1616
2344
|
json_obj = json.loads(result)
|
@@ -1629,7 +2357,7 @@ def doListKeyDetail(args, parsed_globals):
|
|
1629
2357
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
2358
|
|
1631
2359
|
|
1632
|
-
def
|
2360
|
+
def doDisableKeyRotation(args, parsed_globals):
|
1633
2361
|
g_param = parse_global_arg(parsed_globals)
|
1634
2362
|
|
1635
2363
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1658,11 +2386,11 @@ def doAsymmetricRsaDecrypt(args, parsed_globals):
|
|
1658
2386
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1659
2387
|
client._sdkVersion += ("_CLI_" + __version__)
|
1660
2388
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1661
|
-
model = models.
|
2389
|
+
model = models.DisableKeyRotationRequest()
|
1662
2390
|
model.from_json_string(json.dumps(args))
|
1663
2391
|
start_time = time.time()
|
1664
2392
|
while True:
|
1665
|
-
rsp = client.
|
2393
|
+
rsp = client.DisableKeyRotation(model)
|
1666
2394
|
result = rsp.to_json_string()
|
1667
2395
|
try:
|
1668
2396
|
json_obj = json.loads(result)
|
@@ -1681,7 +2409,7 @@ def doAsymmetricRsaDecrypt(args, parsed_globals):
|
|
1681
2409
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1682
2410
|
|
1683
2411
|
|
1684
|
-
def
|
2412
|
+
def doListKeyDetail(args, parsed_globals):
|
1685
2413
|
g_param = parse_global_arg(parsed_globals)
|
1686
2414
|
|
1687
2415
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1710,11 +2438,11 @@ def doDisableKeyRotation(args, parsed_globals):
|
|
1710
2438
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
1711
2439
|
client._sdkVersion += ("_CLI_" + __version__)
|
1712
2440
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1713
|
-
model = models.
|
2441
|
+
model = models.ListKeyDetailRequest()
|
1714
2442
|
model.from_json_string(json.dumps(args))
|
1715
2443
|
start_time = time.time()
|
1716
2444
|
while True:
|
1717
|
-
rsp = client.
|
2445
|
+
rsp = client.ListKeyDetail(model)
|
1718
2446
|
result = rsp.to_json_string()
|
1719
2447
|
try:
|
1720
2448
|
json_obj = json.loads(result)
|
@@ -2045,7 +2773,7 @@ def doUnbindCloudResource(args, parsed_globals):
|
|
2045
2773
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2046
2774
|
|
2047
2775
|
|
2048
|
-
def
|
2776
|
+
def doPostQuantumCryptoEncrypt(args, parsed_globals):
|
2049
2777
|
g_param = parse_global_arg(parsed_globals)
|
2050
2778
|
|
2051
2779
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2074,11 +2802,11 @@ def doEnableKeyRotation(args, parsed_globals):
|
|
2074
2802
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
2075
2803
|
client._sdkVersion += ("_CLI_" + __version__)
|
2076
2804
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2077
|
-
model = models.
|
2805
|
+
model = models.PostQuantumCryptoEncryptRequest()
|
2078
2806
|
model.from_json_string(json.dumps(args))
|
2079
2807
|
start_time = time.time()
|
2080
2808
|
while True:
|
2081
|
-
rsp = client.
|
2809
|
+
rsp = client.PostQuantumCryptoEncrypt(model)
|
2082
2810
|
result = rsp.to_json_string()
|
2083
2811
|
try:
|
2084
2812
|
json_obj = json.loads(result)
|
@@ -2097,7 +2825,7 @@ def doEnableKeyRotation(args, parsed_globals):
|
|
2097
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
2826
|
|
2099
2827
|
|
2100
|
-
def
|
2828
|
+
def doVerifyByAsymmetricKey(args, parsed_globals):
|
2101
2829
|
g_param = parse_global_arg(parsed_globals)
|
2102
2830
|
|
2103
2831
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2126,11 +2854,11 @@ def doCreateWhiteBoxKey(args, parsed_globals):
|
|
2126
2854
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
2855
|
client._sdkVersion += ("_CLI_" + __version__)
|
2128
2856
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
-
model = models.
|
2857
|
+
model = models.VerifyByAsymmetricKeyRequest()
|
2130
2858
|
model.from_json_string(json.dumps(args))
|
2131
2859
|
start_time = time.time()
|
2132
2860
|
while True:
|
2133
|
-
rsp = client.
|
2861
|
+
rsp = client.VerifyByAsymmetricKey(model)
|
2134
2862
|
result = rsp.to_json_string()
|
2135
2863
|
try:
|
2136
2864
|
json_obj = json.loads(result)
|
@@ -2149,7 +2877,7 @@ def doCreateWhiteBoxKey(args, parsed_globals):
|
|
2149
2877
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
2878
|
|
2151
2879
|
|
2152
|
-
def
|
2880
|
+
def doEnableDataKey(args, parsed_globals):
|
2153
2881
|
g_param = parse_global_arg(parsed_globals)
|
2154
2882
|
|
2155
2883
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2178,11 +2906,11 @@ def doPostQuantumCryptoEncrypt(args, parsed_globals):
|
|
2178
2906
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
2179
2907
|
client._sdkVersion += ("_CLI_" + __version__)
|
2180
2908
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2181
|
-
model = models.
|
2909
|
+
model = models.EnableDataKeyRequest()
|
2182
2910
|
model.from_json_string(json.dumps(args))
|
2183
2911
|
start_time = time.time()
|
2184
2912
|
while True:
|
2185
|
-
rsp = client.
|
2913
|
+
rsp = client.EnableDataKey(model)
|
2186
2914
|
result = rsp.to_json_string()
|
2187
2915
|
try:
|
2188
2916
|
json_obj = json.loads(result)
|
@@ -2513,7 +3241,7 @@ def doUpdateKeyDescription(args, parsed_globals):
|
|
2513
3241
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
3242
|
|
2515
3243
|
|
2516
|
-
def
|
3244
|
+
def doGetServiceStatus(args, parsed_globals):
|
2517
3245
|
g_param = parse_global_arg(parsed_globals)
|
2518
3246
|
|
2519
3247
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2542,11 +3270,11 @@ def doCancelKeyArchive(args, parsed_globals):
|
|
2542
3270
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
2543
3271
|
client._sdkVersion += ("_CLI_" + __version__)
|
2544
3272
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2545
|
-
model = models.
|
3273
|
+
model = models.GetServiceStatusRequest()
|
2546
3274
|
model.from_json_string(json.dumps(args))
|
2547
3275
|
start_time = time.time()
|
2548
3276
|
while True:
|
2549
|
-
rsp = client.
|
3277
|
+
rsp = client.GetServiceStatus(model)
|
2550
3278
|
result = rsp.to_json_string()
|
2551
3279
|
try:
|
2552
3280
|
json_obj = json.loads(result)
|
@@ -2721,7 +3449,7 @@ def doGetRegions(args, parsed_globals):
|
|
2721
3449
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2722
3450
|
|
2723
3451
|
|
2724
|
-
def
|
3452
|
+
def doEnableKeyRotation(args, parsed_globals):
|
2725
3453
|
g_param = parse_global_arg(parsed_globals)
|
2726
3454
|
|
2727
3455
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2750,11 +3478,63 @@ def doVerifyByAsymmetricKey(args, parsed_globals):
|
|
2750
3478
|
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
2751
3479
|
client._sdkVersion += ("_CLI_" + __version__)
|
2752
3480
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2753
|
-
model = models.
|
3481
|
+
model = models.EnableKeyRotationRequest()
|
2754
3482
|
model.from_json_string(json.dumps(args))
|
2755
3483
|
start_time = time.time()
|
2756
3484
|
while True:
|
2757
|
-
rsp = client.
|
3485
|
+
rsp = client.EnableKeyRotation(model)
|
3486
|
+
result = rsp.to_json_string()
|
3487
|
+
try:
|
3488
|
+
json_obj = json.loads(result)
|
3489
|
+
except TypeError as e:
|
3490
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3491
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3492
|
+
break
|
3493
|
+
cur_time = time.time()
|
3494
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3495
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3496
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3497
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3498
|
+
else:
|
3499
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3500
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3501
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3502
|
+
|
3503
|
+
|
3504
|
+
def doDisableDataKeys(args, parsed_globals):
|
3505
|
+
g_param = parse_global_arg(parsed_globals)
|
3506
|
+
|
3507
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3508
|
+
cred = credential.CVMRoleCredential()
|
3509
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3510
|
+
cred = credential.STSAssumeRoleCredential(
|
3511
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3512
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3513
|
+
)
|
3514
|
+
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):
|
3515
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3516
|
+
else:
|
3517
|
+
cred = credential.Credential(
|
3518
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3519
|
+
)
|
3520
|
+
http_profile = HttpProfile(
|
3521
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3522
|
+
reqMethod="POST",
|
3523
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3524
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3525
|
+
)
|
3526
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3527
|
+
if g_param[OptionsDefine.Language]:
|
3528
|
+
profile.language = g_param[OptionsDefine.Language]
|
3529
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3530
|
+
client = mod.KmsClient(cred, g_param[OptionsDefine.Region], profile)
|
3531
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3532
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3533
|
+
model = models.DisableDataKeysRequest()
|
3534
|
+
model.from_json_string(json.dumps(args))
|
3535
|
+
start_time = time.time()
|
3536
|
+
while True:
|
3537
|
+
rsp = client.DisableDataKeys(model)
|
2758
3538
|
result = rsp.to_json_string()
|
2759
3539
|
try:
|
2760
3540
|
json_obj = json.loads(result)
|
@@ -2784,59 +3564,74 @@ MODELS_MAP = {
|
|
2784
3564
|
}
|
2785
3565
|
|
2786
3566
|
ACTION_MAP = {
|
3567
|
+
"ListDataKeys": doListDataKeys,
|
2787
3568
|
"DeleteImportedKeyMaterial": doDeleteImportedKeyMaterial,
|
2788
3569
|
"PostQuantumCryptoVerify": doPostQuantumCryptoVerify,
|
3570
|
+
"AsymmetricRsaDecrypt": doAsymmetricRsaDecrypt,
|
2789
3571
|
"Encrypt": doEncrypt,
|
3572
|
+
"CreateWhiteBoxKey": doCreateWhiteBoxKey,
|
3573
|
+
"ImportDataKey": doImportDataKey,
|
2790
3574
|
"EnableWhiteBoxKeys": doEnableWhiteBoxKeys,
|
2791
3575
|
"UpdateAlias": doUpdateAlias,
|
2792
3576
|
"DeleteWhiteBoxKey": doDeleteWhiteBoxKey,
|
2793
3577
|
"ImportKeyMaterial": doImportKeyMaterial,
|
3578
|
+
"DescribeDataKey": doDescribeDataKey,
|
2794
3579
|
"GetPublicKey": doGetPublicKey,
|
2795
3580
|
"DisableKey": doDisableKey,
|
2796
3581
|
"GenerateDataKey": doGenerateDataKey,
|
3582
|
+
"ListDataKeyDetail": doListDataKeyDetail,
|
3583
|
+
"GetDataKeyPlaintext": doGetDataKeyPlaintext,
|
2797
3584
|
"AsymmetricSm2Decrypt": doAsymmetricSm2Decrypt,
|
2798
3585
|
"SignByAsymmetricKey": doSignByAsymmetricKey,
|
2799
3586
|
"CancelKeyDeletion": doCancelKeyDeletion,
|
2800
3587
|
"GetKeyRotationStatus": doGetKeyRotationStatus,
|
3588
|
+
"ScheduleDataKeyDeletion": doScheduleDataKeyDeletion,
|
2801
3589
|
"DescribeWhiteBoxKeyDetails": doDescribeWhiteBoxKeyDetails,
|
2802
3590
|
"BindCloudResource": doBindCloudResource,
|
2803
|
-
"
|
3591
|
+
"CancelKeyArchive": doCancelKeyArchive,
|
2804
3592
|
"ArchiveKey": doArchiveKey,
|
2805
|
-
"
|
3593
|
+
"UpdateDataKeyDescription": doUpdateDataKeyDescription,
|
3594
|
+
"CreateKey": doCreateKey,
|
3595
|
+
"DisableKeys": doDisableKeys,
|
3596
|
+
"CancelDataKeyDeletion": doCancelDataKeyDeletion,
|
2806
3597
|
"EncryptByWhiteBox": doEncryptByWhiteBox,
|
2807
3598
|
"ListAlgorithms": doListAlgorithms,
|
2808
3599
|
"ReEncrypt": doReEncrypt,
|
2809
3600
|
"ListKeys": doListKeys,
|
2810
3601
|
"GenerateRandom": doGenerateRandom,
|
3602
|
+
"GetDataKeyCiphertextBlob": doGetDataKeyCiphertextBlob,
|
2811
3603
|
"PostQuantumCryptoDecrypt": doPostQuantumCryptoDecrypt,
|
3604
|
+
"EnableDataKeys": doEnableDataKeys,
|
2812
3605
|
"OverwriteWhiteBoxDeviceFingerprints": doOverwriteWhiteBoxDeviceFingerprints,
|
2813
|
-
"
|
3606
|
+
"UpdateDataKeyName": doUpdateDataKeyName,
|
2814
3607
|
"DescribeWhiteBoxKey": doDescribeWhiteBoxKey,
|
2815
3608
|
"GetParametersForImport": doGetParametersForImport,
|
2816
3609
|
"DisableWhiteBoxKeys": doDisableWhiteBoxKeys,
|
2817
|
-
"
|
2818
|
-
"
|
3610
|
+
"DisableDataKey": doDisableDataKey,
|
3611
|
+
"DescribeDataKeys": doDescribeDataKeys,
|
2819
3612
|
"DisableKeyRotation": doDisableKeyRotation,
|
3613
|
+
"ListKeyDetail": doListKeyDetail,
|
2820
3614
|
"DisableWhiteBoxKey": doDisableWhiteBoxKey,
|
2821
3615
|
"EnableKeys": doEnableKeys,
|
2822
3616
|
"ScheduleKeyDeletion": doScheduleKeyDeletion,
|
2823
3617
|
"DescribeWhiteBoxDeviceFingerprints": doDescribeWhiteBoxDeviceFingerprints,
|
2824
3618
|
"DescribeKey": doDescribeKey,
|
2825
3619
|
"UnbindCloudResource": doUnbindCloudResource,
|
2826
|
-
"EnableKeyRotation": doEnableKeyRotation,
|
2827
|
-
"CreateWhiteBoxKey": doCreateWhiteBoxKey,
|
2828
3620
|
"PostQuantumCryptoEncrypt": doPostQuantumCryptoEncrypt,
|
3621
|
+
"VerifyByAsymmetricKey": doVerifyByAsymmetricKey,
|
3622
|
+
"EnableDataKey": doEnableDataKey,
|
2829
3623
|
"EnableWhiteBoxKey": doEnableWhiteBoxKey,
|
2830
3624
|
"EnableKey": doEnableKey,
|
2831
3625
|
"Decrypt": doDecrypt,
|
2832
3626
|
"DescribeKeys": doDescribeKeys,
|
2833
3627
|
"DescribeWhiteBoxServiceStatus": doDescribeWhiteBoxServiceStatus,
|
2834
3628
|
"UpdateKeyDescription": doUpdateKeyDescription,
|
2835
|
-
"
|
3629
|
+
"GetServiceStatus": doGetServiceStatus,
|
2836
3630
|
"DescribeWhiteBoxDecryptKey": doDescribeWhiteBoxDecryptKey,
|
2837
3631
|
"PostQuantumCryptoSign": doPostQuantumCryptoSign,
|
2838
3632
|
"GetRegions": doGetRegions,
|
2839
|
-
"
|
3633
|
+
"EnableKeyRotation": doEnableKeyRotation,
|
3634
|
+
"DisableDataKeys": doDisableDataKeys,
|
2840
3635
|
|
2841
3636
|
}
|
2842
3637
|
|