OutputMssql

Manages a Stream Analytics Output to Microsoft SQL Server Database.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = Output.Create(Azure.Core.GetResourceGroup.InvokeAsync(new Azure.Core.GetResourceGroupArgs
        {
            Name = "example-resources",
        }));
        var exampleJob = Output.Create(Azure.StreamAnalytics.GetJob.InvokeAsync(new Azure.StreamAnalytics.GetJobArgs
        {
            Name = "example-job",
            ResourceGroupName = azurerm_resource_group.Example.Name,
        }));
        var exampleSqlServer = new Azure.Sql.SqlServer("exampleSqlServer", new Azure.Sql.SqlServerArgs
        {
            ResourceGroupName = azurerm_resource_group.Example.Name,
            Location = azurerm_resource_group.Example.Location,
            Version = "12.0",
            AdministratorLogin = "dbadmin",
            AdministratorLoginPassword = "example-password",
        });
        var exampleDatabase = new Azure.Sql.Database("exampleDatabase", new Azure.Sql.DatabaseArgs
        {
            ResourceGroupName = azurerm_resource_group.Example.Name,
            Location = azurerm_resource_group.Example.Location,
            ServerName = exampleSqlServer.Name,
            RequestedServiceObjectiveName = "S0",
            Collation = "SQL_LATIN1_GENERAL_CP1_CI_AS",
            MaxSizeBytes = "268435456000",
            CreateMode = "Default",
        });
        var exampleOutputMssql = new Azure.StreamAnalytics.OutputMssql("exampleOutputMssql", new Azure.StreamAnalytics.OutputMssqlArgs
        {
            StreamAnalyticsJobName = azurerm_stream_analytics_job.Example.Name,
            ResourceGroupName = azurerm_stream_analytics_job.Example.Resource_group_name,
            Server = exampleSqlServer.FullyQualifiedDomainName,
            User = exampleSqlServer.AdministratorLogin,
            Password = exampleSqlServer.AdministratorLoginPassword,
            Database = exampleDatabase.Name,
            Table = "ExampleTable",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/sql"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/streamanalytics"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{
            Name: "example-resources",
        }, nil)
        if err != nil {
            return err
        }
        _, err := streamanalytics.LookupJob(ctx, &streamanalytics.LookupJobArgs{
            Name:              "example-job",
            ResourceGroupName: azurerm_resource_group.Example.Name,
        }, nil)
        if err != nil {
            return err
        }
        exampleSqlServer, err := sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{
            ResourceGroupName:          pulumi.String(azurerm_resource_group.Example.Name),
            Location:                   pulumi.String(azurerm_resource_group.Example.Location),
            Version:                    pulumi.String("12.0"),
            AdministratorLogin:         pulumi.String("dbadmin"),
            AdministratorLoginPassword: pulumi.String("example-password"),
        })
        if err != nil {
            return err
        }
        exampleDatabase, err := sql.NewDatabase(ctx, "exampleDatabase", &sql.DatabaseArgs{
            ResourceGroupName:             pulumi.String(azurerm_resource_group.Example.Name),
            Location:                      pulumi.String(azurerm_resource_group.Example.Location),
            ServerName:                    exampleSqlServer.Name,
            RequestedServiceObjectiveName: pulumi.String("S0"),
            Collation:                     pulumi.String("SQL_LATIN1_GENERAL_CP1_CI_AS"),
            MaxSizeBytes:                  pulumi.String("268435456000"),
            CreateMode:                    pulumi.String("Default"),
        })
        if err != nil {
            return err
        }
        _, err = streamanalytics.NewOutputMssql(ctx, "exampleOutputMssql", &streamanalytics.OutputMssqlArgs{
            StreamAnalyticsJobName: pulumi.String(azurerm_stream_analytics_job.Example.Name),
            ResourceGroupName:      pulumi.String(azurerm_stream_analytics_job.Example.Resource_group_name),
            Server:                 exampleSqlServer.FullyQualifiedDomainName,
            User:                   exampleSqlServer.AdministratorLogin,
            Password:               exampleSqlServer.AdministratorLoginPassword,
            Database:               exampleDatabase.Name,
            Table:                  pulumi.String("ExampleTable"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.get_resource_group(name="example-resources")
example_job = azure.streamanalytics.get_job(name="example-job",
    resource_group_name=azurerm_resource_group["example"]["name"])
example_sql_server = azure.sql.SqlServer("exampleSqlServer",
    resource_group_name=azurerm_resource_group["example"]["name"],
    location=azurerm_resource_group["example"]["location"],
    version="12.0",
    administrator_login="dbadmin",
    administrator_login_password="example-password")
example_database = azure.sql.Database("exampleDatabase",
    resource_group_name=azurerm_resource_group["example"]["name"],
    location=azurerm_resource_group["example"]["location"],
    server_name=example_sql_server.name,
    requested_service_objective_name="S0",
    collation="SQL_LATIN1_GENERAL_CP1_CI_AS",
    max_size_bytes="268435456000",
    create_mode="Default")
example_output_mssql = azure.streamanalytics.OutputMssql("exampleOutputMssql",
    stream_analytics_job_name=azurerm_stream_analytics_job["example"]["name"],
    resource_group_name=azurerm_stream_analytics_job["example"]["resource_group_name"],
    server=example_sql_server.fully_qualified_domain_name,
    user=example_sql_server.administrator_login,
    password=example_sql_server.administrator_login_password,
    database=example_database.name,
    table="ExampleTable")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = azure.core.getResourceGroup({
    name: "example-resources",
});
const exampleJob = azure.streamanalytics.getJob({
    name: "example-job",
    resourceGroupName: azurerm_resource_group.example.name,
});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
    resourceGroupName: azurerm_resource_group.example.name,
    location: azurerm_resource_group.example.location,
    version: "12.0",
    administratorLogin: "dbadmin",
    administratorLoginPassword: "example-password",
});
const exampleDatabase = new azure.sql.Database("exampleDatabase", {
    resourceGroupName: azurerm_resource_group.example.name,
    location: azurerm_resource_group.example.location,
    serverName: exampleSqlServer.name,
    requestedServiceObjectiveName: "S0",
    collation: "SQL_LATIN1_GENERAL_CP1_CI_AS",
    maxSizeBytes: "268435456000",
    createMode: "Default",
});
const exampleOutputMssql = new azure.streamanalytics.OutputMssql("exampleOutputMssql", {
    streamAnalyticsJobName: azurerm_stream_analytics_job.example.name,
    resourceGroupName: azurerm_stream_analytics_job.example.resource_group_name,
    server: exampleSqlServer.fullyQualifiedDomainName,
    user: exampleSqlServer.administratorLogin,
    password: exampleSqlServer.administratorLoginPassword,
    database: exampleDatabase.name,
    table: "ExampleTable",
});

Create a OutputMssql Resource

def OutputMssql(resource_name, opts=None, database=None, name=None, password=None, resource_group_name=None, server=None, stream_analytics_job_name=None, table=None, user=None, __props__=None);
func NewOutputMssql(ctx *Context, name string, args OutputMssqlArgs, opts ...ResourceOption) (*OutputMssql, error)
public OutputMssql(string name, OutputMssqlArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args OutputMssqlArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args OutputMssqlArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args OutputMssqlArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

OutputMssql Resource Properties

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

Inputs

The OutputMssql resource accepts the following input properties:

Database string
Password string

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Server string

The SQL server url. Changing this forces a new resource to be created.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Table string

Table in the database that the output points to. Changing this forces a new resource to be created.

User string

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

Name string

The name of the Stream Output. Changing this forces a new resource to be created.

Database string
Password string

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Server string

The SQL server url. Changing this forces a new resource to be created.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Table string

Table in the database that the output points to. Changing this forces a new resource to be created.

User string

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

Name string

The name of the Stream Output. Changing this forces a new resource to be created.

database string
password string

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

resourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

server string

The SQL server url. Changing this forces a new resource to be created.

streamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

table string

Table in the database that the output points to. Changing this forces a new resource to be created.

user string

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

name string

The name of the Stream Output. Changing this forces a new resource to be created.

database str
password str

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

resource_group_name str

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

server str

The SQL server url. Changing this forces a new resource to be created.

stream_analytics_job_name str

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

table str

Table in the database that the output points to. Changing this forces a new resource to be created.

user str

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

name str

The name of the Stream Output. Changing this forces a new resource to be created.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing OutputMssql Resource

Get an existing OutputMssql resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: OutputMssqlState, opts?: CustomResourceOptions): OutputMssql
static get(resource_name, id, opts=None, database=None, name=None, password=None, resource_group_name=None, server=None, stream_analytics_job_name=None, table=None, user=None, __props__=None);
func GetOutputMssql(ctx *Context, name string, id IDInput, state *OutputMssqlState, opts ...ResourceOption) (*OutputMssql, error)
public static OutputMssql Get(string name, Input<string> id, OutputMssqlState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Database string
Name string

The name of the Stream Output. Changing this forces a new resource to be created.

Password string

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Server string

The SQL server url. Changing this forces a new resource to be created.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Table string

Table in the database that the output points to. Changing this forces a new resource to be created.

User string

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

Database string
Name string

The name of the Stream Output. Changing this forces a new resource to be created.

Password string

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Server string

The SQL server url. Changing this forces a new resource to be created.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Table string

Table in the database that the output points to. Changing this forces a new resource to be created.

User string

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

database string
name string

The name of the Stream Output. Changing this forces a new resource to be created.

password string

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

resourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

server string

The SQL server url. Changing this forces a new resource to be created.

streamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

table string

Table in the database that the output points to. Changing this forces a new resource to be created.

user string

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

database str
name str

The name of the Stream Output. Changing this forces a new resource to be created.

password str

Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

resource_group_name str

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

server str

The SQL server url. Changing this forces a new resource to be created.

stream_analytics_job_name str

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

table str

Table in the database that the output points to. Changing this forces a new resource to be created.

user str

Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.