"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DockerCodeBuildAction = void 0;
const aws_cdk_lib_1 = require("aws-cdk-lib");
class DockerCodeBuildAction {
    static fromLinuxDockerImage(scope, id, options) {
        return aws_cdk_lib_1.aws_codebuild.LinuxBuildImage.fromDockerRegistry(options.image, {
            secretsManagerCredentials: aws_cdk_lib_1.aws_secretsmanager.Secret.fromSecretNameV2(scope, `${id}-Credentials`, options.credentialsContextKeyName),
        });
    }
    /**
     * Returns a Windows Build Image using the provided DockerHub Image tag and auth credentials
     *
     * @param scope The scope that this image is being created within
     * @param id A unique identifier for this image
     * @param credentialsContextKeyName A required path to look for the credentials secret in Secrets Manager.
     * @param image The DockerHub image that should be used for this action
     */
    static fromWindowsDockerImage(scope, id, options) {
        return aws_cdk_lib_1.aws_codebuild.WindowsBuildImage.fromDockerRegistry(options.image, {
            secretsManagerCredentials: aws_cdk_lib_1.aws_secretsmanager.Secret.fromSecretNameV2(scope, `${id}-Credentials`, options.credentialsContextKeyName),
        });
    }
}
exports.DockerCodeBuildAction = DockerCodeBuildAction;
