import * as iam from "aws-cdk-lib/aws-iam"; import * as constructs from "constructs"; export interface Props { /** * A list of trusted GitHub repository owners. * * This functions as a sort of whitelist to catch * potential typos in {@link repositories}. */ trustedOwners: string[]; /** * The name of the trusted branch. * * The wildcard characters '*' and '?' can be used to * represent any combination of characters and any single * character, respectively. * * @default "master" */ trustedBranch?: string; /** * The name of the role to create. * * @default "github-actions-role" */ roleName?: string; /** * The GitHub repositories that the principal trusts. */ repositories: { /** * The name of the GitHub repository. * * The wildcard characters '*' and '?' can be used to * represent any combination of characters and any single * character, respectively. * * NOTE: Be careful when using wildcard characters as you * may grant access to repositories you did not intend. * * @example "my-repository" * @example "my-team-*" */ name: string; /** * The name of the owner of the GitHub repository. * * NOTE: The owner must explicitly be whitelisted in {@link trustedOwners}. */ owner: string; }[]; /** * An existing OpenID Connect Provider for GitHub Actions. */ oidcProvider: iam.IOpenIdConnectProvider; } /** * Utility function for validating the construct properties. * * Returns a list of validation error messages. An empty list means the props are valid. */ export declare const validateProps: (props: Props) => string[]; /** * Creates an IAM role that can be assumed by GitHub Actions workflows * in specific GitHub repositories and branches using OpenID Connect. */ export declare class GithubActionsRole extends constructs.Construct { readonly role: iam.Role; constructor(scope: constructs.Construct, id: string, props: Props); }