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

com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs Maven / Gradle / Ivy

There is a newer version: 4.35.0
Show newest version
// *** 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.digitalocean.inputs;

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


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

    public static final GetDropletSnapshotArgs Empty = new GetDropletSnapshotArgs();

    /**
     * If more than one result is returned, use the most recent Droplet snapshot.
     * 
     * > **NOTE:** If more or less than a single match is returned by the search,
     * the update will fail. Ensure that your search is specific enough to return
     * a single Droplet snapshot ID only, or use `most_recent` to choose the most recent one.
     * 
     */
    @Import(name="mostRecent")
    private @Nullable Output mostRecent;

    /**
     * @return If more than one result is returned, use the most recent Droplet snapshot.
     * 
     * > **NOTE:** If more or less than a single match is returned by the search,
     * the update will fail. Ensure that your search is specific enough to return
     * a single Droplet snapshot ID only, or use `most_recent` to choose the most recent one.
     * 
     */
    public Optional> mostRecent() {
        return Optional.ofNullable(this.mostRecent);
    }

    /**
     * The name of the Droplet snapshot.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the Droplet snapshot.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A regex string to apply to the Droplet snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
     * 
     */
    @Import(name="nameRegex")
    private @Nullable Output nameRegex;

    /**
     * @return A regex string to apply to the Droplet snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
     * 
     */
    public Optional> nameRegex() {
        return Optional.ofNullable(this.nameRegex);
    }

    /**
     * A "slug" representing a DigitalOcean region (e.g. `nyc1`). If set, only Droplet snapshots available in the region will be returned.
     * 
     */
    @Import(name="region")
    private @Nullable Output region;

    /**
     * @return A "slug" representing a DigitalOcean region (e.g. `nyc1`). If set, only Droplet snapshots available in the region will be returned.
     * 
     */
    public Optional> region() {
        return Optional.ofNullable(this.region);
    }

    private GetDropletSnapshotArgs() {}

    private GetDropletSnapshotArgs(GetDropletSnapshotArgs $) {
        this.mostRecent = $.mostRecent;
        this.name = $.name;
        this.nameRegex = $.nameRegex;
        this.region = $.region;
    }

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

    public static final class Builder {
        private GetDropletSnapshotArgs $;

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

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

        /**
         * @param mostRecent If more than one result is returned, use the most recent Droplet snapshot.
         * 
         * > **NOTE:** If more or less than a single match is returned by the search,
         * the update will fail. Ensure that your search is specific enough to return
         * a single Droplet snapshot ID only, or use `most_recent` to choose the most recent one.
         * 
         * @return builder
         * 
         */
        public Builder mostRecent(@Nullable Output mostRecent) {
            $.mostRecent = mostRecent;
            return this;
        }

        /**
         * @param mostRecent If more than one result is returned, use the most recent Droplet snapshot.
         * 
         * > **NOTE:** If more or less than a single match is returned by the search,
         * the update will fail. Ensure that your search is specific enough to return
         * a single Droplet snapshot ID only, or use `most_recent` to choose the most recent one.
         * 
         * @return builder
         * 
         */
        public Builder mostRecent(Boolean mostRecent) {
            return mostRecent(Output.of(mostRecent));
        }

        /**
         * @param name The name of the Droplet snapshot.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the Droplet snapshot.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param nameRegex A regex string to apply to the Droplet snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
         * 
         * @return builder
         * 
         */
        public Builder nameRegex(@Nullable Output nameRegex) {
            $.nameRegex = nameRegex;
            return this;
        }

        /**
         * @param nameRegex A regex string to apply to the Droplet snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
         * 
         * @return builder
         * 
         */
        public Builder nameRegex(String nameRegex) {
            return nameRegex(Output.of(nameRegex));
        }

        /**
         * @param region A "slug" representing a DigitalOcean region (e.g. `nyc1`). If set, only Droplet snapshots available in the region will be returned.
         * 
         * @return builder
         * 
         */
        public Builder region(@Nullable Output region) {
            $.region = region;
            return this;
        }

        /**
         * @param region A "slug" representing a DigitalOcean region (e.g. `nyc1`). If set, only Droplet snapshots available in the region will be returned.
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Output.of(region));
        }

        public GetDropletSnapshotArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy