-
Notifications
You must be signed in to change notification settings - Fork 17
/
pipeline.go
194 lines (162 loc) · 8.58 KB
/
pipeline.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
// 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 datapipeline
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"
)
// An example resource schema demonstrating some basic constructs and validation rules.
type Pipeline struct {
pulumi.CustomResourceState
// Indicates whether to validate and start the pipeline or stop an active pipeline. By default, the value is set to true.
Activate pulumi.BoolPtrOutput `pulumi:"activate"`
// A description of the pipeline.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name of the pipeline.
Name pulumi.StringOutput `pulumi:"name"`
// The parameter objects used with the pipeline.
ParameterObjects PipelineParameterObjectArrayOutput `pulumi:"parameterObjects"`
// The parameter values used with the pipeline.
ParameterValues PipelineParameterValueArrayOutput `pulumi:"parameterValues"`
PipelineId pulumi.StringOutput `pulumi:"pipelineId"`
// The objects that define the pipeline. These objects overwrite the existing pipeline definition. Not all objects, fields, and values can be updated. For information about restrictions, see Editing Your Pipeline in the AWS Data Pipeline Developer Guide.
PipelineObjects PipelineObjectArrayOutput `pulumi:"pipelineObjects"`
// A list of arbitrary tags (key-value pairs) to associate with the pipeline, which you can use to control permissions. For more information, see Controlling Access to Pipelines and Resources in the AWS Data Pipeline Developer Guide.
PipelineTags aws.TagArrayOutput `pulumi:"pipelineTags"`
}
// NewPipeline registers a new resource with the given unique name, arguments, and options.
func NewPipeline(ctx *pulumi.Context,
name string, args *PipelineArgs, opts ...pulumi.ResourceOption) (*Pipeline, error) {
if args == nil {
args = &PipelineArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"description",
"name",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Pipeline
err := ctx.RegisterResource("aws-native:datapipeline:Pipeline", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPipeline gets an existing Pipeline 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 GetPipeline(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PipelineState, opts ...pulumi.ResourceOption) (*Pipeline, error) {
var resource Pipeline
err := ctx.ReadResource("aws-native:datapipeline:Pipeline", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Pipeline resources.
type pipelineState struct {
}
type PipelineState struct {
}
func (PipelineState) ElementType() reflect.Type {
return reflect.TypeOf((*pipelineState)(nil)).Elem()
}
type pipelineArgs struct {
// Indicates whether to validate and start the pipeline or stop an active pipeline. By default, the value is set to true.
Activate *bool `pulumi:"activate"`
// A description of the pipeline.
Description *string `pulumi:"description"`
// The name of the pipeline.
Name *string `pulumi:"name"`
// The parameter objects used with the pipeline.
ParameterObjects []PipelineParameterObject `pulumi:"parameterObjects"`
// The parameter values used with the pipeline.
ParameterValues []PipelineParameterValue `pulumi:"parameterValues"`
// The objects that define the pipeline. These objects overwrite the existing pipeline definition. Not all objects, fields, and values can be updated. For information about restrictions, see Editing Your Pipeline in the AWS Data Pipeline Developer Guide.
PipelineObjects []PipelineObject `pulumi:"pipelineObjects"`
// A list of arbitrary tags (key-value pairs) to associate with the pipeline, which you can use to control permissions. For more information, see Controlling Access to Pipelines and Resources in the AWS Data Pipeline Developer Guide.
PipelineTags []aws.Tag `pulumi:"pipelineTags"`
}
// The set of arguments for constructing a Pipeline resource.
type PipelineArgs struct {
// Indicates whether to validate and start the pipeline or stop an active pipeline. By default, the value is set to true.
Activate pulumi.BoolPtrInput
// A description of the pipeline.
Description pulumi.StringPtrInput
// The name of the pipeline.
Name pulumi.StringPtrInput
// The parameter objects used with the pipeline.
ParameterObjects PipelineParameterObjectArrayInput
// The parameter values used with the pipeline.
ParameterValues PipelineParameterValueArrayInput
// The objects that define the pipeline. These objects overwrite the existing pipeline definition. Not all objects, fields, and values can be updated. For information about restrictions, see Editing Your Pipeline in the AWS Data Pipeline Developer Guide.
PipelineObjects PipelineObjectArrayInput
// A list of arbitrary tags (key-value pairs) to associate with the pipeline, which you can use to control permissions. For more information, see Controlling Access to Pipelines and Resources in the AWS Data Pipeline Developer Guide.
PipelineTags aws.TagArrayInput
}
func (PipelineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*pipelineArgs)(nil)).Elem()
}
type PipelineInput interface {
pulumi.Input
ToPipelineOutput() PipelineOutput
ToPipelineOutputWithContext(ctx context.Context) PipelineOutput
}
func (*Pipeline) ElementType() reflect.Type {
return reflect.TypeOf((**Pipeline)(nil)).Elem()
}
func (i *Pipeline) ToPipelineOutput() PipelineOutput {
return i.ToPipelineOutputWithContext(context.Background())
}
func (i *Pipeline) ToPipelineOutputWithContext(ctx context.Context) PipelineOutput {
return pulumi.ToOutputWithContext(ctx, i).(PipelineOutput)
}
type PipelineOutput struct{ *pulumi.OutputState }
func (PipelineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Pipeline)(nil)).Elem()
}
func (o PipelineOutput) ToPipelineOutput() PipelineOutput {
return o
}
func (o PipelineOutput) ToPipelineOutputWithContext(ctx context.Context) PipelineOutput {
return o
}
// Indicates whether to validate and start the pipeline or stop an active pipeline. By default, the value is set to true.
func (o PipelineOutput) Activate() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Pipeline) pulumi.BoolPtrOutput { return v.Activate }).(pulumi.BoolPtrOutput)
}
// A description of the pipeline.
func (o PipelineOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The name of the pipeline.
func (o PipelineOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The parameter objects used with the pipeline.
func (o PipelineOutput) ParameterObjects() PipelineParameterObjectArrayOutput {
return o.ApplyT(func(v *Pipeline) PipelineParameterObjectArrayOutput { return v.ParameterObjects }).(PipelineParameterObjectArrayOutput)
}
// The parameter values used with the pipeline.
func (o PipelineOutput) ParameterValues() PipelineParameterValueArrayOutput {
return o.ApplyT(func(v *Pipeline) PipelineParameterValueArrayOutput { return v.ParameterValues }).(PipelineParameterValueArrayOutput)
}
func (o PipelineOutput) PipelineId() pulumi.StringOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringOutput { return v.PipelineId }).(pulumi.StringOutput)
}
// The objects that define the pipeline. These objects overwrite the existing pipeline definition. Not all objects, fields, and values can be updated. For information about restrictions, see Editing Your Pipeline in the AWS Data Pipeline Developer Guide.
func (o PipelineOutput) PipelineObjects() PipelineObjectArrayOutput {
return o.ApplyT(func(v *Pipeline) PipelineObjectArrayOutput { return v.PipelineObjects }).(PipelineObjectArrayOutput)
}
// A list of arbitrary tags (key-value pairs) to associate with the pipeline, which you can use to control permissions. For more information, see Controlling Access to Pipelines and Resources in the AWS Data Pipeline Developer Guide.
func (o PipelineOutput) PipelineTags() aws.TagArrayOutput {
return o.ApplyT(func(v *Pipeline) aws.TagArrayOutput { return v.PipelineTags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PipelineInput)(nil)).Elem(), &Pipeline{})
pulumi.RegisterOutputType(PipelineOutput{})
}