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

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

There is a newer version: 2.82.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.ManagedInstanceArgs;
import com.pulumi.azurenative.sql.outputs.ManagedInstanceExternalAdministratorResponse;
import com.pulumi.azurenative.sql.outputs.ManagedInstancePecPropertyResponse;
import com.pulumi.azurenative.sql.outputs.ResourceIdentityResponse;
import com.pulumi.azurenative.sql.outputs.ServicePrincipalResponse;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * An Azure SQL managed instance.
 * Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
 * 
 * Other available API versions: 2021-02-01-preview, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
 * 
 * ## Example Usage
 * ### Create managed instance with all properties
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.ManagedInstance;
 * import com.pulumi.azurenative.sql.ManagedInstanceArgs;
 * import com.pulumi.azurenative.sql.inputs.ManagedInstanceExternalAdministratorArgs;
 * import com.pulumi.azurenative.sql.inputs.ServicePrincipalArgs;
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var managedInstance = new ManagedInstance("managedInstance", ManagedInstanceArgs.builder()
 *             .administratorLogin("dummylogin")
 *             .administratorLoginPassword("PLACEHOLDER")
 *             .administrators(ManagedInstanceExternalAdministratorArgs.builder()
 *                 .azureADOnlyAuthentication(true)
 *                 .login("bob}{@literal @}{@code contoso.com")
 *                 .principalType("User")
 *                 .sid("00000011-1111-2222-2222-123456789111")
 *                 .tenantId("00000011-1111-2222-2222-123456789111")
 *                 .build())
 *             .collation("SQL_Latin1_General_CP1_CI_AS")
 *             .dnsZonePartner("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance")
 *             .instancePoolId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1")
 *             .licenseType("LicenseIncluded")
 *             .location("Japan East")
 *             .maintenanceConfigurationId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1")
 *             .managedInstanceName("testinstance")
 *             .minimalTlsVersion("1.2")
 *             .proxyOverride("Redirect")
 *             .publicDataEndpointEnabled(false)
 *             .requestedBackupStorageRedundancy("Geo")
 *             .resourceGroupName("testrg")
 *             .servicePrincipal(ServicePrincipalArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .sku(SkuArgs.builder()
 *                 .name("GP_Gen5")
 *                 .tier("GeneralPurpose")
 *                 .build())
 *             .storageSizeInGB(1024)
 *             .subnetId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
 *             .tags(Map.of("tagKey1", "TagValue1"))
 *             .timezoneId("UTC")
 *             .vCores(8)
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* ### Create managed instance with minimal properties * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.ManagedInstance;
 * import com.pulumi.azurenative.sql.ManagedInstanceArgs;
 * 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 managedInstance = new ManagedInstance("managedInstance", ManagedInstanceArgs.builder()
 *             .administratorLogin("dummylogin")
 *             .administratorLoginPassword("PLACEHOLDER")
 *             .licenseType("LicenseIncluded")
 *             .location("Japan East")
 *             .managedInstanceName("testinstance")
 *             .resourceGroupName("testrg")
 *             .sku(SkuArgs.builder()
 *                 .name("GP_Gen4")
 *                 .tier("GeneralPurpose")
 *                 .build())
 *             .storageSizeInGB(1024)
 *             .subnetId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
 *             .vCores(8)
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:sql:ManagedInstance testinstance /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} * ``` * */ @ResourceType(type="azure-native:sql:ManagedInstance") public class ManagedInstance extends com.pulumi.resources.CustomResource { /** * Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). * */ @Export(name="administratorLogin", refs={String.class}, tree="[0]") private Output administratorLogin; /** * @return Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). * */ public Output> administratorLogin() { return Codegen.optional(this.administratorLogin); } /** * The Azure Active Directory administrator of the server. * */ @Export(name="administrators", refs={ManagedInstanceExternalAdministratorResponse.class}, tree="[0]") private Output administrators; /** * @return The Azure Active Directory administrator of the server. * */ public Output> administrators() { return Codegen.optional(this.administrators); } /** * Collation of the managed instance. * */ @Export(name="collation", refs={String.class}, tree="[0]") private Output collation; /** * @return Collation of the managed instance. * */ public Output> collation() { return Codegen.optional(this.collation); } /** * The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) * */ @Export(name="currentBackupStorageRedundancy", refs={String.class}, tree="[0]") private Output currentBackupStorageRedundancy; /** * @return The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) * */ public Output currentBackupStorageRedundancy() { return this.currentBackupStorageRedundancy; } /** * The Dns Zone that the managed instance is in. * */ @Export(name="dnsZone", refs={String.class}, tree="[0]") private Output dnsZone; /** * @return The Dns Zone that the managed instance is in. * */ public Output dnsZone() { return this.dnsZone; } /** * The fully qualified domain name of the managed instance. * */ @Export(name="fullyQualifiedDomainName", refs={String.class}, tree="[0]") private Output fullyQualifiedDomainName; /** * @return The fully qualified domain name of the managed instance. * */ public Output fullyQualifiedDomainName() { return this.fullyQualifiedDomainName; } /** * The Azure Active Directory identity of the managed instance. * */ @Export(name="identity", refs={ResourceIdentityResponse.class}, tree="[0]") private Output identity; /** * @return The Azure Active Directory identity of the managed instance. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * The Id of the instance pool this managed server belongs to. * */ @Export(name="instancePoolId", refs={String.class}, tree="[0]") private Output instancePoolId; /** * @return The Id of the instance pool this managed server belongs to. * */ public Output> instancePoolId() { return Codegen.optional(this.instancePoolId); } /** * A CMK URI of the key to use for encryption. * */ @Export(name="keyId", refs={String.class}, tree="[0]") private Output keyId; /** * @return A CMK URI of the key to use for encryption. * */ public Output> keyId() { return Codegen.optional(this.keyId); } /** * The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). * */ @Export(name="licenseType", refs={String.class}, tree="[0]") private Output licenseType; /** * @return The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). * */ 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; } /** * Specifies maintenance configuration id to apply to this managed instance. * */ @Export(name="maintenanceConfigurationId", refs={String.class}, tree="[0]") private Output maintenanceConfigurationId; /** * @return Specifies maintenance configuration id to apply to this managed instance. * */ public Output> maintenanceConfigurationId() { return Codegen.optional(this.maintenanceConfigurationId); } /** * Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' * */ @Export(name="minimalTlsVersion", refs={String.class}, tree="[0]") private Output minimalTlsVersion; /** * @return Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' * */ public Output> minimalTlsVersion() { return Codegen.optional(this.minimalTlsVersion); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * The resource id of a user assigned identity to be used by default. * */ @Export(name="primaryUserAssignedIdentityId", refs={String.class}, tree="[0]") private Output primaryUserAssignedIdentityId; /** * @return The resource id of a user assigned identity to be used by default. * */ public Output> primaryUserAssignedIdentityId() { return Codegen.optional(this.primaryUserAssignedIdentityId); } /** * List of private endpoint connections on a managed instance. * */ @Export(name="privateEndpointConnections", refs={List.class,ManagedInstancePecPropertyResponse.class}, tree="[0,1]") private Output> privateEndpointConnections; /** * @return List of private endpoint connections on a managed instance. * */ public Output> privateEndpointConnections() { return this.privateEndpointConnections; } @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; public Output provisioningState() { return this.provisioningState; } /** * Connection type used for connecting to the instance. * */ @Export(name="proxyOverride", refs={String.class}, tree="[0]") private Output proxyOverride; /** * @return Connection type used for connecting to the instance. * */ public Output> proxyOverride() { return Codegen.optional(this.proxyOverride); } /** * Whether or not the public data endpoint is enabled. * */ @Export(name="publicDataEndpointEnabled", refs={Boolean.class}, tree="[0]") private Output publicDataEndpointEnabled; /** * @return Whether or not the public data endpoint is enabled. * */ public Output> publicDataEndpointEnabled() { return Codegen.optional(this.publicDataEndpointEnabled); } /** * The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) * */ @Export(name="requestedBackupStorageRedundancy", refs={String.class}, tree="[0]") private Output requestedBackupStorageRedundancy; /** * @return The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) * */ public Output> requestedBackupStorageRedundancy() { return Codegen.optional(this.requestedBackupStorageRedundancy); } /** * The managed instance's service principal. * */ @Export(name="servicePrincipal", refs={ServicePrincipalResponse.class}, tree="[0]") private Output servicePrincipal; /** * @return The managed instance's service principal. * */ public Output> servicePrincipal() { return Codegen.optional(this.servicePrincipal); } /** * Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH * */ @Export(name="sku", refs={SkuResponse.class}, tree="[0]") private Output sku; /** * @return Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH * */ public Output> sku() { return Codegen.optional(this.sku); } /** * The state of the managed instance. * */ @Export(name="state", refs={String.class}, tree="[0]") private Output state; /** * @return The state of the managed instance. * */ public Output state() { return this.state; } /** * Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. * */ @Export(name="storageSizeInGB", refs={Integer.class}, tree="[0]") private Output storageSizeInGB; /** * @return Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. * */ public Output> storageSizeInGB() { return Codegen.optional(this.storageSizeInGB); } /** * Subnet resource ID for the managed instance. * */ @Export(name="subnetId", refs={String.class}, tree="[0]") private Output subnetId; /** * @return Subnet resource ID for the managed instance. * */ public Output> subnetId() { return Codegen.optional(this.subnetId); } /** * 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); } /** * Id of the timezone. Allowed values are timezones supported by Windows. * Windows keeps details on supported timezones, including the id, in registry under * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". * */ @Export(name="timezoneId", refs={String.class}, tree="[0]") private Output timezoneId; /** * @return Id of the timezone. Allowed values are timezones supported by Windows. * Windows keeps details on supported timezones, including the id, in registry under * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". * */ public Output> timezoneId() { return Codegen.optional(this.timezoneId); } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. * */ @Export(name="vCores", refs={Integer.class}, tree="[0]") private Output vCores; /** * @return The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. * */ public Output> vCores() { return Codegen.optional(this.vCores); } /** * Whether or not the multi-az is enabled. * */ @Export(name="zoneRedundant", refs={Boolean.class}, tree="[0]") private Output zoneRedundant; /** * @return Whether or not the multi-az is enabled. * */ public Output> zoneRedundant() { return Codegen.optional(this.zoneRedundant); } /** * * @param name The _unique_ name of the resulting resource. */ public ManagedInstance(java.lang.String name) { this(name, ManagedInstanceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ManagedInstance(java.lang.String name, ManagedInstanceArgs 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 ManagedInstance(java.lang.String name, ManagedInstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:sql:ManagedInstance", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ManagedInstance(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:sql:ManagedInstance", name, null, makeResourceOptions(options, id), false); } private static ManagedInstanceArgs makeArgs(ManagedInstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ManagedInstanceArgs.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/v20150501preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20180601preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20200202preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20200801preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20201101preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20210201preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20210501preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20210801preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20220201preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20220501preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20220801preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20221101preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20230201preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20230501preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20230801preview:ManagedInstance").build()), Output.of(Alias.builder().type("azure-native:sql/v20240501preview:ManagedInstance").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 ManagedInstance get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ManagedInstance(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy