Skip to content

Commit 9f61823

Browse files
committed
fix(IAM Identity): add delete link with parameter api
Signed-off-by: Somanath Chavan <somanath.chavan@ibm.com>
1 parent 8c3f76e commit 9f61823

File tree

4 files changed

+494
-437
lines changed

4 files changed

+494
-437
lines changed

examples/test_iam_identity_v1_examples.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,33 @@ def test_delete_link_example(self):
897897
except ApiException as e:
898898
pytest.fail(str(e))
899899

900+
@needscredentials
901+
def test_delete_link_by_parameters_example(self):
902+
"""
903+
delete_link_by_parameters request example
904+
"""
905+
CreateProfileLinkRequestLink = {}
906+
CreateProfileLinkRequestLink['crn'] = (
907+
'crn:v1:staging:public:iam-identity::a/' + account_id + '::computeresource:Fake-Compute-Resource'
908+
)
909+
CreateProfileLinkRequestLink['component_name'] = 'component_name'
910+
CreateProfileLinkRequestLink['component_type'] = 'test_componenet_type'
911+
link = iam_identity_service.create_link(
912+
profile_id=profile_id, name='Great link', cr_type='CE', link=CreateProfileLinkRequestLink
913+
).get_result()
914+
print(json.dumps(link, indent=2))
915+
916+
try:
917+
# begin-delete_link_by_parameters
918+
919+
response = iam_identity_service.delete_link_by_parameters(profile_id=profile_id, type='CE', crn=CreateProfileLinkRequestLink['crn'], component_name='test_componenet_name', component_type='test_componenet_type')
920+
921+
# end-delete_link_by_parameters
922+
print('\ndelete_link_by_parameters() response status code: ', response.get_status_code())
923+
924+
except ApiException as e:
925+
pytest.fail(str(e))
926+
900927
@needscredentials
901928
def test_get_profile_identities(self):
902929
"""

0 commit comments

Comments
 (0)