/
replicationConfig.go
252 lines (217 loc) · 13.5 KB
/
replicationConfig.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
// 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 dms
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"
)
// A replication configuration that you later provide to configure and start a AWS DMS Serverless replication
type ReplicationConfig struct {
pulumi.CustomResourceState
ComputeConfig ReplicationConfigComputeConfigPtrOutput `pulumi:"computeConfig"`
// The Amazon Resource Name (ARN) of the Replication Config
ReplicationConfigArn pulumi.StringPtrOutput `pulumi:"replicationConfigArn"`
// A unique identifier of replication configuration
ReplicationConfigIdentifier pulumi.StringPtrOutput `pulumi:"replicationConfigIdentifier"`
// JSON settings for Servereless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
ReplicationSettings pulumi.AnyOutput `pulumi:"replicationSettings"`
// The type of AWS DMS Serverless replication to provision using this replication configuration
ReplicationType ReplicationConfigReplicationTypePtrOutput `pulumi:"replicationType"`
// A unique value or name that you get set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource
ResourceIdentifier pulumi.StringPtrOutput `pulumi:"resourceIdentifier"`
// The Amazon Resource Name (ARN) of the source endpoint for this AWS DMS Serverless replication configuration
SourceEndpointArn pulumi.StringPtrOutput `pulumi:"sourceEndpointArn"`
// JSON settings for specifying supplemental data
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
SupplementalSettings pulumi.AnyOutput `pulumi:"supplementalSettings"`
// JSON table mappings for AWS DMS Serverless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
TableMappings pulumi.AnyOutput `pulumi:"tableMappings"`
// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.</p>
Tags aws.TagArrayOutput `pulumi:"tags"`
// The Amazon Resource Name (ARN) of the target endpoint for this AWS DMS Serverless replication configuration
TargetEndpointArn pulumi.StringPtrOutput `pulumi:"targetEndpointArn"`
}
// NewReplicationConfig registers a new resource with the given unique name, arguments, and options.
func NewReplicationConfig(ctx *pulumi.Context,
name string, args *ReplicationConfigArgs, opts ...pulumi.ResourceOption) (*ReplicationConfig, error) {
if args == nil {
args = &ReplicationConfigArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"resourceIdentifier",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ReplicationConfig
err := ctx.RegisterResource("aws-native:dms:ReplicationConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetReplicationConfig gets an existing ReplicationConfig 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 GetReplicationConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ReplicationConfigState, opts ...pulumi.ResourceOption) (*ReplicationConfig, error) {
var resource ReplicationConfig
err := ctx.ReadResource("aws-native:dms:ReplicationConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ReplicationConfig resources.
type replicationConfigState struct {
}
type ReplicationConfigState struct {
}
func (ReplicationConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*replicationConfigState)(nil)).Elem()
}
type replicationConfigArgs struct {
ComputeConfig *ReplicationConfigComputeConfig `pulumi:"computeConfig"`
// The Amazon Resource Name (ARN) of the Replication Config
ReplicationConfigArn *string `pulumi:"replicationConfigArn"`
// A unique identifier of replication configuration
ReplicationConfigIdentifier *string `pulumi:"replicationConfigIdentifier"`
// JSON settings for Servereless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
ReplicationSettings interface{} `pulumi:"replicationSettings"`
// The type of AWS DMS Serverless replication to provision using this replication configuration
ReplicationType *ReplicationConfigReplicationType `pulumi:"replicationType"`
// A unique value or name that you get set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource
ResourceIdentifier *string `pulumi:"resourceIdentifier"`
// The Amazon Resource Name (ARN) of the source endpoint for this AWS DMS Serverless replication configuration
SourceEndpointArn *string `pulumi:"sourceEndpointArn"`
// JSON settings for specifying supplemental data
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
SupplementalSettings interface{} `pulumi:"supplementalSettings"`
// JSON table mappings for AWS DMS Serverless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
TableMappings interface{} `pulumi:"tableMappings"`
// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.</p>
Tags []aws.Tag `pulumi:"tags"`
// The Amazon Resource Name (ARN) of the target endpoint for this AWS DMS Serverless replication configuration
TargetEndpointArn *string `pulumi:"targetEndpointArn"`
}
// The set of arguments for constructing a ReplicationConfig resource.
type ReplicationConfigArgs struct {
ComputeConfig ReplicationConfigComputeConfigPtrInput
// The Amazon Resource Name (ARN) of the Replication Config
ReplicationConfigArn pulumi.StringPtrInput
// A unique identifier of replication configuration
ReplicationConfigIdentifier pulumi.StringPtrInput
// JSON settings for Servereless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
ReplicationSettings pulumi.Input
// The type of AWS DMS Serverless replication to provision using this replication configuration
ReplicationType ReplicationConfigReplicationTypePtrInput
// A unique value or name that you get set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource
ResourceIdentifier pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of the source endpoint for this AWS DMS Serverless replication configuration
SourceEndpointArn pulumi.StringPtrInput
// JSON settings for specifying supplemental data
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
SupplementalSettings pulumi.Input
// JSON table mappings for AWS DMS Serverless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
TableMappings pulumi.Input
// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.</p>
Tags aws.TagArrayInput
// The Amazon Resource Name (ARN) of the target endpoint for this AWS DMS Serverless replication configuration
TargetEndpointArn pulumi.StringPtrInput
}
func (ReplicationConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*replicationConfigArgs)(nil)).Elem()
}
type ReplicationConfigInput interface {
pulumi.Input
ToReplicationConfigOutput() ReplicationConfigOutput
ToReplicationConfigOutputWithContext(ctx context.Context) ReplicationConfigOutput
}
func (*ReplicationConfig) ElementType() reflect.Type {
return reflect.TypeOf((**ReplicationConfig)(nil)).Elem()
}
func (i *ReplicationConfig) ToReplicationConfigOutput() ReplicationConfigOutput {
return i.ToReplicationConfigOutputWithContext(context.Background())
}
func (i *ReplicationConfig) ToReplicationConfigOutputWithContext(ctx context.Context) ReplicationConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReplicationConfigOutput)
}
type ReplicationConfigOutput struct{ *pulumi.OutputState }
func (ReplicationConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ReplicationConfig)(nil)).Elem()
}
func (o ReplicationConfigOutput) ToReplicationConfigOutput() ReplicationConfigOutput {
return o
}
func (o ReplicationConfigOutput) ToReplicationConfigOutputWithContext(ctx context.Context) ReplicationConfigOutput {
return o
}
func (o ReplicationConfigOutput) ComputeConfig() ReplicationConfigComputeConfigPtrOutput {
return o.ApplyT(func(v *ReplicationConfig) ReplicationConfigComputeConfigPtrOutput { return v.ComputeConfig }).(ReplicationConfigComputeConfigPtrOutput)
}
// The Amazon Resource Name (ARN) of the Replication Config
func (o ReplicationConfigOutput) ReplicationConfigArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.StringPtrOutput { return v.ReplicationConfigArn }).(pulumi.StringPtrOutput)
}
// A unique identifier of replication configuration
func (o ReplicationConfigOutput) ReplicationConfigIdentifier() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.StringPtrOutput { return v.ReplicationConfigIdentifier }).(pulumi.StringPtrOutput)
}
// JSON settings for Servereless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
func (o ReplicationConfigOutput) ReplicationSettings() pulumi.AnyOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.AnyOutput { return v.ReplicationSettings }).(pulumi.AnyOutput)
}
// The type of AWS DMS Serverless replication to provision using this replication configuration
func (o ReplicationConfigOutput) ReplicationType() ReplicationConfigReplicationTypePtrOutput {
return o.ApplyT(func(v *ReplicationConfig) ReplicationConfigReplicationTypePtrOutput { return v.ReplicationType }).(ReplicationConfigReplicationTypePtrOutput)
}
// A unique value or name that you get set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource
func (o ReplicationConfigOutput) ResourceIdentifier() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.StringPtrOutput { return v.ResourceIdentifier }).(pulumi.StringPtrOutput)
}
// The Amazon Resource Name (ARN) of the source endpoint for this AWS DMS Serverless replication configuration
func (o ReplicationConfigOutput) SourceEndpointArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.StringPtrOutput { return v.SourceEndpointArn }).(pulumi.StringPtrOutput)
}
// JSON settings for specifying supplemental data
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
func (o ReplicationConfigOutput) SupplementalSettings() pulumi.AnyOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.AnyOutput { return v.SupplementalSettings }).(pulumi.AnyOutput)
}
// JSON table mappings for AWS DMS Serverless replications that are provisioned using this replication configuration
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::DMS::ReplicationConfig` for more information about the expected schema for this property.
func (o ReplicationConfigOutput) TableMappings() pulumi.AnyOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.AnyOutput { return v.TableMappings }).(pulumi.AnyOutput)
}
// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.</p>
func (o ReplicationConfigOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *ReplicationConfig) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
// The Amazon Resource Name (ARN) of the target endpoint for this AWS DMS Serverless replication configuration
func (o ReplicationConfigOutput) TargetEndpointArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ReplicationConfig) pulumi.StringPtrOutput { return v.TargetEndpointArn }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ReplicationConfigInput)(nil)).Elem(), &ReplicationConfig{})
pulumi.RegisterOutputType(ReplicationConfigOutput{})
}