generated from pulumi/pulumi-tf-provider-boilerplate
/
getVpcGateway.go
163 lines (141 loc) · 5.73 KB
/
getVpcGateway.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
// 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 yandex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information about a Yandex VPC gateway. For more information, see
// [Yandex.Cloud VPC](https://cloud.yandex.com/docs/vpc/concepts/index).
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err = yandex.LookupVpcGateway(ctx, &GetVpcGatewayArgs{
// GatewayId: pulumi.StringRef("my-gateway-id"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// This data source is used to define [VPC Gateways] that can be used by other resources.
func LookupVpcGateway(ctx *pulumi.Context, args *LookupVpcGatewayArgs, opts ...pulumi.InvokeOption) (*LookupVpcGatewayResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv LookupVpcGatewayResult
err := ctx.Invoke("yandex:index/getVpcGateway:getVpcGateway", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVpcGateway.
type LookupVpcGatewayArgs struct {
// Folder that the resource belongs to. If value is omitted, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// ID of the VPC Gateway.
GatewayId *string `pulumi:"gatewayId"`
// Name of the VPC Gateway.
Name *string `pulumi:"name"`
// Shared egress gateway configuration
SharedEgressGateway *GetVpcGatewaySharedEgressGateway `pulumi:"sharedEgressGateway"`
}
// A collection of values returned by getVpcGateway.
type LookupVpcGatewayResult struct {
// Creation timestamp of this VPC Gateway.
CreatedAt string `pulumi:"createdAt"`
// Description of the VPC Gateway.
Description string `pulumi:"description"`
FolderId string `pulumi:"folderId"`
GatewayId string `pulumi:"gatewayId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Labels assigned to this VPC Gateway.
Labels map[string]string `pulumi:"labels"`
Name string `pulumi:"name"`
// Shared egress gateway configuration
SharedEgressGateway *GetVpcGatewaySharedEgressGateway `pulumi:"sharedEgressGateway"`
}
func LookupVpcGatewayOutput(ctx *pulumi.Context, args LookupVpcGatewayOutputArgs, opts ...pulumi.InvokeOption) LookupVpcGatewayResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupVpcGatewayResult, error) {
args := v.(LookupVpcGatewayArgs)
r, err := LookupVpcGateway(ctx, &args, opts...)
var s LookupVpcGatewayResult
if r != nil {
s = *r
}
return s, err
}).(LookupVpcGatewayResultOutput)
}
// A collection of arguments for invoking getVpcGateway.
type LookupVpcGatewayOutputArgs struct {
// Folder that the resource belongs to. If value is omitted, the default provider folder is used.
FolderId pulumi.StringPtrInput `pulumi:"folderId"`
// ID of the VPC Gateway.
GatewayId pulumi.StringPtrInput `pulumi:"gatewayId"`
// Name of the VPC Gateway.
Name pulumi.StringPtrInput `pulumi:"name"`
// Shared egress gateway configuration
SharedEgressGateway GetVpcGatewaySharedEgressGatewayPtrInput `pulumi:"sharedEgressGateway"`
}
func (LookupVpcGatewayOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVpcGatewayArgs)(nil)).Elem()
}
// A collection of values returned by getVpcGateway.
type LookupVpcGatewayResultOutput struct{ *pulumi.OutputState }
func (LookupVpcGatewayResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVpcGatewayResult)(nil)).Elem()
}
func (o LookupVpcGatewayResultOutput) ToLookupVpcGatewayResultOutput() LookupVpcGatewayResultOutput {
return o
}
func (o LookupVpcGatewayResultOutput) ToLookupVpcGatewayResultOutputWithContext(ctx context.Context) LookupVpcGatewayResultOutput {
return o
}
// Creation timestamp of this VPC Gateway.
func (o LookupVpcGatewayResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
// Description of the VPC Gateway.
func (o LookupVpcGatewayResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) string { return v.Description }).(pulumi.StringOutput)
}
func (o LookupVpcGatewayResultOutput) FolderId() pulumi.StringOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) string { return v.FolderId }).(pulumi.StringOutput)
}
func (o LookupVpcGatewayResultOutput) GatewayId() pulumi.StringOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) string { return v.GatewayId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupVpcGatewayResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) string { return v.Id }).(pulumi.StringOutput)
}
// Labels assigned to this VPC Gateway.
func (o LookupVpcGatewayResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
func (o LookupVpcGatewayResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) string { return v.Name }).(pulumi.StringOutput)
}
// Shared egress gateway configuration
func (o LookupVpcGatewayResultOutput) SharedEgressGateway() GetVpcGatewaySharedEgressGatewayPtrOutput {
return o.ApplyT(func(v LookupVpcGatewayResult) *GetVpcGatewaySharedEgressGateway { return v.SharedEgressGateway }).(GetVpcGatewaySharedEgressGatewayPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupVpcGatewayResultOutput{})
}