/
virtualInterfaces.go
230 lines (202 loc) · 9.37 KB
/
virtualInterfaces.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
// 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 direct_connect
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/internal"
)
// Use this data source to query detailed information of direct connect virtual interfaces
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/direct_connect"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := direct_connect.VirtualInterfaces(ctx, &direct_connect.VirtualInterfacesArgs{
// VirtualInterfaceName: pulumi.StringRef("tf-test"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func VirtualInterfaces(ctx *pulumi.Context, args *VirtualInterfacesArgs, opts ...pulumi.InvokeOption) (*VirtualInterfacesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv VirtualInterfacesResult
err := ctx.Invoke("volcengine:direct_connect/virtualInterfaces:VirtualInterfaces", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking VirtualInterfaces.
type VirtualInterfacesArgs struct {
// The direct connect connection ID that associated with this virtual interface.
DirectConnectConnectionId *string `pulumi:"directConnectConnectionId"`
// The direct connect gateway ID that associated with this virtual interface.
DirectConnectGatewayId *string `pulumi:"directConnectGatewayId"`
// A list of IDs.
Ids []string `pulumi:"ids"`
// The local IP that associated with this virtual interface.
LocalIp *string `pulumi:"localIp"`
// A Name Regex of Resource.
NameRegex *string `pulumi:"nameRegex"`
// File name where to save data source results.
OutputFile *string `pulumi:"outputFile"`
// The peer IP that associated with this virtual interface.
PeerIp *string `pulumi:"peerIp"`
// The route type of virtual interface.
RouteType *string `pulumi:"routeType"`
// The filter tag of direct connect virtual interface.
TagFilters []VirtualInterfacesTagFilter `pulumi:"tagFilters"`
// The name of virtual interface.
VirtualInterfaceName *string `pulumi:"virtualInterfaceName"`
// The VLAN ID of virtual interface.
VlanId *int `pulumi:"vlanId"`
}
// A collection of values returned by VirtualInterfaces.
type VirtualInterfacesResult struct {
// The direct connect connection ID which associated with this virtual interface.
DirectConnectConnectionId *string `pulumi:"directConnectConnectionId"`
// The direct connect gateway ID which associated with this virtual interface.
DirectConnectGatewayId *string `pulumi:"directConnectGatewayId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Ids []string `pulumi:"ids"`
// The local IP that associated with this virtual interface.
LocalIp *string `pulumi:"localIp"`
NameRegex *string `pulumi:"nameRegex"`
OutputFile *string `pulumi:"outputFile"`
// The peer IP that associated with this virtual interface.
PeerIp *string `pulumi:"peerIp"`
// The route type of this virtual interface.
RouteType *string `pulumi:"routeType"`
TagFilters []VirtualInterfacesTagFilter `pulumi:"tagFilters"`
// The total count of query.
TotalCount int `pulumi:"totalCount"`
// The name of virtual interface.
VirtualInterfaceName *string `pulumi:"virtualInterfaceName"`
// The collection of query.
VirtualInterfaces []VirtualInterfacesVirtualInterface `pulumi:"virtualInterfaces"`
// The VLAN ID of virtual interface.
VlanId *int `pulumi:"vlanId"`
}
func VirtualInterfacesOutput(ctx *pulumi.Context, args VirtualInterfacesOutputArgs, opts ...pulumi.InvokeOption) VirtualInterfacesResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (VirtualInterfacesResult, error) {
args := v.(VirtualInterfacesArgs)
r, err := VirtualInterfaces(ctx, &args, opts...)
var s VirtualInterfacesResult
if r != nil {
s = *r
}
return s, err
}).(VirtualInterfacesResultOutput)
}
// A collection of arguments for invoking VirtualInterfaces.
type VirtualInterfacesOutputArgs struct {
// The direct connect connection ID that associated with this virtual interface.
DirectConnectConnectionId pulumi.StringPtrInput `pulumi:"directConnectConnectionId"`
// The direct connect gateway ID that associated with this virtual interface.
DirectConnectGatewayId pulumi.StringPtrInput `pulumi:"directConnectGatewayId"`
// A list of IDs.
Ids pulumi.StringArrayInput `pulumi:"ids"`
// The local IP that associated with this virtual interface.
LocalIp pulumi.StringPtrInput `pulumi:"localIp"`
// A Name Regex of Resource.
NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
// File name where to save data source results.
OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
// The peer IP that associated with this virtual interface.
PeerIp pulumi.StringPtrInput `pulumi:"peerIp"`
// The route type of virtual interface.
RouteType pulumi.StringPtrInput `pulumi:"routeType"`
// The filter tag of direct connect virtual interface.
TagFilters VirtualInterfacesTagFilterArrayInput `pulumi:"tagFilters"`
// The name of virtual interface.
VirtualInterfaceName pulumi.StringPtrInput `pulumi:"virtualInterfaceName"`
// The VLAN ID of virtual interface.
VlanId pulumi.IntPtrInput `pulumi:"vlanId"`
}
func (VirtualInterfacesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*VirtualInterfacesArgs)(nil)).Elem()
}
// A collection of values returned by VirtualInterfaces.
type VirtualInterfacesResultOutput struct{ *pulumi.OutputState }
func (VirtualInterfacesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*VirtualInterfacesResult)(nil)).Elem()
}
func (o VirtualInterfacesResultOutput) ToVirtualInterfacesResultOutput() VirtualInterfacesResultOutput {
return o
}
func (o VirtualInterfacesResultOutput) ToVirtualInterfacesResultOutputWithContext(ctx context.Context) VirtualInterfacesResultOutput {
return o
}
// The direct connect connection ID which associated with this virtual interface.
func (o VirtualInterfacesResultOutput) DirectConnectConnectionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.DirectConnectConnectionId }).(pulumi.StringPtrOutput)
}
// The direct connect gateway ID which associated with this virtual interface.
func (o VirtualInterfacesResultOutput) DirectConnectGatewayId() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.DirectConnectGatewayId }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o VirtualInterfacesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v VirtualInterfacesResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o VirtualInterfacesResultOutput) Ids() pulumi.StringArrayOutput {
return o.ApplyT(func(v VirtualInterfacesResult) []string { return v.Ids }).(pulumi.StringArrayOutput)
}
// The local IP that associated with this virtual interface.
func (o VirtualInterfacesResultOutput) LocalIp() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.LocalIp }).(pulumi.StringPtrOutput)
}
func (o VirtualInterfacesResultOutput) NameRegex() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.NameRegex }).(pulumi.StringPtrOutput)
}
func (o VirtualInterfacesResultOutput) OutputFile() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.OutputFile }).(pulumi.StringPtrOutput)
}
// The peer IP that associated with this virtual interface.
func (o VirtualInterfacesResultOutput) PeerIp() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.PeerIp }).(pulumi.StringPtrOutput)
}
// The route type of this virtual interface.
func (o VirtualInterfacesResultOutput) RouteType() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.RouteType }).(pulumi.StringPtrOutput)
}
func (o VirtualInterfacesResultOutput) TagFilters() VirtualInterfacesTagFilterArrayOutput {
return o.ApplyT(func(v VirtualInterfacesResult) []VirtualInterfacesTagFilter { return v.TagFilters }).(VirtualInterfacesTagFilterArrayOutput)
}
// The total count of query.
func (o VirtualInterfacesResultOutput) TotalCount() pulumi.IntOutput {
return o.ApplyT(func(v VirtualInterfacesResult) int { return v.TotalCount }).(pulumi.IntOutput)
}
// The name of virtual interface.
func (o VirtualInterfacesResultOutput) VirtualInterfaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *string { return v.VirtualInterfaceName }).(pulumi.StringPtrOutput)
}
// The collection of query.
func (o VirtualInterfacesResultOutput) VirtualInterfaces() VirtualInterfacesVirtualInterfaceArrayOutput {
return o.ApplyT(func(v VirtualInterfacesResult) []VirtualInterfacesVirtualInterface { return v.VirtualInterfaces }).(VirtualInterfacesVirtualInterfaceArrayOutput)
}
// The VLAN ID of virtual interface.
func (o VirtualInterfacesResultOutput) VlanId() pulumi.IntPtrOutput {
return o.ApplyT(func(v VirtualInterfacesResult) *int { return v.VlanId }).(pulumi.IntPtrOutput)
}
func init() {
pulumi.RegisterOutputType(VirtualInterfacesResultOutput{})
}