UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

30 lines 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InstanceProfilesSync = void 0; const client_iam_1 = require("@aws-sdk/client-iam"); const typedSync_js_1 = require("../typedSync.js"); exports.InstanceProfilesSync = (0, typedSync_js_1.createTypedSyncOperation)('iam', 'instanceprofiles', (0, typedSync_js_1.createResourceSyncType)({ client: client_iam_1.IAMClient, command: client_iam_1.ListInstanceProfilesCommand, key: 'InstanceProfiles', paginationConfig: { inputKey: 'Marker', outputKey: 'Marker' }, arn: (profile) => profile.Arn, tags: (profile) => profile.Tags, resourceTypeParts: (account, region) => ({ service: 'iam', account, resourceType: 'instance-profile' }), results: (profile) => ({ metadata: { name: profile.Path, roles: profile.Roles?.map((role) => role.Arn), id: profile.InstanceProfileId, path: profile.Path } }) })); //# sourceMappingURL=instanceProfiles.js.map