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

com.pulumi.azurenative.dbforpostgresql.ServerArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.azurenative.dbforpostgresql;

import com.pulumi.azurenative.dbforpostgresql.enums.CreateMode;
import com.pulumi.azurenative.dbforpostgresql.enums.ReplicationRole;
import com.pulumi.azurenative.dbforpostgresql.enums.ServerVersion;
import com.pulumi.azurenative.dbforpostgresql.inputs.AuthConfigArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.BackupArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.DataEncryptionArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.HighAvailabilityArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.MaintenanceWindowArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.NetworkArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.SkuArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.StorageArgs;
import com.pulumi.azurenative.dbforpostgresql.inputs.UserAssignedIdentityArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
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 ServerArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServerArgs Empty = new ServerArgs();

    /**
     * The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
     * 
     */
    @Import(name="administratorLogin")
    private @Nullable Output administratorLogin;

    /**
     * @return The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
     * 
     */
    public Optional> administratorLogin() {
        return Optional.ofNullable(this.administratorLogin);
    }

    /**
     * The administrator login password (required for server creation).
     * 
     */
    @Import(name="administratorLoginPassword")
    private @Nullable Output administratorLoginPassword;

    /**
     * @return The administrator login password (required for server creation).
     * 
     */
    public Optional> administratorLoginPassword() {
        return Optional.ofNullable(this.administratorLoginPassword);
    }

    /**
     * AuthConfig properties of a server.
     * 
     */
    @Import(name="authConfig")
    private @Nullable Output authConfig;

    /**
     * @return AuthConfig properties of a server.
     * 
     */
    public Optional> authConfig() {
        return Optional.ofNullable(this.authConfig);
    }

    /**
     * availability zone information of the server.
     * 
     */
    @Import(name="availabilityZone")
    private @Nullable Output availabilityZone;

    /**
     * @return availability zone information of the server.
     * 
     */
    public Optional> availabilityZone() {
        return Optional.ofNullable(this.availabilityZone);
    }

    /**
     * Backup properties of a server.
     * 
     */
    @Import(name="backup")
    private @Nullable Output backup;

    /**
     * @return Backup properties of a server.
     * 
     */
    public Optional> backup() {
        return Optional.ofNullable(this.backup);
    }

    /**
     * The mode to create a new PostgreSQL server.
     * 
     */
    @Import(name="createMode")
    private @Nullable Output> createMode;

    /**
     * @return The mode to create a new PostgreSQL server.
     * 
     */
    public Optional>> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * Data encryption properties of a server.
     * 
     */
    @Import(name="dataEncryption")
    private @Nullable Output dataEncryption;

    /**
     * @return Data encryption properties of a server.
     * 
     */
    public Optional> dataEncryption() {
        return Optional.ofNullable(this.dataEncryption);
    }

    /**
     * High availability properties of a server.
     * 
     */
    @Import(name="highAvailability")
    private @Nullable Output highAvailability;

    /**
     * @return High availability properties of a server.
     * 
     */
    public Optional> highAvailability() {
        return Optional.ofNullable(this.highAvailability);
    }

    /**
     * Describes the identity of the application.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return Describes the identity of the application.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * The geo-location where the resource lives
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The geo-location where the resource lives
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Maintenance window properties of a server.
     * 
     */
    @Import(name="maintenanceWindow")
    private @Nullable Output maintenanceWindow;

    /**
     * @return Maintenance window properties of a server.
     * 
     */
    public Optional> maintenanceWindow() {
        return Optional.ofNullable(this.maintenanceWindow);
    }

    /**
     * Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server.
     * 
     */
    @Import(name="network")
    private @Nullable Output network;

    /**
     * @return Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server.
     * 
     */
    public Optional> network() {
        return Optional.ofNullable(this.network);
    }

    /**
     * Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
     * 
     */
    @Import(name="pointInTimeUTC")
    private @Nullable Output pointInTimeUTC;

    /**
     * @return Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
     * 
     */
    public Optional> pointInTimeUTC() {
        return Optional.ofNullable(this.pointInTimeUTC);
    }

    /**
     * Replication role of the server
     * 
     */
    @Import(name="replicationRole")
    private @Nullable Output> replicationRole;

    /**
     * @return Replication role of the server
     * 
     */
    public Optional>> replicationRole() {
        return Optional.ofNullable(this.replicationRole);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

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

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

    /**
     * The SKU (pricing tier) of the server.
     * 
     */
    @Import(name="sku")
    private @Nullable Output sku;

    /**
     * @return The SKU (pricing tier) of the server.
     * 
     */
    public Optional> sku() {
        return Optional.ofNullable(this.sku);
    }

    /**
     * The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica server
     * 
     */
    @Import(name="sourceServerResourceId")
    private @Nullable Output sourceServerResourceId;

    /**
     * @return The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica server
     * 
     */
    public Optional> sourceServerResourceId() {
        return Optional.ofNullable(this.sourceServerResourceId);
    }

    /**
     * Storage properties of a server.
     * 
     */
    @Import(name="storage")
    private @Nullable Output storage;

    /**
     * @return Storage properties of a server.
     * 
     */
    public Optional> storage() {
        return Optional.ofNullable(this.storage);
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * PostgreSQL Server version.
     * 
     */
    @Import(name="version")
    private @Nullable Output> version;

    /**
     * @return PostgreSQL Server version.
     * 
     */
    public Optional>> version() {
        return Optional.ofNullable(this.version);
    }

    private ServerArgs() {}

    private ServerArgs(ServerArgs $) {
        this.administratorLogin = $.administratorLogin;
        this.administratorLoginPassword = $.administratorLoginPassword;
        this.authConfig = $.authConfig;
        this.availabilityZone = $.availabilityZone;
        this.backup = $.backup;
        this.createMode = $.createMode;
        this.dataEncryption = $.dataEncryption;
        this.highAvailability = $.highAvailability;
        this.identity = $.identity;
        this.location = $.location;
        this.maintenanceWindow = $.maintenanceWindow;
        this.network = $.network;
        this.pointInTimeUTC = $.pointInTimeUTC;
        this.replicationRole = $.replicationRole;
        this.resourceGroupName = $.resourceGroupName;
        this.serverName = $.serverName;
        this.sku = $.sku;
        this.sourceServerResourceId = $.sourceServerResourceId;
        this.storage = $.storage;
        this.tags = $.tags;
        this.version = $.version;
    }

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

    public static final class Builder {
        private ServerArgs $;

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

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

        /**
         * @param administratorLogin The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(@Nullable Output administratorLogin) {
            $.administratorLogin = administratorLogin;
            return this;
        }

        /**
         * @param administratorLogin The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(String administratorLogin) {
            return administratorLogin(Output.of(administratorLogin));
        }

        /**
         * @param administratorLoginPassword The administrator login password (required for server creation).
         * 
         * @return builder
         * 
         */
        public Builder administratorLoginPassword(@Nullable Output administratorLoginPassword) {
            $.administratorLoginPassword = administratorLoginPassword;
            return this;
        }

        /**
         * @param administratorLoginPassword The administrator login password (required for server creation).
         * 
         * @return builder
         * 
         */
        public Builder administratorLoginPassword(String administratorLoginPassword) {
            return administratorLoginPassword(Output.of(administratorLoginPassword));
        }

        /**
         * @param authConfig AuthConfig properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder authConfig(@Nullable Output authConfig) {
            $.authConfig = authConfig;
            return this;
        }

        /**
         * @param authConfig AuthConfig properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder authConfig(AuthConfigArgs authConfig) {
            return authConfig(Output.of(authConfig));
        }

        /**
         * @param availabilityZone availability zone information of the server.
         * 
         * @return builder
         * 
         */
        public Builder availabilityZone(@Nullable Output availabilityZone) {
            $.availabilityZone = availabilityZone;
            return this;
        }

        /**
         * @param availabilityZone availability zone information of the server.
         * 
         * @return builder
         * 
         */
        public Builder availabilityZone(String availabilityZone) {
            return availabilityZone(Output.of(availabilityZone));
        }

        /**
         * @param backup Backup properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder backup(@Nullable Output backup) {
            $.backup = backup;
            return this;
        }

        /**
         * @param backup Backup properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder backup(BackupArgs backup) {
            return backup(Output.of(backup));
        }

        /**
         * @param createMode The mode to create a new PostgreSQL server.
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output> createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode The mode to create a new PostgreSQL server.
         * 
         * @return builder
         * 
         */
        public Builder createMode(Either createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param createMode The mode to create a new PostgreSQL server.
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Either.ofLeft(createMode));
        }

        /**
         * @param createMode The mode to create a new PostgreSQL server.
         * 
         * @return builder
         * 
         */
        public Builder createMode(CreateMode createMode) {
            return createMode(Either.ofRight(createMode));
        }

        /**
         * @param dataEncryption Data encryption properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder dataEncryption(@Nullable Output dataEncryption) {
            $.dataEncryption = dataEncryption;
            return this;
        }

        /**
         * @param dataEncryption Data encryption properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder dataEncryption(DataEncryptionArgs dataEncryption) {
            return dataEncryption(Output.of(dataEncryption));
        }

        /**
         * @param highAvailability High availability properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder highAvailability(@Nullable Output highAvailability) {
            $.highAvailability = highAvailability;
            return this;
        }

        /**
         * @param highAvailability High availability properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder highAvailability(HighAvailabilityArgs highAvailability) {
            return highAvailability(Output.of(highAvailability));
        }

        /**
         * @param identity Describes the identity of the application.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity Describes the identity of the application.
         * 
         * @return builder
         * 
         */
        public Builder identity(UserAssignedIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param location The geo-location where the resource lives
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The geo-location where the resource lives
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param maintenanceWindow Maintenance window properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder maintenanceWindow(@Nullable Output maintenanceWindow) {
            $.maintenanceWindow = maintenanceWindow;
            return this;
        }

        /**
         * @param maintenanceWindow Maintenance window properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder maintenanceWindow(MaintenanceWindowArgs maintenanceWindow) {
            return maintenanceWindow(Output.of(maintenanceWindow));
        }

        /**
         * @param network Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server.
         * 
         * @return builder
         * 
         */
        public Builder network(@Nullable Output network) {
            $.network = network;
            return this;
        }

        /**
         * @param network Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server.
         * 
         * @return builder
         * 
         */
        public Builder network(NetworkArgs network) {
            return network(Output.of(network));
        }

        /**
         * @param pointInTimeUTC Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
         * 
         * @return builder
         * 
         */
        public Builder pointInTimeUTC(@Nullable Output pointInTimeUTC) {
            $.pointInTimeUTC = pointInTimeUTC;
            return this;
        }

        /**
         * @param pointInTimeUTC Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
         * 
         * @return builder
         * 
         */
        public Builder pointInTimeUTC(String pointInTimeUTC) {
            return pointInTimeUTC(Output.of(pointInTimeUTC));
        }

        /**
         * @param replicationRole Replication role of the server
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(@Nullable Output> replicationRole) {
            $.replicationRole = replicationRole;
            return this;
        }

        /**
         * @param replicationRole Replication role of the server
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(Either replicationRole) {
            return replicationRole(Output.of(replicationRole));
        }

        /**
         * @param replicationRole Replication role of the server
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(String replicationRole) {
            return replicationRole(Either.ofLeft(replicationRole));
        }

        /**
         * @param replicationRole Replication role of the server
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(ReplicationRole replicationRole) {
            return replicationRole(Either.ofRight(replicationRole));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

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

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

        /**
         * @param sku The SKU (pricing tier) of the server.
         * 
         * @return builder
         * 
         */
        public Builder sku(@Nullable Output sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku The SKU (pricing tier) of the server.
         * 
         * @return builder
         * 
         */
        public Builder sku(SkuArgs sku) {
            return sku(Output.of(sku));
        }

        /**
         * @param sourceServerResourceId The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica server
         * 
         * @return builder
         * 
         */
        public Builder sourceServerResourceId(@Nullable Output sourceServerResourceId) {
            $.sourceServerResourceId = sourceServerResourceId;
            return this;
        }

        /**
         * @param sourceServerResourceId The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica server
         * 
         * @return builder
         * 
         */
        public Builder sourceServerResourceId(String sourceServerResourceId) {
            return sourceServerResourceId(Output.of(sourceServerResourceId));
        }

        /**
         * @param storage Storage properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder storage(@Nullable Output storage) {
            $.storage = storage;
            return this;
        }

        /**
         * @param storage Storage properties of a server.
         * 
         * @return builder
         * 
         */
        public Builder storage(StorageArgs storage) {
            return storage(Output.of(storage));
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param version PostgreSQL Server version.
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output> version) {
            $.version = version;
            return this;
        }

        /**
         * @param version PostgreSQL Server version.
         * 
         * @return builder
         * 
         */
        public Builder version(Either version) {
            return version(Output.of(version));
        }

        /**
         * @param version PostgreSQL Server version.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Either.ofLeft(version));
        }

        /**
         * @param version PostgreSQL Server version.
         * 
         * @return builder
         * 
         */
        public Builder version(ServerVersion version) {
            return version(Either.ofRight(version));
        }

        public ServerArgs build() {
            $.availabilityZone = Codegen.stringProp("availabilityZone").output().arg($.availabilityZone).def("").getNullable();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ServerArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy