@cloud-copilot/iam-policy
Version:
An ORM for AWS IAM policies
60 lines • 1.33 kB
TypeScript
/**
* A resource string in an IAM policy
*/
export interface Resource {
/**
* The raw string of the resource
*/
value(): string;
/**
* Whether the resource is all resources: `"*"`
*/
isAllResources(): boolean;
/**
* Whether the resource is an ARN resource
*/
isArnResource(): this is ArnResource;
/**
* The path to the resource in the policy document
*/
path(): string;
}
export interface ArnResource extends Resource {
/**
* The partition of the ARN
*/
partition(): string;
/**
* The service of the ARN
*/
service(): string;
/**
* The region of the ARN
*/
region(): string;
/**
* The account of the ARN
*/
account(): string;
/**
* The resource of the ARN
*/
resource(): string;
}
export declare class ResourceImpl implements Resource, ArnResource {
private readonly rawValue;
private readonly otherProps;
constructor(rawValue: string, otherProps: {
path: string;
});
path(): string;
partition(): string;
service(): string;
region(): string;
account(): string;
resource(): string;
value(): string;
isAllResources(): boolean;
isArnResource(): this is ArnResource;
}
//# sourceMappingURL=resource.d.ts.map