/
scheduleGroup.go
155 lines (125 loc) · 5.27 KB
/
scheduleGroup.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
// 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 scheduler
import (
"context"
"reflect"
"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"
)
// Definition of AWS::Scheduler::ScheduleGroup Resource Type
type ScheduleGroup struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) of the schedule group.
Arn pulumi.StringOutput `pulumi:"arn"`
// The time at which the schedule group was created.
CreationDate pulumi.StringOutput `pulumi:"creationDate"`
// The time at which the schedule group was last modified.
LastModificationDate pulumi.StringOutput `pulumi:"lastModificationDate"`
Name pulumi.StringPtrOutput `pulumi:"name"`
State ScheduleGroupStateEnumOutput `pulumi:"state"`
// The list of tags to associate with the schedule group.
Tags aws.TagArrayOutput `pulumi:"tags"`
}
// NewScheduleGroup registers a new resource with the given unique name, arguments, and options.
func NewScheduleGroup(ctx *pulumi.Context,
name string, args *ScheduleGroupArgs, opts ...pulumi.ResourceOption) (*ScheduleGroup, error) {
if args == nil {
args = &ScheduleGroupArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"name",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ScheduleGroup
err := ctx.RegisterResource("aws-native:scheduler:ScheduleGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetScheduleGroup gets an existing ScheduleGroup 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 GetScheduleGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScheduleGroupState, opts ...pulumi.ResourceOption) (*ScheduleGroup, error) {
var resource ScheduleGroup
err := ctx.ReadResource("aws-native:scheduler:ScheduleGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ScheduleGroup resources.
type scheduleGroupState struct {
}
type ScheduleGroupState struct {
}
func (ScheduleGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleGroupState)(nil)).Elem()
}
type scheduleGroupArgs struct {
Name *string `pulumi:"name"`
// The list of tags to associate with the schedule group.
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a ScheduleGroup resource.
type ScheduleGroupArgs struct {
Name pulumi.StringPtrInput
// The list of tags to associate with the schedule group.
Tags aws.TagArrayInput
}
func (ScheduleGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleGroupArgs)(nil)).Elem()
}
type ScheduleGroupInput interface {
pulumi.Input
ToScheduleGroupOutput() ScheduleGroupOutput
ToScheduleGroupOutputWithContext(ctx context.Context) ScheduleGroupOutput
}
func (*ScheduleGroup) ElementType() reflect.Type {
return reflect.TypeOf((**ScheduleGroup)(nil)).Elem()
}
func (i *ScheduleGroup) ToScheduleGroupOutput() ScheduleGroupOutput {
return i.ToScheduleGroupOutputWithContext(context.Background())
}
func (i *ScheduleGroup) ToScheduleGroupOutputWithContext(ctx context.Context) ScheduleGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleGroupOutput)
}
type ScheduleGroupOutput struct{ *pulumi.OutputState }
func (ScheduleGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ScheduleGroup)(nil)).Elem()
}
func (o ScheduleGroupOutput) ToScheduleGroupOutput() ScheduleGroupOutput {
return o
}
func (o ScheduleGroupOutput) ToScheduleGroupOutputWithContext(ctx context.Context) ScheduleGroupOutput {
return o
}
// The Amazon Resource Name (ARN) of the schedule group.
func (o ScheduleGroupOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *ScheduleGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// The time at which the schedule group was created.
func (o ScheduleGroupOutput) CreationDate() pulumi.StringOutput {
return o.ApplyT(func(v *ScheduleGroup) pulumi.StringOutput { return v.CreationDate }).(pulumi.StringOutput)
}
// The time at which the schedule group was last modified.
func (o ScheduleGroupOutput) LastModificationDate() pulumi.StringOutput {
return o.ApplyT(func(v *ScheduleGroup) pulumi.StringOutput { return v.LastModificationDate }).(pulumi.StringOutput)
}
func (o ScheduleGroupOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ScheduleGroup) pulumi.StringPtrOutput { return v.Name }).(pulumi.StringPtrOutput)
}
func (o ScheduleGroupOutput) State() ScheduleGroupStateEnumOutput {
return o.ApplyT(func(v *ScheduleGroup) ScheduleGroupStateEnumOutput { return v.State }).(ScheduleGroupStateEnumOutput)
}
// The list of tags to associate with the schedule group.
func (o ScheduleGroupOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *ScheduleGroup) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleGroupInput)(nil)).Elem(), &ScheduleGroup{})
pulumi.RegisterOutputType(ScheduleGroupOutput{})
}