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

com.pulumi.azure.postgresql.ServerArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.postgresql;

import com.pulumi.azure.postgresql.inputs.ServerIdentityArgs;
import com.pulumi.azure.postgresql.inputs.ServerThreatDetectionPolicyArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
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 login for the PostgreSQL Server. Required when `create_mode` is `Default`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="administratorLogin")
    private @Nullable Output administratorLogin;

    /**
     * @return The Administrator login for the PostgreSQL Server. Required when `create_mode` is `Default`. Changing this forces a new resource to be created.
     * 
     */
    public Optional> administratorLogin() {
        return Optional.ofNullable(this.administratorLogin);
    }

    /**
     * The Password associated with the `administrator_login` for the PostgreSQL Server. Required when `create_mode` is `Default`.
     * 
     */
    @Import(name="administratorLoginPassword")
    private @Nullable Output administratorLoginPassword;

    /**
     * @return The Password associated with the `administrator_login` for the PostgreSQL Server. Required when `create_mode` is `Default`.
     * 
     */
    public Optional> administratorLoginPassword() {
        return Optional.ofNullable(this.administratorLoginPassword);
    }

    /**
     * Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`.
     * 
     */
    @Import(name="autoGrowEnabled")
    private @Nullable Output autoGrowEnabled;

    /**
     * @return Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`.
     * 
     */
    public Optional> autoGrowEnabled() {
        return Optional.ofNullable(this.autoGrowEnabled);
    }

    /**
     * Backup retention days for the server, supported values are between `7` and `35` days.
     * 
     */
    @Import(name="backupRetentionDays")
    private @Nullable Output backupRetentionDays;

    /**
     * @return Backup retention days for the server, supported values are between `7` and `35` days.
     * 
     */
    public Optional> backupRetentionDays() {
        return Optional.ofNullable(this.backupRetentionDays);
    }

    /**
     * The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
     * 
     */
    @Import(name="createMode")
    private @Nullable Output createMode;

    /**
     * @return The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
     * 
     */
    public Optional> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * For creation modes other than `Default`, the source server ID to use.
     * 
     */
    @Import(name="creationSourceServerId")
    private @Nullable Output creationSourceServerId;

    /**
     * @return For creation modes other than `Default`, the source server ID to use.
     * 
     */
    public Optional> creationSourceServerId() {
        return Optional.ofNullable(this.creationSourceServerId);
    }

    /**
     * Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="geoRedundantBackupEnabled")
    private @Nullable Output geoRedundantBackupEnabled;

    /**
     * @return Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
     * 
     */
    public Optional> geoRedundantBackupEnabled() {
        return Optional.ofNullable(this.geoRedundantBackupEnabled);
    }

    /**
     * An `identity` block as defined below.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return An `identity` block as defined below.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** This property is currently still in development and not supported by Microsoft. If the `infrastructure_encryption_enabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages.
     * 
     */
    @Import(name="infrastructureEncryptionEnabled")
    private @Nullable Output infrastructureEncryptionEnabled;

    /**
     * @return Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** This property is currently still in development and not supported by Microsoft. If the `infrastructure_encryption_enabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages.
     * 
     */
    public Optional> infrastructureEncryptionEnabled() {
        return Optional.ofNullable(this.infrastructureEncryptionEnabled);
    }

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Whether or not public network access is allowed for this server. Defaults to `true`.
     * 
     */
    @Import(name="publicNetworkAccessEnabled")
    private @Nullable Output publicNetworkAccessEnabled;

    /**
     * @return Whether or not public network access is allowed for this server. Defaults to `true`.
     * 
     */
    public Optional> publicNetworkAccessEnabled() {
        return Optional.ofNullable(this.publicNetworkAccessEnabled);
    }

    /**
     * The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
     * 
     */
    @Import(name="restorePointInTime")
    private @Nullable Output restorePointInTime;

    /**
     * @return When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
     * 
     */
    public Optional> restorePointInTime() {
        return Optional.ofNullable(this.restorePointInTime);
    }

    /**
     * Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`.
     * 
     * > **NOTE:** When replication is set up and `sku_name` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling)
     * 
     */
    @Import(name="skuName", required=true)
    private Output skuName;

    /**
     * @return Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`.
     * 
     * > **NOTE:** When replication is set up and `sku_name` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling)
     * 
     */
    public Output skuName() {
        return this.skuName;
    }

    /**
     * Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
     * 
     * > **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`.
     * 
     */
    @Import(name="sslEnforcementEnabled", required=true)
    private Output sslEnforcementEnabled;

    /**
     * @return Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
     * 
     * > **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`.
     * 
     */
    public Output sslEnforcementEnabled() {
        return this.sslEnforcementEnabled;
    }

    /**
     * The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`.
     * 
     */
    @Import(name="sslMinimalTlsVersionEnforced")
    private @Nullable Output sslMinimalTlsVersionEnforced;

    /**
     * @return The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`.
     * 
     */
    public Optional> sslMinimalTlsVersionEnforced() {
        return Optional.ofNullable(this.sslMinimalTlsVersionEnforced);
    }

    /**
     * Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage).
     * 
     */
    @Import(name="storageMb")
    private @Nullable Output storageMb;

    /**
     * @return Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage).
     * 
     */
    public Optional> storageMb() {
        return Optional.ofNullable(this.storageMb);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below.
     * 
     */
    @Import(name="threatDetectionPolicy")
    private @Nullable Output threatDetectionPolicy;

    /**
     * @return Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below.
     * 
     */
    public Optional> threatDetectionPolicy() {
        return Optional.ofNullable(this.threatDetectionPolicy);
    }

    /**
     * Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="version", required=true)
    private Output version;

    /**
     * @return Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created.
     * 
     */
    public Output version() {
        return this.version;
    }

    private ServerArgs() {}

    private ServerArgs(ServerArgs $) {
        this.administratorLogin = $.administratorLogin;
        this.administratorLoginPassword = $.administratorLoginPassword;
        this.autoGrowEnabled = $.autoGrowEnabled;
        this.backupRetentionDays = $.backupRetentionDays;
        this.createMode = $.createMode;
        this.creationSourceServerId = $.creationSourceServerId;
        this.geoRedundantBackupEnabled = $.geoRedundantBackupEnabled;
        this.identity = $.identity;
        this.infrastructureEncryptionEnabled = $.infrastructureEncryptionEnabled;
        this.location = $.location;
        this.name = $.name;
        this.publicNetworkAccessEnabled = $.publicNetworkAccessEnabled;
        this.resourceGroupName = $.resourceGroupName;
        this.restorePointInTime = $.restorePointInTime;
        this.skuName = $.skuName;
        this.sslEnforcementEnabled = $.sslEnforcementEnabled;
        this.sslMinimalTlsVersionEnforced = $.sslMinimalTlsVersionEnforced;
        this.storageMb = $.storageMb;
        this.tags = $.tags;
        this.threatDetectionPolicy = $.threatDetectionPolicy;
        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 login for the PostgreSQL Server. Required when `create_mode` is `Default`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(@Nullable Output administratorLogin) {
            $.administratorLogin = administratorLogin;
            return this;
        }

        /**
         * @param administratorLogin The Administrator login for the PostgreSQL Server. Required when `create_mode` is `Default`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(String administratorLogin) {
            return administratorLogin(Output.of(administratorLogin));
        }

        /**
         * @param administratorLoginPassword The Password associated with the `administrator_login` for the PostgreSQL Server. Required when `create_mode` is `Default`.
         * 
         * @return builder
         * 
         */
        public Builder administratorLoginPassword(@Nullable Output administratorLoginPassword) {
            $.administratorLoginPassword = administratorLoginPassword;
            return this;
        }

        /**
         * @param administratorLoginPassword The Password associated with the `administrator_login` for the PostgreSQL Server. Required when `create_mode` is `Default`.
         * 
         * @return builder
         * 
         */
        public Builder administratorLoginPassword(String administratorLoginPassword) {
            return administratorLoginPassword(Output.of(administratorLoginPassword));
        }

        /**
         * @param autoGrowEnabled Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder autoGrowEnabled(@Nullable Output autoGrowEnabled) {
            $.autoGrowEnabled = autoGrowEnabled;
            return this;
        }

        /**
         * @param autoGrowEnabled Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder autoGrowEnabled(Boolean autoGrowEnabled) {
            return autoGrowEnabled(Output.of(autoGrowEnabled));
        }

        /**
         * @param backupRetentionDays Backup retention days for the server, supported values are between `7` and `35` days.
         * 
         * @return builder
         * 
         */
        public Builder backupRetentionDays(@Nullable Output backupRetentionDays) {
            $.backupRetentionDays = backupRetentionDays;
            return this;
        }

        /**
         * @param backupRetentionDays Backup retention days for the server, supported values are between `7` and `35` days.
         * 
         * @return builder
         * 
         */
        public Builder backupRetentionDays(Integer backupRetentionDays) {
            return backupRetentionDays(Output.of(backupRetentionDays));
        }

        /**
         * @param createMode The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param creationSourceServerId For creation modes other than `Default`, the source server ID to use.
         * 
         * @return builder
         * 
         */
        public Builder creationSourceServerId(@Nullable Output creationSourceServerId) {
            $.creationSourceServerId = creationSourceServerId;
            return this;
        }

        /**
         * @param creationSourceServerId For creation modes other than `Default`, the source server ID to use.
         * 
         * @return builder
         * 
         */
        public Builder creationSourceServerId(String creationSourceServerId) {
            return creationSourceServerId(Output.of(creationSourceServerId));
        }

        /**
         * @param geoRedundantBackupEnabled Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder geoRedundantBackupEnabled(@Nullable Output geoRedundantBackupEnabled) {
            $.geoRedundantBackupEnabled = geoRedundantBackupEnabled;
            return this;
        }

        /**
         * @param geoRedundantBackupEnabled Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder geoRedundantBackupEnabled(Boolean geoRedundantBackupEnabled) {
            return geoRedundantBackupEnabled(Output.of(geoRedundantBackupEnabled));
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(ServerIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param infrastructureEncryptionEnabled Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** This property is currently still in development and not supported by Microsoft. If the `infrastructure_encryption_enabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages.
         * 
         * @return builder
         * 
         */
        public Builder infrastructureEncryptionEnabled(@Nullable Output infrastructureEncryptionEnabled) {
            $.infrastructureEncryptionEnabled = infrastructureEncryptionEnabled;
            return this;
        }

        /**
         * @param infrastructureEncryptionEnabled Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** This property is currently still in development and not supported by Microsoft. If the `infrastructure_encryption_enabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages.
         * 
         * @return builder
         * 
         */
        public Builder infrastructureEncryptionEnabled(Boolean infrastructureEncryptionEnabled) {
            return infrastructureEncryptionEnabled(Output.of(infrastructureEncryptionEnabled));
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param publicNetworkAccessEnabled Whether or not public network access is allowed for this server. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(@Nullable Output publicNetworkAccessEnabled) {
            $.publicNetworkAccessEnabled = publicNetworkAccessEnabled;
            return this;
        }

        /**
         * @param publicNetworkAccessEnabled Whether or not public network access is allowed for this server. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(Boolean publicNetworkAccessEnabled) {
            return publicNetworkAccessEnabled(Output.of(publicNetworkAccessEnabled));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param restorePointInTime When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
         * 
         * @return builder
         * 
         */
        public Builder restorePointInTime(@Nullable Output restorePointInTime) {
            $.restorePointInTime = restorePointInTime;
            return this;
        }

        /**
         * @param restorePointInTime When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
         * 
         * @return builder
         * 
         */
        public Builder restorePointInTime(String restorePointInTime) {
            return restorePointInTime(Output.of(restorePointInTime));
        }

        /**
         * @param skuName Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`.
         * 
         * > **NOTE:** When replication is set up and `sku_name` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling)
         * 
         * @return builder
         * 
         */
        public Builder skuName(Output skuName) {
            $.skuName = skuName;
            return this;
        }

        /**
         * @param skuName Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`.
         * 
         * > **NOTE:** When replication is set up and `sku_name` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling)
         * 
         * @return builder
         * 
         */
        public Builder skuName(String skuName) {
            return skuName(Output.of(skuName));
        }

        /**
         * @param sslEnforcementEnabled Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
         * 
         * > **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`.
         * 
         * @return builder
         * 
         */
        public Builder sslEnforcementEnabled(Output sslEnforcementEnabled) {
            $.sslEnforcementEnabled = sslEnforcementEnabled;
            return this;
        }

        /**
         * @param sslEnforcementEnabled Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
         * 
         * > **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`.
         * 
         * @return builder
         * 
         */
        public Builder sslEnforcementEnabled(Boolean sslEnforcementEnabled) {
            return sslEnforcementEnabled(Output.of(sslEnforcementEnabled));
        }

        /**
         * @param sslMinimalTlsVersionEnforced The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`.
         * 
         * @return builder
         * 
         */
        public Builder sslMinimalTlsVersionEnforced(@Nullable Output sslMinimalTlsVersionEnforced) {
            $.sslMinimalTlsVersionEnforced = sslMinimalTlsVersionEnforced;
            return this;
        }

        /**
         * @param sslMinimalTlsVersionEnforced The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`.
         * 
         * @return builder
         * 
         */
        public Builder sslMinimalTlsVersionEnforced(String sslMinimalTlsVersionEnforced) {
            return sslMinimalTlsVersionEnforced(Output.of(sslMinimalTlsVersionEnforced));
        }

        /**
         * @param storageMb Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage).
         * 
         * @return builder
         * 
         */
        public Builder storageMb(@Nullable Output storageMb) {
            $.storageMb = storageMb;
            return this;
        }

        /**
         * @param storageMb Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage).
         * 
         * @return builder
         * 
         */
        public Builder storageMb(Integer storageMb) {
            return storageMb(Output.of(storageMb));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param threatDetectionPolicy Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below.
         * 
         * @return builder
         * 
         */
        public Builder threatDetectionPolicy(@Nullable Output threatDetectionPolicy) {
            $.threatDetectionPolicy = threatDetectionPolicy;
            return this;
        }

        /**
         * @param threatDetectionPolicy Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below.
         * 
         * @return builder
         * 
         */
        public Builder threatDetectionPolicy(ServerThreatDetectionPolicyArgs threatDetectionPolicy) {
            return threatDetectionPolicy(Output.of(threatDetectionPolicy));
        }

        /**
         * @param version Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public ServerArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ServerArgs", "resourceGroupName");
            }
            if ($.skuName == null) {
                throw new MissingRequiredPropertyException("ServerArgs", "skuName");
            }
            if ($.sslEnforcementEnabled == null) {
                throw new MissingRequiredPropertyException("ServerArgs", "sslEnforcementEnabled");
            }
            if ($.version == null) {
                throw new MissingRequiredPropertyException("ServerArgs", "version");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy