import * as AWS from 'aws-sdk'; /** * Given a role name, creates the role with the given trusted service. * * The created role is only assumable by the provided trusted service. For example, * if you provide 'ec2.amazonaws.com' as the trusted service, only EC2 instances * will be able to assume that role. */ export declare function createRole(roleName: string, trustedService: string, permissionsBoundary?: string): Promise; /** * Given a role name, returns information about that role, or null if * the role doesn't exist */ export declare function getRole(roleName: string): Promise; /** * Creates a role if it doesn't already exist. If it does exist, it just returns * information about the existing role. */ export declare function createRoleIfNotExists(roleName: string, trustedService: string): Promise; /** * Gets information about a policy for the given policy ARN, or returns * null if the policy doesn't exist */ export declare function getPolicy(policyArn: string): Promise; /** * Creates the policy for the given name with the provided policy document. * * The policy document must be a valid IAM policy. */ export declare function createPolicy(policyName: string, policyDocument: any): Promise; /** * Given the ARN of a policy, creates a new version with the provided policy document. * * The policy document must be a valid IAM policy */ export declare function createPolicyVersion(policyArn: string, policyDocument: any): Promise; /** * Given the ARN of a policy, deletes all versions of the policy except for the list * of provided versions to keep (if any) */ export declare function deleteAllPolicyVersionsButProvided(policyArn: string, policyVersionToKeep: AWS.IAM.PolicyVersion): Promise; /** * Creates or updates the given policy with the provided policy document. * * The policy document must be a valid IAM policy. * * This method will delete all versions of the policy but the one that was created by * itself. */ export declare function createOrUpdatePolicy(policyName: string, policyArn: string, policyDocument: any): Promise; /** * Attaches the given policy to the given role */ export declare function attachPolicyToRole(policyArn: string, roleName: string): Promise<{ $response: AWS.Response<{}, AWS.AWSError>; }>; /** * Given a policy document, this method will create the policy if it doesn't already exist. */ export declare function createPolicyIfNotExists(policyName: string, policyArn: string, policyDocument: any): Promise; export declare function listAttachedPolicies(roleName: string): Promise; export declare function detachPolicyFromRole(roleName: string, policy: AWS.IAM.AttachedPolicy): Promise; export declare function deletePolicy(policyArn: string): Promise; /** * Given a list of policy statements, this method will construct a valid IAM policy document. * * This method assumes all provided policy statements are valid statements from an IAM policy document. */ export declare function constructPolicyDoc(policyStatements: any[]): any; export declare function createServiceLinkedRole(serviceName: string): Promise;