Skip to content

Commit b0b0ea8

Browse files
authored
feat(IAM Identity): add disable_api_key and enable_api_key operations (#248)
Signed-off-by: Somanath Chavan <[email protected]>
1 parent 8ddcf7f commit b0b0ea8

File tree

4 files changed

+1749
-1352
lines changed

4 files changed

+1749
-1352
lines changed

examples/test_iam_identity_v1_examples.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,39 @@ def test_unlock_api_key_example(self):
317317
except ApiException as e:
318318
pytest.fail(str(e))
319319

320+
@needscredentials
321+
def test_disable_api_key_example(self):
322+
"""
323+
disable_api_key request example
324+
"""
325+
try:
326+
# begin-disable_api_key
327+
328+
response = iam_identity_service.disable_api_key(id=apikey_id)
329+
330+
# end-disable_api_key
331+
print('\nlock_api_key() response status code: ', response.get_status_code())
332+
333+
except ApiException as e:
334+
pytest.fail(str(e))
335+
336+
@needscredentials
337+
def test_enable_api_key_example(self):
338+
"""
339+
enable_api_key request example
340+
"""
341+
try:
342+
# begin-enable_api_key
343+
344+
response = iam_identity_service.enable_api_key(id=apikey_id)
345+
346+
# end-enable_api_key
347+
348+
print('\nunlock_api_key() response status code: ', response.get_status_code())
349+
350+
except ApiException as e:
351+
pytest.fail(str(e))
352+
320353
@needscredentials
321354
def test_delete_api_key_example(self):
322355
"""

0 commit comments

Comments
 (0)