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

com.pulumi.azurenative.sql.ElasticPool Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.sql;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.sql.ElasticPoolArgs;
import com.pulumi.azurenative.sql.outputs.ElasticPoolPerDatabaseSettingsResponse;
import com.pulumi.azurenative.sql.outputs.SkuResponse;
import com.pulumi.core.Alias;
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.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * An elastic pool.
 * Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
 * 
 * Other available API versions: 2014-04-01, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
 * 
 * ## Example Usage
 * ### Create or update Hyperscale elastic pool with high availability replica count parameter
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.ElasticPool;
 * import com.pulumi.azurenative.sql.ElasticPoolArgs;
 * import com.pulumi.azurenative.sql.inputs.SkuArgs;
 * 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 elasticPool = new ElasticPool("elasticPool", ElasticPoolArgs.builder()
 *             .elasticPoolName("sqlcrudtest-8102")
 *             .highAvailabilityReplicaCount(2)
 *             .location("Japan East")
 *             .resourceGroupName("sqlcrudtest-2369")
 *             .serverName("sqlcrudtest-8069")
 *             .sku(SkuArgs.builder()
 *                 .name("HS_Gen5_4")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update elastic pool with all parameter * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.ElasticPool;
 * import com.pulumi.azurenative.sql.ElasticPoolArgs;
 * import com.pulumi.azurenative.sql.inputs.ElasticPoolPerDatabaseSettingsArgs;
 * import com.pulumi.azurenative.sql.inputs.SkuArgs;
 * 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 elasticPool = new ElasticPool("elasticPool", ElasticPoolArgs.builder()
 *             .elasticPoolName("sqlcrudtest-8102")
 *             .location("Japan East")
 *             .perDatabaseSettings(ElasticPoolPerDatabaseSettingsArgs.builder()
 *                 .maxCapacity(2)
 *                 .minCapacity(0.25)
 *                 .build())
 *             .resourceGroupName("sqlcrudtest-2369")
 *             .serverName("sqlcrudtest-8069")
 *             .sku(SkuArgs.builder()
 *                 .capacity(2)
 *                 .name("GP_Gen4_2")
 *                 .tier("GeneralPurpose")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update elastic pool with maintenance configuration parameter * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.ElasticPool;
 * import com.pulumi.azurenative.sql.ElasticPoolArgs;
 * 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 elasticPool = new ElasticPool("elasticPool", ElasticPoolArgs.builder()
 *             .elasticPoolName("sqlcrudtest-8102")
 *             .location("Japan East")
 *             .maintenanceConfigurationId("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1")
 *             .resourceGroupName("sqlcrudtest-2369")
 *             .serverName("sqlcrudtest-8069")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update elastic pool with minimum parameters * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.ElasticPool;
 * import com.pulumi.azurenative.sql.ElasticPoolArgs;
 * 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 elasticPool = new ElasticPool("elasticPool", ElasticPoolArgs.builder()
 *             .elasticPoolName("sqlcrudtest-8102")
 *             .location("Japan East")
 *             .resourceGroupName("sqlcrudtest-2369")
 *             .serverName("sqlcrudtest-8069")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:sql:ElasticPool sqlcrudtest-8102 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName} * ``` * */ @ResourceType(type="azure-native:sql:ElasticPool") public class ElasticPool extends com.pulumi.resources.CustomResource { /** * The creation date of the elastic pool (ISO8601 format). * */ @Export(name="creationDate", refs={String.class}, tree="[0]") private Output creationDate; /** * @return The creation date of the elastic pool (ISO8601 format). * */ public Output creationDate() { return this.creationDate; } /** * The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. * */ @Export(name="highAvailabilityReplicaCount", refs={Integer.class}, tree="[0]") private Output highAvailabilityReplicaCount; /** * @return The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. * */ public Output> highAvailabilityReplicaCount() { return Codegen.optional(this.highAvailabilityReplicaCount); } /** * Kind of elastic pool. This is metadata used for the Azure portal experience. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Kind of elastic pool. This is metadata used for the Azure portal experience. * */ public Output kind() { return this.kind; } /** * The license type to apply for this elastic pool. * */ @Export(name="licenseType", refs={String.class}, tree="[0]") private Output licenseType; /** * @return The license type to apply for this elastic pool. * */ public Output> licenseType() { return Codegen.optional(this.licenseType); } /** * Resource location. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource location. * */ public Output location() { return this.location; } /** * Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. * */ @Export(name="maintenanceConfigurationId", refs={String.class}, tree="[0]") private Output maintenanceConfigurationId; /** * @return Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. * */ public Output> maintenanceConfigurationId() { return Codegen.optional(this.maintenanceConfigurationId); } /** * The storage limit for the database elastic pool in bytes. * */ @Export(name="maxSizeBytes", refs={Double.class}, tree="[0]") private Output maxSizeBytes; /** * @return The storage limit for the database elastic pool in bytes. * */ public Output> maxSizeBytes() { return Codegen.optional(this.maxSizeBytes); } /** * Minimal capacity that serverless pool will not shrink below, if not paused * */ @Export(name="minCapacity", refs={Double.class}, tree="[0]") private Output minCapacity; /** * @return Minimal capacity that serverless pool will not shrink below, if not paused * */ public Output> minCapacity() { return Codegen.optional(this.minCapacity); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * The per database settings for the elastic pool. * */ @Export(name="perDatabaseSettings", refs={ElasticPoolPerDatabaseSettingsResponse.class}, tree="[0]") private Output perDatabaseSettings; /** * @return The per database settings for the elastic pool. * */ public Output> perDatabaseSettings() { return Codegen.optional(this.perDatabaseSettings); } /** * The elastic pool SKU. * * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command: * */ @Export(name="sku", refs={SkuResponse.class}, tree="[0]") private Output sku; /** * @return The elastic pool SKU. * * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command: * */ public Output> sku() { return Codegen.optional(this.sku); } /** * The state of the elastic pool. * */ @Export(name="state", refs={String.class}, tree="[0]") private Output state; /** * @return The state of the elastic pool. * */ public Output state() { return this.state; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. * */ @Export(name="zoneRedundant", refs={Boolean.class}, tree="[0]") private Output zoneRedundant; /** * @return Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. * */ 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-native:sql:ElasticPool", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ElasticPool(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:sql:ElasticPool", name, null, 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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:sql/v20140401:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20171001preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20200202preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20200801preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20201101preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20210201preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20210501preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20210801preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20220201preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20220501preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20220801preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20221101preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20230201preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20230501preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20230801preview:ElasticPool").build()), Output.of(Alias.builder().type("azure-native:sql/v20240501preview:ElasticPool").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static ElasticPool get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ElasticPool(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy