-
Notifications
You must be signed in to change notification settings - Fork 17
/
monitoringSchedule.go
203 lines (169 loc) · 8.73 KB
/
monitoringSchedule.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package sagemaker
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource Type definition for AWS::SageMaker::MonitoringSchedule
type MonitoringSchedule struct {
pulumi.CustomResourceState
// The time at which the schedule was created.
CreationTime pulumi.StringOutput `pulumi:"creationTime"`
EndpointName pulumi.StringPtrOutput `pulumi:"endpointName"`
// Contains the reason a monitoring job failed, if it failed.
FailureReason pulumi.StringPtrOutput `pulumi:"failureReason"`
// A timestamp that indicates the last time the monitoring job was modified.
LastModifiedTime pulumi.StringOutput `pulumi:"lastModifiedTime"`
// Describes metadata on the last execution to run, if there was one.
LastMonitoringExecutionSummary MonitoringScheduleMonitoringExecutionSummaryPtrOutput `pulumi:"lastMonitoringExecutionSummary"`
// The Amazon Resource Name (ARN) of the monitoring schedule.
MonitoringScheduleArn pulumi.StringOutput `pulumi:"monitoringScheduleArn"`
MonitoringScheduleConfig MonitoringScheduleConfigOutput `pulumi:"monitoringScheduleConfig"`
MonitoringScheduleName pulumi.StringOutput `pulumi:"monitoringScheduleName"`
// The status of a schedule job.
MonitoringScheduleStatus MonitoringScheduleStatusPtrOutput `pulumi:"monitoringScheduleStatus"`
// An array of key-value pairs to apply to this resource.
Tags aws.TagArrayOutput `pulumi:"tags"`
}
// NewMonitoringSchedule registers a new resource with the given unique name, arguments, and options.
func NewMonitoringSchedule(ctx *pulumi.Context,
name string, args *MonitoringScheduleArgs, opts ...pulumi.ResourceOption) (*MonitoringSchedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MonitoringScheduleConfig == nil {
return nil, errors.New("invalid value for required argument 'MonitoringScheduleConfig'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"monitoringScheduleName",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource MonitoringSchedule
err := ctx.RegisterResource("aws-native:sagemaker:MonitoringSchedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMonitoringSchedule gets an existing MonitoringSchedule 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 GetMonitoringSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MonitoringScheduleState, opts ...pulumi.ResourceOption) (*MonitoringSchedule, error) {
var resource MonitoringSchedule
err := ctx.ReadResource("aws-native:sagemaker:MonitoringSchedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MonitoringSchedule resources.
type monitoringScheduleState struct {
}
type MonitoringScheduleState struct {
}
func (MonitoringScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*monitoringScheduleState)(nil)).Elem()
}
type monitoringScheduleArgs struct {
EndpointName *string `pulumi:"endpointName"`
// Contains the reason a monitoring job failed, if it failed.
FailureReason *string `pulumi:"failureReason"`
// Describes metadata on the last execution to run, if there was one.
LastMonitoringExecutionSummary *MonitoringScheduleMonitoringExecutionSummary `pulumi:"lastMonitoringExecutionSummary"`
MonitoringScheduleConfig MonitoringScheduleConfig `pulumi:"monitoringScheduleConfig"`
MonitoringScheduleName *string `pulumi:"monitoringScheduleName"`
// The status of a schedule job.
MonitoringScheduleStatus *MonitoringScheduleStatus `pulumi:"monitoringScheduleStatus"`
// An array of key-value pairs to apply to this resource.
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a MonitoringSchedule resource.
type MonitoringScheduleArgs struct {
EndpointName pulumi.StringPtrInput
// Contains the reason a monitoring job failed, if it failed.
FailureReason pulumi.StringPtrInput
// Describes metadata on the last execution to run, if there was one.
LastMonitoringExecutionSummary MonitoringScheduleMonitoringExecutionSummaryPtrInput
MonitoringScheduleConfig MonitoringScheduleConfigInput
MonitoringScheduleName pulumi.StringPtrInput
// The status of a schedule job.
MonitoringScheduleStatus MonitoringScheduleStatusPtrInput
// An array of key-value pairs to apply to this resource.
Tags aws.TagArrayInput
}
func (MonitoringScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*monitoringScheduleArgs)(nil)).Elem()
}
type MonitoringScheduleInput interface {
pulumi.Input
ToMonitoringScheduleOutput() MonitoringScheduleOutput
ToMonitoringScheduleOutputWithContext(ctx context.Context) MonitoringScheduleOutput
}
func (*MonitoringSchedule) ElementType() reflect.Type {
return reflect.TypeOf((**MonitoringSchedule)(nil)).Elem()
}
func (i *MonitoringSchedule) ToMonitoringScheduleOutput() MonitoringScheduleOutput {
return i.ToMonitoringScheduleOutputWithContext(context.Background())
}
func (i *MonitoringSchedule) ToMonitoringScheduleOutputWithContext(ctx context.Context) MonitoringScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitoringScheduleOutput)
}
type MonitoringScheduleOutput struct{ *pulumi.OutputState }
func (MonitoringScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MonitoringSchedule)(nil)).Elem()
}
func (o MonitoringScheduleOutput) ToMonitoringScheduleOutput() MonitoringScheduleOutput {
return o
}
func (o MonitoringScheduleOutput) ToMonitoringScheduleOutputWithContext(ctx context.Context) MonitoringScheduleOutput {
return o
}
// The time at which the schedule was created.
func (o MonitoringScheduleOutput) CreationTime() pulumi.StringOutput {
return o.ApplyT(func(v *MonitoringSchedule) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput)
}
func (o MonitoringScheduleOutput) EndpointName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitoringSchedule) pulumi.StringPtrOutput { return v.EndpointName }).(pulumi.StringPtrOutput)
}
// Contains the reason a monitoring job failed, if it failed.
func (o MonitoringScheduleOutput) FailureReason() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitoringSchedule) pulumi.StringPtrOutput { return v.FailureReason }).(pulumi.StringPtrOutput)
}
// A timestamp that indicates the last time the monitoring job was modified.
func (o MonitoringScheduleOutput) LastModifiedTime() pulumi.StringOutput {
return o.ApplyT(func(v *MonitoringSchedule) pulumi.StringOutput { return v.LastModifiedTime }).(pulumi.StringOutput)
}
// Describes metadata on the last execution to run, if there was one.
func (o MonitoringScheduleOutput) LastMonitoringExecutionSummary() MonitoringScheduleMonitoringExecutionSummaryPtrOutput {
return o.ApplyT(func(v *MonitoringSchedule) MonitoringScheduleMonitoringExecutionSummaryPtrOutput {
return v.LastMonitoringExecutionSummary
}).(MonitoringScheduleMonitoringExecutionSummaryPtrOutput)
}
// The Amazon Resource Name (ARN) of the monitoring schedule.
func (o MonitoringScheduleOutput) MonitoringScheduleArn() pulumi.StringOutput {
return o.ApplyT(func(v *MonitoringSchedule) pulumi.StringOutput { return v.MonitoringScheduleArn }).(pulumi.StringOutput)
}
func (o MonitoringScheduleOutput) MonitoringScheduleConfig() MonitoringScheduleConfigOutput {
return o.ApplyT(func(v *MonitoringSchedule) MonitoringScheduleConfigOutput { return v.MonitoringScheduleConfig }).(MonitoringScheduleConfigOutput)
}
func (o MonitoringScheduleOutput) MonitoringScheduleName() pulumi.StringOutput {
return o.ApplyT(func(v *MonitoringSchedule) pulumi.StringOutput { return v.MonitoringScheduleName }).(pulumi.StringOutput)
}
// The status of a schedule job.
func (o MonitoringScheduleOutput) MonitoringScheduleStatus() MonitoringScheduleStatusPtrOutput {
return o.ApplyT(func(v *MonitoringSchedule) MonitoringScheduleStatusPtrOutput { return v.MonitoringScheduleStatus }).(MonitoringScheduleStatusPtrOutput)
}
// An array of key-value pairs to apply to this resource.
func (o MonitoringScheduleOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *MonitoringSchedule) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MonitoringScheduleInput)(nil)).Elem(), &MonitoringSchedule{})
pulumi.RegisterOutputType(MonitoringScheduleOutput{})
}