All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.dockerbuild.inputs.CacheToS3Args Maven / Gradle / Ivy

Go to download

A Pulumi provider for building modern Docker images with buildx and BuildKit.

There is a newer version: 0.1.0-alpha.1729468870
Show newest version
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.dockerbuild.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.dockerbuild.enums.CacheMode;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class CacheToS3Args extends com.pulumi.resources.ResourceArgs {

    public static final CacheToS3Args Empty = new CacheToS3Args();

    /**
     * Defaults to `$AWS_ACCESS_KEY_ID`.
     * 
     */
    @Import(name="accessKeyId")
    private @Nullable Output accessKeyId;

    /**
     * @return Defaults to `$AWS_ACCESS_KEY_ID`.
     * 
     */
    public Optional> accessKeyId() {
        return Optional.ofNullable(this.accessKeyId);
    }

    /**
     * Prefix to prepend to blob filenames.
     * 
     */
    @Import(name="blobsPrefix")
    private @Nullable Output blobsPrefix;

    /**
     * @return Prefix to prepend to blob filenames.
     * 
     */
    public Optional> blobsPrefix() {
        return Optional.ofNullable(this.blobsPrefix);
    }

    /**
     * Name of the S3 bucket.
     * 
     */
    @Import(name="bucket", required=true)
    private Output bucket;

    /**
     * @return Name of the S3 bucket.
     * 
     */
    public Output bucket() {
        return this.bucket;
    }

    /**
     * Endpoint of the S3 bucket.
     * 
     */
    @Import(name="endpointUrl")
    private @Nullable Output endpointUrl;

    /**
     * @return Endpoint of the S3 bucket.
     * 
     */
    public Optional> endpointUrl() {
        return Optional.ofNullable(this.endpointUrl);
    }

    /**
     * Ignore errors caused by failed cache exports.
     * 
     */
    @Import(name="ignoreError")
    private @Nullable Output ignoreError;

    /**
     * @return Ignore errors caused by failed cache exports.
     * 
     */
    public Optional> ignoreError() {
        return Optional.ofNullable(this.ignoreError);
    }

    /**
     * Prefix to prepend on manifest filenames.
     * 
     */
    @Import(name="manifestsPrefix")
    private @Nullable Output manifestsPrefix;

    /**
     * @return Prefix to prepend on manifest filenames.
     * 
     */
    public Optional> manifestsPrefix() {
        return Optional.ofNullable(this.manifestsPrefix);
    }

    /**
     * The cache mode to use. Defaults to `min`.
     * 
     */
    @Import(name="mode")
    private @Nullable Output mode;

    /**
     * @return The cache mode to use. Defaults to `min`.
     * 
     */
    public Optional> mode() {
        return Optional.ofNullable(this.mode);
    }

    /**
     * Name of the cache image.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the cache image.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The geographic location of the bucket. Defaults to `$AWS_REGION`.
     * 
     */
    @Import(name="region", required=true)
    private Output region;

    /**
     * @return The geographic location of the bucket. Defaults to `$AWS_REGION`.
     * 
     */
    public Output region() {
        return this.region;
    }

    /**
     * Defaults to `$AWS_SECRET_ACCESS_KEY`.
     * 
     */
    @Import(name="secretAccessKey")
    private @Nullable Output secretAccessKey;

    /**
     * @return Defaults to `$AWS_SECRET_ACCESS_KEY`.
     * 
     */
    public Optional> secretAccessKey() {
        return Optional.ofNullable(this.secretAccessKey);
    }

    /**
     * Defaults to `$AWS_SESSION_TOKEN`.
     * 
     */
    @Import(name="sessionToken")
    private @Nullable Output sessionToken;

    /**
     * @return Defaults to `$AWS_SESSION_TOKEN`.
     * 
     */
    public Optional> sessionToken() {
        return Optional.ofNullable(this.sessionToken);
    }

    /**
     * Uses `bucket` in the URL instead of hostname when `true`.
     * 
     */
    @Import(name="usePathStyle")
    private @Nullable Output usePathStyle;

    /**
     * @return Uses `bucket` in the URL instead of hostname when `true`.
     * 
     */
    public Optional> usePathStyle() {
        return Optional.ofNullable(this.usePathStyle);
    }

    private CacheToS3Args() {}

    private CacheToS3Args(CacheToS3Args $) {
        this.accessKeyId = $.accessKeyId;
        this.blobsPrefix = $.blobsPrefix;
        this.bucket = $.bucket;
        this.endpointUrl = $.endpointUrl;
        this.ignoreError = $.ignoreError;
        this.manifestsPrefix = $.manifestsPrefix;
        this.mode = $.mode;
        this.name = $.name;
        this.region = $.region;
        this.secretAccessKey = $.secretAccessKey;
        this.sessionToken = $.sessionToken;
        this.usePathStyle = $.usePathStyle;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(CacheToS3Args defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private CacheToS3Args $;

        public Builder() {
            $ = new CacheToS3Args();
        }

        public Builder(CacheToS3Args defaults) {
            $ = new CacheToS3Args(Objects.requireNonNull(defaults));
        }

        /**
         * @param accessKeyId Defaults to `$AWS_ACCESS_KEY_ID`.
         * 
         * @return builder
         * 
         */
        public Builder accessKeyId(@Nullable Output accessKeyId) {
            $.accessKeyId = accessKeyId;
            return this;
        }

        /**
         * @param accessKeyId Defaults to `$AWS_ACCESS_KEY_ID`.
         * 
         * @return builder
         * 
         */
        public Builder accessKeyId(String accessKeyId) {
            return accessKeyId(Output.of(accessKeyId));
        }

        /**
         * @param blobsPrefix Prefix to prepend to blob filenames.
         * 
         * @return builder
         * 
         */
        public Builder blobsPrefix(@Nullable Output blobsPrefix) {
            $.blobsPrefix = blobsPrefix;
            return this;
        }

        /**
         * @param blobsPrefix Prefix to prepend to blob filenames.
         * 
         * @return builder
         * 
         */
        public Builder blobsPrefix(String blobsPrefix) {
            return blobsPrefix(Output.of(blobsPrefix));
        }

        /**
         * @param bucket Name of the S3 bucket.
         * 
         * @return builder
         * 
         */
        public Builder bucket(Output bucket) {
            $.bucket = bucket;
            return this;
        }

        /**
         * @param bucket Name of the S3 bucket.
         * 
         * @return builder
         * 
         */
        public Builder bucket(String bucket) {
            return bucket(Output.of(bucket));
        }

        /**
         * @param endpointUrl Endpoint of the S3 bucket.
         * 
         * @return builder
         * 
         */
        public Builder endpointUrl(@Nullable Output endpointUrl) {
            $.endpointUrl = endpointUrl;
            return this;
        }

        /**
         * @param endpointUrl Endpoint of the S3 bucket.
         * 
         * @return builder
         * 
         */
        public Builder endpointUrl(String endpointUrl) {
            return endpointUrl(Output.of(endpointUrl));
        }

        /**
         * @param ignoreError Ignore errors caused by failed cache exports.
         * 
         * @return builder
         * 
         */
        public Builder ignoreError(@Nullable Output ignoreError) {
            $.ignoreError = ignoreError;
            return this;
        }

        /**
         * @param ignoreError Ignore errors caused by failed cache exports.
         * 
         * @return builder
         * 
         */
        public Builder ignoreError(Boolean ignoreError) {
            return ignoreError(Output.of(ignoreError));
        }

        /**
         * @param manifestsPrefix Prefix to prepend on manifest filenames.
         * 
         * @return builder
         * 
         */
        public Builder manifestsPrefix(@Nullable Output manifestsPrefix) {
            $.manifestsPrefix = manifestsPrefix;
            return this;
        }

        /**
         * @param manifestsPrefix Prefix to prepend on manifest filenames.
         * 
         * @return builder
         * 
         */
        public Builder manifestsPrefix(String manifestsPrefix) {
            return manifestsPrefix(Output.of(manifestsPrefix));
        }

        /**
         * @param mode The cache mode to use. Defaults to `min`.
         * 
         * @return builder
         * 
         */
        public Builder mode(@Nullable Output mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode The cache mode to use. Defaults to `min`.
         * 
         * @return builder
         * 
         */
        public Builder mode(CacheMode mode) {
            return mode(Output.of(mode));
        }

        /**
         * @param name Name of the cache image.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the cache image.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param region The geographic location of the bucket. Defaults to `$AWS_REGION`.
         * 
         * @return builder
         * 
         */
        public Builder region(Output region) {
            $.region = region;
            return this;
        }

        /**
         * @param region The geographic location of the bucket. Defaults to `$AWS_REGION`.
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Output.of(region));
        }

        /**
         * @param secretAccessKey Defaults to `$AWS_SECRET_ACCESS_KEY`.
         * 
         * @return builder
         * 
         */
        public Builder secretAccessKey(@Nullable Output secretAccessKey) {
            $.secretAccessKey = secretAccessKey;
            return this;
        }

        /**
         * @param secretAccessKey Defaults to `$AWS_SECRET_ACCESS_KEY`.
         * 
         * @return builder
         * 
         */
        public Builder secretAccessKey(String secretAccessKey) {
            return secretAccessKey(Output.of(secretAccessKey));
        }

        /**
         * @param sessionToken Defaults to `$AWS_SESSION_TOKEN`.
         * 
         * @return builder
         * 
         */
        public Builder sessionToken(@Nullable Output sessionToken) {
            $.sessionToken = sessionToken;
            return this;
        }

        /**
         * @param sessionToken Defaults to `$AWS_SESSION_TOKEN`.
         * 
         * @return builder
         * 
         */
        public Builder sessionToken(String sessionToken) {
            return sessionToken(Output.of(sessionToken));
        }

        /**
         * @param usePathStyle Uses `bucket` in the URL instead of hostname when `true`.
         * 
         * @return builder
         * 
         */
        public Builder usePathStyle(@Nullable Output usePathStyle) {
            $.usePathStyle = usePathStyle;
            return this;
        }

        /**
         * @param usePathStyle Uses `bucket` in the URL instead of hostname when `true`.
         * 
         * @return builder
         * 
         */
        public Builder usePathStyle(Boolean usePathStyle) {
            return usePathStyle(Output.of(usePathStyle));
        }

        public CacheToS3Args build() {
            $.accessKeyId = Codegen.stringProp("accessKeyId").output().arg($.accessKeyId).env("AWS_ACCESS_KEY_ID").def("").getNullable();
            if ($.bucket == null) {
                throw new MissingRequiredPropertyException("CacheToS3Args", "bucket");
            }
            $.ignoreError = Codegen.booleanProp("ignoreError").output().arg($.ignoreError).def(false).getNullable();
            $.mode = Codegen.objectProp("mode", CacheMode.class).output().arg($.mode).def(CacheMode.Min).getNullable();
            $.region = Codegen.stringProp("region").output().arg($.region).env("AWS_REGION").def("").require();
            $.secretAccessKey = Codegen.stringProp("secretAccessKey").secret().arg($.secretAccessKey).env("AWS_SECRET_ACCESS_KEY").def("").getNullable();
            $.sessionToken = Codegen.stringProp("sessionToken").secret().arg($.sessionToken).env("AWS_SESSION_TOKEN").def("").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy