UNPKG

aws-iam-managed-policies

Version:

Provides AWS IAM Managed Policies historical data as a convenient npm package that can be used in other OSS projects.

44 lines (43 loc) 2.14 kB
import { ManagedPolicies, ManagedPolicy } from '../src/types'; /** * Retrieve a list of all included IAM Managed Polcies. * @returns {Array} An array of IAM Managed Policy names. */ export declare const listPolicies: () => string[]; /** * Get the number of included IAM Managed Polcies. * @returns {number} The count of IAM Managed Policies. */ export declare const getPolicyCount: () => number; /** * Get the IAM Managed Policy by name with the full version history * @param {string} policyName The IAM Managed Policy name. * @returns {object} The IAM Managed Policy if found. * @throws Will throw an error if not found by the name. */ export declare const getPolicyByName: (policyName: string) => ManagedPolicy; /** * Get the latest policy document for a IAM Managed Policy by name * @param {string} policyName The IAM Managed Policy name. * @returns {object} The IAM Managed Policy document if found. * @throws Will throw an error if not found by the name. */ export declare const getLatestPolicyDocument: (policyName: string) => object; /** * Get the latest policy document for a IAM Managed Policy by name * @param {string} policyName The IAM Managed Policy name. * @param {number} policyVersion The version id of the IAM Managed Policy. * @returns {object} The IAM Managed Policy document if found. * @throws Will throw an error if not found by the name. */ export declare const getPolicyDocumentByVersion: (policyName: string, policyVersion: number) => object; /** * Get a diff of the policy documents for two versions of a IAM Managed Policy * @param {string} policyName The IAM Managed Policy name. * @param {number} oldPolicyVersion The old version id of the IAM Managed Policy. * @param {number} newPolicyVersion The new version id of the IAM Managed Policy. * @returns {object} The diff of the IAM Managed Policy document versions if found. * @throws Will throw an error if not found by the name or the respective policy document versions. */ export declare const getPolicyDiffByVersions: (policyName: string, oldPolicyVersion: number, newPolicyVersion: number) => object; export { ManagedPolicies, };