generated from pulumi/pulumi-tf-provider-boilerplate
/
ipv6EniAddress.go
257 lines (208 loc) · 9.85 KB
/
ipv6EniAddress.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
253
254
255
256
257
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package vpc
import (
"context"
"reflect"
"errors"
"github.com/mergtil/pulumi-tencentcloud/sdk/go/tencentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Ipv6EniAddress struct {
pulumi.CustomResourceState
// The specified `IPv6` address list, up to 10 can be specified at a time. Combined with the input parameter
// `Ipv6AddressCount` to calculate the quota. Mandatory one with Ipv6AddressCount.
Ipv6Addresses Ipv6EniAddressIpv6AddressArrayOutput `pulumi:"ipv6Addresses"`
// ENI instance `ID`, in the form of `eni-m6dyj72l`.
NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"`
// VPC `ID`, in the form of `vpc-m6dyj72l`.
VpcId pulumi.StringOutput `pulumi:"vpcId"`
}
// NewIpv6EniAddress registers a new resource with the given unique name, arguments, and options.
func NewIpv6EniAddress(ctx *pulumi.Context,
name string, args *Ipv6EniAddressArgs, opts ...pulumi.ResourceOption) (*Ipv6EniAddress, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkInterfaceId == nil {
return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'")
}
if args.VpcId == nil {
return nil, errors.New("invalid value for required argument 'VpcId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Ipv6EniAddress
err := ctx.RegisterResource("tencentcloud:Vpc/ipv6EniAddress:Ipv6EniAddress", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIpv6EniAddress gets an existing Ipv6EniAddress 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 GetIpv6EniAddress(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *Ipv6EniAddressState, opts ...pulumi.ResourceOption) (*Ipv6EniAddress, error) {
var resource Ipv6EniAddress
err := ctx.ReadResource("tencentcloud:Vpc/ipv6EniAddress:Ipv6EniAddress", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Ipv6EniAddress resources.
type ipv6EniAddressState struct {
// The specified `IPv6` address list, up to 10 can be specified at a time. Combined with the input parameter
// `Ipv6AddressCount` to calculate the quota. Mandatory one with Ipv6AddressCount.
Ipv6Addresses []Ipv6EniAddressIpv6Address `pulumi:"ipv6Addresses"`
// ENI instance `ID`, in the form of `eni-m6dyj72l`.
NetworkInterfaceId *string `pulumi:"networkInterfaceId"`
// VPC `ID`, in the form of `vpc-m6dyj72l`.
VpcId *string `pulumi:"vpcId"`
}
type Ipv6EniAddressState struct {
// The specified `IPv6` address list, up to 10 can be specified at a time. Combined with the input parameter
// `Ipv6AddressCount` to calculate the quota. Mandatory one with Ipv6AddressCount.
Ipv6Addresses Ipv6EniAddressIpv6AddressArrayInput
// ENI instance `ID`, in the form of `eni-m6dyj72l`.
NetworkInterfaceId pulumi.StringPtrInput
// VPC `ID`, in the form of `vpc-m6dyj72l`.
VpcId pulumi.StringPtrInput
}
func (Ipv6EniAddressState) ElementType() reflect.Type {
return reflect.TypeOf((*ipv6EniAddressState)(nil)).Elem()
}
type ipv6EniAddressArgs struct {
// The specified `IPv6` address list, up to 10 can be specified at a time. Combined with the input parameter
// `Ipv6AddressCount` to calculate the quota. Mandatory one with Ipv6AddressCount.
Ipv6Addresses []Ipv6EniAddressIpv6Address `pulumi:"ipv6Addresses"`
// ENI instance `ID`, in the form of `eni-m6dyj72l`.
NetworkInterfaceId string `pulumi:"networkInterfaceId"`
// VPC `ID`, in the form of `vpc-m6dyj72l`.
VpcId string `pulumi:"vpcId"`
}
// The set of arguments for constructing a Ipv6EniAddress resource.
type Ipv6EniAddressArgs struct {
// The specified `IPv6` address list, up to 10 can be specified at a time. Combined with the input parameter
// `Ipv6AddressCount` to calculate the quota. Mandatory one with Ipv6AddressCount.
Ipv6Addresses Ipv6EniAddressIpv6AddressArrayInput
// ENI instance `ID`, in the form of `eni-m6dyj72l`.
NetworkInterfaceId pulumi.StringInput
// VPC `ID`, in the form of `vpc-m6dyj72l`.
VpcId pulumi.StringInput
}
func (Ipv6EniAddressArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ipv6EniAddressArgs)(nil)).Elem()
}
type Ipv6EniAddressInput interface {
pulumi.Input
ToIpv6EniAddressOutput() Ipv6EniAddressOutput
ToIpv6EniAddressOutputWithContext(ctx context.Context) Ipv6EniAddressOutput
}
func (*Ipv6EniAddress) ElementType() reflect.Type {
return reflect.TypeOf((**Ipv6EniAddress)(nil)).Elem()
}
func (i *Ipv6EniAddress) ToIpv6EniAddressOutput() Ipv6EniAddressOutput {
return i.ToIpv6EniAddressOutputWithContext(context.Background())
}
func (i *Ipv6EniAddress) ToIpv6EniAddressOutputWithContext(ctx context.Context) Ipv6EniAddressOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ipv6EniAddressOutput)
}
// Ipv6EniAddressArrayInput is an input type that accepts Ipv6EniAddressArray and Ipv6EniAddressArrayOutput values.
// You can construct a concrete instance of `Ipv6EniAddressArrayInput` via:
//
// Ipv6EniAddressArray{ Ipv6EniAddressArgs{...} }
type Ipv6EniAddressArrayInput interface {
pulumi.Input
ToIpv6EniAddressArrayOutput() Ipv6EniAddressArrayOutput
ToIpv6EniAddressArrayOutputWithContext(context.Context) Ipv6EniAddressArrayOutput
}
type Ipv6EniAddressArray []Ipv6EniAddressInput
func (Ipv6EniAddressArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Ipv6EniAddress)(nil)).Elem()
}
func (i Ipv6EniAddressArray) ToIpv6EniAddressArrayOutput() Ipv6EniAddressArrayOutput {
return i.ToIpv6EniAddressArrayOutputWithContext(context.Background())
}
func (i Ipv6EniAddressArray) ToIpv6EniAddressArrayOutputWithContext(ctx context.Context) Ipv6EniAddressArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ipv6EniAddressArrayOutput)
}
// Ipv6EniAddressMapInput is an input type that accepts Ipv6EniAddressMap and Ipv6EniAddressMapOutput values.
// You can construct a concrete instance of `Ipv6EniAddressMapInput` via:
//
// Ipv6EniAddressMap{ "key": Ipv6EniAddressArgs{...} }
type Ipv6EniAddressMapInput interface {
pulumi.Input
ToIpv6EniAddressMapOutput() Ipv6EniAddressMapOutput
ToIpv6EniAddressMapOutputWithContext(context.Context) Ipv6EniAddressMapOutput
}
type Ipv6EniAddressMap map[string]Ipv6EniAddressInput
func (Ipv6EniAddressMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Ipv6EniAddress)(nil)).Elem()
}
func (i Ipv6EniAddressMap) ToIpv6EniAddressMapOutput() Ipv6EniAddressMapOutput {
return i.ToIpv6EniAddressMapOutputWithContext(context.Background())
}
func (i Ipv6EniAddressMap) ToIpv6EniAddressMapOutputWithContext(ctx context.Context) Ipv6EniAddressMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ipv6EniAddressMapOutput)
}
type Ipv6EniAddressOutput struct{ *pulumi.OutputState }
func (Ipv6EniAddressOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Ipv6EniAddress)(nil)).Elem()
}
func (o Ipv6EniAddressOutput) ToIpv6EniAddressOutput() Ipv6EniAddressOutput {
return o
}
func (o Ipv6EniAddressOutput) ToIpv6EniAddressOutputWithContext(ctx context.Context) Ipv6EniAddressOutput {
return o
}
// The specified `IPv6` address list, up to 10 can be specified at a time. Combined with the input parameter
// `Ipv6AddressCount` to calculate the quota. Mandatory one with Ipv6AddressCount.
func (o Ipv6EniAddressOutput) Ipv6Addresses() Ipv6EniAddressIpv6AddressArrayOutput {
return o.ApplyT(func(v *Ipv6EniAddress) Ipv6EniAddressIpv6AddressArrayOutput { return v.Ipv6Addresses }).(Ipv6EniAddressIpv6AddressArrayOutput)
}
// ENI instance `ID`, in the form of `eni-m6dyj72l`.
func (o Ipv6EniAddressOutput) NetworkInterfaceId() pulumi.StringOutput {
return o.ApplyT(func(v *Ipv6EniAddress) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput)
}
// VPC `ID`, in the form of `vpc-m6dyj72l`.
func (o Ipv6EniAddressOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v *Ipv6EniAddress) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
}
type Ipv6EniAddressArrayOutput struct{ *pulumi.OutputState }
func (Ipv6EniAddressArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Ipv6EniAddress)(nil)).Elem()
}
func (o Ipv6EniAddressArrayOutput) ToIpv6EniAddressArrayOutput() Ipv6EniAddressArrayOutput {
return o
}
func (o Ipv6EniAddressArrayOutput) ToIpv6EniAddressArrayOutputWithContext(ctx context.Context) Ipv6EniAddressArrayOutput {
return o
}
func (o Ipv6EniAddressArrayOutput) Index(i pulumi.IntInput) Ipv6EniAddressOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Ipv6EniAddress {
return vs[0].([]*Ipv6EniAddress)[vs[1].(int)]
}).(Ipv6EniAddressOutput)
}
type Ipv6EniAddressMapOutput struct{ *pulumi.OutputState }
func (Ipv6EniAddressMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Ipv6EniAddress)(nil)).Elem()
}
func (o Ipv6EniAddressMapOutput) ToIpv6EniAddressMapOutput() Ipv6EniAddressMapOutput {
return o
}
func (o Ipv6EniAddressMapOutput) ToIpv6EniAddressMapOutputWithContext(ctx context.Context) Ipv6EniAddressMapOutput {
return o
}
func (o Ipv6EniAddressMapOutput) MapIndex(k pulumi.StringInput) Ipv6EniAddressOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Ipv6EniAddress {
return vs[0].(map[string]*Ipv6EniAddress)[vs[1].(string)]
}).(Ipv6EniAddressOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*Ipv6EniAddressInput)(nil)).Elem(), &Ipv6EniAddress{})
pulumi.RegisterInputType(reflect.TypeOf((*Ipv6EniAddressArrayInput)(nil)).Elem(), Ipv6EniAddressArray{})
pulumi.RegisterInputType(reflect.TypeOf((*Ipv6EniAddressMapInput)(nil)).Elem(), Ipv6EniAddressMap{})
pulumi.RegisterOutputType(Ipv6EniAddressOutput{})
pulumi.RegisterOutputType(Ipv6EniAddressArrayOutput{})
pulumi.RegisterOutputType(Ipv6EniAddressMapOutput{})
}