get Sql Managed Instance
suspend fun getSqlManagedInstance(argument: GetSqlManagedInstancePlainArgs): GetSqlManagedInstanceResult
Use this data source to access information about an existing SQL Managed Instance.
Note: The
azure.sql.ManagedInstance
data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use theazure.mssql.ManagedInstance
data source instead.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.sql.SqlFunctions;
import com.pulumi.azure.sql.inputs.GetSqlManagedInstanceArgs;
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 = SqlFunctions.getSqlManagedInstance(GetSqlManagedInstanceArgs.builder()
.name("example_mi")
.resourceGroupName("example-resources")
.build());
ctx.export("sqlInstanceId", example.applyValue(getSqlManagedInstanceResult -> getSqlManagedInstanceResult.id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getSqlManagedInstance.
Parameters
argument
A collection of arguments for invoking getSqlManagedInstance.
suspend fun getSqlManagedInstance(name: String, resourceGroupName: String, tags: Map<String, String>? = null): GetSqlManagedInstanceResult
Return
A collection of values returned by getSqlManagedInstance.
See also
Parameters
name
The name of the SQL Managed Instance.
resource Group Name
The name of the Resource Group in which the SQL Managed Instance exists.
tags
A mapping of tags assigned to the resource.
suspend fun getSqlManagedInstance(argument: suspend GetSqlManagedInstancePlainArgsBuilder.() -> Unit): GetSqlManagedInstanceResult
Return
A collection of values returned by getSqlManagedInstance.
See also
Parameters
argument
Builder for com.pulumi.azure.sql.kotlin.inputs.GetSqlManagedInstancePlainArgs.