Skip to content

Commit a6b6941

Browse files
authored
feat(IAM Identity): add support for limits/cross account (#332)
Signed-off-by: Hari K Arla <hariarla@in.ibm.com>
1 parent 4653b45 commit a6b6941

File tree

4 files changed

+855
-48
lines changed

4 files changed

+855
-48
lines changed

examples/iam-identity.v1.test.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,6 +2751,66 @@ test('createApiKey request example', async () => {
27512751
// end-delete_profile
27522752
});
27532753

2754+
test('getAccountLimits request example', async () => {
2755+
consoleLogMock.mockImplementation((output) => {
2756+
originalLog(output);
2757+
});
2758+
consoleWarnMock.mockImplementation((output) => {
2759+
// if an error occurs, display the message and then fail the test
2760+
originalWarn(output);
2761+
expect(true).toBeFalsy();
2762+
});
2763+
2764+
originalLog('getAccountLimits() result:');
2765+
// begin-getAccountLimits
2766+
2767+
const params = {
2768+
accountId: accountId,
2769+
};
2770+
2771+
let res;
2772+
try {
2773+
res = await iamIdentityService.getAccountLimits(params);
2774+
console.log(JSON.stringify(res.result, null, 2));
2775+
} catch (err) {
2776+
console.warn(err);
2777+
}
2778+
2779+
// end-getAccountLimits
2780+
});
2781+
2782+
test('bulkListAccountEntityConsumption request example', async () => {
2783+
consoleLogMock.mockImplementation((output) => {
2784+
originalLog(output);
2785+
});
2786+
consoleWarnMock.mockImplementation((output) => {
2787+
// if an error occurs, display the message and then fail the test
2788+
originalWarn(output);
2789+
expect(true).toBeFalsy();
2790+
});
2791+
2792+
originalLog('bulkListAccountEntityConsumption() result:');
2793+
// begin-bulkListAccountEntityConsumption
2794+
2795+
const params = {
2796+
accountId: accountId,
2797+
serviceidGroups: true,
2798+
profiles: true,
2799+
templates: true,
2800+
idps: true,
2801+
};
2802+
2803+
let res;
2804+
try {
2805+
res = await iamIdentityService.bulkListAccountEntityConsumption(params);
2806+
console.log(JSON.stringify(res.result, null, 2));
2807+
} catch (err) {
2808+
console.warn(err);
2809+
}
2810+
2811+
// end-bulkListAccountEntityConsumption
2812+
});
2813+
27542814
function isFinishedEx(status) {
27552815
return ("succeeded" === status.toLowerCase() || "failed" === status.toLowerCase());
27562816
}

0 commit comments

Comments
 (0)