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

com.pulumi.azure.postgresql.inputs.FlexibleServerState 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.azure.postgresql.inputs;

import com.pulumi.azure.postgresql.inputs.FlexibleServerAuthenticationArgs;
import com.pulumi.azure.postgresql.inputs.FlexibleServerCustomerManagedKeyArgs;
import com.pulumi.azure.postgresql.inputs.FlexibleServerHighAvailabilityArgs;
import com.pulumi.azure.postgresql.inputs.FlexibleServerIdentityArgs;
import com.pulumi.azure.postgresql.inputs.FlexibleServerMaintenanceWindowArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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 FlexibleServerState extends com.pulumi.resources.ResourceArgs {

    public static final FlexibleServerState Empty = new FlexibleServerState();

    /**
     * The Administrator login for the PostgreSQL Flexible Server. Required when `create_mode` is `Default` and `authentication.password_auth_enabled` is `true`.
     * 
     * > **Note:** Once `administrator_login` is specified, changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     * > **Note:** To create with `administrator_login` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`.
     * 
     */
    @Import(name="administratorLogin")
    private @Nullable Output administratorLogin;

    /**
     * @return The Administrator login for the PostgreSQL Flexible Server. Required when `create_mode` is `Default` and `authentication.password_auth_enabled` is `true`.
     * 
     * > **Note:** Once `administrator_login` is specified, changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     * > **Note:** To create with `administrator_login` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`.
     * 
     */
    public Optional> administratorLogin() {
        return Optional.ofNullable(this.administratorLogin);
    }

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

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

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

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

    /**
     * Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`.
     * 
     */
    @Import(name="autoGrowEnabled")
    private @Nullable Output autoGrowEnabled;

    /**
     * @return Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`.
     * 
     */
    public Optional> autoGrowEnabled() {
        return Optional.ofNullable(this.autoGrowEnabled);
    }

    /**
     * The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days.
     * 
     */
    @Import(name="backupRetentionDays")
    private @Nullable Output backupRetentionDays;

    /**
     * @return The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days.
     * 
     */
    public Optional> backupRetentionDays() {
        return Optional.ofNullable(this.backupRetentionDays);
    }

    /**
     * The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica` and `Update`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     * > **Note:** `create_mode` cannot be changed once it's set since it's a parameter at creation.
     * 
     * > **Note:** While creating the resource, `create_mode` cannot be set to `Update`.
     * 
     */
    @Import(name="createMode")
    private @Nullable Output createMode;

    /**
     * @return The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica` and `Update`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     * > **Note:** `create_mode` cannot be changed once it's set since it's a parameter at creation.
     * 
     * > **Note:** While creating the resource, `create_mode` cannot be set to `Update`.
     * 
     */
    public Optional> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="customerManagedKey")
    private @Nullable Output customerManagedKey;

    /**
     * @return A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    public Optional> customerManagedKey() {
        return Optional.ofNullable(this.customerManagedKey);
    }

    /**
     * The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    @Import(name="delegatedSubnetId")
    private @Nullable Output delegatedSubnetId;

    /**
     * @return The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    public Optional> delegatedSubnetId() {
        return Optional.ofNullable(this.delegatedSubnetId);
    }

    /**
     * The FQDN of the PostgreSQL Flexible Server.
     * 
     */
    @Import(name="fqdn")
    private @Nullable Output fqdn;

    /**
     * @return The FQDN of the PostgreSQL Flexible Server.
     * 
     */
    public Optional> fqdn() {
        return Optional.ofNullable(this.fqdn);
    }

    /**
     * Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    @Import(name="geoRedundantBackupEnabled")
    private @Nullable Output geoRedundantBackupEnabled;

    /**
     * @return Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    public Optional> geoRedundantBackupEnabled() {
        return Optional.ofNullable(this.geoRedundantBackupEnabled);
    }

    /**
     * A `high_availability` block as defined below.
     * 
     */
    @Import(name="highAvailability")
    private @Nullable Output highAvailability;

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

    /**
     * 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);
    }

    /**
     * The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * A `maintenance_window` block as defined below.
     * 
     */
    @Import(name="maintenanceWindow")
    private @Nullable Output maintenanceWindow;

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

    /**
     * The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     * > **Note** This must be unique across the entire Azure service, not just within the resource group.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     * > **Note** This must be unique across the entire Azure service, not just within the resource group.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The point in time to restore from `source_server_id` when `create_mode` is `GeoRestore`, `PointInTimeRestore`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    @Import(name="pointInTimeRestoreTimeInUtc")
    private @Nullable Output pointInTimeRestoreTimeInUtc;

    /**
     * @return The point in time to restore from `source_server_id` when `create_mode` is `GeoRestore`, `PointInTimeRestore`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    public Optional> pointInTimeRestoreTimeInUtc() {
        return Optional.ofNullable(this.pointInTimeRestoreTimeInUtc);
    }

    /**
     * The ID of the private DNS zone to create the PostgreSQL Flexible Server.
     * 
     * > **Note:** There will be a breaking change from upstream service at 15th July 2021, the `private_dns_zone_id` will be required when setting a `delegated_subnet_id`. For existing flexible servers who don't want to be recreated, you need to provide the `private_dns_zone_id` to the service team to manually migrate to the specified private DNS zone. The `azure.privatedns.Zone` should end with suffix `.postgres.database.azure.com`.
     * 
     */
    @Import(name="privateDnsZoneId")
    private @Nullable Output privateDnsZoneId;

    /**
     * @return The ID of the private DNS zone to create the PostgreSQL Flexible Server.
     * 
     * > **Note:** There will be a breaking change from upstream service at 15th July 2021, the `private_dns_zone_id` will be required when setting a `delegated_subnet_id`. For existing flexible servers who don't want to be recreated, you need to provide the `private_dns_zone_id` to the service team to manually migrate to the specified private DNS zone. The `azure.privatedns.Zone` should end with suffix `.postgres.database.azure.com`.
     * 
     */
    public Optional> privateDnsZoneId() {
        return Optional.ofNullable(this.privateDnsZoneId);
    }

    /**
     * Specifies whether this PostgreSQL Flexible Server is publicly accessible. Defaults to `true`.
     * 
     * > **Note:** `public_network_access_enabled` must be set to `false` when `delegated_subnet_id` and `private_dns_zone_id` have a value.
     * 
     */
    @Import(name="publicNetworkAccessEnabled")
    private @Nullable Output publicNetworkAccessEnabled;

    /**
     * @return Specifies whether this PostgreSQL Flexible Server is publicly accessible. Defaults to `true`.
     * 
     * > **Note:** `public_network_access_enabled` must be set to `false` when `delegated_subnet_id` and `private_dns_zone_id` have a value.
     * 
     */
    public Optional> publicNetworkAccessEnabled() {
        return Optional.ofNullable(this.publicNetworkAccessEnabled);
    }

    /**
     * The replication role for the PostgreSQL Flexible Server. Possible value is `None`.
     * 
     * > **Note:** The `replication_role` cannot be set while creating and only can be updated to `None` for replica server.
     * 
     */
    @Import(name="replicationRole")
    private @Nullable Output replicationRole;

    /**
     * @return The replication role for the PostgreSQL Flexible Server. Possible value is `None`.
     * 
     * > **Note:** The `replication_role` cannot be set while creating and only can be updated to `None` for replica server.
     * 
     */
    public Optional> replicationRole() {
        return Optional.ofNullable(this.replicationRole);
    }

    /**
     * The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output resourceGroupName;

    /**
     * @return The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    public Optional> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`).
     * 
     */
    @Import(name="skuName")
    private @Nullable Output skuName;

    /**
     * @return The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`).
     * 
     */
    public Optional> skuName() {
        return Optional.ofNullable(this.skuName);
    }

    /**
     * The resource ID of the source PostgreSQL Flexible Server to be restored. Required when `create_mode` is `GeoRestore`, `PointInTimeRestore` or `Replica`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    @Import(name="sourceServerId")
    private @Nullable Output sourceServerId;

    /**
     * @return The resource ID of the source PostgreSQL Flexible Server to be restored. Required when `create_mode` is `GeoRestore`, `PointInTimeRestore` or `Replica`. Changing this forces a new PostgreSQL Flexible Server to be created.
     * 
     */
    public Optional> sourceServerId() {
        return Optional.ofNullable(this.sourceServerId);
    }

    /**
     * The max storage allowed for the PostgreSQL Flexible Server. Possible values are `32768`, `65536`, `131072`, `262144`, `524288`, `1048576`, `2097152`, `4193280`, `4194304`, `8388608`, `16777216` and `33553408`.
     * 
     * > **Note:** If the `storage_mb` field is undefined on the initial deployment of the PostgreSQL Flexible Server resource it will default to `32768`. If the `storage_mb` field has been defined and then removed, the `storage_mb` field will retain the previously defined value.
     * 
     * > **Note:** The `storage_mb` can only be scaled up, for example, you can scale the `storage_mb` from `32768` to `65536`, but not from `65536` to `32768`.
     * 
     */
    @Import(name="storageMb")
    private @Nullable Output storageMb;

    /**
     * @return The max storage allowed for the PostgreSQL Flexible Server. Possible values are `32768`, `65536`, `131072`, `262144`, `524288`, `1048576`, `2097152`, `4193280`, `4194304`, `8388608`, `16777216` and `33553408`.
     * 
     * > **Note:** If the `storage_mb` field is undefined on the initial deployment of the PostgreSQL Flexible Server resource it will default to `32768`. If the `storage_mb` field has been defined and then removed, the `storage_mb` field will retain the previously defined value.
     * 
     * > **Note:** The `storage_mb` can only be scaled up, for example, you can scale the `storage_mb` from `32768` to `65536`, but not from `65536` to `32768`.
     * 
     */
    public Optional> storageMb() {
        return Optional.ofNullable(this.storageMb);
    }

    /**
     * The name of storage performance tier for IOPS of the PostgreSQL Flexible Server. Possible values are `P4`, `P6`, `P10`, `P15`,`P20`, `P30`,`P40`, `P50`,`P60`, `P70` or `P80`. Default value is dependant on the `storage_mb` value. Please see the `storage_tier` defaults based on `storage_mb` table below.
     * 
     * > **Note:** The `storage_tier` can be scaled once every 12 hours, this restriction is in place to ensure stability and performance after any changes to your PostgreSQL Flexible Server's configuration.
     * 
     */
    @Import(name="storageTier")
    private @Nullable Output storageTier;

    /**
     * @return The name of storage performance tier for IOPS of the PostgreSQL Flexible Server. Possible values are `P4`, `P6`, `P10`, `P15`,`P20`, `P30`,`P40`, `P50`,`P60`, `P70` or `P80`. Default value is dependant on the `storage_mb` value. Please see the `storage_tier` defaults based on `storage_mb` table below.
     * 
     * > **Note:** The `storage_tier` can be scaled once every 12 hours, this restriction is in place to ensure stability and performance after any changes to your PostgreSQL Flexible Server's configuration.
     * 
     */
    public Optional> storageTier() {
        return Optional.ofNullable(this.storageTier);
    }

    /**
     * A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15` and `16`. Required when `create_mode` is `Default`.
     * 
     * > **Note:** When `create_mode` is `Update`, upgrading version wouldn't force a new resource to be created.
     * 
     */
    @Import(name="version")
    private @Nullable Output version;

    /**
     * @return The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15` and `16`. Required when `create_mode` is `Default`.
     * 
     * > **Note:** When `create_mode` is `Update`, upgrading version wouldn't force a new resource to be created.
     * 
     */
    public Optional> version() {
        return Optional.ofNullable(this.version);
    }

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

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

    private FlexibleServerState() {}

    private FlexibleServerState(FlexibleServerState $) {
        this.administratorLogin = $.administratorLogin;
        this.administratorPassword = $.administratorPassword;
        this.authentication = $.authentication;
        this.autoGrowEnabled = $.autoGrowEnabled;
        this.backupRetentionDays = $.backupRetentionDays;
        this.createMode = $.createMode;
        this.customerManagedKey = $.customerManagedKey;
        this.delegatedSubnetId = $.delegatedSubnetId;
        this.fqdn = $.fqdn;
        this.geoRedundantBackupEnabled = $.geoRedundantBackupEnabled;
        this.highAvailability = $.highAvailability;
        this.identity = $.identity;
        this.location = $.location;
        this.maintenanceWindow = $.maintenanceWindow;
        this.name = $.name;
        this.pointInTimeRestoreTimeInUtc = $.pointInTimeRestoreTimeInUtc;
        this.privateDnsZoneId = $.privateDnsZoneId;
        this.publicNetworkAccessEnabled = $.publicNetworkAccessEnabled;
        this.replicationRole = $.replicationRole;
        this.resourceGroupName = $.resourceGroupName;
        this.skuName = $.skuName;
        this.sourceServerId = $.sourceServerId;
        this.storageMb = $.storageMb;
        this.storageTier = $.storageTier;
        this.tags = $.tags;
        this.version = $.version;
        this.zone = $.zone;
    }

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

    public static final class Builder {
        private FlexibleServerState $;

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

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

        /**
         * @param administratorLogin The Administrator login for the PostgreSQL Flexible Server. Required when `create_mode` is `Default` and `authentication.password_auth_enabled` is `true`.
         * 
         * > **Note:** Once `administrator_login` is specified, changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * > **Note:** To create with `administrator_login` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(@Nullable Output administratorLogin) {
            $.administratorLogin = administratorLogin;
            return this;
        }

        /**
         * @param administratorLogin The Administrator login for the PostgreSQL Flexible Server. Required when `create_mode` is `Default` and `authentication.password_auth_enabled` is `true`.
         * 
         * > **Note:** Once `administrator_login` is specified, changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * > **Note:** To create with `administrator_login` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(String administratorLogin) {
            return administratorLogin(Output.of(administratorLogin));
        }

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

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

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

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

        /**
         * @param autoGrowEnabled Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder autoGrowEnabled(@Nullable Output autoGrowEnabled) {
            $.autoGrowEnabled = autoGrowEnabled;
            return this;
        }

        /**
         * @param autoGrowEnabled Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder autoGrowEnabled(Boolean autoGrowEnabled) {
            return autoGrowEnabled(Output.of(autoGrowEnabled));
        }

        /**
         * @param backupRetentionDays The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days.
         * 
         * @return builder
         * 
         */
        public Builder backupRetentionDays(@Nullable Output backupRetentionDays) {
            $.backupRetentionDays = backupRetentionDays;
            return this;
        }

        /**
         * @param backupRetentionDays The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days.
         * 
         * @return builder
         * 
         */
        public Builder backupRetentionDays(Integer backupRetentionDays) {
            return backupRetentionDays(Output.of(backupRetentionDays));
        }

        /**
         * @param createMode The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica` and `Update`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * > **Note:** `create_mode` cannot be changed once it's set since it's a parameter at creation.
         * 
         * > **Note:** While creating the resource, `create_mode` cannot be set to `Update`.
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica` and `Update`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * > **Note:** `create_mode` cannot be changed once it's set since it's a parameter at creation.
         * 
         * > **Note:** While creating the resource, `create_mode` cannot be set to `Update`.
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param customerManagedKey A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKey(@Nullable Output customerManagedKey) {
            $.customerManagedKey = customerManagedKey;
            return this;
        }

        /**
         * @param customerManagedKey A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKey(FlexibleServerCustomerManagedKeyArgs customerManagedKey) {
            return customerManagedKey(Output.of(customerManagedKey));
        }

        /**
         * @param delegatedSubnetId The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder delegatedSubnetId(@Nullable Output delegatedSubnetId) {
            $.delegatedSubnetId = delegatedSubnetId;
            return this;
        }

        /**
         * @param delegatedSubnetId The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder delegatedSubnetId(String delegatedSubnetId) {
            return delegatedSubnetId(Output.of(delegatedSubnetId));
        }

        /**
         * @param fqdn The FQDN of the PostgreSQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder fqdn(@Nullable Output fqdn) {
            $.fqdn = fqdn;
            return this;
        }

        /**
         * @param fqdn The FQDN of the PostgreSQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder fqdn(String fqdn) {
            return fqdn(Output.of(fqdn));
        }

        /**
         * @param geoRedundantBackupEnabled Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder geoRedundantBackupEnabled(@Nullable Output geoRedundantBackupEnabled) {
            $.geoRedundantBackupEnabled = geoRedundantBackupEnabled;
            return this;
        }

        /**
         * @param geoRedundantBackupEnabled Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder geoRedundantBackupEnabled(Boolean geoRedundantBackupEnabled) {
            return geoRedundantBackupEnabled(Output.of(geoRedundantBackupEnabled));
        }

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

        /**
         * @param highAvailability A `high_availability` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder highAvailability(FlexibleServerHighAvailabilityArgs highAvailability) {
            return highAvailability(Output.of(highAvailability));
        }

        /**
         * @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(FlexibleServerIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param location The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

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

        /**
         * @param maintenanceWindow A `maintenance_window` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder maintenanceWindow(FlexibleServerMaintenanceWindowArgs maintenanceWindow) {
            return maintenanceWindow(Output.of(maintenanceWindow));
        }

        /**
         * @param name The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * > **Note** This must be unique across the entire Azure service, not just within the resource group.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * > **Note** This must be unique across the entire Azure service, not just within the resource group.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param pointInTimeRestoreTimeInUtc The point in time to restore from `source_server_id` when `create_mode` is `GeoRestore`, `PointInTimeRestore`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder pointInTimeRestoreTimeInUtc(@Nullable Output pointInTimeRestoreTimeInUtc) {
            $.pointInTimeRestoreTimeInUtc = pointInTimeRestoreTimeInUtc;
            return this;
        }

        /**
         * @param pointInTimeRestoreTimeInUtc The point in time to restore from `source_server_id` when `create_mode` is `GeoRestore`, `PointInTimeRestore`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder pointInTimeRestoreTimeInUtc(String pointInTimeRestoreTimeInUtc) {
            return pointInTimeRestoreTimeInUtc(Output.of(pointInTimeRestoreTimeInUtc));
        }

        /**
         * @param privateDnsZoneId The ID of the private DNS zone to create the PostgreSQL Flexible Server.
         * 
         * > **Note:** There will be a breaking change from upstream service at 15th July 2021, the `private_dns_zone_id` will be required when setting a `delegated_subnet_id`. For existing flexible servers who don't want to be recreated, you need to provide the `private_dns_zone_id` to the service team to manually migrate to the specified private DNS zone. The `azure.privatedns.Zone` should end with suffix `.postgres.database.azure.com`.
         * 
         * @return builder
         * 
         */
        public Builder privateDnsZoneId(@Nullable Output privateDnsZoneId) {
            $.privateDnsZoneId = privateDnsZoneId;
            return this;
        }

        /**
         * @param privateDnsZoneId The ID of the private DNS zone to create the PostgreSQL Flexible Server.
         * 
         * > **Note:** There will be a breaking change from upstream service at 15th July 2021, the `private_dns_zone_id` will be required when setting a `delegated_subnet_id`. For existing flexible servers who don't want to be recreated, you need to provide the `private_dns_zone_id` to the service team to manually migrate to the specified private DNS zone. The `azure.privatedns.Zone` should end with suffix `.postgres.database.azure.com`.
         * 
         * @return builder
         * 
         */
        public Builder privateDnsZoneId(String privateDnsZoneId) {
            return privateDnsZoneId(Output.of(privateDnsZoneId));
        }

        /**
         * @param publicNetworkAccessEnabled Specifies whether this PostgreSQL Flexible Server is publicly accessible. Defaults to `true`.
         * 
         * > **Note:** `public_network_access_enabled` must be set to `false` when `delegated_subnet_id` and `private_dns_zone_id` have a value.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(@Nullable Output publicNetworkAccessEnabled) {
            $.publicNetworkAccessEnabled = publicNetworkAccessEnabled;
            return this;
        }

        /**
         * @param publicNetworkAccessEnabled Specifies whether this PostgreSQL Flexible Server is publicly accessible. Defaults to `true`.
         * 
         * > **Note:** `public_network_access_enabled` must be set to `false` when `delegated_subnet_id` and `private_dns_zone_id` have a value.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(Boolean publicNetworkAccessEnabled) {
            return publicNetworkAccessEnabled(Output.of(publicNetworkAccessEnabled));
        }

        /**
         * @param replicationRole The replication role for the PostgreSQL Flexible Server. Possible value is `None`.
         * 
         * > **Note:** The `replication_role` cannot be set while creating and only can be updated to `None` for replica server.
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(@Nullable Output replicationRole) {
            $.replicationRole = replicationRole;
            return this;
        }

        /**
         * @param replicationRole The replication role for the PostgreSQL Flexible Server. Possible value is `None`.
         * 
         * > **Note:** The `replication_role` cannot be set while creating and only can be updated to `None` for replica server.
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(String replicationRole) {
            return replicationRole(Output.of(replicationRole));
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param skuName The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`).
         * 
         * @return builder
         * 
         */
        public Builder skuName(@Nullable Output skuName) {
            $.skuName = skuName;
            return this;
        }

        /**
         * @param skuName The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`).
         * 
         * @return builder
         * 
         */
        public Builder skuName(String skuName) {
            return skuName(Output.of(skuName));
        }

        /**
         * @param sourceServerId The resource ID of the source PostgreSQL Flexible Server to be restored. Required when `create_mode` is `GeoRestore`, `PointInTimeRestore` or `Replica`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourceServerId(@Nullable Output sourceServerId) {
            $.sourceServerId = sourceServerId;
            return this;
        }

        /**
         * @param sourceServerId The resource ID of the source PostgreSQL Flexible Server to be restored. Required when `create_mode` is `GeoRestore`, `PointInTimeRestore` or `Replica`. Changing this forces a new PostgreSQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourceServerId(String sourceServerId) {
            return sourceServerId(Output.of(sourceServerId));
        }

        /**
         * @param storageMb The max storage allowed for the PostgreSQL Flexible Server. Possible values are `32768`, `65536`, `131072`, `262144`, `524288`, `1048576`, `2097152`, `4193280`, `4194304`, `8388608`, `16777216` and `33553408`.
         * 
         * > **Note:** If the `storage_mb` field is undefined on the initial deployment of the PostgreSQL Flexible Server resource it will default to `32768`. If the `storage_mb` field has been defined and then removed, the `storage_mb` field will retain the previously defined value.
         * 
         * > **Note:** The `storage_mb` can only be scaled up, for example, you can scale the `storage_mb` from `32768` to `65536`, but not from `65536` to `32768`.
         * 
         * @return builder
         * 
         */
        public Builder storageMb(@Nullable Output storageMb) {
            $.storageMb = storageMb;
            return this;
        }

        /**
         * @param storageMb The max storage allowed for the PostgreSQL Flexible Server. Possible values are `32768`, `65536`, `131072`, `262144`, `524288`, `1048576`, `2097152`, `4193280`, `4194304`, `8388608`, `16777216` and `33553408`.
         * 
         * > **Note:** If the `storage_mb` field is undefined on the initial deployment of the PostgreSQL Flexible Server resource it will default to `32768`. If the `storage_mb` field has been defined and then removed, the `storage_mb` field will retain the previously defined value.
         * 
         * > **Note:** The `storage_mb` can only be scaled up, for example, you can scale the `storage_mb` from `32768` to `65536`, but not from `65536` to `32768`.
         * 
         * @return builder
         * 
         */
        public Builder storageMb(Integer storageMb) {
            return storageMb(Output.of(storageMb));
        }

        /**
         * @param storageTier The name of storage performance tier for IOPS of the PostgreSQL Flexible Server. Possible values are `P4`, `P6`, `P10`, `P15`,`P20`, `P30`,`P40`, `P50`,`P60`, `P70` or `P80`. Default value is dependant on the `storage_mb` value. Please see the `storage_tier` defaults based on `storage_mb` table below.
         * 
         * > **Note:** The `storage_tier` can be scaled once every 12 hours, this restriction is in place to ensure stability and performance after any changes to your PostgreSQL Flexible Server's configuration.
         * 
         * @return builder
         * 
         */
        public Builder storageTier(@Nullable Output storageTier) {
            $.storageTier = storageTier;
            return this;
        }

        /**
         * @param storageTier The name of storage performance tier for IOPS of the PostgreSQL Flexible Server. Possible values are `P4`, `P6`, `P10`, `P15`,`P20`, `P30`,`P40`, `P50`,`P60`, `P70` or `P80`. Default value is dependant on the `storage_mb` value. Please see the `storage_tier` defaults based on `storage_mb` table below.
         * 
         * > **Note:** The `storage_tier` can be scaled once every 12 hours, this restriction is in place to ensure stability and performance after any changes to your PostgreSQL Flexible Server's configuration.
         * 
         * @return builder
         * 
         */
        public Builder storageTier(String storageTier) {
            return storageTier(Output.of(storageTier));
        }

        /**
         * @param tags A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param version The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15` and `16`. Required when `create_mode` is `Default`.
         * 
         * > **Note:** When `create_mode` is `Update`, upgrading version wouldn't force a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15` and `16`. Required when `create_mode` is `Default`.
         * 
         * > **Note:** When `create_mode` is `Update`, upgrading version wouldn't force a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

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

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

        public FlexibleServerState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy