-
Notifications
You must be signed in to change notification settings - Fork 17
/
vpcConnection.go
194 lines (161 loc) · 6.81 KB
/
vpcConnection.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 the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package msk
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
)
// Resource Type definition for AWS::MSK::VpcConnection
type VpcConnection struct {
pulumi.CustomResourceState
Arn pulumi.StringOutput `pulumi:"arn"`
Authentication VpcConnectionAuthenticationOutput `pulumi:"authentication"`
ClientSubnets pulumi.StringArrayOutput `pulumi:"clientSubnets"`
SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
Tags VpcConnectionTagsPtrOutput `pulumi:"tags"`
// The Amazon Resource Name (ARN) of the target cluster
TargetClusterArn pulumi.StringOutput `pulumi:"targetClusterArn"`
VpcId pulumi.StringOutput `pulumi:"vpcId"`
}
// NewVpcConnection registers a new resource with the given unique name, arguments, and options.
func NewVpcConnection(ctx *pulumi.Context,
name string, args *VpcConnectionArgs, opts ...pulumi.ResourceOption) (*VpcConnection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Authentication == nil {
return nil, errors.New("invalid value for required argument 'Authentication'")
}
if args.ClientSubnets == nil {
return nil, errors.New("invalid value for required argument 'ClientSubnets'")
}
if args.SecurityGroups == nil {
return nil, errors.New("invalid value for required argument 'SecurityGroups'")
}
if args.TargetClusterArn == nil {
return nil, errors.New("invalid value for required argument 'TargetClusterArn'")
}
if args.VpcId == nil {
return nil, errors.New("invalid value for required argument 'VpcId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"authentication",
"clientSubnets[*]",
"securityGroups[*]",
"targetClusterArn",
"vpcId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource VpcConnection
err := ctx.RegisterResource("aws-native:msk:VpcConnection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVpcConnection gets an existing VpcConnection 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 GetVpcConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VpcConnectionState, opts ...pulumi.ResourceOption) (*VpcConnection, error) {
var resource VpcConnection
err := ctx.ReadResource("aws-native:msk:VpcConnection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VpcConnection resources.
type vpcConnectionState struct {
}
type VpcConnectionState struct {
}
func (VpcConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*vpcConnectionState)(nil)).Elem()
}
type vpcConnectionArgs struct {
Authentication VpcConnectionAuthentication `pulumi:"authentication"`
ClientSubnets []string `pulumi:"clientSubnets"`
SecurityGroups []string `pulumi:"securityGroups"`
Tags *VpcConnectionTags `pulumi:"tags"`
// The Amazon Resource Name (ARN) of the target cluster
TargetClusterArn string `pulumi:"targetClusterArn"`
VpcId string `pulumi:"vpcId"`
}
// The set of arguments for constructing a VpcConnection resource.
type VpcConnectionArgs struct {
Authentication VpcConnectionAuthenticationInput
ClientSubnets pulumi.StringArrayInput
SecurityGroups pulumi.StringArrayInput
Tags VpcConnectionTagsPtrInput
// The Amazon Resource Name (ARN) of the target cluster
TargetClusterArn pulumi.StringInput
VpcId pulumi.StringInput
}
func (VpcConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*vpcConnectionArgs)(nil)).Elem()
}
type VpcConnectionInput interface {
pulumi.Input
ToVpcConnectionOutput() VpcConnectionOutput
ToVpcConnectionOutputWithContext(ctx context.Context) VpcConnectionOutput
}
func (*VpcConnection) ElementType() reflect.Type {
return reflect.TypeOf((**VpcConnection)(nil)).Elem()
}
func (i *VpcConnection) ToVpcConnectionOutput() VpcConnectionOutput {
return i.ToVpcConnectionOutputWithContext(context.Background())
}
func (i *VpcConnection) ToVpcConnectionOutputWithContext(ctx context.Context) VpcConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(VpcConnectionOutput)
}
func (i *VpcConnection) ToOutput(ctx context.Context) pulumix.Output[*VpcConnection] {
return pulumix.Output[*VpcConnection]{
OutputState: i.ToVpcConnectionOutputWithContext(ctx).OutputState,
}
}
type VpcConnectionOutput struct{ *pulumi.OutputState }
func (VpcConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VpcConnection)(nil)).Elem()
}
func (o VpcConnectionOutput) ToVpcConnectionOutput() VpcConnectionOutput {
return o
}
func (o VpcConnectionOutput) ToVpcConnectionOutputWithContext(ctx context.Context) VpcConnectionOutput {
return o
}
func (o VpcConnectionOutput) ToOutput(ctx context.Context) pulumix.Output[*VpcConnection] {
return pulumix.Output[*VpcConnection]{
OutputState: o.OutputState,
}
}
func (o VpcConnectionOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *VpcConnection) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
func (o VpcConnectionOutput) Authentication() VpcConnectionAuthenticationOutput {
return o.ApplyT(func(v *VpcConnection) VpcConnectionAuthenticationOutput { return v.Authentication }).(VpcConnectionAuthenticationOutput)
}
func (o VpcConnectionOutput) ClientSubnets() pulumi.StringArrayOutput {
return o.ApplyT(func(v *VpcConnection) pulumi.StringArrayOutput { return v.ClientSubnets }).(pulumi.StringArrayOutput)
}
func (o VpcConnectionOutput) SecurityGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v *VpcConnection) pulumi.StringArrayOutput { return v.SecurityGroups }).(pulumi.StringArrayOutput)
}
func (o VpcConnectionOutput) Tags() VpcConnectionTagsPtrOutput {
return o.ApplyT(func(v *VpcConnection) VpcConnectionTagsPtrOutput { return v.Tags }).(VpcConnectionTagsPtrOutput)
}
// The Amazon Resource Name (ARN) of the target cluster
func (o VpcConnectionOutput) TargetClusterArn() pulumi.StringOutput {
return o.ApplyT(func(v *VpcConnection) pulumi.StringOutput { return v.TargetClusterArn }).(pulumi.StringOutput)
}
func (o VpcConnectionOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v *VpcConnection) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VpcConnectionInput)(nil)).Elem(), &VpcConnection{})
pulumi.RegisterOutputType(VpcConnectionOutput{})
}