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

com.pulumi.azurenative.sql.Database 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.DatabaseArgs;
import com.pulumi.azurenative.sql.outputs.DatabaseIdentityResponse;
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;

/**
 * A database resource.
 * 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, 2019-06-01-preview, 2020-02-02-preview, 2020-08-01-preview, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
 * 
 * ## Example Usage
 * ### Creates a VCore database by specifying service objective name.
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .sku(SkuArgs.builder()
 *                 .capacity(2)
 *                 .family("Gen4")
 *                 .name("BC")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a VCore database by specifying sku name and capacity. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .sku(SkuArgs.builder()
 *                 .capacity(2)
 *                 .name("BC_Gen4")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a data warehouse database as a cross-subscription restore from a backup of a dropped database. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .createMode("Restore")
 *             .databaseName("testdw")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .sourceResourceId("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a data warehouse database as a cross-subscription restore from a geo-backup. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .createMode("Recovery")
 *             .databaseName("testdw")
 *             .location("westus")
 *             .resourceGroupName("Default-SQL-WestUS")
 *             .serverName("testsvr")
 *             .sourceResourceId("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a data warehouse database as a cross-subscription restore from a restore point of an existing database. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .createMode("PointInTimeRestore")
 *             .databaseName("testdw")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .restorePointInTime("2022-01-22T05:35:31.503Z")
 *             .serverName("testsvr")
 *             .sourceResourceId("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database as a copy. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .createMode("Copy")
 *             .databaseName("dbcopy")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .sku(SkuArgs.builder()
 *                 .name("S0")
 *                 .tier("Standard")
 *                 .build())
 *             .sourceDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database as an on-line secondary. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .createMode("Secondary")
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .secondaryType("Geo")
 *             .serverName("testsvr")
 *             .sku(SkuArgs.builder()
 *                 .name("S0")
 *                 .tier("Standard")
 *                 .build())
 *             .sourceDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database as named replica secondary. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .createMode("Secondary")
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .secondaryType("Named")
 *             .serverName("testsvr")
 *             .sku(SkuArgs.builder()
 *                 .capacity(2)
 *                 .name("HS_Gen4")
 *                 .tier("Hyperscale")
 *                 .build())
 *             .sourceDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database from PointInTimeRestore. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .createMode("PointInTimeRestore")
 *             .databaseName("dbpitr")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .restorePointInTime("2020-10-22T05:35:31.503Z")
 *             .serverName("testsvr")
 *             .sourceDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database with default mode. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .collation("SQL_Latin1_General_CP1_CI_AS")
 *             .createMode("Default")
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .maxSizeBytes(1073741824)
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .sku(SkuArgs.builder()
 *                 .name("S0")
 *                 .tier("Standard")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database with ledger on. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .databaseName("testdb")
 *             .isLedgerOn(true)
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database with minimum number of parameters. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database with preferred maintenance window. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .collation("SQL_Latin1_General_CP1_CI_AS")
 *             .createMode("Default")
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .maintenanceConfigurationId("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1")
 *             .maxSizeBytes(1073741824)
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .sku(SkuArgs.builder()
 *                 .name("S2")
 *                 .tier("Standard")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Creates a database with specified backup storage redundancy. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.Database;
 * import com.pulumi.azurenative.sql.DatabaseArgs;
 * 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 database = new Database("database", DatabaseArgs.builder()
 *             .databaseName("testdb")
 *             .location("southeastasia")
 *             .requestedBackupStorageRedundancy("Zone")
 *             .resourceGroupName("Default-SQL-SouthEastAsia")
 *             .serverName("testsvr")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:sql:Database testdb /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName} * ``` * */ @ResourceType(type="azure-native:sql:Database") public class Database extends com.pulumi.resources.CustomResource { /** * Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled * */ @Export(name="autoPauseDelay", refs={Integer.class}, tree="[0]") private Output autoPauseDelay; /** * @return Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled * */ public Output> autoPauseDelay() { return Codegen.optional(this.autoPauseDelay); } /** * Collation of the metadata catalog. * */ @Export(name="catalogCollation", refs={String.class}, tree="[0]") private Output catalogCollation; /** * @return Collation of the metadata catalog. * */ public Output> catalogCollation() { return Codegen.optional(this.catalogCollation); } /** * The collation of the database. * */ @Export(name="collation", refs={String.class}, tree="[0]") private Output collation; /** * @return The collation of the database. * */ public Output> collation() { return Codegen.optional(this.collation); } /** * The creation date of the database (ISO8601 format). * */ @Export(name="creationDate", refs={String.class}, tree="[0]") private Output creationDate; /** * @return The creation date of the database (ISO8601 format). * */ public Output creationDate() { return this.creationDate; } /** * The storage account type used to store backups for this database. * */ @Export(name="currentBackupStorageRedundancy", refs={String.class}, tree="[0]") private Output currentBackupStorageRedundancy; /** * @return The storage account type used to store backups for this database. * */ public Output currentBackupStorageRedundancy() { return this.currentBackupStorageRedundancy; } /** * The current service level objective name of the database. * */ @Export(name="currentServiceObjectiveName", refs={String.class}, tree="[0]") private Output currentServiceObjectiveName; /** * @return The current service level objective name of the database. * */ public Output currentServiceObjectiveName() { return this.currentServiceObjectiveName; } /** * The name and tier of the SKU. * */ @Export(name="currentSku", refs={SkuResponse.class}, tree="[0]") private Output currentSku; /** * @return The name and tier of the SKU. * */ public Output currentSku() { return this.currentSku; } /** * The ID of the database. * */ @Export(name="databaseId", refs={String.class}, tree="[0]") private Output databaseId; /** * @return The ID of the database. * */ public Output databaseId() { return this.databaseId; } /** * The default secondary region for this database. * */ @Export(name="defaultSecondaryLocation", refs={String.class}, tree="[0]") private Output defaultSecondaryLocation; /** * @return The default secondary region for this database. * */ public Output defaultSecondaryLocation() { return this.defaultSecondaryLocation; } /** * This records the earliest start date and time that restore is available for this database (ISO8601 format). * */ @Export(name="earliestRestoreDate", refs={String.class}, tree="[0]") private Output earliestRestoreDate; /** * @return This records the earliest start date and time that restore is available for this database (ISO8601 format). * */ public Output earliestRestoreDate() { return this.earliestRestoreDate; } /** * The resource identifier of the elastic pool containing this database. * */ @Export(name="elasticPoolId", refs={String.class}, tree="[0]") private Output elasticPoolId; /** * @return The resource identifier of the elastic pool containing this database. * */ public Output> elasticPoolId() { return Codegen.optional(this.elasticPoolId); } /** * Failover Group resource identifier that this database belongs to. * */ @Export(name="failoverGroupId", refs={String.class}, tree="[0]") private Output failoverGroupId; /** * @return Failover Group resource identifier that this database belongs to. * */ public Output failoverGroupId() { return this.failoverGroupId; } /** * The Client id used for cross tenant per database CMK scenario * */ @Export(name="federatedClientId", refs={String.class}, tree="[0]") private Output federatedClientId; /** * @return The Client id used for cross tenant per database CMK scenario * */ public Output> federatedClientId() { return Codegen.optional(this.federatedClientId); } /** * The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * */ @Export(name="highAvailabilityReplicaCount", refs={Integer.class}, tree="[0]") private Output highAvailabilityReplicaCount; /** * @return The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * */ public Output> highAvailabilityReplicaCount() { return Codegen.optional(this.highAvailabilityReplicaCount); } /** * The Azure Active Directory identity of the database. * */ @Export(name="identity", refs={DatabaseIdentityResponse.class}, tree="[0]") private Output identity; /** * @return The Azure Active Directory identity of the database. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * Infra encryption is enabled for this database. * */ @Export(name="isInfraEncryptionEnabled", refs={Boolean.class}, tree="[0]") private Output isInfraEncryptionEnabled; /** * @return Infra encryption is enabled for this database. * */ public Output isInfraEncryptionEnabled() { return this.isInfraEncryptionEnabled; } /** * Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. * */ @Export(name="isLedgerOn", refs={Boolean.class}, tree="[0]") private Output isLedgerOn; /** * @return Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. * */ public Output> isLedgerOn() { return Codegen.optional(this.isLedgerOn); } /** * Kind of database. This is metadata used for the Azure portal experience. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Kind of database. This is metadata used for the Azure portal experience. * */ public Output kind() { return this.kind; } /** * The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. * */ @Export(name="licenseType", refs={String.class}, tree="[0]") private Output licenseType; /** * @return The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. * */ 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 database. This configuration defines the period when the maintenance updates will occur. * */ @Export(name="maintenanceConfigurationId", refs={String.class}, tree="[0]") private Output maintenanceConfigurationId; /** * @return Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. * */ public Output> maintenanceConfigurationId() { return Codegen.optional(this.maintenanceConfigurationId); } /** * Resource that manages the database. * */ @Export(name="managedBy", refs={String.class}, tree="[0]") private Output managedBy; /** * @return Resource that manages the database. * */ public Output managedBy() { return this.managedBy; } /** * The max log size for this database. * */ @Export(name="maxLogSizeBytes", refs={Double.class}, tree="[0]") private Output maxLogSizeBytes; /** * @return The max log size for this database. * */ public Output maxLogSizeBytes() { return this.maxLogSizeBytes; } /** * The max size of the database expressed in bytes. * */ @Export(name="maxSizeBytes", refs={Double.class}, tree="[0]") private Output maxSizeBytes; /** * @return The max size of the database expressed in bytes. * */ public Output> maxSizeBytes() { return Codegen.optional(this.maxSizeBytes); } /** * Minimal capacity that database will always have allocated, if not paused * */ @Export(name="minCapacity", refs={Double.class}, tree="[0]") private Output minCapacity; /** * @return Minimal capacity that database will always have allocated, 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 date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. * */ @Export(name="pausedDate", refs={String.class}, tree="[0]") private Output pausedDate; /** * @return The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. * */ public Output pausedDate() { return this.pausedDate; } /** * The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool. * */ @Export(name="readScale", refs={String.class}, tree="[0]") private Output readScale; /** * @return The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool. * */ public Output> readScale() { return Codegen.optional(this.readScale); } /** * The storage account type to be used to store backups for this database. * */ @Export(name="requestedBackupStorageRedundancy", refs={String.class}, tree="[0]") private Output requestedBackupStorageRedundancy; /** * @return The storage account type to be used to store backups for this database. * */ public Output> requestedBackupStorageRedundancy() { return Codegen.optional(this.requestedBackupStorageRedundancy); } /** * The requested service level objective name of the database. * */ @Export(name="requestedServiceObjectiveName", refs={String.class}, tree="[0]") private Output requestedServiceObjectiveName; /** * @return The requested service level objective name of the database. * */ public Output requestedServiceObjectiveName() { return this.requestedServiceObjectiveName; } /** * The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. * */ @Export(name="resumedDate", refs={String.class}, tree="[0]") private Output resumedDate; /** * @return The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. * */ public Output resumedDate() { return this.resumedDate; } /** * The secondary type of the database if it is a secondary. Valid values are Geo and Named. * */ @Export(name="secondaryType", refs={String.class}, tree="[0]") private Output secondaryType; /** * @return The secondary type of the database if it is a secondary. Valid values are Geo and Named. * */ public Output> secondaryType() { return Codegen.optional(this.secondaryType); } /** * The database 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 one of the following commands: * */ @Export(name="sku", refs={SkuResponse.class}, tree="[0]") private Output sku; /** * @return The database 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 one of the following commands: * */ public Output> sku() { return Codegen.optional(this.sku); } /** * The status of the database. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The status of the database. * */ public Output status() { return this.status; } /** * 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 database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. * */ @Export(name="zoneRedundant", refs={Boolean.class}, tree="[0]") private Output zoneRedundant; /** * @return Whether or not this database is zone redundant, which means the replicas of this database 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 Database(java.lang.String name) { this(name, DatabaseArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Database(java.lang.String name, DatabaseArgs 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 Database(java.lang.String name, DatabaseArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:sql:Database", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Database(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:sql:Database", name, null, makeResourceOptions(options, id), false); } private static DatabaseArgs makeArgs(DatabaseArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DatabaseArgs.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:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20170301preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20171001preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20190601preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20200202preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20200801preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20201101preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20210201preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20210501preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20210801preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20220201preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20220501preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20220801preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20221101preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20230201preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20230501preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20230801preview:Database").build()), Output.of(Alias.builder().type("azure-native:sql/v20240501preview:Database").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 Database get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Database(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy