/
privateGraphEndpoint.go
182 lines (152 loc) · 8.51 KB
/
privateGraphEndpoint.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
// 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 neptunegraph
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The AWS::NeptuneGraph::PrivateGraphEndpoint resource creates an Amazon NeptuneGraph PrivateGraphEndpoint.
type PrivateGraphEndpoint struct {
pulumi.CustomResourceState
// The auto-generated Graph Id assigned by the service.
GraphIdentifier pulumi.StringOutput `pulumi:"graphIdentifier"`
// PrivateGraphEndpoint resource identifier generated by concatenating the associated GraphIdentifier and VpcId with an underscore separator.
//
// For example, if GraphIdentifier is `g-12a3bcdef4` and VpcId is `vpc-0a12bc34567de8f90`, the generated PrivateGraphEndpointIdentifier will be `g-12a3bcdef4_vpc-0a12bc34567de8f90`
PrivateGraphEndpointIdentifier pulumi.StringOutput `pulumi:"privateGraphEndpointIdentifier"`
// The security group Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
// The subnet Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
SubnetIds pulumi.StringArrayOutput `pulumi:"subnetIds"`
// VPC endpoint that provides a private connection between the Graph and specified VPC.
VpcEndpointId pulumi.StringOutput `pulumi:"vpcEndpointId"`
// The VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
VpcId pulumi.StringOutput `pulumi:"vpcId"`
}
// NewPrivateGraphEndpoint registers a new resource with the given unique name, arguments, and options.
func NewPrivateGraphEndpoint(ctx *pulumi.Context,
name string, args *PrivateGraphEndpointArgs, opts ...pulumi.ResourceOption) (*PrivateGraphEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.GraphIdentifier == nil {
return nil, errors.New("invalid value for required argument 'GraphIdentifier'")
}
if args.VpcId == nil {
return nil, errors.New("invalid value for required argument 'VpcId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"graphIdentifier",
"securityGroupIds[*]",
"subnetIds[*]",
"vpcId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource PrivateGraphEndpoint
err := ctx.RegisterResource("aws-native:neptunegraph:PrivateGraphEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPrivateGraphEndpoint gets an existing PrivateGraphEndpoint 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 GetPrivateGraphEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PrivateGraphEndpointState, opts ...pulumi.ResourceOption) (*PrivateGraphEndpoint, error) {
var resource PrivateGraphEndpoint
err := ctx.ReadResource("aws-native:neptunegraph:PrivateGraphEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PrivateGraphEndpoint resources.
type privateGraphEndpointState struct {
}
type PrivateGraphEndpointState struct {
}
func (PrivateGraphEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*privateGraphEndpointState)(nil)).Elem()
}
type privateGraphEndpointArgs struct {
// The auto-generated Graph Id assigned by the service.
GraphIdentifier string `pulumi:"graphIdentifier"`
// The security group Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// The subnet Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
SubnetIds []string `pulumi:"subnetIds"`
// The VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
VpcId string `pulumi:"vpcId"`
}
// The set of arguments for constructing a PrivateGraphEndpoint resource.
type PrivateGraphEndpointArgs struct {
// The auto-generated Graph Id assigned by the service.
GraphIdentifier pulumi.StringInput
// The security group Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
SecurityGroupIds pulumi.StringArrayInput
// The subnet Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
SubnetIds pulumi.StringArrayInput
// The VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
VpcId pulumi.StringInput
}
func (PrivateGraphEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*privateGraphEndpointArgs)(nil)).Elem()
}
type PrivateGraphEndpointInput interface {
pulumi.Input
ToPrivateGraphEndpointOutput() PrivateGraphEndpointOutput
ToPrivateGraphEndpointOutputWithContext(ctx context.Context) PrivateGraphEndpointOutput
}
func (*PrivateGraphEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**PrivateGraphEndpoint)(nil)).Elem()
}
func (i *PrivateGraphEndpoint) ToPrivateGraphEndpointOutput() PrivateGraphEndpointOutput {
return i.ToPrivateGraphEndpointOutputWithContext(context.Background())
}
func (i *PrivateGraphEndpoint) ToPrivateGraphEndpointOutputWithContext(ctx context.Context) PrivateGraphEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateGraphEndpointOutput)
}
type PrivateGraphEndpointOutput struct{ *pulumi.OutputState }
func (PrivateGraphEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PrivateGraphEndpoint)(nil)).Elem()
}
func (o PrivateGraphEndpointOutput) ToPrivateGraphEndpointOutput() PrivateGraphEndpointOutput {
return o
}
func (o PrivateGraphEndpointOutput) ToPrivateGraphEndpointOutputWithContext(ctx context.Context) PrivateGraphEndpointOutput {
return o
}
// The auto-generated Graph Id assigned by the service.
func (o PrivateGraphEndpointOutput) GraphIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateGraphEndpoint) pulumi.StringOutput { return v.GraphIdentifier }).(pulumi.StringOutput)
}
// PrivateGraphEndpoint resource identifier generated by concatenating the associated GraphIdentifier and VpcId with an underscore separator.
//
// For example, if GraphIdentifier is `g-12a3bcdef4` and VpcId is `vpc-0a12bc34567de8f90`, the generated PrivateGraphEndpointIdentifier will be `g-12a3bcdef4_vpc-0a12bc34567de8f90`
func (o PrivateGraphEndpointOutput) PrivateGraphEndpointIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateGraphEndpoint) pulumi.StringOutput { return v.PrivateGraphEndpointIdentifier }).(pulumi.StringOutput)
}
// The security group Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
func (o PrivateGraphEndpointOutput) SecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *PrivateGraphEndpoint) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
}
// The subnet Ids associated with the VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
func (o PrivateGraphEndpointOutput) SubnetIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *PrivateGraphEndpoint) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput)
}
// VPC endpoint that provides a private connection between the Graph and specified VPC.
func (o PrivateGraphEndpointOutput) VpcEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateGraphEndpoint) pulumi.StringOutput { return v.VpcEndpointId }).(pulumi.StringOutput)
}
// The VPC where you want the private graph endpoint to be created, ie, the graph will be reachable from within the VPC.
func (o PrivateGraphEndpointOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateGraphEndpoint) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PrivateGraphEndpointInput)(nil)).Elem(), &PrivateGraphEndpoint{})
pulumi.RegisterOutputType(PrivateGraphEndpointOutput{})
}