UNPKG

@cloud-copilot/iam-simulate

Version:
37 lines 1.48 kB
import { Action, Statement } from '@cloud-copilot/iam-policy'; import { ActionExplain, StatementExplain } from '../explain/statementExplain.js'; import { AwsRequest } from '../request/request.js'; /** * Check if a request matches the Action or NotAction elements of a statement. * * @param request the request to check * @param statement the statement to check against * @returns true if the request matches the Action or NotAction in the statement, false otherwise */ export declare function requestMatchesStatementActions(request: AwsRequest, statement: Statement): { matches: boolean; details: Pick<StatementExplain, 'actions' | 'notActions'>; }; /** * Check if a request matches a set of actions. * * @param request the request to check * @param actions the actions to check against * @returns true if the request matches any of the actions, false otherwise */ export declare function requestMatchesActions(request: AwsRequest, actions: Action[]): { matches: boolean; explains: ActionExplain[]; }; /** * Check if a request does not match a set of actions. * * @param request the request to check * @param actions the actions to check against * @returns true if the request does not match any of the actions, false if the request matches any of the actions */ export declare function requestMatchesNotActions(request: AwsRequest, actions: Action[]): { matches: boolean; explains: ActionExplain[]; }; //# sourceMappingURL=action.d.ts.map