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

com.pulumi.digitalocean.inputs.DatabaseReplicaState 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.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.enums.DatabaseSlug;
import com.pulumi.digitalocean.enums.Region;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DatabaseReplicaState Empty = new DatabaseReplicaState();

    /**
     * The ID of the original source database cluster.
     * 
     */
    @Import(name="clusterId")
    private @Nullable Output clusterId;

    /**
     * @return The ID of the original source database cluster.
     * 
     */
    public Optional> clusterId() {
        return Optional.ofNullable(this.clusterId);
    }

    /**
     * Name of the replica's default database.
     * 
     */
    @Import(name="database")
    private @Nullable Output database;

    /**
     * @return Name of the replica's default database.
     * 
     */
    public Optional> database() {
        return Optional.ofNullable(this.database);
    }

    /**
     * Database replica's hostname.
     * 
     */
    @Import(name="host")
    private @Nullable Output host;

    /**
     * @return Database replica's hostname.
     * 
     */
    public Optional> host() {
        return Optional.ofNullable(this.host);
    }

    /**
     * The name for the database replica.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name for the database replica.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Password for the replica's default user.
     * 
     */
    @Import(name="password")
    private @Nullable Output password;

    /**
     * @return Password for the replica's default user.
     * 
     */
    public Optional> password() {
        return Optional.ofNullable(this.password);
    }

    /**
     * Network port that the database replica is listening on.
     * 
     */
    @Import(name="port")
    private @Nullable Output port;

    /**
     * @return Network port that the database replica is listening on.
     * 
     */
    public Optional> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * Same as `host`, but only accessible from resources within the account and in the same region.
     * 
     */
    @Import(name="privateHost")
    private @Nullable Output privateHost;

    /**
     * @return Same as `host`, but only accessible from resources within the account and in the same region.
     * 
     */
    public Optional> privateHost() {
        return Optional.ofNullable(this.privateHost);
    }

    /**
     * The ID of the VPC where the database replica will be located.
     * 
     */
    @Import(name="privateNetworkUuid")
    private @Nullable Output privateNetworkUuid;

    /**
     * @return The ID of the VPC where the database replica will be located.
     * 
     */
    public Optional> privateNetworkUuid() {
        return Optional.ofNullable(this.privateNetworkUuid);
    }

    /**
     * Same as `uri`, but only accessible from resources within the account and in the same region.
     * 
     */
    @Import(name="privateUri")
    private @Nullable Output privateUri;

    /**
     * @return Same as `uri`, but only accessible from resources within the account and in the same region.
     * 
     */
    public Optional> privateUri() {
        return Optional.ofNullable(this.privateUri);
    }

    /**
     * DigitalOcean region where the replica will reside.
     * 
     */
    @Import(name="region")
    private @Nullable Output> region;

    /**
     * @return DigitalOcean region where the replica will reside.
     * 
     */
    public Optional>> region() {
        return Optional.ofNullable(this.region);
    }

    /**
     * Database Droplet size associated with the replica (ex. `db-s-1vcpu-1gb`). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
     * 
     */
    @Import(name="size")
    private @Nullable Output> size;

    /**
     * @return Database Droplet size associated with the replica (ex. `db-s-1vcpu-1gb`). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
     * 
     */
    public Optional>> size() {
        return Optional.ofNullable(this.size);
    }

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

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

    /**
     * A list of tag names to be applied to the database replica.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A list of tag names to be applied to the database replica.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The full URI for connecting to the database replica.
     * 
     */
    @Import(name="uri")
    private @Nullable Output uri;

    /**
     * @return The full URI for connecting to the database replica.
     * 
     */
    public Optional> uri() {
        return Optional.ofNullable(this.uri);
    }

    /**
     * Username for the replica's default user.
     * 
     */
    @Import(name="user")
    private @Nullable Output user;

    /**
     * @return Username for the replica's default user.
     * 
     */
    public Optional> user() {
        return Optional.ofNullable(this.user);
    }

    /**
     * The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example  "Create firewall rule for database replica" above.
     * 
     */
    @Import(name="uuid")
    private @Nullable Output uuid;

    /**
     * @return The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example  "Create firewall rule for database replica" above.
     * 
     */
    public Optional> uuid() {
        return Optional.ofNullable(this.uuid);
    }

    private DatabaseReplicaState() {}

    private DatabaseReplicaState(DatabaseReplicaState $) {
        this.clusterId = $.clusterId;
        this.database = $.database;
        this.host = $.host;
        this.name = $.name;
        this.password = $.password;
        this.port = $.port;
        this.privateHost = $.privateHost;
        this.privateNetworkUuid = $.privateNetworkUuid;
        this.privateUri = $.privateUri;
        this.region = $.region;
        this.size = $.size;
        this.storageSizeMib = $.storageSizeMib;
        this.tags = $.tags;
        this.uri = $.uri;
        this.user = $.user;
        this.uuid = $.uuid;
    }

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

    public static final class Builder {
        private DatabaseReplicaState $;

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

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

        /**
         * @param clusterId The ID of the original source database cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(@Nullable Output clusterId) {
            $.clusterId = clusterId;
            return this;
        }

        /**
         * @param clusterId The ID of the original source database cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(String clusterId) {
            return clusterId(Output.of(clusterId));
        }

        /**
         * @param database Name of the replica's default database.
         * 
         * @return builder
         * 
         */
        public Builder database(@Nullable Output database) {
            $.database = database;
            return this;
        }

        /**
         * @param database Name of the replica's default database.
         * 
         * @return builder
         * 
         */
        public Builder database(String database) {
            return database(Output.of(database));
        }

        /**
         * @param host Database replica's hostname.
         * 
         * @return builder
         * 
         */
        public Builder host(@Nullable Output host) {
            $.host = host;
            return this;
        }

        /**
         * @param host Database replica's hostname.
         * 
         * @return builder
         * 
         */
        public Builder host(String host) {
            return host(Output.of(host));
        }

        /**
         * @param name The name for the database replica.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

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

        /**
         * @param password Password for the replica's default user.
         * 
         * @return builder
         * 
         */
        public Builder password(@Nullable Output password) {
            $.password = password;
            return this;
        }

        /**
         * @param password Password for the replica's default user.
         * 
         * @return builder
         * 
         */
        public Builder password(String password) {
            return password(Output.of(password));
        }

        /**
         * @param port Network port that the database replica is listening on.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port Network port that the database replica is listening on.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param privateHost Same as `host`, but only accessible from resources within the account and in the same region.
         * 
         * @return builder
         * 
         */
        public Builder privateHost(@Nullable Output privateHost) {
            $.privateHost = privateHost;
            return this;
        }

        /**
         * @param privateHost Same as `host`, but only accessible from resources within the account and in the same region.
         * 
         * @return builder
         * 
         */
        public Builder privateHost(String privateHost) {
            return privateHost(Output.of(privateHost));
        }

        /**
         * @param privateNetworkUuid The ID of the VPC where the database replica will be located.
         * 
         * @return builder
         * 
         */
        public Builder privateNetworkUuid(@Nullable Output privateNetworkUuid) {
            $.privateNetworkUuid = privateNetworkUuid;
            return this;
        }

        /**
         * @param privateNetworkUuid The ID of the VPC where the database replica will be located.
         * 
         * @return builder
         * 
         */
        public Builder privateNetworkUuid(String privateNetworkUuid) {
            return privateNetworkUuid(Output.of(privateNetworkUuid));
        }

        /**
         * @param privateUri Same as `uri`, but only accessible from resources within the account and in the same region.
         * 
         * @return builder
         * 
         */
        public Builder privateUri(@Nullable Output privateUri) {
            $.privateUri = privateUri;
            return this;
        }

        /**
         * @param privateUri Same as `uri`, but only accessible from resources within the account and in the same region.
         * 
         * @return builder
         * 
         */
        public Builder privateUri(String privateUri) {
            return privateUri(Output.of(privateUri));
        }

        /**
         * @param region DigitalOcean region where the replica will reside.
         * 
         * @return builder
         * 
         */
        public Builder region(@Nullable Output> region) {
            $.region = region;
            return this;
        }

        /**
         * @param region DigitalOcean region where the replica will reside.
         * 
         * @return builder
         * 
         */
        public Builder region(Either region) {
            return region(Output.of(region));
        }

        /**
         * @param region DigitalOcean region where the replica will reside.
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Either.ofLeft(region));
        }

        /**
         * @param region DigitalOcean region where the replica will reside.
         * 
         * @return builder
         * 
         */
        public Builder region(Region region) {
            return region(Either.ofRight(region));
        }

        /**
         * @param size Database Droplet size associated with the replica (ex. `db-s-1vcpu-1gb`). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
         * 
         * @return builder
         * 
         */
        public Builder size(@Nullable Output> size) {
            $.size = size;
            return this;
        }

        /**
         * @param size Database Droplet size associated with the replica (ex. `db-s-1vcpu-1gb`). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
         * 
         * @return builder
         * 
         */
        public Builder size(Either size) {
            return size(Output.of(size));
        }

        /**
         * @param size Database Droplet size associated with the replica (ex. `db-s-1vcpu-1gb`). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
         * 
         * @return builder
         * 
         */
        public Builder size(String size) {
            return size(Either.ofLeft(size));
        }

        /**
         * @param size Database Droplet size associated with the replica (ex. `db-s-1vcpu-1gb`). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
         * 
         * @return builder
         * 
         */
        public Builder size(DatabaseSlug size) {
            return size(Either.ofRight(size));
        }

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

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

        /**
         * @param tags A list of tag names to be applied to the database replica.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A list of tag names to be applied to the database replica.
         * 
         * @return builder
         * 
         */
        public Builder tags(List tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param tags A list of tag names to be applied to the database replica.
         * 
         * @return builder
         * 
         */
        public Builder tags(String... tags) {
            return tags(List.of(tags));
        }

        /**
         * @param uri The full URI for connecting to the database replica.
         * 
         * @return builder
         * 
         */
        public Builder uri(@Nullable Output uri) {
            $.uri = uri;
            return this;
        }

        /**
         * @param uri The full URI for connecting to the database replica.
         * 
         * @return builder
         * 
         */
        public Builder uri(String uri) {
            return uri(Output.of(uri));
        }

        /**
         * @param user Username for the replica's default user.
         * 
         * @return builder
         * 
         */
        public Builder user(@Nullable Output user) {
            $.user = user;
            return this;
        }

        /**
         * @param user Username for the replica's default user.
         * 
         * @return builder
         * 
         */
        public Builder user(String user) {
            return user(Output.of(user));
        }

        /**
         * @param uuid The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example  "Create firewall rule for database replica" above.
         * 
         * @return builder
         * 
         */
        public Builder uuid(@Nullable Output uuid) {
            $.uuid = uuid;
            return this;
        }

        /**
         * @param uuid The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example  "Create firewall rule for database replica" above.
         * 
         * @return builder
         * 
         */
        public Builder uuid(String uuid) {
            return uuid(Output.of(uuid));
        }

        public DatabaseReplicaState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy