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

com.pulumi.azure.postgresql.kotlin.FlexibleServerArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.postgresql.kotlin

import com.pulumi.azure.postgresql.FlexibleServerArgs.builder
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerAuthenticationArgs
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerAuthenticationArgsBuilder
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerCustomerManagedKeyArgs
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerCustomerManagedKeyArgsBuilder
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerHighAvailabilityArgs
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerHighAvailabilityArgsBuilder
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerIdentityArgs
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerIdentityArgsBuilder
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerMaintenanceWindowArgs
import com.pulumi.azure.postgresql.kotlin.inputs.FlexibleServerMaintenanceWindowArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a PostgreSQL Flexible Server.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "example-vn",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     addressSpaces: ["10.0.0.0/16"],
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "example-sn",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/24"],
 *     serviceEndpoints: ["Microsoft.Storage"],
 *     delegations: [{
 *         name: "fs",
 *         serviceDelegation: {
 *             name: "Microsoft.DBforPostgreSQL/flexibleServers",
 *             actions: ["Microsoft.Network/virtualNetworks/subnets/join/action"],
 *         },
 *     }],
 * });
 * const exampleZone = new azure.privatedns.Zone("example", {
 *     name: "example.postgres.database.azure.com",
 *     resourceGroupName: example.name,
 * });
 * const exampleZoneVirtualNetworkLink = new azure.privatedns.ZoneVirtualNetworkLink("example", {
 *     name: "exampleVnetZone.com",
 *     privateDnsZoneName: exampleZone.name,
 *     virtualNetworkId: exampleVirtualNetwork.id,
 *     resourceGroupName: example.name,
 * }, {
 *     dependsOn: [exampleSubnet],
 * });
 * const exampleFlexibleServer = new azure.postgresql.FlexibleServer("example", {
 *     name: "example-psqlflexibleserver",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     version: "12",
 *     delegatedSubnetId: exampleSubnet.id,
 *     privateDnsZoneId: exampleZone.id,
 *     publicNetworkAccessEnabled: false,
 *     administratorLogin: "psqladmin",
 *     administratorPassword: "H@Sh1CoR3!",
 *     zone: "1",
 *     storageMb: 32768,
 *     storageTier: "P30",
 *     skuName: "GP_Standard_D4s_v3",
 * }, {
 *     dependsOn: [exampleZoneVirtualNetworkLink],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_virtual_network = azure.network.VirtualNetwork("example",
 *     name="example-vn",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     address_spaces=["10.0.0.0/16"])
 * example_subnet = azure.network.Subnet("example",
 *     name="example-sn",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.2.0/24"],
 *     service_endpoints=["Microsoft.Storage"],
 *     delegations=[{
 *         "name": "fs",
 *         "service_delegation": {
 *             "name": "Microsoft.DBforPostgreSQL/flexibleServers",
 *             "actions": ["Microsoft.Network/virtualNetworks/subnets/join/action"],
 *         },
 *     }])
 * example_zone = azure.privatedns.Zone("example",
 *     name="example.postgres.database.azure.com",
 *     resource_group_name=example.name)
 * example_zone_virtual_network_link = azure.privatedns.ZoneVirtualNetworkLink("example",
 *     name="exampleVnetZone.com",
 *     private_dns_zone_name=example_zone.name,
 *     virtual_network_id=example_virtual_network.id,
 *     resource_group_name=example.name,
 *     opts = pulumi.ResourceOptions(depends_on=[example_subnet]))
 * example_flexible_server = azure.postgresql.FlexibleServer("example",
 *     name="example-psqlflexibleserver",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     version="12",
 *     delegated_subnet_id=example_subnet.id,
 *     private_dns_zone_id=example_zone.id,
 *     public_network_access_enabled=False,
 *     administrator_login="psqladmin",
 *     administrator_password="H@Sh1CoR3!",
 *     zone="1",
 *     storage_mb=32768,
 *     storage_tier="P30",
 *     sku_name="GP_Standard_D4s_v3",
 *     opts = pulumi.ResourceOptions(depends_on=[example_zone_virtual_network_link]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
 *     {
 *         Name = "example-vn",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AddressSpaces = new[]
 *         {
 *             "10.0.0.0/16",
 *         },
 *     });
 *     var exampleSubnet = new Azure.Network.Subnet("example", new()
 *     {
 *         Name = "example-sn",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.2.0/24",
 *         },
 *         ServiceEndpoints = new[]
 *         {
 *             "Microsoft.Storage",
 *         },
 *         Delegations = new[]
 *         {
 *             new Azure.Network.Inputs.SubnetDelegationArgs
 *             {
 *                 Name = "fs",
 *                 ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
 *                 {
 *                     Name = "Microsoft.DBforPostgreSQL/flexibleServers",
 *                     Actions = new[]
 *                     {
 *                         "Microsoft.Network/virtualNetworks/subnets/join/action",
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var exampleZone = new Azure.PrivateDns.Zone("example", new()
 *     {
 *         Name = "example.postgres.database.azure.com",
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleZoneVirtualNetworkLink = new Azure.PrivateDns.ZoneVirtualNetworkLink("example", new()
 *     {
 *         Name = "exampleVnetZone.com",
 *         PrivateDnsZoneName = exampleZone.Name,
 *         VirtualNetworkId = exampleVirtualNetwork.Id,
 *         ResourceGroupName = example.Name,
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             exampleSubnet,
 *         },
 *     });
 *     var exampleFlexibleServer = new Azure.PostgreSql.FlexibleServer("example", new()
 *     {
 *         Name = "example-psqlflexibleserver",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         Version = "12",
 *         DelegatedSubnetId = exampleSubnet.Id,
 *         PrivateDnsZoneId = exampleZone.Id,
 *         PublicNetworkAccessEnabled = false,
 *         AdministratorLogin = "psqladmin",
 *         AdministratorPassword = "H@Sh1CoR3!",
 *         Zone = "1",
 *         StorageMb = 32768,
 *         StorageTier = "P30",
 *         SkuName = "GP_Standard_D4s_v3",
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             exampleZoneVirtualNetworkLink,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/postgresql"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
 * 			Name:              pulumi.String("example-vn"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/16"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
 * 			Name:               pulumi.String("example-sn"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.2.0/24"),
 * 			},
 * 			ServiceEndpoints: pulumi.StringArray{
 * 				pulumi.String("Microsoft.Storage"),
 * 			},
 * 			Delegations: network.SubnetDelegationArray{
 * 				&network.SubnetDelegationArgs{
 * 					Name: pulumi.String("fs"),
 * 					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
 * 						Name: pulumi.String("Microsoft.DBforPostgreSQL/flexibleServers"),
 * 						Actions: pulumi.StringArray{
 * 							pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
 * 			Name:              pulumi.String("example.postgres.database.azure.com"),
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleZoneVirtualNetworkLink, err := privatedns.NewZoneVirtualNetworkLink(ctx, "example", &privatedns.ZoneVirtualNetworkLinkArgs{
 * 			Name:               pulumi.String("exampleVnetZone.com"),
 * 			PrivateDnsZoneName: exampleZone.Name,
 * 			VirtualNetworkId:   exampleVirtualNetwork.ID(),
 * 			ResourceGroupName:  example.Name,
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			exampleSubnet,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{
 * 			Name:                       pulumi.String("example-psqlflexibleserver"),
 * 			ResourceGroupName:          example.Name,
 * 			Location:                   example.Location,
 * 			Version:                    pulumi.String("12"),
 * 			DelegatedSubnetId:          exampleSubnet.ID(),
 * 			PrivateDnsZoneId:           exampleZone.ID(),
 * 			PublicNetworkAccessEnabled: pulumi.Bool(false),
 * 			AdministratorLogin:         pulumi.String("psqladmin"),
 * 			AdministratorPassword:      pulumi.String("H@Sh1CoR3!"),
 * 			Zone:                       pulumi.String("1"),
 * 			StorageMb:                  pulumi.Int(32768),
 * 			StorageTier:                pulumi.String("P30"),
 * 			SkuName:                    pulumi.String("GP_Standard_D4s_v3"),
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			exampleZoneVirtualNetworkLink,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
 * import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
 * import com.pulumi.azure.privatedns.Zone;
 * import com.pulumi.azure.privatedns.ZoneArgs;
 * import com.pulumi.azure.privatedns.ZoneVirtualNetworkLink;
 * import com.pulumi.azure.privatedns.ZoneVirtualNetworkLinkArgs;
 * import com.pulumi.azure.postgresql.FlexibleServer;
 * import com.pulumi.azure.postgresql.FlexibleServerArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("example-vn")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .addressSpaces("10.0.0.0/16")
 *             .build());
 *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
 *             .name("example-sn")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.2.0/24")
 *             .serviceEndpoints("Microsoft.Storage")
 *             .delegations(SubnetDelegationArgs.builder()
 *                 .name("fs")
 *                 .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
 *                     .name("Microsoft.DBforPostgreSQL/flexibleServers")
 *                     .actions("Microsoft.Network/virtualNetworks/subnets/join/action")
 *                     .build())
 *                 .build())
 *             .build());
 *         var exampleZone = new Zone("exampleZone", ZoneArgs.builder()
 *             .name("example.postgres.database.azure.com")
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleZoneVirtualNetworkLink = new ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink", ZoneVirtualNetworkLinkArgs.builder()
 *             .name("exampleVnetZone.com")
 *             .privateDnsZoneName(exampleZone.name())
 *             .virtualNetworkId(exampleVirtualNetwork.id())
 *             .resourceGroupName(example.name())
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleSubnet)
 *                 .build());
 *         var exampleFlexibleServer = new FlexibleServer("exampleFlexibleServer", FlexibleServerArgs.builder()
 *             .name("example-psqlflexibleserver")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .version("12")
 *             .delegatedSubnetId(exampleSubnet.id())
 *             .privateDnsZoneId(exampleZone.id())
 *             .publicNetworkAccessEnabled(false)
 *             .administratorLogin("psqladmin")
 *             .administratorPassword("H@Sh1CoR3!")
 *             .zone("1")
 *             .storageMb(32768)
 *             .storageTier("P30")
 *             .skuName("GP_Standard_D4s_v3")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleZoneVirtualNetworkLink)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: example
 *     properties:
 *       name: example-vn
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       addressSpaces:
 *         - 10.0.0.0/16
 *   exampleSubnet:
 *     type: azure:network:Subnet
 *     name: example
 *     properties:
 *       name: example-sn
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.2.0/24
 *       serviceEndpoints:
 *         - Microsoft.Storage
 *       delegations:
 *         - name: fs
 *           serviceDelegation:
 *             name: Microsoft.DBforPostgreSQL/flexibleServers
 *             actions:
 *               - Microsoft.Network/virtualNetworks/subnets/join/action
 *   exampleZone:
 *     type: azure:privatedns:Zone
 *     name: example
 *     properties:
 *       name: example.postgres.database.azure.com
 *       resourceGroupName: ${example.name}
 *   exampleZoneVirtualNetworkLink:
 *     type: azure:privatedns:ZoneVirtualNetworkLink
 *     name: example
 *     properties:
 *       name: exampleVnetZone.com
 *       privateDnsZoneName: ${exampleZone.name}
 *       virtualNetworkId: ${exampleVirtualNetwork.id}
 *       resourceGroupName: ${example.name}
 *     options:
 *       dependson:
 *         - ${exampleSubnet}
 *   exampleFlexibleServer:
 *     type: azure:postgresql:FlexibleServer
 *     name: example
 *     properties:
 *       name: example-psqlflexibleserver
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       version: '12'
 *       delegatedSubnetId: ${exampleSubnet.id}
 *       privateDnsZoneId: ${exampleZone.id}
 *       publicNetworkAccessEnabled: false
 *       administratorLogin: psqladmin
 *       administratorPassword: H@Sh1CoR3!
 *       zone: '1'
 *       storageMb: 32768
 *       storageTier: P30
 *       skuName: GP_Standard_D4s_v3
 *     options:
 *       dependson:
 *         - ${exampleZoneVirtualNetworkLink}
 * ```
 * 
 * ## `storage_tier` defaults based on `storage_mb`
 * | `storage_mb` | GiB   | TiB | Default | Supported `storage_tier`'s           | Provisioned `IOPS`  |
 * |:------------:|:-----:|:---:|:-------:|:------------------------------------:|:-------------------:|
 * | 32768        | 32    |  -  | P4      | P4, P6, P10, P15, P20, P30, P40, P50 | 120                 |
 * | 65536        | 64    |  -  | P6      | P6, P10, P15, P20, P30, P40, P50     | 240                 |
 * | 131072       | 128   |  -  | P10     | P10, P15, P20, P30, P40, P50         | 500                 |
 * | 262144       | 256   |  -  | P15     | P15, P20, P30, P40, P50              | 1,100               |
 * | 524288       | 512   |  -  | P20     | P20, P30, P40, P50                   | 2,300               |
 * | 1048576      | 1024  |  1  | P30     | P30, P40, P50                        | 5,000               |
 * | 2097152      | 2048  |  2  | P40     | P40, P50                             | 7,500               |
 * | 4193280      | 4095  |  4  | P50     | P50                                  | 7,500               |
 * | 4194304      | 4096  |  4  | P50     | P50                                  | 7,500               |
 * | 8388608      | 8192  |  8  | P60     | P60, P70                             | 16,000              |
 * | 16777216     | 16384 |  16 | P70     | P70, P80                             | 18,000              |
 * | 33553408     | 32767 |  32 | P80     | P80                                  | 20,000              |
 * > **Note:** Host Caching (ReadOnly and Read/Write) is supported on disk sizes less than 4194304 MiB. This means any disk that is provisioned up to 4193280 MiB can take advantage of Host Caching. Host caching is not supported for disk sizes larger than 4193280 MiB. For example, a P50 premium disk provisioned at 4193280 GiB can take advantage of Host caching while a P50 disk provisioned at 4194304 MiB cannot. Moving from a smaller disk size to a larger disk size, greater than 4193280 MiB, will cause the disk to lose the disk caching ability.
 * ---
 * ## Import
 * PostgreSQL Flexible Servers can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:postgresql/flexibleServer:FlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/flexibleServers/server1
 * ```
 * @property 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`.
 * @property 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`.
 * @property authentication An `authentication` block as defined below.
 * @property autoGrowEnabled Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`.
 * @property backupRetentionDays The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days.
 * @property 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`.
 * @property customerManagedKey A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
 * @property 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.
 * @property 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.
 * @property highAvailability A `high_availability` block as defined below.
 * @property identity An `identity` block as defined below.
 * @property location The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
 * @property maintenanceWindow A `maintenance_window` block as defined below.
 * @property 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.
 * @property 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.
 * @property 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`.
 * @property 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.
 * @property 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.
 * @property 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.
 * @property 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`).
 * @property 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.
 * @property 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`.
 * @property 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.
 * @property tags A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
 * @property 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.
 * @property zone
 */
public data class FlexibleServerArgs(
    public val administratorLogin: Output? = null,
    public val administratorPassword: Output? = null,
    public val authentication: Output? = null,
    public val autoGrowEnabled: Output? = null,
    public val backupRetentionDays: Output? = null,
    public val createMode: Output? = null,
    public val customerManagedKey: Output? = null,
    public val delegatedSubnetId: Output? = null,
    public val geoRedundantBackupEnabled: Output? = null,
    public val highAvailability: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val maintenanceWindow: Output? = null,
    public val name: Output? = null,
    public val pointInTimeRestoreTimeInUtc: Output? = null,
    public val privateDnsZoneId: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val replicationRole: Output? = null,
    public val resourceGroupName: Output? = null,
    public val skuName: Output? = null,
    public val sourceServerId: Output? = null,
    public val storageMb: Output? = null,
    public val storageTier: Output? = null,
    public val tags: Output>? = null,
    public val version: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.postgresql.FlexibleServerArgs =
        com.pulumi.azure.postgresql.FlexibleServerArgs.builder()
            .administratorLogin(administratorLogin?.applyValue({ args0 -> args0 }))
            .administratorPassword(administratorPassword?.applyValue({ args0 -> args0 }))
            .authentication(authentication?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .autoGrowEnabled(autoGrowEnabled?.applyValue({ args0 -> args0 }))
            .backupRetentionDays(backupRetentionDays?.applyValue({ args0 -> args0 }))
            .createMode(createMode?.applyValue({ args0 -> args0 }))
            .customerManagedKey(
                customerManagedKey?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .delegatedSubnetId(delegatedSubnetId?.applyValue({ args0 -> args0 }))
            .geoRedundantBackupEnabled(geoRedundantBackupEnabled?.applyValue({ args0 -> args0 }))
            .highAvailability(highAvailability?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .maintenanceWindow(maintenanceWindow?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .pointInTimeRestoreTimeInUtc(pointInTimeRestoreTimeInUtc?.applyValue({ args0 -> args0 }))
            .privateDnsZoneId(privateDnsZoneId?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .replicationRole(replicationRole?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .sourceServerId(sourceServerId?.applyValue({ args0 -> args0 }))
            .storageMb(storageMb?.applyValue({ args0 -> args0 }))
            .storageTier(storageTier?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .version(version?.applyValue({ args0 -> args0 }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FlexibleServerArgs].
 */
@PulumiTagMarker
public class FlexibleServerArgsBuilder internal constructor() {
    private var administratorLogin: Output? = null

    private var administratorPassword: Output? = null

    private var authentication: Output? = null

    private var autoGrowEnabled: Output? = null

    private var backupRetentionDays: Output? = null

    private var createMode: Output? = null

    private var customerManagedKey: Output? = null

    private var delegatedSubnetId: Output? = null

    private var geoRedundantBackupEnabled: Output? = null

    private var highAvailability: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var maintenanceWindow: Output? = null

    private var name: Output? = null

    private var pointInTimeRestoreTimeInUtc: Output? = null

    private var privateDnsZoneId: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var replicationRole: Output? = null

    private var resourceGroupName: Output? = null

    private var skuName: Output? = null

    private var sourceServerId: Output? = null

    private var storageMb: Output? = null

    private var storageTier: Output? = null

    private var tags: Output>? = null

    private var version: Output? = null

    private var zone: Output? = null

    /**
     * @param value 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`.
     */
    @JvmName("xeoldjlagelxskjx")
    public suspend fun administratorLogin(`value`: Output) {
        this.administratorLogin = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("fhjvahvoqwegjsys")
    public suspend fun administratorPassword(`value`: Output) {
        this.administratorPassword = value
    }

    /**
     * @param value An `authentication` block as defined below.
     */
    @JvmName("hnnuqhjwcetssqrt")
    public suspend fun authentication(`value`: Output) {
        this.authentication = value
    }

    /**
     * @param value Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`.
     */
    @JvmName("txpknnxmjtrumgji")
    public suspend fun autoGrowEnabled(`value`: Output) {
        this.autoGrowEnabled = value
    }

    /**
     * @param value The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days.
     */
    @JvmName("dvyyejnyxejnwltk")
    public suspend fun backupRetentionDays(`value`: Output) {
        this.backupRetentionDays = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("gbefwxudkigycase")
    public suspend fun createMode(`value`: Output) {
        this.createMode = value
    }

    /**
     * @param value A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("qaeqobvbncbblphb")
    public suspend fun customerManagedKey(`value`: Output) {
        this.customerManagedKey = value
    }

    /**
     * @param value 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.
     */
    @JvmName("cajctuhqvgjlwwdq")
    public suspend fun delegatedSubnetId(`value`: Output) {
        this.delegatedSubnetId = value
    }

    /**
     * @param value Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created.
     */
    @JvmName("ttsriceqegpqrneu")
    public suspend fun geoRedundantBackupEnabled(`value`: Output) {
        this.geoRedundantBackupEnabled = value
    }

    /**
     * @param value A `high_availability` block as defined below.
     */
    @JvmName("nctefyvtbeexlskk")
    public suspend fun highAvailability(`value`: Output) {
        this.highAvailability = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("kdudipufixfuwjeb")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     */
    @JvmName("dgvpprdikjschghx")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value A `maintenance_window` block as defined below.
     */
    @JvmName("dbjmajnbhsrvffxh")
    public suspend fun maintenanceWindow(`value`: Output) {
        this.maintenanceWindow = value
    }

    /**
     * @param value 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.
     */
    @JvmName("oqjeofxerglmrxvm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value 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.
     */
    @JvmName("rqxhnycqnxcenqkb")
    public suspend fun pointInTimeRestoreTimeInUtc(`value`: Output) {
        this.pointInTimeRestoreTimeInUtc = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("hydkwhedmwtoetjj")
    public suspend fun privateDnsZoneId(`value`: Output) {
        this.privateDnsZoneId = value
    }

    /**
     * @param value 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.
     */
    @JvmName("dcduvfajfwlruovg")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value 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.
     */
    @JvmName("qxlahvntdgbbexag")
    public suspend fun replicationRole(`value`: Output) {
        this.replicationRole = value
    }

    /**
     * @param value The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     */
    @JvmName("rrjtdwfkumdfmsuf")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value 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`).
     */
    @JvmName("sfqgtoiyojhrbdyp")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value 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.
     */
    @JvmName("waoegdajcxfcnptg")
    public suspend fun sourceServerId(`value`: Output) {
        this.sourceServerId = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("srldatifppulnycd")
    public suspend fun storageMb(`value`: Output) {
        this.storageMb = value
    }

    /**
     * @param value 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.
     */
    @JvmName("gxffarwotqeocmbh")
    public suspend fun storageTier(`value`: Output) {
        this.storageTier = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
     */
    @JvmName("jrpliuuvudgkjsbb")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value 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.
     */
    @JvmName("dtxqafrsaopjtxuo")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value
     */
    @JvmName("amhreytyfwnujqem")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("kheoqpxsyoydsqeh")
    public suspend fun administratorLogin(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.administratorLogin = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("ttgnxnniujkuskkg")
    public suspend fun administratorPassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.administratorPassword = mapped
    }

    /**
     * @param value An `authentication` block as defined below.
     */
    @JvmName("xvurgytbniftjwmg")
    public suspend fun authentication(`value`: FlexibleServerAuthenticationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authentication = mapped
    }

    /**
     * @param argument An `authentication` block as defined below.
     */
    @JvmName("tcpbvejsaokboynn")
    public suspend fun authentication(argument: suspend FlexibleServerAuthenticationArgsBuilder.() -> Unit) {
        val toBeMapped = FlexibleServerAuthenticationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.authentication = mapped
    }

    /**
     * @param value Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`.
     */
    @JvmName("yyefvubkrlhunwif")
    public suspend fun autoGrowEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoGrowEnabled = mapped
    }

    /**
     * @param value The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days.
     */
    @JvmName("jyuehkkrlgguuebq")
    public suspend fun backupRetentionDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupRetentionDays = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("dvwjohsjtuaqrkhv")
    public suspend fun createMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createMode = mapped
    }

    /**
     * @param value A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("pqfrnxuajgoscmes")
    public suspend fun customerManagedKey(`value`: FlexibleServerCustomerManagedKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerManagedKey = mapped
    }

    /**
     * @param argument A `customer_managed_key` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("jodvmjnotcwysyct")
    public suspend fun customerManagedKey(argument: suspend FlexibleServerCustomerManagedKeyArgsBuilder.() -> Unit) {
        val toBeMapped = FlexibleServerCustomerManagedKeyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.customerManagedKey = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("gqyvhaedsrgsruec")
    public suspend fun delegatedSubnetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.delegatedSubnetId = mapped
    }

    /**
     * @param value Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created.
     */
    @JvmName("hmllwjvgvgpukenf")
    public suspend fun geoRedundantBackupEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.geoRedundantBackupEnabled = mapped
    }

    /**
     * @param value A `high_availability` block as defined below.
     */
    @JvmName("wscyihhqcvocodek")
    public suspend fun highAvailability(`value`: FlexibleServerHighAvailabilityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.highAvailability = mapped
    }

    /**
     * @param argument A `high_availability` block as defined below.
     */
    @JvmName("dagbjnbpstrqvmfd")
    public suspend fun highAvailability(argument: suspend FlexibleServerHighAvailabilityArgsBuilder.() -> Unit) {
        val toBeMapped = FlexibleServerHighAvailabilityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.highAvailability = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("lhmbmidqbbnhwvah")
    public suspend fun identity(`value`: FlexibleServerIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("tfxxsrhtiahmqgso")
    public suspend fun identity(argument: suspend FlexibleServerIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = FlexibleServerIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     */
    @JvmName("fglsbuyagmdoadvl")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value A `maintenance_window` block as defined below.
     */
    @JvmName("bdmqkllrmlmlarno")
    public suspend fun maintenanceWindow(`value`: FlexibleServerMaintenanceWindowArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maintenanceWindow = mapped
    }

    /**
     * @param argument A `maintenance_window` block as defined below.
     */
    @JvmName("tcnmnasmxckptpew")
    public suspend fun maintenanceWindow(argument: suspend FlexibleServerMaintenanceWindowArgsBuilder.() -> Unit) {
        val toBeMapped = FlexibleServerMaintenanceWindowArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.maintenanceWindow = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("hyrfgajaasriqsmx")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("mrvdvvflmyaidvve")
    public suspend fun pointInTimeRestoreTimeInUtc(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pointInTimeRestoreTimeInUtc = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("junubopkodipaaus")
    public suspend fun privateDnsZoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateDnsZoneId = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("pgqsphhajfxcxdas")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("vjmuqbrnmgympuya")
    public suspend fun replicationRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicationRole = mapped
    }

    /**
     * @param value The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created.
     */
    @JvmName("anerwqxskqwyyxtg")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value 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`).
     */
    @JvmName("cywioigsbwnwsqjx")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("smghwmsacxbgckye")
    public suspend fun sourceServerId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceServerId = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("uatyapdqsfexkrjl")
    public suspend fun storageMb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageMb = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("ruwfxuanbrfbvsxe")
    public suspend fun storageTier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageTier = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
     */
    @JvmName("ebjhpodvghlsitrf")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the PostgreSQL Flexible Server.
     */
    @JvmName("jqnrbwgawhypsbwt")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("olnqswwmddyamwct")
    public suspend fun version(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    /**
     * @param value
     */
    @JvmName("ngpcrmkffdaccjwc")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): FlexibleServerArgs = FlexibleServerArgs(
        administratorLogin = administratorLogin,
        administratorPassword = administratorPassword,
        authentication = authentication,
        autoGrowEnabled = autoGrowEnabled,
        backupRetentionDays = backupRetentionDays,
        createMode = createMode,
        customerManagedKey = customerManagedKey,
        delegatedSubnetId = delegatedSubnetId,
        geoRedundantBackupEnabled = geoRedundantBackupEnabled,
        highAvailability = highAvailability,
        identity = identity,
        location = location,
        maintenanceWindow = maintenanceWindow,
        name = name,
        pointInTimeRestoreTimeInUtc = pointInTimeRestoreTimeInUtc,
        privateDnsZoneId = privateDnsZoneId,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        replicationRole = replicationRole,
        resourceGroupName = resourceGroupName,
        skuName = skuName,
        sourceServerId = sourceServerId,
        storageMb = storageMb,
        storageTier = storageTier,
        tags = tags,
        version = version,
        zone = zone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy