azure-native.azuredata.SqlServer
Explore with Pulumi AI
A SQL server. API Version: 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"
"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: "string",
SqlServerRegistrationName: "string",
Cores: 0,
Edition: "string",
PropertyBag: "string",
RegistrationID: "string",
SqlServerName: "string",
Version: "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SqlServer resource accepts the following input properties:
- Resource
Group stringName - 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 stringRegistration Name - Name of the SQL Server registration.
- Cores int
- Cores of the Sql Server.
- Edition string
- Sql Server Edition.
- Property
Bag string - Sql Server Json Property Bag.
- Registration
ID string - ID for Parent Sql Server Registration.
- Sql
Server stringName - Name of the SQL Server.
- Version string
- Version of the Sql Server.
- Resource
Group stringName - 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 stringRegistration Name - Name of the SQL Server registration.
- Cores int
- Cores of the Sql Server.
- Edition string
- Sql Server Edition.
- Property
Bag string - Sql Server Json Property Bag.
- Registration
ID string - ID for Parent Sql Server Registration.
- Sql
Server stringName - Name of the SQL Server.
- Version string
- Version of the Sql Server.
- resource
Group StringName - 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 StringRegistration Name - Name of the SQL Server registration.
- cores Integer
- Cores of the Sql Server.
- edition String
- Sql Server Edition.
- property
Bag String - Sql Server Json Property Bag.
- registration
ID String - ID for Parent Sql Server Registration.
- sql
Server StringName - Name of the SQL Server.
- version String
- Version of the Sql Server.
- resource
Group stringName - 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 stringRegistration Name - Name of the SQL Server registration.
- cores number
- Cores of the Sql Server.
- edition string
- Sql Server Edition.
- property
Bag string - Sql Server Json Property Bag.
- registration
ID string - ID for Parent Sql Server Registration.
- sql
Server stringName - Name of the SQL Server.
- version string
- Version of the Sql Server.
- resource_
group_ strname - 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_ strregistration_ name - 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_ strname - Name of the SQL Server.
- version str
- Version of the Sql Server.
- resource
Group StringName - 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 StringRegistration Name - Name of the SQL Server registration.
- cores Number
- Cores of the Sql Server.
- edition String
- Sql Server Edition.
- property
Bag String - Sql Server Json Property Bag.
- registration
ID String - ID for Parent Sql Server Registration.
- sql
Server StringName - 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:
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:azuredata:SqlServer testsqlserver /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0