/
ipam.go
203 lines (167 loc) · 7.5 KB
/
ipam.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
// 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 ec2
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 Schema of AWS::EC2::IPAM Type
type Ipam struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) of the IPAM.
Arn pulumi.StringOutput `pulumi:"arn"`
// The Id of the default association to the default resource discovery, created with this IPAM.
DefaultResourceDiscoveryAssociationId pulumi.StringOutput `pulumi:"defaultResourceDiscoveryAssociationId"`
// The Id of the default resource discovery, created with this IPAM.
DefaultResourceDiscoveryId pulumi.StringOutput `pulumi:"defaultResourceDiscoveryId"`
Description pulumi.StringPtrOutput `pulumi:"description"`
// Id of the IPAM.
IpamId pulumi.StringOutput `pulumi:"ipamId"`
// The regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring
OperatingRegions IpamOperatingRegionArrayOutput `pulumi:"operatingRegions"`
// The Id of the default scope for publicly routable IP space, created with this IPAM.
PrivateDefaultScopeId pulumi.StringOutput `pulumi:"privateDefaultScopeId"`
// The Id of the default scope for publicly routable IP space, created with this IPAM.
PublicDefaultScopeId pulumi.StringOutput `pulumi:"publicDefaultScopeId"`
// The count of resource discoveries associated with this IPAM.
ResourceDiscoveryAssociationCount pulumi.IntOutput `pulumi:"resourceDiscoveryAssociationCount"`
// The number of scopes that currently exist in this IPAM.
ScopeCount pulumi.IntOutput `pulumi:"scopeCount"`
// An array of key-value pairs to apply to this resource.
Tags aws.TagArrayOutput `pulumi:"tags"`
// The tier of the IPAM.
Tier IpamTierPtrOutput `pulumi:"tier"`
}
// NewIpam registers a new resource with the given unique name, arguments, and options.
func NewIpam(ctx *pulumi.Context,
name string, args *IpamArgs, opts ...pulumi.ResourceOption) (*Ipam, error) {
if args == nil {
args = &IpamArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Ipam
err := ctx.RegisterResource("aws-native:ec2:Ipam", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIpam gets an existing Ipam 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 GetIpam(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IpamState, opts ...pulumi.ResourceOption) (*Ipam, error) {
var resource Ipam
err := ctx.ReadResource("aws-native:ec2:Ipam", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Ipam resources.
type ipamState struct {
}
type IpamState struct {
}
func (IpamState) ElementType() reflect.Type {
return reflect.TypeOf((*ipamState)(nil)).Elem()
}
type ipamArgs struct {
Description *string `pulumi:"description"`
// The regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring
OperatingRegions []IpamOperatingRegion `pulumi:"operatingRegions"`
// An array of key-value pairs to apply to this resource.
Tags []aws.Tag `pulumi:"tags"`
// The tier of the IPAM.
Tier *IpamTier `pulumi:"tier"`
}
// The set of arguments for constructing a Ipam resource.
type IpamArgs struct {
Description pulumi.StringPtrInput
// The regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring
OperatingRegions IpamOperatingRegionArrayInput
// An array of key-value pairs to apply to this resource.
Tags aws.TagArrayInput
// The tier of the IPAM.
Tier IpamTierPtrInput
}
func (IpamArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ipamArgs)(nil)).Elem()
}
type IpamInput interface {
pulumi.Input
ToIpamOutput() IpamOutput
ToIpamOutputWithContext(ctx context.Context) IpamOutput
}
func (*Ipam) ElementType() reflect.Type {
return reflect.TypeOf((**Ipam)(nil)).Elem()
}
func (i *Ipam) ToIpamOutput() IpamOutput {
return i.ToIpamOutputWithContext(context.Background())
}
func (i *Ipam) ToIpamOutputWithContext(ctx context.Context) IpamOutput {
return pulumi.ToOutputWithContext(ctx, i).(IpamOutput)
}
type IpamOutput struct{ *pulumi.OutputState }
func (IpamOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Ipam)(nil)).Elem()
}
func (o IpamOutput) ToIpamOutput() IpamOutput {
return o
}
func (o IpamOutput) ToIpamOutputWithContext(ctx context.Context) IpamOutput {
return o
}
// The Amazon Resource Name (ARN) of the IPAM.
func (o IpamOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *Ipam) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// The Id of the default association to the default resource discovery, created with this IPAM.
func (o IpamOutput) DefaultResourceDiscoveryAssociationId() pulumi.StringOutput {
return o.ApplyT(func(v *Ipam) pulumi.StringOutput { return v.DefaultResourceDiscoveryAssociationId }).(pulumi.StringOutput)
}
// The Id of the default resource discovery, created with this IPAM.
func (o IpamOutput) DefaultResourceDiscoveryId() pulumi.StringOutput {
return o.ApplyT(func(v *Ipam) pulumi.StringOutput { return v.DefaultResourceDiscoveryId }).(pulumi.StringOutput)
}
func (o IpamOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Ipam) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Id of the IPAM.
func (o IpamOutput) IpamId() pulumi.StringOutput {
return o.ApplyT(func(v *Ipam) pulumi.StringOutput { return v.IpamId }).(pulumi.StringOutput)
}
// The regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring
func (o IpamOutput) OperatingRegions() IpamOperatingRegionArrayOutput {
return o.ApplyT(func(v *Ipam) IpamOperatingRegionArrayOutput { return v.OperatingRegions }).(IpamOperatingRegionArrayOutput)
}
// The Id of the default scope for publicly routable IP space, created with this IPAM.
func (o IpamOutput) PrivateDefaultScopeId() pulumi.StringOutput {
return o.ApplyT(func(v *Ipam) pulumi.StringOutput { return v.PrivateDefaultScopeId }).(pulumi.StringOutput)
}
// The Id of the default scope for publicly routable IP space, created with this IPAM.
func (o IpamOutput) PublicDefaultScopeId() pulumi.StringOutput {
return o.ApplyT(func(v *Ipam) pulumi.StringOutput { return v.PublicDefaultScopeId }).(pulumi.StringOutput)
}
// The count of resource discoveries associated with this IPAM.
func (o IpamOutput) ResourceDiscoveryAssociationCount() pulumi.IntOutput {
return o.ApplyT(func(v *Ipam) pulumi.IntOutput { return v.ResourceDiscoveryAssociationCount }).(pulumi.IntOutput)
}
// The number of scopes that currently exist in this IPAM.
func (o IpamOutput) ScopeCount() pulumi.IntOutput {
return o.ApplyT(func(v *Ipam) pulumi.IntOutput { return v.ScopeCount }).(pulumi.IntOutput)
}
// An array of key-value pairs to apply to this resource.
func (o IpamOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *Ipam) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
// The tier of the IPAM.
func (o IpamOutput) Tier() IpamTierPtrOutput {
return o.ApplyT(func(v *Ipam) IpamTierPtrOutput { return v.Tier }).(IpamTierPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IpamInput)(nil)).Elem(), &Ipam{})
pulumi.RegisterOutputType(IpamOutput{})
}