@cloud-copilot/iam-simulate
Version:
Simulate evaluation of AWS IAM policies
33 lines • 1.31 kB
TypeScript
import { ConditionKeyType } from './contextKeyTypes.js';
/**
* Check if a context key actually exists
*
* @param key The context key to check
* @returns true if the context key is valid, false otherwise
*/
export declare function isActualContextKey(key: string): Promise<boolean>;
/**
* Split a context key into the service and the rest of the key. This has to be a special
* method because context keys with variables may have a colon in the variable section,
* because of course they can.
*
* @param contextKey The context key to split
* @returns A tuple with the service and the rest of the key
*/
export declare function contextKeyParts(contextKey: string): [string, string];
/**
* Check the capitalization of a context key and return the correct capitalization
*
* @param contextKey the condition key to check
* @returns if the condition key is an array type
*/
export declare function normalizeContextKeyCase(contextKey: string): Promise<string>;
/**
* Get the type of a context key
*
* @param contextKey - The string condition key to get the type for
* @returns The type of the condition key
* @throws an error if the condition key is not found
*/
export declare function typeForContextKey(contextKey: string): Promise<ConditionKeyType>;
//# sourceMappingURL=contextKeys.d.ts.map