We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.mssql.getManagedDatabase
Explore with Pulumi AI
Use this data source to access information about an existing Azure SQL Azure Managed Database.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mssql.MssqlFunctions;
import com.pulumi.azure.mssql.inputs.GetManagedDatabaseArgs;
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) {
        final var example = MssqlFunctions.getManagedDatabase(GetManagedDatabaseArgs.builder()
            .name("example")
            .resourceGroupName(exampleAzurermResourceGroup.name())
            .managedInstanceName(exampleAzurermMssqlManagedInstance.name())
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azure:mssql:getManagedDatabase
      arguments:
        name: example
        resourceGroupName: ${exampleAzurermResourceGroup.name}
        managedInstanceName: ${exampleAzurermMssqlManagedInstance.name}
Using getManagedDatabase
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getManagedDatabase(args: GetManagedDatabaseArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseResult>
function getManagedDatabaseOutput(args: GetManagedDatabaseOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseResult>def get_managed_database(managed_instance_id: Optional[str] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseResult
def get_managed_database_output(managed_instance_id: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseResult]func LookupManagedDatabase(ctx *Context, args *LookupManagedDatabaseArgs, opts ...InvokeOption) (*LookupManagedDatabaseResult, error)
func LookupManagedDatabaseOutput(ctx *Context, args *LookupManagedDatabaseOutputArgs, opts ...InvokeOption) LookupManagedDatabaseResultOutput> Note: This function is named LookupManagedDatabase in the Go SDK.
public static class GetManagedDatabase 
{
    public static Task<GetManagedDatabaseResult> InvokeAsync(GetManagedDatabaseArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseResult> Invoke(GetManagedDatabaseInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetManagedDatabaseResult> getManagedDatabase(GetManagedDatabaseArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseResult> getManagedDatabase(GetManagedDatabaseArgs args, InvokeOptions options)
fn::invoke:
  function: azure:mssql/getManagedDatabase:getManagedDatabase
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ManagedInstance stringId 
- The SQL Managed Instance ID.
- Name string
- The name of this Azure SQL Azure Managed Database.
- ManagedInstance stringId 
- The SQL Managed Instance ID.
- Name string
- The name of this Azure SQL Azure Managed Database.
- managedInstance StringId 
- The SQL Managed Instance ID.
- name String
- The name of this Azure SQL Azure Managed Database.
- managedInstance stringId 
- The SQL Managed Instance ID.
- name string
- The name of this Azure SQL Azure Managed Database.
- managed_instance_ strid 
- The SQL Managed Instance ID.
- name str
- The name of this Azure SQL Azure Managed Database.
- managedInstance StringId 
- The SQL Managed Instance ID.
- name String
- The name of this Azure SQL Azure Managed Database.
getManagedDatabase Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- LongTerm List<GetRetention Policies Managed Database Long Term Retention Policy> 
- A long_term_retention_policyblock as defined below.
- ManagedInstance stringId 
- ManagedInstance stringName 
- The name of the Managed Instance.
- Name string
- PointIn List<GetTime Restores Managed Database Point In Time Restore> 
- A point_in_time_restoreblock as defined below.
- ResourceGroup stringName 
- The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
- ShortTerm intRetention Days 
- The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- Id string
- The provider-assigned unique ID for this managed resource.
- LongTerm []GetRetention Policies Managed Database Long Term Retention Policy 
- A long_term_retention_policyblock as defined below.
- ManagedInstance stringId 
- ManagedInstance stringName 
- The name of the Managed Instance.
- Name string
- PointIn []GetTime Restores Managed Database Point In Time Restore 
- A point_in_time_restoreblock as defined below.
- ResourceGroup stringName 
- The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
- ShortTerm intRetention Days 
- The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- id String
- The provider-assigned unique ID for this managed resource.
- longTerm List<GetRetention Policies Managed Database Long Term Retention Policy> 
- A long_term_retention_policyblock as defined below.
- managedInstance StringId 
- managedInstance StringName 
- The name of the Managed Instance.
- name String
- pointIn List<GetTime Restores Managed Database Point In Time Restore> 
- A point_in_time_restoreblock as defined below.
- resourceGroup StringName 
- The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
- shortTerm IntegerRetention Days 
- The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- id string
- The provider-assigned unique ID for this managed resource.
- longTerm GetRetention Policies Managed Database Long Term Retention Policy[] 
- A long_term_retention_policyblock as defined below.
- managedInstance stringId 
- managedInstance stringName 
- The name of the Managed Instance.
- name string
- pointIn GetTime Restores Managed Database Point In Time Restore[] 
- A point_in_time_restoreblock as defined below.
- resourceGroup stringName 
- The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
- shortTerm numberRetention Days 
- The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- id str
- The provider-assigned unique ID for this managed resource.
- long_term_ Sequence[Getretention_ policies Managed Database Long Term Retention Policy] 
- A long_term_retention_policyblock as defined below.
- managed_instance_ strid 
- managed_instance_ strname 
- The name of the Managed Instance.
- name str
- point_in_ Sequence[Gettime_ restores Managed Database Point In Time Restore] 
- A point_in_time_restoreblock as defined below.
- resource_group_ strname 
- The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
- short_term_ intretention_ days 
- The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- id String
- The provider-assigned unique ID for this managed resource.
- longTerm List<Property Map>Retention Policies 
- A long_term_retention_policyblock as defined below.
- managedInstance StringId 
- managedInstance StringName 
- The name of the Managed Instance.
- name String
- pointIn List<Property Map>Time Restores 
- A point_in_time_restoreblock as defined below.
- resourceGroup StringName 
- The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
- shortTerm NumberRetention Days 
- The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
Supporting Types
GetManagedDatabaseLongTermRetentionPolicy      
- ImmutableBackups boolEnabled 
- Specifies if the backups are immutable.
- MonthlyRetention string
- The monthly retention policy for an LTR backup in an ISO 8601 format.
- WeekOf intYear 
- The week of year to take the yearly backup.
- WeeklyRetention string
- The weekly retention policy for an LTR backup in an ISO 8601 format.
- YearlyRetention string
- The yearly retention policy for an LTR backup in an ISO 8601 format.
- ImmutableBackups boolEnabled 
- Specifies if the backups are immutable.
- MonthlyRetention string
- The monthly retention policy for an LTR backup in an ISO 8601 format.
- WeekOf intYear 
- The week of year to take the yearly backup.
- WeeklyRetention string
- The weekly retention policy for an LTR backup in an ISO 8601 format.
- YearlyRetention string
- The yearly retention policy for an LTR backup in an ISO 8601 format.
- immutableBackups BooleanEnabled 
- Specifies if the backups are immutable.
- monthlyRetention String
- The monthly retention policy for an LTR backup in an ISO 8601 format.
- weekOf IntegerYear 
- The week of year to take the yearly backup.
- weeklyRetention String
- The weekly retention policy for an LTR backup in an ISO 8601 format.
- yearlyRetention String
- The yearly retention policy for an LTR backup in an ISO 8601 format.
- immutableBackups booleanEnabled 
- Specifies if the backups are immutable.
- monthlyRetention string
- The monthly retention policy for an LTR backup in an ISO 8601 format.
- weekOf numberYear 
- The week of year to take the yearly backup.
- weeklyRetention string
- The weekly retention policy for an LTR backup in an ISO 8601 format.
- yearlyRetention string
- The yearly retention policy for an LTR backup in an ISO 8601 format.
- immutable_backups_ boolenabled 
- Specifies if the backups are immutable.
- monthly_retention str
- The monthly retention policy for an LTR backup in an ISO 8601 format.
- week_of_ intyear 
- The week of year to take the yearly backup.
- weekly_retention str
- The weekly retention policy for an LTR backup in an ISO 8601 format.
- yearly_retention str
- The yearly retention policy for an LTR backup in an ISO 8601 format.
- immutableBackups BooleanEnabled 
- Specifies if the backups are immutable.
- monthlyRetention String
- The monthly retention policy for an LTR backup in an ISO 8601 format.
- weekOf NumberYear 
- The week of year to take the yearly backup.
- weeklyRetention String
- The weekly retention policy for an LTR backup in an ISO 8601 format.
- yearlyRetention String
- The yearly retention policy for an LTR backup in an ISO 8601 format.
GetManagedDatabasePointInTimeRestore      
- RestorePoint stringIn Time 
- The point in time for the restore from source_database_id.
- SourceDatabase stringId 
- The source database ID that is used to restore from.
- RestorePoint stringIn Time 
- The point in time for the restore from source_database_id.
- SourceDatabase stringId 
- The source database ID that is used to restore from.
- restorePoint StringIn Time 
- The point in time for the restore from source_database_id.
- sourceDatabase StringId 
- The source database ID that is used to restore from.
- restorePoint stringIn Time 
- The point in time for the restore from source_database_id.
- sourceDatabase stringId 
- The source database ID that is used to restore from.
- restore_point_ strin_ time 
- The point in time for the restore from source_database_id.
- source_database_ strid 
- The source database ID that is used to restore from.
- restorePoint StringIn Time 
- The point in time for the restore from source_database_id.
- sourceDatabase StringId 
- The source database ID that is used to restore from.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.