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

com.pulumi.aws.s3.inputs.GetBucketObjectArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.s3.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class GetBucketObjectArgs extends com.pulumi.resources.InvokeArgs {

    public static final GetBucketObjectArgs Empty = new GetBucketObjectArgs();

    /**
     * Name of the bucket to read the object from. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified
     * 
     * @deprecated
     * Use the aws.s3.BucketObjectv2 data source instead
     * 
     */
    @Deprecated /* Use the aws.s3.BucketObjectv2 data source instead */
    @Import(name="bucket", required=true)
    private Output bucket;

    /**
     * @return Name of the bucket to read the object from. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified
     * 
     * @deprecated
     * Use the aws.s3.BucketObjectv2 data source instead
     * 
     */
    @Deprecated /* Use the aws.s3.BucketObjectv2 data source instead */
    public Output bucket() {
        return this.bucket;
    }

    /**
     * Full path to the object inside the bucket
     * 
     */
    @Import(name="key", required=true)
    private Output key;

    /**
     * @return Full path to the object inside the bucket
     * 
     */
    public Output key() {
        return this.key;
    }

    @Import(name="range")
    private @Nullable Output range;

    public Optional> range() {
        return Optional.ofNullable(this.range);
    }

    /**
     * Map of tags assigned to the object.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Map of tags assigned to the object.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Specific version ID of the object returned (defaults to latest version)
     * 
     */
    @Import(name="versionId")
    private @Nullable Output versionId;

    /**
     * @return Specific version ID of the object returned (defaults to latest version)
     * 
     */
    public Optional> versionId() {
        return Optional.ofNullable(this.versionId);
    }

    private GetBucketObjectArgs() {}

    private GetBucketObjectArgs(GetBucketObjectArgs $) {
        this.bucket = $.bucket;
        this.key = $.key;
        this.range = $.range;
        this.tags = $.tags;
        this.versionId = $.versionId;
    }

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

    public static final class Builder {
        private GetBucketObjectArgs $;

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

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

        /**
         * @param bucket Name of the bucket to read the object from. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified
         * 
         * @return builder
         * 
         * @deprecated
         * Use the aws.s3.BucketObjectv2 data source instead
         * 
         */
        @Deprecated /* Use the aws.s3.BucketObjectv2 data source instead */
        public Builder bucket(Output bucket) {
            $.bucket = bucket;
            return this;
        }

        /**
         * @param bucket Name of the bucket to read the object from. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified
         * 
         * @return builder
         * 
         * @deprecated
         * Use the aws.s3.BucketObjectv2 data source instead
         * 
         */
        @Deprecated /* Use the aws.s3.BucketObjectv2 data source instead */
        public Builder bucket(String bucket) {
            return bucket(Output.of(bucket));
        }

        /**
         * @param key Full path to the object inside the bucket
         * 
         * @return builder
         * 
         */
        public Builder key(Output key) {
            $.key = key;
            return this;
        }

        /**
         * @param key Full path to the object inside the bucket
         * 
         * @return builder
         * 
         */
        public Builder key(String key) {
            return key(Output.of(key));
        }

        public Builder range(@Nullable Output range) {
            $.range = range;
            return this;
        }

        public Builder range(String range) {
            return range(Output.of(range));
        }

        /**
         * @param tags Map of tags assigned to the object.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Map of tags assigned to the object.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param versionId Specific version ID of the object returned (defaults to latest version)
         * 
         * @return builder
         * 
         */
        public Builder versionId(@Nullable Output versionId) {
            $.versionId = versionId;
            return this;
        }

        /**
         * @param versionId Specific version ID of the object returned (defaults to latest version)
         * 
         * @return builder
         * 
         */
        public Builder versionId(String versionId) {
            return versionId(Output.of(versionId));
        }

        public GetBucketObjectArgs build() {
            if ($.bucket == null) {
                throw new MissingRequiredPropertyException("GetBucketObjectArgs", "bucket");
            }
            if ($.key == null) {
                throw new MissingRequiredPropertyException("GetBucketObjectArgs", "key");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy