1. Packages
  2. Azure Native
  3. API Docs
  4. azuredata
  5. SqlServer
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.azuredata.SqlServer

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    A SQL server. Azure REST API version: 2019-07-24-preview. Prior API version in Azure Native 1.x: 2019-07-24-preview.

    Example Usage

    Creates or updates a SQL Server in a Registration group.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var sqlServer = new AzureNative.AzureData.SqlServer("sqlServer", new()
        {
            Cores = 8,
            Edition = "Latin",
            PropertyBag = "",
            RegistrationID = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration",
            ResourceGroupName = "testrg",
            SqlServerName = "testsqlserver",
            SqlServerRegistrationName = "testsqlregistration",
            Version = "2008",
        });
    
    });
    
    package main
    
    import (
    	azuredata "github.com/pulumi/pulumi-azure-native-sdk/azuredata/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := azuredata.NewSqlServer(ctx, "sqlServer", &azuredata.SqlServerArgs{
    			Cores:                     pulumi.Int(8),
    			Edition:                   pulumi.String("Latin"),
    			PropertyBag:               pulumi.String(""),
    			RegistrationID:            pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration"),
    			ResourceGroupName:         pulumi.String("testrg"),
    			SqlServerName:             pulumi.String("testsqlserver"),
    			SqlServerRegistrationName: pulumi.String("testsqlregistration"),
    			Version:                   pulumi.String("2008"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.azuredata.SqlServer;
    import com.pulumi.azurenative.azuredata.SqlServerArgs;
    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 sqlServer = new SqlServer("sqlServer", SqlServerArgs.builder()
                .cores(8)
                .edition("Latin")
                .propertyBag("")
                .registrationID("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration")
                .resourceGroupName("testrg")
                .sqlServerName("testsqlserver")
                .sqlServerRegistrationName("testsqlregistration")
                .version("2008")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    sql_server = azure_native.azuredata.SqlServer("sqlServer",
        cores=8,
        edition="Latin",
        property_bag="",
        registration_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration",
        resource_group_name="testrg",
        sql_server_name="testsqlserver",
        sql_server_registration_name="testsqlregistration",
        version="2008")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const sqlServer = new azure_native.azuredata.SqlServer("sqlServer", {
        cores: 8,
        edition: "Latin",
        propertyBag: "",
        registrationID: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration",
        resourceGroupName: "testrg",
        sqlServerName: "testsqlserver",
        sqlServerRegistrationName: "testsqlregistration",
        version: "2008",
    });
    
    resources:
      sqlServer:
        type: azure-native:azuredata:SqlServer
        properties:
          cores: 8
          edition: Latin
          propertyBag:
          registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
          resourceGroupName: testrg
          sqlServerName: testsqlserver
          sqlServerRegistrationName: testsqlregistration
          version: '2008'
    

    Create SqlServer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SqlServer(name: string, args: SqlServerArgs, opts?: CustomResourceOptions);
    @overload
    def SqlServer(resource_name: str,
                  args: SqlServerArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def SqlServer(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  resource_group_name: Optional[str] = None,
                  sql_server_registration_name: Optional[str] = None,
                  cores: Optional[int] = None,
                  edition: Optional[str] = None,
                  property_bag: Optional[str] = None,
                  registration_id: Optional[str] = None,
                  sql_server_name: Optional[str] = None,
                  version: Optional[str] = None)
    func NewSqlServer(ctx *Context, name string, args SqlServerArgs, opts ...ResourceOption) (*SqlServer, error)
    public SqlServer(string name, SqlServerArgs args, CustomResourceOptions? opts = null)
    public SqlServer(String name, SqlServerArgs args)
    public SqlServer(String name, SqlServerArgs args, CustomResourceOptions options)
    
    type: azure-native:azuredata:SqlServer
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SqlServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SqlServerArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SqlServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SqlServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SqlServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sqlServerResource = new AzureNative.AzureData.SqlServer("sqlServerResource", new()
    {
        ResourceGroupName = "string",
        SqlServerRegistrationName = "string",
        Cores = 0,
        Edition = "string",
        PropertyBag = "string",
        RegistrationID = "string",
        SqlServerName = "string",
        Version = "string",
    });
    
    example, err := azuredata.NewSqlServer(ctx, "sqlServerResource", &azuredata.SqlServerArgs{
    ResourceGroupName: pulumi.String("string"),
    SqlServerRegistrationName: pulumi.String("string"),
    Cores: pulumi.Int(0),
    Edition: pulumi.String("string"),
    PropertyBag: pulumi.String("string"),
    RegistrationID: pulumi.String("string"),
    SqlServerName: pulumi.String("string"),
    Version: pulumi.String("string"),
    })
    
    var sqlServerResource = new SqlServer("sqlServerResource", SqlServerArgs.builder()
        .resourceGroupName("string")
        .sqlServerRegistrationName("string")
        .cores(0)
        .edition("string")
        .propertyBag("string")
        .registrationID("string")
        .sqlServerName("string")
        .version("string")
        .build());
    
    sql_server_resource = azure_native.azuredata.SqlServer("sqlServerResource",
        resource_group_name="string",
        sql_server_registration_name="string",
        cores=0,
        edition="string",
        property_bag="string",
        registration_id="string",
        sql_server_name="string",
        version="string")
    
    const sqlServerResource = new azure_native.azuredata.SqlServer("sqlServerResource", {
        resourceGroupName: "string",
        sqlServerRegistrationName: "string",
        cores: 0,
        edition: "string",
        propertyBag: "string",
        registrationID: "string",
        sqlServerName: "string",
        version: "string",
    });
    
    type: azure-native:azuredata:SqlServer
    properties:
        cores: 0
        edition: string
        propertyBag: string
        registrationID: string
        resourceGroupName: string
        sqlServerName: string
        sqlServerRegistrationName: string
        version: string
    

    SqlServer Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SqlServer resource accepts the following input properties:

    ResourceGroupName string
    Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    SqlServerRegistrationName string
    Name of the SQL Server registration.
    Cores int
    Cores of the Sql Server.
    Edition string
    Sql Server Edition.
    PropertyBag string
    Sql Server Json Property Bag.
    RegistrationID string
    ID for Parent Sql Server Registration.
    SqlServerName string
    Name of the SQL Server.
    Version string
    Version of the Sql Server.
    ResourceGroupName string
    Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    SqlServerRegistrationName string
    Name of the SQL Server registration.
    Cores int
    Cores of the Sql Server.
    Edition string
    Sql Server Edition.
    PropertyBag string
    Sql Server Json Property Bag.
    RegistrationID string
    ID for Parent Sql Server Registration.
    SqlServerName string
    Name of the SQL Server.
    Version string
    Version of the Sql Server.
    resourceGroupName String
    Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    sqlServerRegistrationName String
    Name of the SQL Server registration.
    cores Integer
    Cores of the Sql Server.
    edition String
    Sql Server Edition.
    propertyBag String
    Sql Server Json Property Bag.
    registrationID String
    ID for Parent Sql Server Registration.
    sqlServerName String
    Name of the SQL Server.
    version String
    Version of the Sql Server.
    resourceGroupName string
    Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    sqlServerRegistrationName string
    Name of the SQL Server registration.
    cores number
    Cores of the Sql Server.
    edition string
    Sql Server Edition.
    propertyBag string
    Sql Server Json Property Bag.
    registrationID string
    ID for Parent Sql Server Registration.
    sqlServerName string
    Name of the SQL Server.
    version string
    Version of the Sql Server.
    resource_group_name str
    Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    sql_server_registration_name str
    Name of the SQL Server registration.
    cores int
    Cores of the Sql Server.
    edition str
    Sql Server Edition.
    property_bag str
    Sql Server Json Property Bag.
    registration_id str
    ID for Parent Sql Server Registration.
    sql_server_name str
    Name of the SQL Server.
    version str
    Version of the Sql Server.
    resourceGroupName String
    Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    sqlServerRegistrationName String
    Name of the SQL Server registration.
    cores Number
    Cores of the Sql Server.
    edition String
    Sql Server Edition.
    propertyBag String
    Sql Server Json Property Bag.
    registrationID String
    ID for Parent Sql Server Registration.
    sqlServerName String
    Name of the SQL Server.
    version String
    Version of the Sql Server.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SqlServer resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    Type string
    The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    Type string
    The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    type String
    The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    type string
    The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    type str
    The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    type String
    The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:azuredata:SqlServer testsqlserver /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers/{sqlServerName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi