This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
maintenanceConfiguration.go
257 lines (233 loc) · 18 KB
/
maintenanceConfiguration.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
255
256
257
// *** 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 v20200701preview
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Maintenance configuration record type
type MaintenanceConfiguration struct {
pulumi.CustomResourceState
// Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.
Duration pulumi.StringPtrOutput `pulumi:"duration"`
// Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.
ExpirationDateTime pulumi.StringPtrOutput `pulumi:"expirationDateTime"`
// Gets or sets extensionProperties of the maintenanceConfiguration
ExtensionProperties pulumi.StringMapOutput `pulumi:"extensionProperties"`
// Gets or sets location of the resource
Location pulumi.StringPtrOutput `pulumi:"location"`
// Gets or sets maintenanceScope of the configuration
MaintenanceScope pulumi.StringPtrOutput `pulumi:"maintenanceScope"`
// Name of the resource
Name pulumi.StringOutput `pulumi:"name"`
// Gets or sets namespace of the resource
Namespace pulumi.StringPtrOutput `pulumi:"namespace"`
// Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.
RecurEvery pulumi.StringPtrOutput `pulumi:"recurEvery"`
// Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.
StartDateTime pulumi.StringPtrOutput `pulumi:"startDateTime"`
// Gets or sets tags of the resource
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// Type of the resource
Type pulumi.StringOutput `pulumi:"type"`
// Gets or sets the visibility of the configuration
Visibility pulumi.StringPtrOutput `pulumi:"visibility"`
}
// NewMaintenanceConfiguration registers a new resource with the given unique name, arguments, and options.
func NewMaintenanceConfiguration(ctx *pulumi.Context,
name string, args *MaintenanceConfigurationArgs, opts ...pulumi.ResourceOption) (*MaintenanceConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ResourceName == nil {
return nil, errors.New("invalid value for required argument 'ResourceName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:maintenance/latest:MaintenanceConfiguration"),
},
{
Type: pulumi.String("azure-nextgen:maintenance/v20180601preview:MaintenanceConfiguration"),
},
{
Type: pulumi.String("azure-nextgen:maintenance/v20200401:MaintenanceConfiguration"),
},
{
Type: pulumi.String("azure-nextgen:maintenance/v20210401preview:MaintenanceConfiguration"),
},
})
opts = append(opts, aliases)
var resource MaintenanceConfiguration
err := ctx.RegisterResource("azure-nextgen:maintenance/v20200701preview:MaintenanceConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMaintenanceConfiguration gets an existing MaintenanceConfiguration 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 GetMaintenanceConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MaintenanceConfigurationState, opts ...pulumi.ResourceOption) (*MaintenanceConfiguration, error) {
var resource MaintenanceConfiguration
err := ctx.ReadResource("azure-nextgen:maintenance/v20200701preview:MaintenanceConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MaintenanceConfiguration resources.
type maintenanceConfigurationState struct {
// Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.
Duration *string `pulumi:"duration"`
// Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.
ExpirationDateTime *string `pulumi:"expirationDateTime"`
// Gets or sets extensionProperties of the maintenanceConfiguration
ExtensionProperties map[string]string `pulumi:"extensionProperties"`
// Gets or sets location of the resource
Location *string `pulumi:"location"`
// Gets or sets maintenanceScope of the configuration
MaintenanceScope *string `pulumi:"maintenanceScope"`
// Name of the resource
Name *string `pulumi:"name"`
// Gets or sets namespace of the resource
Namespace *string `pulumi:"namespace"`
// Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.
RecurEvery *string `pulumi:"recurEvery"`
// Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.
StartDateTime *string `pulumi:"startDateTime"`
// Gets or sets tags of the resource
Tags map[string]string `pulumi:"tags"`
// Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.
TimeZone *string `pulumi:"timeZone"`
// Type of the resource
Type *string `pulumi:"type"`
// Gets or sets the visibility of the configuration
Visibility *string `pulumi:"visibility"`
}
type MaintenanceConfigurationState struct {
// Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.
Duration pulumi.StringPtrInput
// Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.
ExpirationDateTime pulumi.StringPtrInput
// Gets or sets extensionProperties of the maintenanceConfiguration
ExtensionProperties pulumi.StringMapInput
// Gets or sets location of the resource
Location pulumi.StringPtrInput
// Gets or sets maintenanceScope of the configuration
MaintenanceScope pulumi.StringPtrInput
// Name of the resource
Name pulumi.StringPtrInput
// Gets or sets namespace of the resource
Namespace pulumi.StringPtrInput
// Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.
RecurEvery pulumi.StringPtrInput
// Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.
StartDateTime pulumi.StringPtrInput
// Gets or sets tags of the resource
Tags pulumi.StringMapInput
// Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.
TimeZone pulumi.StringPtrInput
// Type of the resource
Type pulumi.StringPtrInput
// Gets or sets the visibility of the configuration
Visibility pulumi.StringPtrInput
}
func (MaintenanceConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*maintenanceConfigurationState)(nil)).Elem()
}
type maintenanceConfigurationArgs struct {
// Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.
Duration *string `pulumi:"duration"`
// Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.
ExpirationDateTime *string `pulumi:"expirationDateTime"`
// Gets or sets extensionProperties of the maintenanceConfiguration
ExtensionProperties map[string]string `pulumi:"extensionProperties"`
// Gets or sets location of the resource
Location *string `pulumi:"location"`
// Gets or sets maintenanceScope of the configuration
MaintenanceScope *string `pulumi:"maintenanceScope"`
// Gets or sets namespace of the resource
Namespace *string `pulumi:"namespace"`
// Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.
RecurEvery *string `pulumi:"recurEvery"`
// Resource Group Name
ResourceGroupName string `pulumi:"resourceGroupName"`
// Resource Identifier
ResourceName string `pulumi:"resourceName"`
// Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.
StartDateTime *string `pulumi:"startDateTime"`
// Gets or sets tags of the resource
Tags map[string]string `pulumi:"tags"`
// Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.
TimeZone *string `pulumi:"timeZone"`
// Gets or sets the visibility of the configuration
Visibility *string `pulumi:"visibility"`
}
// The set of arguments for constructing a MaintenanceConfiguration resource.
type MaintenanceConfigurationArgs struct {
// Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.
Duration pulumi.StringPtrInput
// Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.
ExpirationDateTime pulumi.StringPtrInput
// Gets or sets extensionProperties of the maintenanceConfiguration
ExtensionProperties pulumi.StringMapInput
// Gets or sets location of the resource
Location pulumi.StringPtrInput
// Gets or sets maintenanceScope of the configuration
MaintenanceScope pulumi.StringPtrInput
// Gets or sets namespace of the resource
Namespace pulumi.StringPtrInput
// Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.
RecurEvery pulumi.StringPtrInput
// Resource Group Name
ResourceGroupName pulumi.StringInput
// Resource Identifier
ResourceName pulumi.StringInput
// Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.
StartDateTime pulumi.StringPtrInput
// Gets or sets tags of the resource
Tags pulumi.StringMapInput
// Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.
TimeZone pulumi.StringPtrInput
// Gets or sets the visibility of the configuration
Visibility pulumi.StringPtrInput
}
func (MaintenanceConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*maintenanceConfigurationArgs)(nil)).Elem()
}
type MaintenanceConfigurationInput interface {
pulumi.Input
ToMaintenanceConfigurationOutput() MaintenanceConfigurationOutput
ToMaintenanceConfigurationOutputWithContext(ctx context.Context) MaintenanceConfigurationOutput
}
func (*MaintenanceConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((*MaintenanceConfiguration)(nil))
}
func (i *MaintenanceConfiguration) ToMaintenanceConfigurationOutput() MaintenanceConfigurationOutput {
return i.ToMaintenanceConfigurationOutputWithContext(context.Background())
}
func (i *MaintenanceConfiguration) ToMaintenanceConfigurationOutputWithContext(ctx context.Context) MaintenanceConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(MaintenanceConfigurationOutput)
}
type MaintenanceConfigurationOutput struct {
*pulumi.OutputState
}
func (MaintenanceConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MaintenanceConfiguration)(nil))
}
func (o MaintenanceConfigurationOutput) ToMaintenanceConfigurationOutput() MaintenanceConfigurationOutput {
return o
}
func (o MaintenanceConfigurationOutput) ToMaintenanceConfigurationOutputWithContext(ctx context.Context) MaintenanceConfigurationOutput {
return o
}
func init() {
pulumi.RegisterOutputType(MaintenanceConfigurationOutput{})
}