-
Notifications
You must be signed in to change notification settings - Fork 151
/
getVpcEndpointService.go
155 lines (150 loc) · 5.07 KB
/
getVpcEndpointService.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ec2
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The VPC Endpoint Service data source details about a specific service that
// can be specified when creating a VPC endpoint within the region configured in the provider.
//
// ## Example Usage
// ### AWS Service
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "s3"
// opt1 := "Gateway"
// s3, err := ec2.LookupVpcEndpointService(ctx, &ec2.LookupVpcEndpointServiceArgs{
// Service: &opt0,
// ServiceType: &opt1,
// }, nil)
// if err != nil {
// return err
// }
// foo, err := ec2.NewVpc(ctx, "foo", &ec2.VpcArgs{
// CidrBlock: pulumi.String("10.0.0.0/16"),
// })
// if err != nil {
// return err
// }
// _, err = ec2.NewVpcEndpoint(ctx, "ep", &ec2.VpcEndpointArgs{
// VpcId: foo.ID(),
// ServiceName: pulumi.String(s3.ServiceName),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Non-AWS Service
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8"
// _, err := ec2.LookupVpcEndpointService(ctx, &ec2.LookupVpcEndpointServiceArgs{
// ServiceName: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Filter
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ec2.LookupVpcEndpointService(ctx, &ec2.LookupVpcEndpointServiceArgs{
// Filters: []ec2.GetVpcEndpointServiceFilter{
// ec2.GetVpcEndpointServiceFilter{
// Name: "service-name",
// Values: []string{
// "some-service",
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupVpcEndpointService(ctx *pulumi.Context, args *LookupVpcEndpointServiceArgs, opts ...pulumi.InvokeOption) (*LookupVpcEndpointServiceResult, error) {
var rv LookupVpcEndpointServiceResult
err := ctx.Invoke("aws:ec2/getVpcEndpointService:getVpcEndpointService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVpcEndpointService.
type LookupVpcEndpointServiceArgs struct {
// Configuration block(s) for filtering. Detailed below.
Filters []GetVpcEndpointServiceFilter `pulumi:"filters"`
// The common name of an AWS service (e.g. `s3`).
Service *string `pulumi:"service"`
// The service name that is specified when creating a VPC endpoint. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).
ServiceName *string `pulumi:"serviceName"`
// The service type, `Gateway` or `Interface`.
ServiceType *string `pulumi:"serviceType"`
// A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getVpcEndpointService.
type LookupVpcEndpointServiceResult struct {
// Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - `true` or `false`.
AcceptanceRequired bool `pulumi:"acceptanceRequired"`
// The Amazon Resource Name (ARN) of the VPC endpoint service.
Arn string `pulumi:"arn"`
// The Availability Zones in which the service is available.
AvailabilityZones []string `pulumi:"availabilityZones"`
// The DNS names for the service.
BaseEndpointDnsNames []string `pulumi:"baseEndpointDnsNames"`
Filters []GetVpcEndpointServiceFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Whether or not the service manages its VPC endpoints - `true` or `false`.
ManagesVpcEndpoints bool `pulumi:"managesVpcEndpoints"`
// The AWS account ID of the service owner or `amazon`.
Owner string `pulumi:"owner"`
// The private DNS name for the service.
PrivateDnsName string `pulumi:"privateDnsName"`
Service *string `pulumi:"service"`
// The ID of the endpoint service.
ServiceId string `pulumi:"serviceId"`
ServiceName string `pulumi:"serviceName"`
ServiceType string `pulumi:"serviceType"`
// A map of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// Whether or not the service supports endpoint policies - `true` or `false`.
VpcEndpointPolicySupported bool `pulumi:"vpcEndpointPolicySupported"`
}