This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
siteSourceControlSlot.go
254 lines (230 loc) · 8.28 KB
/
siteSourceControlSlot.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20150801
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Describes the source control configuration for web app
type SiteSourceControlSlot struct {
pulumi.CustomResourceState
// Name of branch to use for deployment
Branch pulumi.StringPtrOutput `pulumi:"branch"`
// Whether to manual or continuous integration
DeploymentRollbackEnabled pulumi.BoolPtrOutput `pulumi:"deploymentRollbackEnabled"`
// Whether to manual or continuous integration
IsManualIntegration pulumi.BoolPtrOutput `pulumi:"isManualIntegration"`
// Mercurial or Git repository type
IsMercurial pulumi.BoolPtrOutput `pulumi:"isMercurial"`
// Kind of resource
Kind pulumi.StringPtrOutput `pulumi:"kind"`
// Resource Location
Location pulumi.StringOutput `pulumi:"location"`
// Resource Name
Name pulumi.StringPtrOutput `pulumi:"name"`
// Repository or source control url
RepoUrl pulumi.StringPtrOutput `pulumi:"repoUrl"`
// Resource tags
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Resource type
Type pulumi.StringPtrOutput `pulumi:"type"`
}
// NewSiteSourceControlSlot registers a new resource with the given unique name, arguments, and options.
func NewSiteSourceControlSlot(ctx *pulumi.Context,
name string, args *SiteSourceControlSlotArgs, opts ...pulumi.ResourceOption) (*SiteSourceControlSlot, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Name == nil {
return nil, errors.New("invalid value for required argument 'Name'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Slot == nil {
return nil, errors.New("invalid value for required argument 'Slot'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:web/latest:SiteSourceControlSlot"),
},
{
Type: pulumi.String("azure-nextgen:web/v20160801:SiteSourceControlSlot"),
},
{
Type: pulumi.String("azure-nextgen:web/v20180201:SiteSourceControlSlot"),
},
{
Type: pulumi.String("azure-nextgen:web/v20181101:SiteSourceControlSlot"),
},
{
Type: pulumi.String("azure-nextgen:web/v20190801:SiteSourceControlSlot"),
},
{
Type: pulumi.String("azure-nextgen:web/v20200601:SiteSourceControlSlot"),
},
{
Type: pulumi.String("azure-nextgen:web/v20200901:SiteSourceControlSlot"),
},
{
Type: pulumi.String("azure-nextgen:web/v20201001:SiteSourceControlSlot"),
},
})
opts = append(opts, aliases)
var resource SiteSourceControlSlot
err := ctx.RegisterResource("azure-nextgen:web/v20150801:SiteSourceControlSlot", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSiteSourceControlSlot gets an existing SiteSourceControlSlot 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 GetSiteSourceControlSlot(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SiteSourceControlSlotState, opts ...pulumi.ResourceOption) (*SiteSourceControlSlot, error) {
var resource SiteSourceControlSlot
err := ctx.ReadResource("azure-nextgen:web/v20150801:SiteSourceControlSlot", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SiteSourceControlSlot resources.
type siteSourceControlSlotState struct {
// Name of branch to use for deployment
Branch *string `pulumi:"branch"`
// Whether to manual or continuous integration
DeploymentRollbackEnabled *bool `pulumi:"deploymentRollbackEnabled"`
// Whether to manual or continuous integration
IsManualIntegration *bool `pulumi:"isManualIntegration"`
// Mercurial or Git repository type
IsMercurial *bool `pulumi:"isMercurial"`
// Kind of resource
Kind *string `pulumi:"kind"`
// Resource Location
Location *string `pulumi:"location"`
// Resource Name
Name *string `pulumi:"name"`
// Repository or source control url
RepoUrl *string `pulumi:"repoUrl"`
// Resource tags
Tags map[string]string `pulumi:"tags"`
// Resource type
Type *string `pulumi:"type"`
}
type SiteSourceControlSlotState struct {
// Name of branch to use for deployment
Branch pulumi.StringPtrInput
// Whether to manual or continuous integration
DeploymentRollbackEnabled pulumi.BoolPtrInput
// Whether to manual or continuous integration
IsManualIntegration pulumi.BoolPtrInput
// Mercurial or Git repository type
IsMercurial pulumi.BoolPtrInput
// Kind of resource
Kind pulumi.StringPtrInput
// Resource Location
Location pulumi.StringPtrInput
// Resource Name
Name pulumi.StringPtrInput
// Repository or source control url
RepoUrl pulumi.StringPtrInput
// Resource tags
Tags pulumi.StringMapInput
// Resource type
Type pulumi.StringPtrInput
}
func (SiteSourceControlSlotState) ElementType() reflect.Type {
return reflect.TypeOf((*siteSourceControlSlotState)(nil)).Elem()
}
type siteSourceControlSlotArgs struct {
// Name of branch to use for deployment
Branch *string `pulumi:"branch"`
// Whether to manual or continuous integration
DeploymentRollbackEnabled *bool `pulumi:"deploymentRollbackEnabled"`
// Resource Id
Id *string `pulumi:"id"`
// Whether to manual or continuous integration
IsManualIntegration *bool `pulumi:"isManualIntegration"`
// Mercurial or Git repository type
IsMercurial *bool `pulumi:"isMercurial"`
// Kind of resource
Kind *string `pulumi:"kind"`
// Resource Location
Location *string `pulumi:"location"`
// Resource Name
Name string `pulumi:"name"`
// Repository or source control url
RepoUrl *string `pulumi:"repoUrl"`
// Name of resource group
ResourceGroupName string `pulumi:"resourceGroupName"`
// Name of web app slot. If not specified then will default to production slot.
Slot string `pulumi:"slot"`
// Resource tags
Tags map[string]string `pulumi:"tags"`
// Resource type
Type *string `pulumi:"type"`
}
// The set of arguments for constructing a SiteSourceControlSlot resource.
type SiteSourceControlSlotArgs struct {
// Name of branch to use for deployment
Branch pulumi.StringPtrInput
// Whether to manual or continuous integration
DeploymentRollbackEnabled pulumi.BoolPtrInput
// Resource Id
Id pulumi.StringPtrInput
// Whether to manual or continuous integration
IsManualIntegration pulumi.BoolPtrInput
// Mercurial or Git repository type
IsMercurial pulumi.BoolPtrInput
// Kind of resource
Kind pulumi.StringPtrInput
// Resource Location
Location pulumi.StringPtrInput
// Resource Name
Name pulumi.StringInput
// Repository or source control url
RepoUrl pulumi.StringPtrInput
// Name of resource group
ResourceGroupName pulumi.StringInput
// Name of web app slot. If not specified then will default to production slot.
Slot pulumi.StringInput
// Resource tags
Tags pulumi.StringMapInput
// Resource type
Type pulumi.StringPtrInput
}
func (SiteSourceControlSlotArgs) ElementType() reflect.Type {
return reflect.TypeOf((*siteSourceControlSlotArgs)(nil)).Elem()
}
type SiteSourceControlSlotInput interface {
pulumi.Input
ToSiteSourceControlSlotOutput() SiteSourceControlSlotOutput
ToSiteSourceControlSlotOutputWithContext(ctx context.Context) SiteSourceControlSlotOutput
}
func (*SiteSourceControlSlot) ElementType() reflect.Type {
return reflect.TypeOf((*SiteSourceControlSlot)(nil))
}
func (i *SiteSourceControlSlot) ToSiteSourceControlSlotOutput() SiteSourceControlSlotOutput {
return i.ToSiteSourceControlSlotOutputWithContext(context.Background())
}
func (i *SiteSourceControlSlot) ToSiteSourceControlSlotOutputWithContext(ctx context.Context) SiteSourceControlSlotOutput {
return pulumi.ToOutputWithContext(ctx, i).(SiteSourceControlSlotOutput)
}
type SiteSourceControlSlotOutput struct {
*pulumi.OutputState
}
func (SiteSourceControlSlotOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SiteSourceControlSlot)(nil))
}
func (o SiteSourceControlSlotOutput) ToSiteSourceControlSlotOutput() SiteSourceControlSlotOutput {
return o
}
func (o SiteSourceControlSlotOutput) ToSiteSourceControlSlotOutputWithContext(ctx context.Context) SiteSourceControlSlotOutput {
return o
}
func init() {
pulumi.RegisterOutputType(SiteSourceControlSlotOutput{})
}