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

com.pulumi.azure.mssql.ElasticPool 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.mssql;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.mssql.ElasticPoolArgs;
import com.pulumi.azure.mssql.inputs.ElasticPoolState;
import com.pulumi.azure.mssql.outputs.ElasticPoolPerDatabaseSettings;
import com.pulumi.azure.mssql.outputs.ElasticPoolSku;
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.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Allows you to manage an Azure SQL Elastic Pool.
 * 
 * ## 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.mssql.Server;
 * import com.pulumi.azure.mssql.ServerArgs;
 * import com.pulumi.azure.mssql.ElasticPool;
 * import com.pulumi.azure.mssql.ElasticPoolArgs;
 * import com.pulumi.azure.mssql.inputs.ElasticPoolSkuArgs;
 * import com.pulumi.azure.mssql.inputs.ElasticPoolPerDatabaseSettingsArgs;
 * 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("my-resource-group")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleServer = new Server("exampleServer", ServerArgs.builder()
 *             .name("my-sql-server")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .version("12.0")
 *             .administratorLogin("4dm1n157r470r")
 *             .administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
 *             .build());
 * 
 *         var exampleElasticPool = new ElasticPool("exampleElasticPool", ElasticPoolArgs.builder()
 *             .name("test-epool")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .serverName(exampleServer.name())
 *             .licenseType("LicenseIncluded")
 *             .maxSizeGb(756)
 *             .sku(ElasticPoolSkuArgs.builder()
 *                 .name("BasicPool")
 *                 .tier("Basic")
 *                 .family("Gen4")
 *                 .capacity(4)
 *                 .build())
 *             .perDatabaseSettings(ElasticPoolPerDatabaseSettingsArgs.builder()
 *                 .minCapacity(0.25)
 *                 .maxCapacity(4)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * SQL Elastic Pool can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:mssql/elasticPool:ElasticPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/elasticPools/myelasticpoolname * ``` * */ @ResourceType(type="azure:mssql/elasticPool:ElasticPool") public class ElasticPool extends com.pulumi.resources.CustomResource { /** * Specifies the type of enclave to be used by the elastic pool. When `enclave_type` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. <!-- TODO: Uncomment in 4.0: Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclave_type` field from the configuration file will force the creation of a new resource.-> Possible values are `Default` or `VBS`. * * > **NOTE:** All databases that are added to the elastic pool must have the same `enclave_type` as the elastic pool. * * > **NOTE:** `enclave_type` is not supported for DC-series SKUs. * * > **NOTE:** The default value for `enclave_type` field is unset not `Default`. * */ @Export(name="enclaveType", refs={String.class}, tree="[0]") private Output enclaveType; /** * @return Specifies the type of enclave to be used by the elastic pool. When `enclave_type` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. <!-- TODO: Uncomment in 4.0: Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclave_type` field from the configuration file will force the creation of a new resource.-> Possible values are `Default` or `VBS`. * * > **NOTE:** All databases that are added to the elastic pool must have the same `enclave_type` as the elastic pool. * * > **NOTE:** `enclave_type` is not supported for DC-series SKUs. * * > **NOTE:** The default value for `enclave_type` field is unset not `Default`. * */ public Output enclaveType() { return this.enclaveType; } /** * Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`. * */ @Export(name="licenseType", refs={String.class}, tree="[0]") private Output licenseType; /** * @return Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`. * */ public Output licenseType() { return this.licenseType; } /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ public Output location() { return this.location; } /** * The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`. Defaults to `SQL_Default`. * */ @Export(name="maintenanceConfigurationName", refs={String.class}, tree="[0]") private Output maintenanceConfigurationName; /** * @return The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`. Defaults to `SQL_Default`. * */ public Output> maintenanceConfigurationName() { return Codegen.optional(this.maintenanceConfigurationName); } /** * The max data size of the elastic pool in bytes. Conflicts with `max_size_gb`. * * > **NOTE:** One of either `max_size_gb` or `max_size_bytes` must be specified. * */ @Export(name="maxSizeBytes", refs={Integer.class}, tree="[0]") private Output maxSizeBytes; /** * @return The max data size of the elastic pool in bytes. Conflicts with `max_size_gb`. * * > **NOTE:** One of either `max_size_gb` or `max_size_bytes` must be specified. * */ public Output maxSizeBytes() { return this.maxSizeBytes; } /** * The max data size of the elastic pool in gigabytes. Conflicts with `max_size_bytes`. * */ @Export(name="maxSizeGb", refs={Double.class}, tree="[0]") private Output maxSizeGb; /** * @return The max data size of the elastic pool in gigabytes. Conflicts with `max_size_bytes`. * */ public Output maxSizeGb() { return this.maxSizeGb; } /** * The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A `per_database_settings` block as defined below. * */ @Export(name="perDatabaseSettings", refs={ElasticPoolPerDatabaseSettings.class}, tree="[0]") private Output perDatabaseSettings; /** * @return A `per_database_settings` block as defined below. * */ public Output perDatabaseSettings() { return this.perDatabaseSettings; } /** * The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. * */ @Export(name="serverName", refs={String.class}, tree="[0]") private Output serverName; /** * @return The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. * */ public Output serverName() { return this.serverName; } /** * A `sku` block as defined below. * */ @Export(name="sku", refs={ElasticPoolSku.class}, tree="[0]") private Output sku; /** * @return A `sku` block as defined below. * */ public Output sku() { return this.sku; } /** * A mapping of tags to assign to the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`. * */ @Export(name="zoneRedundant", refs={Boolean.class}, tree="[0]") private Output zoneRedundant; /** * @return Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`. * */ public Output> zoneRedundant() { return Codegen.optional(this.zoneRedundant); } /** * * @param name The _unique_ name of the resulting resource. */ public ElasticPool(java.lang.String name) { this(name, ElasticPoolArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ElasticPool(java.lang.String name, ElasticPoolArgs 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 ElasticPool(java.lang.String name, ElasticPoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:mssql/elasticPool:ElasticPool", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ElasticPool(java.lang.String name, Output id, @Nullable ElasticPoolState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:mssql/elasticPool:ElasticPool", name, state, makeResourceOptions(options, id), false); } private static ElasticPoolArgs makeArgs(ElasticPoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ElasticPoolArgs.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()) .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 ElasticPool get(java.lang.String name, Output id, @Nullable ElasticPoolState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ElasticPool(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy