Skip to content

Commit 36698b0

Browse files
committed
feat(IAM Identity): add support for limits/cross account
Signed-off-by: Hari K Arla <hariarla@in.ibm.com>
1 parent bc34b00 commit 36698b0

File tree

4 files changed

+2861
-263
lines changed

4 files changed

+2861
-263
lines changed

examples/test_iam_identity_v1_examples.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,6 +2082,59 @@ def test_delete_profile_example(self):
20822082
except ApiException as e:
20832083
pytest.fail(str(e))
20842084

2085+
@needscredentials
2086+
def test_get_account_limits_example(self):
2087+
"""
2088+
get_account_limits request example
2089+
"""
2090+
try:
2091+
print('\nget_account_limits() result:')
2092+
2093+
# begin-getAccountLimits
2094+
2095+
response = iam_identity_service.get_account_limits(
2096+
account_id=account_id,
2097+
)
2098+
identity_limits_usage_response = response.get_result()
2099+
2100+
print(json.dumps(identity_limits_usage_response, indent=2))
2101+
2102+
# end-getAccountLimits
2103+
2104+
except ApiException as e:
2105+
pytest.fail(str(e))
2106+
2107+
@needscredentials
2108+
def test_bulk_list_account_entity_consumption_example(self):
2109+
"""
2110+
bulk_list_account_entity_consumption request example
2111+
"""
2112+
try:
2113+
print('\nbulk_list_account_entity_consumption() result:')
2114+
2115+
# begin-bulkListAccountEntityConsumption
2116+
2117+
response = iam_identity_service.bulk_list_account_entity_consumption(
2118+
account_id=account_id,
2119+
serviceid_groups=True,
2120+
serviceids_per_group=['ServiceIdGroup-12345678-1234-1234-1234-123456789abc'],
2121+
profiles=True,
2122+
apikeys_per_identity=['iam-ServiceId-12345678-1234-1234-1234-123456789def'],
2123+
templates=True,
2124+
template_versions_per_template=['AccountSettingsTemplate-12345678-1234-1234-1234-123456789abc'],
2125+
idps=True,
2126+
claim_rules_per_group=['AccessGroupId-12345678-1234-1234-1234-123456789abc'],
2127+
)
2128+
identity_limits_usage_response = response.get_result()
2129+
2130+
print(json.dumps(identity_limits_usage_response, indent=2))
2131+
2132+
# end-bulkListAccountEntityConsumption
2133+
2134+
except ApiException as e:
2135+
pytest.fail(str(e))
2136+
2137+
20852138

20862139
# endregion
20872140
##############################################################################

0 commit comments

Comments
 (0)