-
Notifications
You must be signed in to change notification settings - Fork 17
/
accelerator.go
193 lines (159 loc) · 7.21 KB
/
accelerator.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
// 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 globalaccelerator
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource Type definition for AWS::GlobalAccelerator::Accelerator
type Accelerator struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) of the accelerator.
AcceleratorArn pulumi.StringOutput `pulumi:"acceleratorArn"`
// The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IPv4 addresses.
DnsName pulumi.StringOutput `pulumi:"dnsName"`
// The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IPv4 and IPv6 addresses.
DualStackDnsName pulumi.StringOutput `pulumi:"dualStackDnsName"`
// Indicates whether an accelerator is enabled. The value is true or false.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// IP Address type.
IpAddressType AcceleratorIpAddressTypePtrOutput `pulumi:"ipAddressType"`
// The IP addresses from BYOIP Prefix pool.
IpAddresses pulumi.StringArrayOutput `pulumi:"ipAddresses"`
// The IPv4 addresses assigned to the accelerator.
Ipv4Addresses pulumi.StringArrayOutput `pulumi:"ipv4Addresses"`
// The IPv6 addresses assigned if the accelerator is dualstack
Ipv6Addresses pulumi.StringArrayOutput `pulumi:"ipv6Addresses"`
// Name of accelerator.
Name pulumi.StringOutput `pulumi:"name"`
Tags aws.TagArrayOutput `pulumi:"tags"`
}
// NewAccelerator registers a new resource with the given unique name, arguments, and options.
func NewAccelerator(ctx *pulumi.Context,
name string, args *AcceleratorArgs, opts ...pulumi.ResourceOption) (*Accelerator, error) {
if args == nil {
args = &AcceleratorArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Accelerator
err := ctx.RegisterResource("aws-native:globalaccelerator:Accelerator", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccelerator gets an existing Accelerator 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 GetAccelerator(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AcceleratorState, opts ...pulumi.ResourceOption) (*Accelerator, error) {
var resource Accelerator
err := ctx.ReadResource("aws-native:globalaccelerator:Accelerator", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Accelerator resources.
type acceleratorState struct {
}
type AcceleratorState struct {
}
func (AcceleratorState) ElementType() reflect.Type {
return reflect.TypeOf((*acceleratorState)(nil)).Elem()
}
type acceleratorArgs struct {
// Indicates whether an accelerator is enabled. The value is true or false.
Enabled *bool `pulumi:"enabled"`
// IP Address type.
IpAddressType *AcceleratorIpAddressType `pulumi:"ipAddressType"`
// The IP addresses from BYOIP Prefix pool.
IpAddresses []string `pulumi:"ipAddresses"`
// Name of accelerator.
Name *string `pulumi:"name"`
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a Accelerator resource.
type AcceleratorArgs struct {
// Indicates whether an accelerator is enabled. The value is true or false.
Enabled pulumi.BoolPtrInput
// IP Address type.
IpAddressType AcceleratorIpAddressTypePtrInput
// The IP addresses from BYOIP Prefix pool.
IpAddresses pulumi.StringArrayInput
// Name of accelerator.
Name pulumi.StringPtrInput
Tags aws.TagArrayInput
}
func (AcceleratorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*acceleratorArgs)(nil)).Elem()
}
type AcceleratorInput interface {
pulumi.Input
ToAcceleratorOutput() AcceleratorOutput
ToAcceleratorOutputWithContext(ctx context.Context) AcceleratorOutput
}
func (*Accelerator) ElementType() reflect.Type {
return reflect.TypeOf((**Accelerator)(nil)).Elem()
}
func (i *Accelerator) ToAcceleratorOutput() AcceleratorOutput {
return i.ToAcceleratorOutputWithContext(context.Background())
}
func (i *Accelerator) ToAcceleratorOutputWithContext(ctx context.Context) AcceleratorOutput {
return pulumi.ToOutputWithContext(ctx, i).(AcceleratorOutput)
}
type AcceleratorOutput struct{ *pulumi.OutputState }
func (AcceleratorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Accelerator)(nil)).Elem()
}
func (o AcceleratorOutput) ToAcceleratorOutput() AcceleratorOutput {
return o
}
func (o AcceleratorOutput) ToAcceleratorOutputWithContext(ctx context.Context) AcceleratorOutput {
return o
}
// The Amazon Resource Name (ARN) of the accelerator.
func (o AcceleratorOutput) AcceleratorArn() pulumi.StringOutput {
return o.ApplyT(func(v *Accelerator) pulumi.StringOutput { return v.AcceleratorArn }).(pulumi.StringOutput)
}
// The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IPv4 addresses.
func (o AcceleratorOutput) DnsName() pulumi.StringOutput {
return o.ApplyT(func(v *Accelerator) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput)
}
// The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IPv4 and IPv6 addresses.
func (o AcceleratorOutput) DualStackDnsName() pulumi.StringOutput {
return o.ApplyT(func(v *Accelerator) pulumi.StringOutput { return v.DualStackDnsName }).(pulumi.StringOutput)
}
// Indicates whether an accelerator is enabled. The value is true or false.
func (o AcceleratorOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Accelerator) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// IP Address type.
func (o AcceleratorOutput) IpAddressType() AcceleratorIpAddressTypePtrOutput {
return o.ApplyT(func(v *Accelerator) AcceleratorIpAddressTypePtrOutput { return v.IpAddressType }).(AcceleratorIpAddressTypePtrOutput)
}
// The IP addresses from BYOIP Prefix pool.
func (o AcceleratorOutput) IpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Accelerator) pulumi.StringArrayOutput { return v.IpAddresses }).(pulumi.StringArrayOutput)
}
// The IPv4 addresses assigned to the accelerator.
func (o AcceleratorOutput) Ipv4Addresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Accelerator) pulumi.StringArrayOutput { return v.Ipv4Addresses }).(pulumi.StringArrayOutput)
}
// The IPv6 addresses assigned if the accelerator is dualstack
func (o AcceleratorOutput) Ipv6Addresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Accelerator) pulumi.StringArrayOutput { return v.Ipv6Addresses }).(pulumi.StringArrayOutput)
}
// Name of accelerator.
func (o AcceleratorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Accelerator) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o AcceleratorOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *Accelerator) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AcceleratorInput)(nil)).Elem(), &Accelerator{})
pulumi.RegisterOutputType(AcceleratorOutput{})
}