/
globalPublicDelegatedPrefix.go
274 lines (232 loc) · 19.2 KB
/
globalPublicDelegatedPrefix.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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package alpha
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.
type GlobalPublicDelegatedPrefix struct {
pulumi.CustomResourceState
// The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32.
AllocatablePrefixLength pulumi.IntOutput `pulumi:"allocatablePrefixLength"`
// The version of BYOIP API.
ByoipApiVersion pulumi.StringOutput `pulumi:"byoipApiVersion"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringOutput `pulumi:"creationTimestamp"`
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringOutput `pulumi:"description"`
// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint must be provided in order to update the PublicDelegatedPrefix, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a PublicDelegatedPrefix.
Fingerprint pulumi.StringOutput `pulumi:"fingerprint"`
// The IP address range, in CIDR format, represented by this public delegated prefix.
IpCidrRange pulumi.StringOutput `pulumi:"ipCidrRange"`
// If true, the prefix will be live migrated.
IsLiveMigration pulumi.BoolOutput `pulumi:"isLiveMigration"`
// Type of the resource. Always compute#publicDelegatedPrefix for public delegated prefixes.
Kind pulumi.StringOutput `pulumi:"kind"`
// The public delegated prefix mode for IPv6 only.
Mode pulumi.StringOutput `pulumi:"mode"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringOutput `pulumi:"name"`
// The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
ParentPrefix pulumi.StringOutput `pulumi:"parentPrefix"`
Project pulumi.StringOutput `pulumi:"project"`
// The list of sub public delegated prefixes that exist for this public delegated prefix.
PublicDelegatedSubPrefixs PublicDelegatedPrefixPublicDelegatedSubPrefixResponseArrayOutput `pulumi:"publicDelegatedSubPrefixs"`
// URL of the region where the public delegated prefix resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
Region pulumi.StringOutput `pulumi:"region"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrOutput `pulumi:"requestId"`
// Server-defined URL for the resource.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// Server-defined URL with id for the resource.
SelfLinkWithId pulumi.StringOutput `pulumi:"selfLinkWithId"`
// The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is active. - `DELETING` The public delegated prefix is being deprovsioned.
Status pulumi.StringOutput `pulumi:"status"`
}
// NewGlobalPublicDelegatedPrefix registers a new resource with the given unique name, arguments, and options.
func NewGlobalPublicDelegatedPrefix(ctx *pulumi.Context,
name string, args *GlobalPublicDelegatedPrefixArgs, opts ...pulumi.ResourceOption) (*GlobalPublicDelegatedPrefix, error) {
if args == nil {
args = &GlobalPublicDelegatedPrefixArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource GlobalPublicDelegatedPrefix
err := ctx.RegisterResource("google-native:compute/alpha:GlobalPublicDelegatedPrefix", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGlobalPublicDelegatedPrefix gets an existing GlobalPublicDelegatedPrefix 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 GetGlobalPublicDelegatedPrefix(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GlobalPublicDelegatedPrefixState, opts ...pulumi.ResourceOption) (*GlobalPublicDelegatedPrefix, error) {
var resource GlobalPublicDelegatedPrefix
err := ctx.ReadResource("google-native:compute/alpha:GlobalPublicDelegatedPrefix", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GlobalPublicDelegatedPrefix resources.
type globalPublicDelegatedPrefixState struct {
}
type GlobalPublicDelegatedPrefixState struct {
}
func (GlobalPublicDelegatedPrefixState) ElementType() reflect.Type {
return reflect.TypeOf((*globalPublicDelegatedPrefixState)(nil)).Elem()
}
type globalPublicDelegatedPrefixArgs struct {
// The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32.
AllocatablePrefixLength *int `pulumi:"allocatablePrefixLength"`
// An optional description of this resource. Provide this property when you create the resource.
Description *string `pulumi:"description"`
// The IP address range, in CIDR format, represented by this public delegated prefix.
IpCidrRange *string `pulumi:"ipCidrRange"`
// If true, the prefix will be live migrated.
IsLiveMigration *bool `pulumi:"isLiveMigration"`
// The public delegated prefix mode for IPv6 only.
Mode *GlobalPublicDelegatedPrefixMode `pulumi:"mode"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name *string `pulumi:"name"`
// The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
ParentPrefix *string `pulumi:"parentPrefix"`
Project *string `pulumi:"project"`
// The list of sub public delegated prefixes that exist for this public delegated prefix.
PublicDelegatedSubPrefixs []PublicDelegatedPrefixPublicDelegatedSubPrefix `pulumi:"publicDelegatedSubPrefixs"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId *string `pulumi:"requestId"`
}
// The set of arguments for constructing a GlobalPublicDelegatedPrefix resource.
type GlobalPublicDelegatedPrefixArgs struct {
// The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32.
AllocatablePrefixLength pulumi.IntPtrInput
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringPtrInput
// The IP address range, in CIDR format, represented by this public delegated prefix.
IpCidrRange pulumi.StringPtrInput
// If true, the prefix will be live migrated.
IsLiveMigration pulumi.BoolPtrInput
// The public delegated prefix mode for IPv6 only.
Mode GlobalPublicDelegatedPrefixModePtrInput
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringPtrInput
// The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
ParentPrefix pulumi.StringPtrInput
Project pulumi.StringPtrInput
// The list of sub public delegated prefixes that exist for this public delegated prefix.
PublicDelegatedSubPrefixs PublicDelegatedPrefixPublicDelegatedSubPrefixArrayInput
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrInput
}
func (GlobalPublicDelegatedPrefixArgs) ElementType() reflect.Type {
return reflect.TypeOf((*globalPublicDelegatedPrefixArgs)(nil)).Elem()
}
type GlobalPublicDelegatedPrefixInput interface {
pulumi.Input
ToGlobalPublicDelegatedPrefixOutput() GlobalPublicDelegatedPrefixOutput
ToGlobalPublicDelegatedPrefixOutputWithContext(ctx context.Context) GlobalPublicDelegatedPrefixOutput
}
func (*GlobalPublicDelegatedPrefix) ElementType() reflect.Type {
return reflect.TypeOf((**GlobalPublicDelegatedPrefix)(nil)).Elem()
}
func (i *GlobalPublicDelegatedPrefix) ToGlobalPublicDelegatedPrefixOutput() GlobalPublicDelegatedPrefixOutput {
return i.ToGlobalPublicDelegatedPrefixOutputWithContext(context.Background())
}
func (i *GlobalPublicDelegatedPrefix) ToGlobalPublicDelegatedPrefixOutputWithContext(ctx context.Context) GlobalPublicDelegatedPrefixOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalPublicDelegatedPrefixOutput)
}
type GlobalPublicDelegatedPrefixOutput struct{ *pulumi.OutputState }
func (GlobalPublicDelegatedPrefixOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GlobalPublicDelegatedPrefix)(nil)).Elem()
}
func (o GlobalPublicDelegatedPrefixOutput) ToGlobalPublicDelegatedPrefixOutput() GlobalPublicDelegatedPrefixOutput {
return o
}
func (o GlobalPublicDelegatedPrefixOutput) ToGlobalPublicDelegatedPrefixOutputWithContext(ctx context.Context) GlobalPublicDelegatedPrefixOutput {
return o
}
// The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32.
func (o GlobalPublicDelegatedPrefixOutput) AllocatablePrefixLength() pulumi.IntOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.IntOutput { return v.AllocatablePrefixLength }).(pulumi.IntOutput)
}
// The version of BYOIP API.
func (o GlobalPublicDelegatedPrefixOutput) ByoipApiVersion() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.ByoipApiVersion }).(pulumi.StringOutput)
}
// Creation timestamp in RFC3339 text format.
func (o GlobalPublicDelegatedPrefixOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// An optional description of this resource. Provide this property when you create the resource.
func (o GlobalPublicDelegatedPrefixOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint must be provided in order to update the PublicDelegatedPrefix, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a PublicDelegatedPrefix.
func (o GlobalPublicDelegatedPrefixOutput) Fingerprint() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Fingerprint }).(pulumi.StringOutput)
}
// The IP address range, in CIDR format, represented by this public delegated prefix.
func (o GlobalPublicDelegatedPrefixOutput) IpCidrRange() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.IpCidrRange }).(pulumi.StringOutput)
}
// If true, the prefix will be live migrated.
func (o GlobalPublicDelegatedPrefixOutput) IsLiveMigration() pulumi.BoolOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.BoolOutput { return v.IsLiveMigration }).(pulumi.BoolOutput)
}
// Type of the resource. Always compute#publicDelegatedPrefix for public delegated prefixes.
func (o GlobalPublicDelegatedPrefixOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput)
}
// The public delegated prefix mode for IPv6 only.
func (o GlobalPublicDelegatedPrefixOutput) Mode() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Mode }).(pulumi.StringOutput)
}
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
func (o GlobalPublicDelegatedPrefixOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
func (o GlobalPublicDelegatedPrefixOutput) ParentPrefix() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.ParentPrefix }).(pulumi.StringOutput)
}
func (o GlobalPublicDelegatedPrefixOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The list of sub public delegated prefixes that exist for this public delegated prefix.
func (o GlobalPublicDelegatedPrefixOutput) PublicDelegatedSubPrefixs() PublicDelegatedPrefixPublicDelegatedSubPrefixResponseArrayOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) PublicDelegatedPrefixPublicDelegatedSubPrefixResponseArrayOutput {
return v.PublicDelegatedSubPrefixs
}).(PublicDelegatedPrefixPublicDelegatedSubPrefixResponseArrayOutput)
}
// URL of the region where the public delegated prefix resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
func (o GlobalPublicDelegatedPrefixOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
func (o GlobalPublicDelegatedPrefixOutput) RequestId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringPtrOutput { return v.RequestId }).(pulumi.StringPtrOutput)
}
// Server-defined URL for the resource.
func (o GlobalPublicDelegatedPrefixOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)
}
// Server-defined URL with id for the resource.
func (o GlobalPublicDelegatedPrefixOutput) SelfLinkWithId() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.SelfLinkWithId }).(pulumi.StringOutput)
}
// The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is active. - `DELETING` The public delegated prefix is being deprovsioned.
func (o GlobalPublicDelegatedPrefixOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalPublicDelegatedPrefix) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GlobalPublicDelegatedPrefixInput)(nil)).Elem(), &GlobalPublicDelegatedPrefix{})
pulumi.RegisterOutputType(GlobalPublicDelegatedPrefixOutput{})
}