UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

57 lines 2.74 kB
import { type Account, type Organization, type OrganizationalUnit, OrganizationsClient, type Root } from '@aws-sdk/client-organizations'; import { type Sync } from '../sync.js'; export declare const OrganizationSync: Sync; /** * Get the details of an organization or an account. * * @param client The OrganizationsClient to use * @returns the details of the organization the account belongs to or undefined if the account is not part of an organization or does not have permission. */ export declare function getOrganizationDetails(client: OrganizationsClient): Promise<Organization | undefined>; /** * Get the root Organizational Unit for an organization * * @param client The OrganizationsClient to use * @returns the root Organizational Unit for the organization if it exists */ export declare function getOrganizationRoot(client: OrganizationsClient): Promise<Root | undefined>; /** * Get the delegated administrators for an organization * * @param client The OrganizationsClient to use * @param organizationArn The ARN of the organization * @returns a map of service principals to account IDs that are delegated administrators for those services */ export declare function getDelegatedAdministrators(client: OrganizationsClient, organizationArn: string): Promise<Record<string, string[]>>; /** * Get the tags for an Organizational Unit * * @param client The OrganizationsClient to use * @param ouId The AWS id of the Organizational Unit to get the tags for * @returns The tags for the Organizational Unit */ export declare function getTagsForOu(client: OrganizationsClient, ouId: string): Promise<Record<string, string> | undefined>; /** * Get the tags for an account * @param client The OrganizationsClient to use * @param accountId The AWS id of the account to get the tags for * @returns The tags for the account */ export declare function getTagsForAccount(client: OrganizationsClient, accountId: string): Promise<Record<string, string> | undefined>; /** * Get the organizational units for a parent organizational unit * * @param client The OrganizationsClient to use * @param parentId The AWS id of the parent organizational unit * @returns The organizational units directly under the parent */ export declare function getChildOrgUnits(client: OrganizationsClient, parentId: string): Promise<OrganizationalUnit[]>; /** * Get the accounts for a parent organizational unit * * @param client The OrganizationsClient to use * @param parentId The AWS id of the parent organizational unit * @returns The accounts directly under the parent */ export declare function getAccountsForParent(client: OrganizationsClient, parentId: string): Promise<Account[]>; //# sourceMappingURL=organizations.d.ts.map