-
Notifications
You must be signed in to change notification settings - Fork 51
/
outputMssql.go
176 lines (159 loc) · 7.05 KB
/
outputMssql.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package streamanalytics
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages a Stream Analytics Output to Microsoft SQL Server Database.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/stream_analytics_output_mssql.html.markdown.
type OutputMssql struct {
s *pulumi.ResourceState
}
// NewOutputMssql registers a new resource with the given unique name, arguments, and options.
func NewOutputMssql(ctx *pulumi.Context,
name string, args *OutputMssqlArgs, opts ...pulumi.ResourceOpt) (*OutputMssql, error) {
if args == nil || args.Database == nil {
return nil, errors.New("missing required argument 'Database'")
}
if args == nil || args.Password == nil {
return nil, errors.New("missing required argument 'Password'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil || args.Server == nil {
return nil, errors.New("missing required argument 'Server'")
}
if args == nil || args.StreamAnalyticsJobName == nil {
return nil, errors.New("missing required argument 'StreamAnalyticsJobName'")
}
if args == nil || args.Table == nil {
return nil, errors.New("missing required argument 'Table'")
}
if args == nil || args.User == nil {
return nil, errors.New("missing required argument 'User'")
}
inputs := make(map[string]interface{})
if args == nil {
inputs["database"] = nil
inputs["name"] = nil
inputs["password"] = nil
inputs["resourceGroupName"] = nil
inputs["server"] = nil
inputs["streamAnalyticsJobName"] = nil
inputs["table"] = nil
inputs["user"] = nil
} else {
inputs["database"] = args.Database
inputs["name"] = args.Name
inputs["password"] = args.Password
inputs["resourceGroupName"] = args.ResourceGroupName
inputs["server"] = args.Server
inputs["streamAnalyticsJobName"] = args.StreamAnalyticsJobName
inputs["table"] = args.Table
inputs["user"] = args.User
}
s, err := ctx.RegisterResource("azure:streamanalytics/outputMssql:OutputMssql", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &OutputMssql{s: s}, nil
}
// GetOutputMssql gets an existing OutputMssql resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetOutputMssql(ctx *pulumi.Context,
name string, id pulumi.ID, state *OutputMssqlState, opts ...pulumi.ResourceOpt) (*OutputMssql, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["database"] = state.Database
inputs["name"] = state.Name
inputs["password"] = state.Password
inputs["resourceGroupName"] = state.ResourceGroupName
inputs["server"] = state.Server
inputs["streamAnalyticsJobName"] = state.StreamAnalyticsJobName
inputs["table"] = state.Table
inputs["user"] = state.User
}
s, err := ctx.ReadResource("azure:streamanalytics/outputMssql:OutputMssql", name, id, inputs, opts...)
if err != nil {
return nil, err
}
return &OutputMssql{s: s}, nil
}
// URN is this resource's unique name assigned by Pulumi.
func (r *OutputMssql) URN() *pulumi.URNOutput {
return r.s.URN()
}
// ID is this resource's unique identifier assigned by its provider.
func (r *OutputMssql) ID() *pulumi.IDOutput {
return r.s.ID()
}
func (r *OutputMssql) Database() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["database"])
}
// The name of the Stream Output. Changing this forces a new resource to be created.
func (r *OutputMssql) Name() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["name"])
}
// Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.
func (r *OutputMssql) Password() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["password"])
}
// The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
func (r *OutputMssql) ResourceGroupName() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["resourceGroupName"])
}
// The SQL server url. Changing this forces a new resource to be created.
func (r *OutputMssql) Server() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["server"])
}
// The name of the Stream Analytics Job. Changing this forces a new resource to be created.
func (r *OutputMssql) StreamAnalyticsJobName() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["streamAnalyticsJobName"])
}
// Table in the database that the output points to. Changing this forces a new resource to be created.
func (r *OutputMssql) Table() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["table"])
}
// Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.
func (r *OutputMssql) User() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["user"])
}
// Input properties used for looking up and filtering OutputMssql resources.
type OutputMssqlState struct {
Database interface{}
// The name of the Stream Output. Changing this forces a new resource to be created.
Name interface{}
// Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.
Password interface{}
// The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
ResourceGroupName interface{}
// The SQL server url. Changing this forces a new resource to be created.
Server interface{}
// The name of the Stream Analytics Job. Changing this forces a new resource to be created.
StreamAnalyticsJobName interface{}
// Table in the database that the output points to. Changing this forces a new resource to be created.
Table interface{}
// Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.
User interface{}
}
// The set of arguments for constructing a OutputMssql resource.
type OutputMssqlArgs struct {
Database interface{}
// The name of the Stream Output. Changing this forces a new resource to be created.
Name interface{}
// Password used together with username, to login to the Microsoft SQL Server. Changing this forces a new resource to be created.
Password interface{}
// The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
ResourceGroupName interface{}
// The SQL server url. Changing this forces a new resource to be created.
Server interface{}
// The name of the Stream Analytics Job. Changing this forces a new resource to be created.
StreamAnalyticsJobName interface{}
// Table in the database that the output points to. Changing this forces a new resource to be created.
Table interface{}
// Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created.
User interface{}
}