/
transitGatewayPeeringAttachment.go
212 lines (179 loc) · 8.88 KB
/
transitGatewayPeeringAttachment.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
// 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 ec2
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"
)
// The AWS::EC2::TransitGatewayPeeringAttachment type
type TransitGatewayPeeringAttachment struct {
pulumi.CustomResourceState
// The time the transit gateway peering attachment was created.
CreationTime pulumi.StringOutput `pulumi:"creationTime"`
// The ID of the peer account
PeerAccountId pulumi.StringOutput `pulumi:"peerAccountId"`
// Peer Region
PeerRegion pulumi.StringOutput `pulumi:"peerRegion"`
// The ID of the peer transit gateway.
PeerTransitGatewayId pulumi.StringOutput `pulumi:"peerTransitGatewayId"`
// The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.
State pulumi.StringOutput `pulumi:"state"`
// The status of the transit gateway peering attachment.
Status TransitGatewayPeeringAttachmentPeeringAttachmentStatusOutput `pulumi:"status"`
// The tags for the transit gateway peering attachment.
Tags aws.TagArrayOutput `pulumi:"tags"`
// The ID of the transit gateway peering attachment.
TransitGatewayAttachmentId pulumi.StringOutput `pulumi:"transitGatewayAttachmentId"`
// The ID of the transit gateway.
TransitGatewayId pulumi.StringOutput `pulumi:"transitGatewayId"`
}
// NewTransitGatewayPeeringAttachment registers a new resource with the given unique name, arguments, and options.
func NewTransitGatewayPeeringAttachment(ctx *pulumi.Context,
name string, args *TransitGatewayPeeringAttachmentArgs, opts ...pulumi.ResourceOption) (*TransitGatewayPeeringAttachment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PeerAccountId == nil {
return nil, errors.New("invalid value for required argument 'PeerAccountId'")
}
if args.PeerRegion == nil {
return nil, errors.New("invalid value for required argument 'PeerRegion'")
}
if args.PeerTransitGatewayId == nil {
return nil, errors.New("invalid value for required argument 'PeerTransitGatewayId'")
}
if args.TransitGatewayId == nil {
return nil, errors.New("invalid value for required argument 'TransitGatewayId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"peerAccountId",
"peerRegion",
"peerTransitGatewayId",
"transitGatewayId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource TransitGatewayPeeringAttachment
err := ctx.RegisterResource("aws-native:ec2:TransitGatewayPeeringAttachment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTransitGatewayPeeringAttachment gets an existing TransitGatewayPeeringAttachment 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 GetTransitGatewayPeeringAttachment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TransitGatewayPeeringAttachmentState, opts ...pulumi.ResourceOption) (*TransitGatewayPeeringAttachment, error) {
var resource TransitGatewayPeeringAttachment
err := ctx.ReadResource("aws-native:ec2:TransitGatewayPeeringAttachment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TransitGatewayPeeringAttachment resources.
type transitGatewayPeeringAttachmentState struct {
}
type TransitGatewayPeeringAttachmentState struct {
}
func (TransitGatewayPeeringAttachmentState) ElementType() reflect.Type {
return reflect.TypeOf((*transitGatewayPeeringAttachmentState)(nil)).Elem()
}
type transitGatewayPeeringAttachmentArgs struct {
// The ID of the peer account
PeerAccountId string `pulumi:"peerAccountId"`
// Peer Region
PeerRegion string `pulumi:"peerRegion"`
// The ID of the peer transit gateway.
PeerTransitGatewayId string `pulumi:"peerTransitGatewayId"`
// The tags for the transit gateway peering attachment.
Tags []aws.Tag `pulumi:"tags"`
// The ID of the transit gateway.
TransitGatewayId string `pulumi:"transitGatewayId"`
}
// The set of arguments for constructing a TransitGatewayPeeringAttachment resource.
type TransitGatewayPeeringAttachmentArgs struct {
// The ID of the peer account
PeerAccountId pulumi.StringInput
// Peer Region
PeerRegion pulumi.StringInput
// The ID of the peer transit gateway.
PeerTransitGatewayId pulumi.StringInput
// The tags for the transit gateway peering attachment.
Tags aws.TagArrayInput
// The ID of the transit gateway.
TransitGatewayId pulumi.StringInput
}
func (TransitGatewayPeeringAttachmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*transitGatewayPeeringAttachmentArgs)(nil)).Elem()
}
type TransitGatewayPeeringAttachmentInput interface {
pulumi.Input
ToTransitGatewayPeeringAttachmentOutput() TransitGatewayPeeringAttachmentOutput
ToTransitGatewayPeeringAttachmentOutputWithContext(ctx context.Context) TransitGatewayPeeringAttachmentOutput
}
func (*TransitGatewayPeeringAttachment) ElementType() reflect.Type {
return reflect.TypeOf((**TransitGatewayPeeringAttachment)(nil)).Elem()
}
func (i *TransitGatewayPeeringAttachment) ToTransitGatewayPeeringAttachmentOutput() TransitGatewayPeeringAttachmentOutput {
return i.ToTransitGatewayPeeringAttachmentOutputWithContext(context.Background())
}
func (i *TransitGatewayPeeringAttachment) ToTransitGatewayPeeringAttachmentOutputWithContext(ctx context.Context) TransitGatewayPeeringAttachmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(TransitGatewayPeeringAttachmentOutput)
}
type TransitGatewayPeeringAttachmentOutput struct{ *pulumi.OutputState }
func (TransitGatewayPeeringAttachmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TransitGatewayPeeringAttachment)(nil)).Elem()
}
func (o TransitGatewayPeeringAttachmentOutput) ToTransitGatewayPeeringAttachmentOutput() TransitGatewayPeeringAttachmentOutput {
return o
}
func (o TransitGatewayPeeringAttachmentOutput) ToTransitGatewayPeeringAttachmentOutputWithContext(ctx context.Context) TransitGatewayPeeringAttachmentOutput {
return o
}
// The time the transit gateway peering attachment was created.
func (o TransitGatewayPeeringAttachmentOutput) CreationTime() pulumi.StringOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput)
}
// The ID of the peer account
func (o TransitGatewayPeeringAttachmentOutput) PeerAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) pulumi.StringOutput { return v.PeerAccountId }).(pulumi.StringOutput)
}
// Peer Region
func (o TransitGatewayPeeringAttachmentOutput) PeerRegion() pulumi.StringOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) pulumi.StringOutput { return v.PeerRegion }).(pulumi.StringOutput)
}
// The ID of the peer transit gateway.
func (o TransitGatewayPeeringAttachmentOutput) PeerTransitGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) pulumi.StringOutput { return v.PeerTransitGatewayId }).(pulumi.StringOutput)
}
// The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.
func (o TransitGatewayPeeringAttachmentOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// The status of the transit gateway peering attachment.
func (o TransitGatewayPeeringAttachmentOutput) Status() TransitGatewayPeeringAttachmentPeeringAttachmentStatusOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) TransitGatewayPeeringAttachmentPeeringAttachmentStatusOutput {
return v.Status
}).(TransitGatewayPeeringAttachmentPeeringAttachmentStatusOutput)
}
// The tags for the transit gateway peering attachment.
func (o TransitGatewayPeeringAttachmentOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
// The ID of the transit gateway peering attachment.
func (o TransitGatewayPeeringAttachmentOutput) TransitGatewayAttachmentId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) pulumi.StringOutput { return v.TransitGatewayAttachmentId }).(pulumi.StringOutput)
}
// The ID of the transit gateway.
func (o TransitGatewayPeeringAttachmentOutput) TransitGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitGatewayPeeringAttachment) pulumi.StringOutput { return v.TransitGatewayId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TransitGatewayPeeringAttachmentInput)(nil)).Elem(), &TransitGatewayPeeringAttachment{})
pulumi.RegisterOutputType(TransitGatewayPeeringAttachmentOutput{})
}