38 lines
1.7 KiB
TypeScript
38 lines
1.7 KiB
TypeScript
import type { Construct } from 'constructs';
|
|
import { Resource } from '../../../core';
|
|
import { Grant } from '../grant';
|
|
import type { RoleReference } from '../iam.generated';
|
|
import type { IManagedPolicy } from '../managed-policy';
|
|
import { Policy } from '../policy';
|
|
import type { PolicyStatement } from '../policy-statement';
|
|
import type { AddToPrincipalPolicyResult, IComparablePrincipal, IPrincipal, PrincipalPolicyFragment } from '../principals';
|
|
import type { FromRoleArnOptions, IRole } from '../role';
|
|
export interface ImportedRoleProps extends FromRoleArnOptions {
|
|
readonly roleArn: string;
|
|
readonly roleName: string;
|
|
readonly account?: string;
|
|
}
|
|
export declare class ImportedRole extends Resource implements IRole, IComparablePrincipal {
|
|
/** Uniquely identifies this class. */
|
|
static readonly PROPERTY_INJECTION_ID: string;
|
|
readonly grantPrincipal: IPrincipal;
|
|
readonly principalAccount?: string;
|
|
readonly assumeRoleAction: string;
|
|
readonly policyFragment: PrincipalPolicyFragment;
|
|
readonly roleArn: string;
|
|
readonly roleName: string;
|
|
private readonly attachedPolicies;
|
|
private readonly defaultPolicyName?;
|
|
private defaultPolicy?;
|
|
constructor(scope: Construct, id: string, props: ImportedRoleProps);
|
|
get roleRef(): RoleReference;
|
|
addToPolicy(statement: PolicyStatement): boolean;
|
|
addToPrincipalPolicy(statement: PolicyStatement): AddToPrincipalPolicyResult;
|
|
attachInlinePolicy(policy: Policy): void;
|
|
addManagedPolicy(policy: IManagedPolicy): void;
|
|
grantPassRole(identity: IPrincipal): Grant;
|
|
grantAssumeRole(identity: IPrincipal): Grant;
|
|
grant(grantee: IPrincipal, ...actions: string[]): Grant;
|
|
dedupeString(): string | undefined;
|
|
}
|