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

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

Go to download

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

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.postgresql;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.postgresql.FlexibleServerArgs;
import com.pulumi.azure.postgresql.inputs.FlexibleServerState;
import com.pulumi.azure.postgresql.outputs.FlexibleServerAuthentication;
import com.pulumi.azure.postgresql.outputs.FlexibleServerCustomerManagedKey;
import com.pulumi.azure.postgresql.outputs.FlexibleServerHighAvailability;
import com.pulumi.azure.postgresql.outputs.FlexibleServerIdentity;
import com.pulumi.azure.postgresql.outputs.FlexibleServerMaintenanceWindow;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a PostgreSQL Flexible Server.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         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}{@literal @}{@code Sh1CoR3!")
 *             .zone("1")
 *             .storageMb(32768)
 *             .storageTier("P30")
 *             .skuName("GP_Standard_D4s_v3")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleZoneVirtualNetworkLink)
 *                 .build());
 * 
 *     }}{@code
 * }}{@code
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## `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 * ``` * */ @ResourceType(type="azure:postgresql/flexibleServer:FlexibleServer") public class FlexibleServer extends com.pulumi.resources.CustomResource { /** * 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`. * */ @Export(name="administratorLogin", refs={String.class}, tree="[0]") private 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 Output administratorLogin() { return 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`. * */ @Export(name="administratorPassword", refs={String.class}, tree="[0]") private 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 Output> administratorPassword() { return Codegen.optional(this.administratorPassword); } /** * An `authentication` block as defined below. * */ @Export(name="authentication", refs={FlexibleServerAuthentication.class}, tree="[0]") private Output authentication; /** * @return An `authentication` block as defined below. * */ public Output authentication() { return this.authentication; } /** * Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`. * */ @Export(name="autoGrowEnabled", refs={Boolean.class}, tree="[0]") private Output autoGrowEnabled; /** * @return Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`. * */ public Output> autoGrowEnabled() { return Codegen.optional(this.autoGrowEnabled); } /** * The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days. * */ @Export(name="backupRetentionDays", refs={Integer.class}, tree="[0]") private Output backupRetentionDays; /** * @return The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days. * */ public Output backupRetentionDays() { return 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`. * */ @Export(name="createMode", refs={String.class}, tree="[0]") private 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 Output> createMode() { return Codegen.optional(this.createMode); } /** * A `customer_managed_key` block as defined below. Changing this forces a new resource to be created. * */ @Export(name="customerManagedKey", refs={FlexibleServerCustomerManagedKey.class}, tree="[0]") private Output customerManagedKey; /** * @return A `customer_managed_key` block as defined below. Changing this forces a new resource to be created. * */ public Output> customerManagedKey() { return Codegen.optional(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. * */ @Export(name="delegatedSubnetId", refs={String.class}, tree="[0]") private 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 Output> delegatedSubnetId() { return Codegen.optional(this.delegatedSubnetId); } /** * The FQDN of the PostgreSQL Flexible Server. * */ @Export(name="fqdn", refs={String.class}, tree="[0]") private Output fqdn; /** * @return The FQDN of the PostgreSQL Flexible Server. * */ public Output fqdn() { return 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. * */ @Export(name="geoRedundantBackupEnabled", refs={Boolean.class}, tree="[0]") private 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 Output> geoRedundantBackupEnabled() { return Codegen.optional(this.geoRedundantBackupEnabled); } /** * A `high_availability` block as defined below. * */ @Export(name="highAvailability", refs={FlexibleServerHighAvailability.class}, tree="[0]") private Output highAvailability; /** * @return A `high_availability` block as defined below. * */ public Output> highAvailability() { return Codegen.optional(this.highAvailability); } /** * An `identity` block as defined below. * */ @Export(name="identity", refs={FlexibleServerIdentity.class}, tree="[0]") private Output identity; /** * @return An `identity` block as defined below. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private 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 Output location() { return this.location; } /** * A `maintenance_window` block as defined below. * */ @Export(name="maintenanceWindow", refs={FlexibleServerMaintenanceWindow.class}, tree="[0]") private Output maintenanceWindow; /** * @return A `maintenance_window` block as defined below. * */ public Output> maintenanceWindow() { return Codegen.optional(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. * */ @Export(name="name", refs={String.class}, tree="[0]") private 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 Output name() { return 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. * */ @Export(name="pointInTimeRestoreTimeInUtc", refs={String.class}, tree="[0]") private 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 Output> pointInTimeRestoreTimeInUtc() { return Codegen.optional(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`. * */ @Export(name="privateDnsZoneId", refs={String.class}, tree="[0]") private 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 Output privateDnsZoneId() { return 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. * */ @Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]") private 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 Output> publicNetworkAccessEnabled() { return Codegen.optional(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. * */ @Export(name="replicationRole", refs={String.class}, tree="[0]") private 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 Output> replicationRole() { return Codegen.optional(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. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private 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 Output resourceGroupName() { return 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`). * */ @Export(name="skuName", refs={String.class}, tree="[0]") private 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 Output skuName() { return 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. * */ @Export(name="sourceServerId", refs={String.class}, tree="[0]") private 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 Output> sourceServerId() { return Codegen.optional(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`. * */ @Export(name="storageMb", refs={Integer.class}, tree="[0]") private 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 Output storageMb() { return 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. * */ @Export(name="storageTier", refs={String.class}, tree="[0]") private 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 Output storageTier() { return this.storageTier; } /** * A mapping of tags which should be assigned to the PostgreSQL Flexible Server. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags which should be assigned to the PostgreSQL Flexible Server. * */ public Output>> tags() { return Codegen.optional(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. * */ @Export(name="version", refs={String.class}, tree="[0]") private 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 Output version() { return this.version; } @Export(name="zone", refs={String.class}, tree="[0]") private Output zone; public Output> zone() { return Codegen.optional(this.zone); } /** * * @param name The _unique_ name of the resulting resource. */ public FlexibleServer(java.lang.String name) { this(name, FlexibleServerArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public FlexibleServer(java.lang.String name, FlexibleServerArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public FlexibleServer(java.lang.String name, FlexibleServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:postgresql/flexibleServer:FlexibleServer", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private FlexibleServer(java.lang.String name, Output id, @Nullable FlexibleServerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:postgresql/flexibleServer:FlexibleServer", name, state, makeResourceOptions(options, id), false); } private static FlexibleServerArgs makeArgs(FlexibleServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? FlexibleServerArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .additionalSecretOutputs(List.of( "administratorPassword" )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static FlexibleServer get(java.lang.String name, Output id, @Nullable FlexibleServerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new FlexibleServer(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy